Example #1
0
        /// <summary> Initializes a new instance of the <see cref="ShapeLayer"/> class. By default, the spatial reference system is set to "EPSG:4326". </summary>
        /// <param name="name"> Name of the layer. </param>
        public MultiCanvasShapeLayer(string name)
            : base(name)
        {
            SpatialReferenceId = "EPSG:4326";

            CanvasCategories = new[] { CanvasCategory.Content, CanvasCategory.Content + 1 };
            CanvasFactories  = new CanvasFactoryDelegate[] {
                map => map.Name == "Map" ? new ShapeCanvas(map, shapes, SpatialReferenceId, LazyUpdate) : null,
                map => map.Name == "Map" ? new ShapeCanvas(map, topShapes, SpatialReferenceId, LazyUpdate) : null
            };
        }
Example #2
0
 /// <summary> Initializes the base layer factory. A default category for the created canvases is set as well as a
 /// default factory method which creates the new canvas instances. </summary>
 /// <param name="category"> Default category of all base layers. </param>
 /// <param name="factory"> Default factory delegate. </param>
 public void InitializeFactory(CanvasCategory category, CanvasFactoryDelegate factory)
 {
     CanvasCategories = new[] { category };
     CanvasFactories  = new[] { factory };
 }