MDriven中的坐标系是什么(浏览器位置)

时间:2018-01-28 19:35:57

标签: mdriven

在MDriven ViewModel变量(vLatitude和vLongitude)中获取的值的坐标系是什么?

1 个答案:

答案 0 :(得分:2)

用于MDriven的Angular html5 Web客户端的坐标是从浏览器中获取的,如下所示:

<script>
  var x = document.getElementById("demo");
       function getLocation() {
        if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(showPosition);
        } else {
            x.innerHTML = "Geolocation is not supported by this browser.";
        }
    }
    function showPosition(position) {
        x.innerHTML = "Latitude: " + position.coords.latitude + 
        "<br>Longitude: " + position.coords.longitude; 
    }
    </script>

坐标是浮点数