Pergunta

I am currently making a c# program in WPF. I am basing my codes here: http://msdn.microsoft.com/en-us/library/dd221354.aspx . Currently, I am done doing the Geocoding and Reverse Geocoding. I want to know how can I use this to know my current location automatically without inputting my latitude and longitude.

Foi útil?

Solução

Those services only response to input of either an address or coordinate. The service won't be able to tell you where you are without you providing it some information. In a WPF application you will need to make use of the Location Platform in Windows to get access to the users location from their device. The location platform will get the users location using one of several methods such as; GPS, WIFI triangulation, IP address lookup. This will provide you with the coordinate (latitude/longitude) of where you are approximately. If you want the address information then send this coordinate to the Reverse Geocoding Service. You can find information on how to use the Location platform in WPF here: http://www.codeguru.com/csharp/.net/article.php/c16973/Using-the-Windows-7-Sensor-and-Location-Platform-from-C.htm

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top