开发者

Google Maps panTo AND setCenter

The default panTo only pans to the edge of the screen.

I like setCenter but would like to pan to that point. Any ideas welcome

   map.setCenter(mymarker.getPoint());

   GEvent.trigger(mymarker,"click"); //open the info window
开发者_开发技巧


Fixed Code - First pan to center then open infowindow after 2 seconds

   map.panTo(mymarker.getPosition());

   window.setTimeout(function(){GEvent.trigger(mymarker,"click");},2000);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜