Dynamic GMapMarker

Topics: Etc..., Help
Apr 18, 2013 at 9:01 AM
Hi everyone.

Does any one know how to use a dynamic GMapMarker?

Declare var:
GMapMarker myLocation;

Now I'm using this way:

top.Markers.Remove(myLocation);
if( x== 1) {
myLocation = new GMapMarkerGpsFx(MainMap.Position);
myLocation.IsVisible = true;
top.Markers.Add(myLocation);
} else {
myLocation = new GMapMarkerGpsNotFx(MainMap.Position);
myLocation.IsVisible = true;
top.Markers.Add(myLocation);
}

What I want to ask, is if there's anyway to use something like this:
if( x== 1) {
myLocation = new GMapMarkerGpsFx(MainMap.Position);
} else {
myLocation = new GMapMarkerGpsNotFx(MainMap.Position);
}
But this doesn't seem to work.... I don't want to add/remove the myLocation Marker from the top GMapOverlay everytime I change my marker.

King Regards,
mdkneo.
Apr 18, 2013 at 9:26 AM
Hello
I'm not sure that I understand clearly your need but why not just change the location of your MyLocation marker !
Apr 18, 2013 at 9:31 AM
Edited Apr 18, 2013 at 9:40 AM
Hi,

in the demo the location is added to the top in loading form. What I want to do is if the GPS HDOP value is bigger than x I want to use the GmapMarker type 1, otherwise GmapMarker type 2. I want to show to the user if is a good fix or not. Did you understand?

King Regards,
mdkneo.
Apr 18, 2013 at 9:46 AM
Yo have to create these specific GmapMarker once
Then add them once to the layer
After that you just need to change the location and set them visible or not !