开发者

when closing google marker go back to center of map

开发者 https://www.devze.com 2023-04-06 05:58 出处:网络
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

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

0

精彩评论

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