Change Zoom Level after loading google maps in webpart?

Sep 17, 2014 at 3:32 PM
Hi,

I'm new and today I installed the google maps webpart. I got it working, with my own criteria, however if the map loads it will automatically load a certain zoom level.
When I change the zoom level in de coding from 6 to 4, nothing happens?

Could anybody let me know how I can set the zoom level, so that after loading the map, the correct and desired zoom level is established?

Thanks!
Marco
Sep 26, 2014 at 3:34 PM
Edited Sep 26, 2014 at 4:55 PM
I got it working, find this line of code:

gmMap.setCenter(gmBounds.getCenter());

add a line below it with this

gmMap.setZoon(8);

Change the 8 to whatever zoom level you want.

Also in the "myOptions" variable you can add a maxZoom or minZoom parameter.