|
|
||
|---|---|---|
| .. | ||
| App.xaml | ||
| App.xaml.cs | ||
| AssemblyInfo.cs | ||
| Geo.Map.Rendering.csproj | ||
| MainWindow.xaml | ||
| MainWindow.xaml.cs | ||
| ProjectInfo.cs | ||
| ProjectPresenter.cs | ||
| ReadMe-Ru.md | ||
| ReadMe.md | ||
ReadMe.md
Map Rendering
The code performs the following actions:
-
It determines an available file name by appending a number to a base file name until a file with that name does not exist.
-
It creates a collection of different geometries, including a point, a line, and a polygon.
-
It defines colors for each geometry.
-
It creates an in-memory layer to map each geometry with its respective color. The layer has an attribute named "Color" of type Integer.
-
It loops through the geometries and creates a feature for each geometry. The feature is assigned the corresponding color value and geometry, and then added to the layer.
-
It creates a new map instance with a specified size and padding.
-
It sets up different symbolizers (pointSymbolizer, lineSymbolizer, and polygonSymbolizer) to configure the rendering appearance based on the "Color" attribute value of each feature.
-
It adds the layer to the map, along with the symbolizers, to define how each geometry should be represented.
-
It renders the map to a file with the available file name and specified file extension.
-
It returns the name of the rendered file.
In summary, the code creates a map with different geometries and their associated colors. It renders the map to an image file and returns the file name. The code essentially renders a collection of geometries with custom colors to an image using the Aspose.Gis library.