public static Dictionary <string, Func <Map> > CreateList() { return(new Dictionary <string, Func <Map> > { ["OpenStreetMap"] = () => OsmSample.CreateMap(), ["Simple Points"] = () => PointsSample.CreateMap(), ["Simple LineStrings"] = () => LineStringSample.CreateMap(), ["Simple Polygons"] = () => PolygonSample.CreateMap(), ["Various"] = () => VariousSample.CreateMap(), ["Labels"] = () => LabelsSample.CreateMap(), ["Center on location"] = () => CenterOnLocationSample.CreateMap(), ["Projected point"] = () => ProjectionSample.CreateMap(), ["Stacked labels"] = () => StackedLabelsSample.CreateMap(), ["Symbols"] = () => SymbolsSample.CreateMap(), ["Info"] = () => InfoLayersSample.CreateMap(), ["MbTiles"] = () => MbTilesSample.CreateMap(), ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(), ["TileSources: WMTS"] = () => WmtsSample.CreateMap(), ["TileSources: Bing maps"] = () => BingSample.CreateMap(), ["TileSources: TMS"] = () => TmsSample.CreateMap(), // todo: find a WMS-C that is stil in service ["TileSources: WMS-C"] = () => WmscSample.CreateMap(), ["TileSources: regular WMS"] = () => TiledWmsSample.CreateMap(), ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(), ["Empty Map"] = () => EmptyMapSample.CreateMap(), ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap(), ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(), }); }
public static Dictionary <string, Func <Map> > CreateList() { return(new Dictionary <string, Func <Map> > { ["OpenStreetMap"] = () => OsmSample.CreateMap(), ["Projected point"] = () => ProjectionSample.CreateMap(), ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(), ["Stacked labels"] = () => StackedLabelsSample.CreateMap(), ["Info"] = () => InfoLayersSample.CreateMap(), ["Tiled request to WMS"] = () => TiledWmsSample.CreateMap(), ["TMS"] = () => TmsSample.CreateMap(), ["Bing maps"] = () => BingSample.CreateMap(), ["WMS-C"] = () => WmscSample.CreateMap(), ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(), ["WMTS"] = () => WmtsSample.CreateMap(), ["Labels"] = () => LabelsSample.CreateMap(), ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(), ["Polygons"] = () => PolygonSample.CreateMap(), ["LineStrings"] = () => LineStringSample.CreateMap(), ["Points"] = () => PointsSample.CreateMap(), ["Various Layers"] = () => VariousSample.CreateMap(), ["Empty Map"] = () => EmptyMapSample.CreateMap(), ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap() }); }
public static ILayer CreateLayer(BoundingBox envelope) { var pointLayer = CreateRandomPointLayer(PointsSample.CreateRandomPointsProvider(envelope)); pointLayer.Name = "Points with feature info"; pointLayer.Style = new StyleCollection { new SymbolStyle { SymbolScale = 1, Fill = new Brush(Color.Cyan), Outline = { Color = Color.White, Width = 2 } } }; return(pointLayer); }
public static MemoryProvider CreateRandomPointsProvider(BoundingBox envelope) { var randomPoints = PointsSample.GenerateRandomPoints(envelope, 100); var features = new Features(); var count = 0; foreach (var point in randomPoints) { var feature = new Feature { Geometry = point }; feature["Label"] = count.ToString(CultureInfo.InvariantCulture); features.Add(feature); count++; } return(new MemoryProvider(features)); }
public override IEnumerable <IFeature> GetFeaturesInView(BoundingBox box, double resolution) { var geometries = PointsSample.GenerateRandomPoints(box, 10).ToList(); var count = 0; var random = _random.Next(geometries.Count); foreach (var geometry in geometries) { if (count != random) // skip a random element to test robustness { var feature = new Feature { Geometry = geometry, ["ID"] = count.ToString(CultureInfo.InvariantCulture) }; yield return(feature); } count++; } }