Jump to content

Google Maps and php


Andrew R

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.