Forum Moderators: coopster

Message Too Old, No Replies

Mapping solutions: Yahoo vs Google vs MS MapPoint

         

mgm_03

2:28 pm on May 11, 2006 (gmt 0)

10+ Year Member



I am an intermediate PHP/MySQL coder. I am looking for opinions from anyone who has integrated dynamic mapping into their website (vs a link to the 3rd party site).

From a development perspective, which API is the most straightforward and fastest to implement? My need is simply to click a link and display a map that provides the location with zoom....don't really care how many pizzarias are within a 5 mile radius. I saw a Yahoo solution by Rasmus but it required PHP5.

LifeinAsia

3:21 pm on May 11, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Google API only requires JavaScript and is free to use even for commercial sites (with some minor restrictions). Google feeds you the map, you code any any icons you want placed (for restaurants, etc.). Two downsides:
1) API does not include geocoding- you have to determine and pass lat/long values yourself (but there are plenty of free solutions available on the Net)
2) API doesn't include directions from point A to point B

mgm_03

8:52 pm on May 11, 2006 (gmt 0)

10+ Year Member



Thanks. I found a way to get the Lat/Lon from Yahoo's API and use it for the Google Map. It was very simple.

Yahoo will let you unserialize the data returned from their API and then it's in the form of an array:

$phpobj = unserialize($response);

$lat = $phpobj['ResultSet']['Result']['Latitude'];
$lon = $phpobj['ResultSet']['Result']['Longitude'];

TomAnthony

1:43 pm on May 14, 2006 (gmt 0)

10+ Year Member



Whilst the Google Maps API doesn't include a built in directions from A->B system, you can replicate their "Get directions to here" approach if you don't mind linking off site.

Just put a link in your bubble with "Get directions to here" and you can take the user to a google maps page, centered on the same location, with the destination address filled out and the cursor in the 'Start address' field.