Google Maps choose zoom to fit country TIGHTLY in given window

前端 未结 2 909
闹比i
闹比i 2021-01-28 18:28

I am just starting out with the Google Maps API. I have successfully managed to create a map centered on a given country

function create_map (geometry) {
    var         


        
2条回答
  •  佛祖请我去吃肉
    2021-01-28 18:48

    It's not possible. The zoom of a map may only be set to integer-values, but what you're trying to achieve would require a float-value.

    Go to http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html#q%3Dfrance

    The blue rectangle marks the viewport, when you increase the zoom by 1 the blue rectangle will not fit into the container.

提交回复
热议问题