开发者

How to show user current location on google maps detected by WP7 gps

开发者 https://www.devze.com 2023-03-30 22:53 出处:网络
i want to plot/show current location of user on google map, where as location detec开发者_JAVA技巧ted by WP& gps. thanks in advanceGoogle maps API documentation is here.

i want to plot/show current location of user on google map, where as location detec开发者_JAVA技巧ted by WP& gps. thanks in advance


Google maps API documentation is here.

I used the following code in a little (desktop) app of mine, you just need to feed the appropiate set of coordinates.

<script type="text/javascript">
    var map;
    var latlng;
    var lat;
    var lng;
    var zoom;

    function Init() {
        lat = 40.632915;
        lng = -8.68929;
        zoom = 18
        latlng = new google.maps.LatLng(lat, lng);

        var options = {
            zoom: 18,
            center: latlng,
            mapTypeId: google.maps.MapTypeId.SATELLITE
        };

        map = new google.maps.Map(document.getElementById("map_canvas"), options);
   }
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消