maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Google Maps - get lat/lng on click event

The actual map is wrapped inside a jQuery Mobile object:

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

Haim
Posts: 0
Joined: Wed Sep 05, 2012 9:15 am

Google Maps - get lat/lng on click event

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

Haim
Posts: 0
Joined: Wed Sep 05, 2012 9:15 am

Google Maps - get lat/lng on click event

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)

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

Google Maps - get lat/lng on click event

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

James Edwards
Posts: 0
Joined: Mon Feb 04, 2013 9:35 pm

Google Maps - get lat/lng on click event

I have tried this but the page just locks up.

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

Google Maps - get lat/lng on click event

Hello! Do you have any errors in console?

Bikram Ray
Posts: 0
Joined: Wed May 22, 2013 5:52 pm

Google Maps - get lat/lng on click event

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google Maps - get lat/lng on click event

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...

Professor English
Posts: 0
Joined: Mon Mar 24, 2014 2:18 pm

Google Maps - get lat/lng on click event

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!

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

Google Maps - get lat/lng on click event

Hello Professor,
Are there any errors in console?

Return to “Issues”