I can’t achieve zoom on kml map, I am using same solution that is given here:
google-maps-zoom-gets-over-riden-when-using-a-kml-file . You can see my jsfiddle here:
jsfiddle for kml map zoom.
If I remove preserveViewport: true from that example it will load the map with it I am not getting map.
I can’t achieve zoom on kml map, I am using same solution that is
Share
The map needs to be initialized with a center. You are currently not doing that if you set preserveViewport to false; where do you expect the map to be centered?
Your (problematic) code:
Either set the center explicitly or let the KmlLayer do it for you.
From the documentation: