GPS, Maps, Zip Codes, Addresses and such

    Date: 02/09/05 (PHP Community)    Keywords: php, mysql, sql, web

    I'm working on creating some tools (PHP/MySQL) on one of my websites to help a user tell where things are. Generically, I will probably put this to use in several ways at some point - I just need a bit of help to start with. The budget is $0, so there will be no buying of commercial map data.

    1) User A inputs location data - say, for SSO, it's a store that sells ShadowRun books. This information includes address, city, state, zip, country, phone, etc.
    2) User B is going on a trip to Town Z, and wants to know which of these locations are nearby, so they input address Y and a radius of M miles.
    3) The display shows a map of town Z with a radius of M miles centered around addess Y, and a numer N of locations X are indicated with icons on the map. Along with this, there is a table with a list of N locations and a distance between Y and X for each.
    *) I would also like to be able to create a state-wide or regional default map to show as a default.

    Work In Progress:
    What I have been able to do so far, thanks to some links I found, is to use the old US Census Zip data that is floating around to give an approximate distance based on zip code. This is pretty inaccurate at best, but it does at least give some idea.

    What I think the next step is would be to find a way to get a more accurate lat/long for each address, and use the zip only as a fallback if that method fails. This would increase the accuracy by a significant amount. Any ideas on where/how to implement such a thing would be welcome.

    The big step would be actually mapping into an image. I have looked around quite a bit for information on creating images and maps, but have yet to find anything that I can relate well enough to to work with. I'm looking for an example not too far from this scenario to work from. I magine a basic way to accomplish this task would be to find a state outline map and the lat/long that equate with each corner, then use those as a base to map the icon points... somehow. That would at least be a place to start from, and could probably be done with freely available data. To actually generate M radius maps from address Y would be a bit trickier, I imagine. Any thoughts as to the methods, code, sites, data, or experience in creating such a thing are welcome.



« ftp || stripping HTML formatting »

antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home