1

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

4

1 回答 1

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>

坐标是浮点数

于 2018-01-29T16:31:32.950 回答