Hi i am getting Feature by ID but an error occurs as
Parameter name: Parameter Ids should be from 1 to the record number in ShapeFileFeatureSource
This id my Method:
protected void btnSearch_Click(object sender, EventArgs e)
{
FeatureLayer shapeFileLayer = (FeatureLayer)((LayerOverlay)Map1.CustomOverlays[1]).Layers[“ShapeLayer”];
InMemoryFeatureLayer mapShapeLayer = (InMemoryFeatureLayer)((LayerOverlay)Map1.CustomOverlays[2]).Layers[“InMemoryFeatureLayer”];
shapeFileLayer.Open();
Feature feature = shapeFileLayer.FeatureSource.GetFeatureById(txtGisCode.Text,new string[1]{“UID”});
shapeFileLayer.Close();
mapShapeLayer.InternalFeatures.Clear();
mapShapeLayer.InternalFeatures.Add(feature.Id, feature);
((LayerOverlay)Map1.CustomOverlays[2]).Redraw();
}
Here i am attaching shape files
plz help me out asap
Thanks
ShapeFile.zip (82.6 KB)