Page 2 of 3

Google Maps - get lat/lng on click event

Posted: Wed Oct 10, 2012 7:45 pm
by maxkatz

The actual map is wrapped inside a jQuery Mobile object:

code
map.gmap.getCenter().lat();
map.gmap.getCenter().lng();
/code


Google Maps - get lat/lng on click event

Posted: Wed Oct 10, 2012 7:56 pm
by Haim

That was what I was looking for. Max... you're a saint!


Google Maps - get lat/lng on click event

Posted: Thu Oct 11, 2012 6:04 am
by Haim

One last item then... in the request mapping, I will want to use these local storage variables...

So let's say I've created a service for a parse.com call.

  1. I create parameters (header) required for the API call

  2. I have an additional parameter representing the "where" clause. In that where clause, I want to use local storage such as localStorage.

    {"GeoLocation":{"$nearSphere":{"__type":"GeoPoint","latitude":localStorage.getItem('myLatitude'),"longitude":localStorage.getItem('myLongitude')},"$maxDistanceInMiles":3.0}}

    The problem is that the values for localStorage.getItem('myLatitude') and the similar one for longitude were not substituted. How can I do this in the request mapping?

    (otherwise, I get a 400 error code if the numbers aren't substituted in)
    resulting in a 400 error code)


Google Maps - get lat/lng on click event

Posted: Thu Oct 11, 2012 10:27 am
by Maryna Brodina

Hello! This should help http://help.gotiggr.com/documentation... (see Custom JavaScript)


Google Maps - get lat/lng on click event

Posted: Mon Feb 04, 2013 9:35 pm
by James Edwards

I have tried this but the page just locks up.


Google Maps - get lat/lng on click event

Posted: Mon Feb 04, 2013 9:53 pm
by Kateryna Grynko

Hello! Do you have any errors in console?


Google Maps - get lat/lng on click event

Posted: Sun May 26, 2013 6:01 pm
by Bikram Ray

http://help.gotiggr.com/documentation...
link is broken. do you have alternate link foe that?


Google Maps - get lat/lng on click event

Posted: Sun May 26, 2013 8:39 pm
by Illya Stepanov

Hi - I hope this is it :: http://docs.appery.io/tutorials/build...
You can always check our new tutorials here :: http://docs.appery.io/tutorials/
and Docs here :: http://docs.appery.io/documentation/a...


Google Maps - get lat/lng on click event

Posted: Mon Mar 24, 2014 2:18 pm
by Professor English

Hi, I tried this and the initial start up page just locks. I too am trying to store the lat/long of a user long click on the map into a variable. Can anyone offer some help? Thanks!


Google Maps - get lat/lng on click event

Posted: Mon Mar 24, 2014 5:35 pm
by Nikita

Hello Professor,
Are there any errors in console?