Unable to display current Location information in WP7 device
I am developing application in Silverlight for WP7 device, where used Bing Map to display Location information to user. I wants to display Current Location information when application loaded. But I am not a开发者_Go百科ble to retrieve current location information. Even I downloaded GPS related application from Market Place, that also not display current location information. So How to retrieve Current Location of device in WP7?
MSDN has samples for retireving location and displaying it on a map: http://msdn.microsoft.com/en-us/library/ff431744(v=vs.92).aspx
If you are not able to retrieve the location from any application verify that the device wide location setting has not been turned off as this woudl stop all apps ebign abel to retrieve location information.
You should also check the response you receive from the GeoCoordinateWatcher for errors.
Add below namespace
System.Device.Location
Then add
GeoCoordinate geoCoordiante=new GeoCoordinate();
Add positionchanged event handler
from there from EventArgs you can find
e.Position.Latitude
e.Position.Longitude
it gives the latitude n longitude of current place
Hope it helps you
精彩评论