google maps - panToBounds don't adjust zoom -


i have following problem, use autocomplete coordinates needed places, has use before autocomplete.getplace().geometry.location map.setcenter() , have manual make maximum zoom. have found, given autocomplete.getplace().geometry.viewport, how can understand, give me 4 x,y points corners, have put inside of map.pantobounds(). dont know how, map slide right viewport, wrong zoom level . before start type in autocomplete, zoom on 19, , after fire action, map slide right location, position map bounds not autocomplete viewport, zoom on center.

var autocomplete = new google.maps.places.autocomplete(my_input,{types:['geocode']}); google.maps.event.addlistener(autocomplete, 'place_changed', function()     {     my_map.pantobounds(this.getplace().geometry.viewport);     }); 

self fixed, dont know map.pantobounds(), needed map.fitbounds()


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -