Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

Center of Map

How do I get the center of map?

I'm using this to get the map in a button click event

var mapCenter = Tiggr('googlemap_11').gmap.getCenter();

The coordinates are always zero.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Center of Map

Hello! Could you clarify - do you need to get marker in the center?

Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

Center of Map

I need to get the center of the map. I dont have a marker in the center at this point. the user will drag the map and then click a button and I want to get the center at that point and record it.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Center of Map

Try this code
codeAppery('googlemapName').gmap.getCenter().lng()
Appery('googlemapName').gmap.getCenter().lat()/code

Jeremy5835883
Posts: 0
Joined: Wed May 08, 2013 12:02 pm

Center of Map

The code runs without error. But I still get 0 for the result

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Center of Map

Could you give us your public app link and tell how to reproduce the problem?

Return to “Issues”