Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Get map center and zoom level.

Hello,

I would like to get the google map center and zoom level after any changes occurs and store them in global variables.
I tried to use the google.maps.event.addListener, with GetZoom() and GetCenter(), but I didn't manage to set it right in Appery.

Can anyone give me a hand with this issue ?

Thanks,
Marcel

Marcel Popescu
Posts: 0
Joined: Sat Feb 08, 2014 5:44 pm

Get map center and zoom level.

Solved meanwhile.

Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Get map center and zoom level.

Hi Marcel,

Thank you for the update.
Let us know if you need any help.

B510
Posts: 0
Joined: Wed Jun 04, 2014 2:17 pm

Get map center and zoom level.

Hello Marcel,

could you please share how to set automatic zoom level?..
thanks a lot in advance

regards

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Get map center and zoom level.

Did you got the answer? Having same issue

B510
Posts: 0
Joined: Wed Jun 04, 2014 2:17 pm

Get map center and zoom level.

Hi Tooba..
not yet .. :)..
please let me know if you got it.. I also will update it .. thanks

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Get map center and zoom level.

I have done it like getting the zoom level of previous map and using that for new map on service success using

var map = Appery("InspectionMap").options.mapElement.gmap('get', 'map');
prevZoom = map.getZoom();

and then on geolocation service success I use
map.setZoom(prevZoom);

It works for me.

Return to “Issues”