Hello,
I am using the following to create points on a map. How do you select points, save them in a list (dropdownlist ect). For example, I would like to create a group called "Colorado". Then add the features (Aspen, Vail, Brecenridge).
Thanks, Steven
public void CreateShapeLayersLocalData()
{
CreateShapLayer("ShapeLayerAspen", "38.929237", "-119.984347", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerWilmotMtn", "42.512778", "-88.181944", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerVail", "39.635757", "-106.362984", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerBreckenridge", "39.486445", "-106.043516", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerLakeTahoe", "38.929237", "-119.984347", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerParkCity", "40.659306", "-111.499828", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerSnowBird", "40.617147", "-111.820361", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
CreateShapLayer("ShapeLayerSolitude", "38.373038", "-110.714039", 10, PointSymbolType.Circle, GeoColor.StandardColors.Blue);
LoopThroughShapes();
}
protected void CreateShapLayer(string cellName, string cellLat, string cellLong, float cellSize, PointSymbolType symbolType, GeoColor symbolColor)
{
InMemoryFeatureLayer addShapeLayer = new InMemoryFeatureLayer();
addShapeLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimplePointStyle(symbolType, symbolColor, cellSize);
addShapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.DynamicOverlay.Layers.Add(cellName, addShapeLayer);
Feature pointFeature = new Feature
(new PointShape(
double.Parse(cellLong, CultureInfo.InvariantCulture),
double.Parse(cellLat, CultureInfo.InvariantCulture)));
addShapeLayer.InternalFeatures.Add(pointFeature.Id, pointFeature);
Map1.DynamicOverlay.Redraw();
}