JQuery GPS Directions implementation and PanTo
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/
精彩评论