Hello all,
I'm kinda new in livecode and I've been working in an App using different functionalities. Now I'm using the Google Maps API to show some points in the map (with markers and info windows).
My problem is that I haven't find a way to get information back from the map to use it in livecode.
What I want to do is to allow the user to navigate in the map, choose a location to insert a marker, let him drag that marker if necessary and get the latlng of the position of the marker to save it in the database.
I already have all that functionality in the map, including the latlng of the position, wich can be used with javacript inside the map (I can show an alert in the App with the position of the marker with the javascript alert() function, for example).
In other words, I would like to know if there is a way to use the values of JavaScript variables contained in the HTML file with livecode (I'm using a browser control to show the HTML file with the map)
Another question that comes to my mind during this request is if there is a way to call a livecode handler or function with a JavaScript event.
I'll really appreciate your help.
Daniel
Get information from a Google Map
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Get information from a Google Map
Hi Daniel,
Welcome to the forum
Did this post help you?
http://forums.runrev.com/phpBB2/viewtop ... ipt#p78962
Simon
Welcome to the forum

Did this post help you?
http://forums.runrev.com/phpBB2/viewtop ... ipt#p78962
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Get information from a Google Map
Hello Simon,
Thanks for your answer, I saw that topic some days ago and it helped, but what I need now is something different.
In Bangkok's example he gets information from the map using geocode, the problem is that an URL with the location of the markers set in the parameters is needed.
I need to get the latlng after inserting or draging the marker and that is not reflected in the URL.
Please tell me if I'm wrong.
Daniel
Thanks for your answer, I saw that topic some days ago and it helped, but what I need now is something different.
In Bangkok's example he gets information from the map using geocode, the problem is that an URL with the location of the markers set in the parameters is needed.
I need to get the latlng after inserting or draging the marker and that is not reflected in the URL.
Please tell me if I'm wrong.
Daniel
Re: Get information from a Google Map
Hi Daniel,
I thought that might be the problem.
I do understand the question but don't have an answer.
Just thinking out loud... Any chance you can download again after the pin is set? Could just be to a hidden field?
Simon
I thought that might be the problem.
I do understand the question but don't have an answer.
Just thinking out loud... Any chance you can download again after the pin is set? Could just be to a hidden field?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Get information from a Google Map
It is possible to insert the value that I need in a HTML hidden field, but I don't know how to read it after it.
I could get the file again, but it will be the content of the original HTML file.
Anyway, I would need to call a handler after a JavaScript event and I don't know how to do it either.
Regards,
Daniel
I could get the file again, but it will be the content of the original HTML file.
Anyway, I would need to call a handler after a JavaScript event and I don't know how to do it either.
Regards,
Daniel