Jump to content

Archived

This topic is now archived and is closed to further replies.

Andrew R

Google Maps and php

Recommended Posts

I recently got the Google maps API but I’m having a few problems using it with PHP and MYSQL.  What I would like to do is have a list of longitude and latitude points stored in my sql database in a structure below.

[code]CREATE TABLE googlemaps(
  id int(11) NOT NULL auto_increment,
  lat decimal(10,6) NOT NULL default '0.000000',
  lon decimal(10,6) NOT NULL default '0.000000',
  comments varchar(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;[/code]

What I would like the Google maps API do to is pull out the lat and lon and out of the sql database and display that point on the map.  For example I click on a link such as map.php?id=21 and the Google maps will display that position on the map using the latitude and longitude from the database. 

Does anybody have any experience doing something like this or could somebody point me in the right direction?  I have read through most of the API documentation and I can’t find anything related to PHP or MYSQL.

Cheers

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.