I selected one street name from Combobox, then proper street is coming to the winform map(ie. SelectedPOILayer.FeatureSource.GetBoundingBoxById(POI.SelectedValue.ToString());. I need Selected Street Name should be highlighted in the Map using Marker and how to get latitude and longitude also.
private void POI_SelectedIndexChanged(object sender, EventArgs e)
{
if (POI.SelectedValue.ToString() == "System.Data.DataRowView")
{
return;
}
if (POI.SelectedValue.ToString() == "-1" || POI.SelectedValue == null)
{
return;
}
ShapeFileFeatureLayer SelectedPOILayer = new ShapeFileFeatureLayer(@"C:\Program Files\ThinkGeo\Map Suite Desktop Evaluation Edition 5.0\Samples\SampleData\Data\RIYADH_POI.shp");
SelectedPOILayer.Open();
winformsMap2.CurrentExtent = SelectedPOILayer.FeatureSource.GetBoundingBoxById(POI.SelectedValue.ToString());
winformsMap2.CurrentExtent.ScaleUp(300);
winformsMap2.MapClick += new EventHandler<MapClickWinformsMapEventArgs>(winformsMap2_MapClick);
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("SelectedPOILayer", SelectedPOILayer);
winformsMap2.Overlays.Add(staticOverlay);
SelectedPOILayer.Close();
winformsMap2.Refresh();
}