开发者

How to create larger map bounds with a certain padding on Google Maps(v3)?

I want to create map bounds that can cover a little more area than the current viewport开发者_开发百科 using a padding of xx pixel. How to do that on Google maps (v3)?


I suspect you can problem just make the div a bit oversized.. but it's going to create scrollbars.

 #map{ width: 105%, height: 105%}

I would think it makes more sense to make it just fit the viewport with 100% and 100% and it will resize dynamically with the window.


You could take each of the bounds markers, add .001 (or some suitable value) to each lat & lng, then extend the bounds.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜