开发者

How to let users choose their town, so my app can know coordinates

I am starting my first Open Source ASP.NET project in C#. Data that Web app is going to show is in close relation with geographic coordinates of towns.

Now I want to implement user interface where user of web app can choose a desired town and submit form, and behind scene i want to get coordinates of chosen town, so I can make calculations.

Now I wondering is there some free services or library, which can I implement to get wanted results?

Does Google's Maps provide this feature or there is开发者_运维问答 other services with databases of towns around worlds and theirs coordinates?


Take a look at Microsoft's Bing Maps API.

http://msdn.microsoft.com/en-us/library/ff701711.aspx


If Google have it it will be here. When I was tasked with this once we simply downloaded some SQL off the web. Not sure if this was the exact site but it was something similar. Whack it in your database and query when needed.


Be really careful with these APIs. Read the Terms carefully, as they have some interesting stipulations. To boil it down -- don't try using it for commercial purposes. Google states that you should never cache any of your results (which prohibits geocoding addresses and storing them in your database. I have some old Google code that I did as a proof-of-concept that allowed me to geocode from the server-side via their JSON call.

If you're looking for a REAL adventure, you can get the TIGER-LINE data from the Census bureau and do the geocode math yourself. Semaphore has a great, cheap product for cleaning up addresses and looking up TIGER-LINE stats. 32-bit only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜