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.
精彩评论