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

萝らか妹 提交于 2019-12-24 17:06:17

问题


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?


回答1:


Take a look at Microsoft's Bing Maps API.

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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/3708465/how-to-let-users-choose-their-town-so-my-app-can-know-coordinates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!