I want to find a marker from added markers giving its name or id and highlight it on the map. How can I do that?
the code below shows how I add markers on the map
,
SimpleMarkerOverlay smMarkerOverlay = (SimpleMarkerOverlay)Map1.CustomOverlays["simplevehiclelayer"];
for (int i = 0; i < staticDt.Rows.Count; i++){
string did = staticDt.Rows[i]["DEVICEID"].ToString();
string plate = staticDt.Rows[i]["PLATE"].ToString();
string speed = staticDt.Rows[i]["SPEED"].ToString();
string sDate = staticDt.Rows[i]["DATE"].ToString();
string address = HttpContext.Current.Server.HtmlEncode(staticDt.Rows[i]["LOCATION"].ToString());
int dtype = (int)staticDt.Rows[i]["DTYPE"];
bool status = Convert.ToInt32(staticDt.Rows[i]["STATUS"]) != 0;
double Lat = 0;
double.TryParse(staticDt.Rows[i]["Lat"].ToString(), out Lat);
double Lon = 0;
double.TryParse(staticDt.Rows[i]["Lon"].ToString(), out Lon);
Vertex v = MapGlobals.ConvertCoord(xCoord, Lat, Lon);
Marker vm = new Marker(v.X, v.Y);
string vStatus = String.Format("{0:000}", iStatus);
string vFolder = (dtype > 0) ? dtype.ToString() + "/" : "";
string imagePath = String.Format("images/vTypes/{0}{1}.gif", vFolder, vStatus);
vm.WebImage = new WebImage(imagePath);
vm.Popup = GetPopupStyle(did, plate, speed, address, sDate);
vm.Popup.HasCloseButton = false;
vm.Popup.IsVisible = false;
smMarkerOverlay.Markers.Add(vm);
}
James if you remember webimage zooming topic, this is the case that I want to deploy it. Could you help me for this too?
thanks,
Ayhan