How to allow users to choose their city, so my application can know the coordinates

I am starting my first open source ASP.NET project in C #. The data that the web application will display is closely related to the geographical coordinates of the cities.

Now I want to implement a user interface where the web application user can select the desired city and submit the form, and behind the scenes I want to get the coordinates of the selected city, so I can do the calculations.

Now I wonder if there are any free services or library that I can implement to get the desired results?

Does Google Maps provide this feature or are there other services with databases of cities around the worlds and their coordinates?

+1
source share
3 answers

Take a look at the Microsoft Bing Maps API.

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

+1
source

If at Google it will be here . When I was charged with this, we simply downloaded some SQL from the Internet. Not sure if it was an exact site , but it was something similar. Delete it in your database and query when necessary.

+1
source

Be very careful with these APIs. Read the Terms carefully, as they have interesting conditions. To weld it - do not try to use 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 old Google code that I made as proof of concept that allowed me to geocode their call from the server JSON

If you are looking for a REAL adventure, you can get TIGER-LINE data from the Census Bureau and do the geocode math yourself. Semaphore has an excellent, cheap product for cleaning TIGER-LINE addresses and statistics. 32-bit version only.

+1
source

Source: https://habr.com/ru/post/1302360/


All Articles