Notes from Spain and Spanish Forum Learn REAL Spanish now!  

Go Back   Notes from Spain and Spanish Forum > The Rastro > Geek's Corner

Notices

Reply
 
Thread Tools Display Modes
Old 22nd June 2008, 11:57 PM   #21
gastephen
..es que yo no estoy loco
 
gastephen's Avatar
 
Join Date: Mar 2007
Location: Gales
Posts: 1,932
Default

Quote:
Originally Posted by ValenciaSon View Post
Habeis visto o leido esto?
Me gustó este enlace en el artículo. Un poco siniestro, ¿no? Agujeros negros al fin de la calle, y todo eso...
gastephen is offline   Reply With Quote
Old 4th July 2008, 08:31 PM   #22
gastephen
..es que yo no estoy loco
 
gastephen's Avatar
 
Join Date: Mar 2007
Location: Gales
Posts: 1,932
Default

Quote:
Originally Posted by MrMark View Post
Thanks for the feedback all. I've been able to calculate distances between different places I've recorded on my mysql database. So long as I have the longitude and latitude values I can use the trig functions available in mysql to calculate the distance (either in miles or kilometres)...
Hi MrMark - it's been a while since you were posting on this topic, but I thought you might be interested - if you don't already know, that is - about the functions available in the Google Maps API.

To evaluate as-the-crow-flies distances from one location to another you can use the distanceFrom() method of the GLatLng class.

However, something that I have been using recently and that is more useful for certain applications is the GDirections class. You can use its asynchronous load() method with a query involving either textual location descriptions or lat/long coordinates. This will return route information, including the distance by road between two points.

I've recently written a demo prototype dealer locator based on this. This expects a UK postcode as input, and will rank a number of fixed sites in order of road distance. You can also get directions and view the suggested route on the map.

BTW, there is documentation about the API available here.

Cheers, G.
gastephen is offline   Reply With Quote
Old 5th July 2008, 10:35 PM   #23
MrMark
Convert to vinos
 
MrMark's Avatar
 
Join Date: Oct 2007
Location: London
Posts: 317
Default

Good info there, thx Gastephen. I'm afraid I don't have much time to follow this at the moment, as I've just started a new contract, but I hope to get back to this at some point.
MrMark is offline   Reply With Quote
Reply

Bookmarks
Learn REAL Spanish now!

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.