Hello,
I am using the following to get the polygon description: GetWellKnownText(). Then I save the string to a datable. My question is once I retrieve the polygon string, how do I create a dynamic layer (InMemoryFeatureLayer drawZoneLayer ) that represents that polygon?
InMemoryFeatureLayer drawZoneLayer = (InMemoryFeatureLayer)Map1.DynamicOverlay.Layers["ZoneLayer"];
drawZoneLayer.InternalFeatures.Clear();
foreach(Feature features in Map1.EditOverlay.Features)
{
if(!drawZoneLayer.InternalFeatures.Contains(features.Id))
{
this._hdnPolygonString.Value = features.GetWellKnownText().ToString();
}
}
protected void LoadPolygon()
{
ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(this._hdnPolygonString.Value);
InMemoryFeatureLayer drawZoneLayer = (InMemoryFeatureLayer)Map1.DynamicOverlay.Layers["ZoneLayer"];
// Load Polygon description here.
Map1.DynamicOverlay.Redraw();
}
Thanks, Steven