when closing google marker go back to center of map
I have a map which opens multiple markers then when you click on one of the markers a street view of that location opens up. What Im trying to do is when you开发者_如何学运维 close the marker have it re-center the map
You can always get the center of a map (getCenter()
), so you will know the lat/long before you open a Street View image. There are then setCenter()
and panTo()
methods in the API: http://code.google.com/apis/maps/documentation/javascript/reference.html#Map
精彩评论