> Is there a way to make that a clickable link next to the map to center
> and focus on different locations?
Of course ; you wrap it in a function
Look at what you have now
function focusMap(lat,lon,zoom) {
var latlng = new google.maps.LatLng(lat, lon);
That's good, keep that.
Now put in the new map methods suggested by Larry
map.setCenter( latlng : latlng) ;
map.setZoom( zoom : zoom) ;
That's it, so finish this function off and don't let it run on into
building a new map
}
Now you'll have to repair your intialize() function, making sure that
is where you set up the initial map options and create the map etc.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.