c# - Tracking location in realtime in Windows phone 8.1 -


Sorry if this is a dumb question, then I'm beginning to develop Windows Phone 8.1. I am using MapControl to display my current location on the map, but as I move my position, it does not automatically update in realtime unless I Do not click on a button and restart the pushpin status that was previously created. Is this a better way, where the user wants to see his current location every time without doing this without pressing the button.

  Private async Task Set Location () {try {var gl = new geolocator () {desired accuracy = position accuracy High}; Geoption Location = Waiting for Glett Getgeopation Async (TimespainMarmines (5), Timespain. FramesConds (5)); Var pin = new map () {location = location. Coordination Page, title = "you are here", normalized endpoint = new point () {X = 0, Y = 0},}; MyMapView.MapElements.Add (pin); Wait for MyMapView.TrySetViewAsync (location.Coordinate.Point, 20); } Hold {myMapView.Center = new Geopoint (App.centerPin); MyMapView.ZoomLevel = 20; Debug. Wrightite ("no GPS found"); } App.centerPin = myMapView.Center.Position; }  

Thanks in advance!

Instead of running a timer, the voting, handle the event. It will change the situation every time and it will be much more efficient.

You can set up the property, so it will only set a fire when the user has set a distance and the user can not do anything at the same place. The threshold you choose will probably depend on how far your map has zoomed.


Comments

Popular posts from this blog

graphviz - size of node with shape=circle -

android - TCP sending with Unity -

properties - C#: How to set default value for a property in a partial class? -