I have a WMS layer and an in-memory layer. The inmemory layer has a feature that displays in the center of the map. The location of this feature is updated every second (via a timer). I have followed the sample code to effectuate this (as you can see in the code snippet below). However, the icon representing the feature does not move on the map, even though the coordinates change.
How can I change the code to ensure the feature's updated position is displayed?
Feature gpsFeature = _featureLayer.InternalFeatures[GPS_KEY];PointShape pointShape = (PointShape)gpsFeature.GetShape();this._featureLayer.Open();this._featureLayer.EditTools.BeginTransaction();this._featureLayer.EditTools.Update(pointShape);this._featureLayer.EditTools.CommitTransaction();this._featureLayer.Close();
wpfMap1.Refresh();
gpsFeature.ColumnValues[LABEL_KEY_NAME] = labelText;
pointShape.X = longitude;
pointShape.Y = latitude;
pointShape.Id = GPS_KEY;