Jump to content


Google Maps and php

  • Please log in to reply
No replies to this topic

#1 Andrew R

Andrew R
  • Members
  • PipPipPip
  • Advanced Member
  • 158 posts
  • LocationIreland

Posted 23 September 2006 - 07:49 PM

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.

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 '',

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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users