Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Google/Yahoo Maps with geocoding

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
US
I have search for hours yesterday trying to find an example where i do the following in ASP:

I have 10-20 records i pull from a DB, i need to find a server side script to geocode those addresses, then show all of those points on a google/yahoo map with the text box description hover.

I have found several tutorials about putting markers and such, but i can't find any that includes the code so i can do it myself. I like this example: and how it shows the points with the description box, but i need to dynamically provide addresses from my own website.

Any ideas?
 
The code to determine the Latitude and Longitude for a given address would depend on your database of addresses and coordinates.

According to the page you linked, one source of this data is TIGER from the US Census Bureau. They don't seem to feel all that confident in the quality of their data:
The TIGER Map Service was built in 1995 as a proof of concept to see what it took to build a basic Web mapping application. It remains on our web site because there are people who still find it useful in spite of it's limitations. It was never intended to be a general purpose mapping application to fill every mapping need.

On the plus side, it appears to be free:



Anyway, back to the batchgeocode page... they say they don't use TIGER bur instead:
The Yahoo! Geocoding API which this site uses is based on uses a much more powerful commercial street dataset, one well known as an industry standards for transportation data.

OK, so Yahoo is hosting the database of addresses mapped to latitude/longitude. Something else down lower on the page leads me to believe that the Yahoo service is free but limitted to 5000 queries per day.

So, if you have less than 5000 per day you might just use the server-safe version of xmlhttp in your ASP so that your web server asks their web server for the data.

If you have a fixed set of addresses in a database then you might just use the batchgeocode page to get the coordinates and then save them in your own database.
 
There is another difference between Tiger and other geocoding services. The Tiger data is stored in the NAD83 Datum whereas most other services use WGS84. Most commercial GPS devices, for example, default to WGS84.

Most of the time, the difference is about 100 feet. Depending on your accuracy, this may or may not make a difference.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top