开发者

JQuery GPS Directions implementation and PanTo

开发者 https://www.devze.com 2023-03-09 02:09 出处:网络
I have integrated JQuery GPS with my own XML implementation of google directions. I want it so that on c开发者_高级运维lick of a direction between the start and finish items the panTo() function initi

I have integrated JQuery GPS with my own XML implementation of google directions. I want it so that on c开发者_高级运维lick of a direction between the start and finish items the panTo() function initiates and scrolls the map gently to the new location.

It's this bit I cannot get working. Try it out and see if you can work it out. My attempt was this.

function movemap(latlong) {
     var latlng = new google.maps.LatLng(latlong);
    var myOptions = {
      zoom: 8,
      center: latlng
    };
    var map = new google.maps.Map(document.getElementById("map"),
        myOptions);
}

the onclick function of each item has the exact longitude and latitude.

see here http://www.golfbrowser.com/courses/wentworth-east/

0

精彩评论

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