Link to home
Start Free TrialLog in
Avatar of tektician
tektician

asked on

Getting latitude and longitude from an address/postal code string

I have a database with postal code and address fields in a user table.  I want to plot these into a Virtual Earth Map control in Visual Studio but it seems like I can only give it a longitude/latitude as the parameters.

This table grows dynamically so I can't statically plot all the long/lat data myself in the table.

Is there a way that I can programatically (C#) get the long/lat from just a postal/zip code or address string before creating the markers on the maps?
Avatar of BToson
BToson
Flag of United Kingdom of Great Britain and Northern Ireland image

If the Virtual Earth control has no post code lookup facility then you will have to get the information from an external database.

I know when you run an address/post code search on Live Maps it refers to the location by latitude and longitude in the "cp" query string variable.when you click on share.
There may be a way of doing this programatically in order to get the information you require.
Avatar of tektician
tektician

ASKER

Yea I have been looking for an external service.

I'm making a request to geocoder.ca for now.

It seems to be working with the exception that the look ups are a little inaccurate sometimes.
ASKER CERTIFIED SOLUTION
Avatar of tektician
tektician

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial