Page 1 of 1

Center of Map

Posted: Tue Jun 11, 2013 3:16 pm
by Jeremy5835883

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.


Center of Map

Posted: Tue Jun 11, 2013 3:26 pm
by Maryna Brodina

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


Center of Map

Posted: Tue Jun 11, 2013 3:29 pm
by Jeremy5835883

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.


Center of Map

Posted: Tue Jun 11, 2013 3:39 pm
by Maryna Brodina

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


Center of Map

Posted: Tue Jun 11, 2013 3:50 pm
by Jeremy5835883

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


Center of Map

Posted: Tue Jun 11, 2013 4:37 pm
by Maryna Brodina

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