I want to change the position of map marker with my position but don't work i try like this:
How can i do? thx
_locationManager.LocationsUpdated += (o, e) => {
if(e.Locations != null &&
e.Locations.Length > 0)
{
if(PositionMarker != null)
{
//
PositionMarker.Location = new GeoCoordinate(e.Locations[0].Coordinate.Latitude,
e.Locations[0].Coordinate.Longitude+0.0001);
//i try like this but don't works
_mapView.RemoveMarker(PositionMarker);
_mapView.AddMarker(PositionMarker);
@valentinoMalloggia Probably you need to also do this on the UI-thread. Should work as you are doing it. Also setting marker.Location should also update it.
I want to change the position of map marker with my position but don't work i try like this: How can i do? thx _locationManager.LocationsUpdated += (o, e) => { if(e.Locations != null && e.Locations.Length > 0) { if(PositionMarker != null) { // PositionMarker.Location = new GeoCoordinate(e.Locations[0].Coordinate.Latitude, e.Locations[0].Coordinate.Longitude+0.0001); //i try like this but don't works _mapView.RemoveMarker(PositionMarker); _mapView.AddMarker(PositionMarker);