LiveCode & Google maps
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
LiveCode & Google maps
Could some please point me in the right direction (no pun intended !)
I would like to use the browser object in a stack to display a google map… that I can do. I would like to be able to choose a postcode or the name of a town or village from a list in a field in the stack to place the two markers, showing the start and finish location, get the direction drawn on the google map and the total distance put into another field in the stack...
If someone could point me in the the right direction (no pun intended !) of how to go about doing this from within LiveCode… it would be appreciated.
Dixie
I would like to use the browser object in a stack to display a google map… that I can do. I would like to be able to choose a postcode or the name of a town or village from a list in a field in the stack to place the two markers, showing the start and finish location, get the direction drawn on the google map and the total distance put into another field in the stack...
If someone could point me in the the right direction (no pun intended !) of how to go about doing this from within LiveCode… it would be appreciated.
Dixie
Re: LiveCode & Google maps
Hi,
Do you have already found out how to do this? Can you help me as well? I am looking for something similer.
Do you have already found out how to do this? Can you help me as well? I am looking for something similer.
Re: LiveCode & Google maps
Hi Dixie,
The asiest way to do this to to access the Google Maps API
Go to this example page then look at the source, it should be easy to post and receive values with LiveCode using this method.
http://code.google.com/apis/maps/docume ... panel.html
More examples here:
http://code.google.com/apis/maps/docume ... index.html
Let us know how you get on.
The asiest way to do this to to access the Google Maps API
Go to this example page then look at the source, it should be easy to post and receive values with LiveCode using this method.
http://code.google.com/apis/maps/docume ... panel.html
More examples here:
http://code.google.com/apis/maps/docume ... index.html
Let us know how you get on.
Andy .... LC CLASSIC ROCKS!
Re: LiveCode & Google maps
mtimmerm...
In this example stack that is attached, the location always opens centered on Wells in the UK as that is where I live, but you can change the lat/lng in the .html file to centre the map wherever you wish... When you enter a start/Destination location, also include the country as I have not done any region biasing... eg Wells,UK or Amiens,FR. AndyP is quite correct, you should look at the Google API documentation.
(Andy - getting liveCode and javaScript to play nicely was actually a little trying !)
hope it helps...
Dixie
In this example stack that is attached, the location always opens centered on Wells in the UK as that is where I live, but you can change the lat/lng in the .html file to centre the map wherever you wish... When you enter a start/Destination location, also include the country as I have not done any region biasing... eg Wells,UK or Amiens,FR. AndyP is quite correct, you should look at the Google API documentation.
(Andy - getting liveCode and javaScript to play nicely was actually a little trying !)
hope it helps...
Dixie
- Attachments
-
- GoogleMapExample.zip
- (10.78 KiB) Downloaded 1035 times
Re: LiveCode & Google maps
Hi Dixie,
Great example. I was in the process of putting one together but you beat me to the punch!
Great example. I was in the process of putting one together but you beat me to the punch!
Andy .... LC CLASSIC ROCKS!
Re: LiveCode & Google maps
this helps indeed! Thanks a lot!Dixie wrote:In this example stack that is attached, the location always opens centered on Wells in the UK as that is where I live, but you can change the lat/lng in the .html file to centre the map wherever you wish... When you enter a start/Destination location, also include the country as I have not done any region biasing... eg Wells,UK or Amiens,FR. AndyP is quite correct, you should look at the Google API documentation.
hope it helps...