Jump to content

looking for a latitude and longitude script..


co.ador

Recommended Posts

What would be the best approach to build an latitude and longitude script.

 

I am using the following table structure

CREATE TABLE IF NOT EXISTS `zip_code` (

  `id` int(1) NOT NULL,

  `zip` varchar(5) NOT NULL,

  `state` char(2) NOT NULL,

  `latitude` varchar(10) NOT NULL,

  `longitude` varchar(10) NOT NULL,

  `city` varchar(50) DEFAULT NULL,

  `full_state` varchar(50) DEFAULT NULL,

 

  PRIMARY KEY (`id`),

  UNIQUE KEY `zip` (`zip`)

) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5837 ;

 

--

to look for items within certain mileage range from a zip code.

 

well, that narrows it down.

 

how do you plan on displaying the results?  where are you getting these "items"?  are you incorporating a mapping service such as google, yahoo, etc.?  do you already have the lat's and long's, or do you need to do reverse geocoding to retrieve those specs?

 

it's almost as though you're trying to give the least amount of information possible.

don't take me wrong, I don't have the minimal idea of what is needed to develop this topic in specific. as you guys request I get to formulate what I have in mind.

 

I have been comparing the latitude and longitudes of Google with the database I have and the numbers are different, Is that possible to use the ones from google? I have a database populated in php myadmin even though it sounds like is old.

 

For your first question don't have any idea of what you mean? i have a form, input a zip code that form action takes me to page2.php then in page2.php all the items are displayed within certain mileage range from a zip code entered.

 

As for your second question I am getting those item from a database table, that databse uses many-to-many relationship. those tables usin many-to-many are zip-codes, items, zip-codes-to-items, etc. as I said I plan to look items within an specific milage range from a zip code specified by the user.

 

don't know if more information is needed

 

Excuse me is just that I don't have any idea about this topic, therefor don't have the exact questions.

Archived

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

×
×
  • 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.