Get information from a Google Map
Posted: Fri Aug 02, 2013 1:51 am
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
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