- Install the NuGet Package
- Obtain Leaflet
- Obtain a License
- Initialize Mapzania
- Initialize Endpoints
- Add a Map to a Web Page
- Add Data to a Map
- Style a Map
- Further Reading
- Creating a Map Object
- Customize the Map Toolbar
- Map Events
- Mouse and Drawing Behaviour
- Map Extents
- Refresh/Reset the Map
- Working with Layers
- Displaying Layers
- Working with Layer Data
- Styling Layers
- Transforming Layers
- Working with Features
- Displaying Features
- Styling Features
- Working with the QueryEngine
Mapzania is a powerful mapping-toolkit that can quickly be installed in your .NET applications from NuGet.
- On-the-fly styling options
- Filters that adapt the way you view your maps.
- Queries that allow you to extract information from map layers as easily as from a database
Mapzania allows you to design as many different maps as you like in each of your .NET projects.
Maps are created and styled using the MapStyler, which makes it easy to:
- Define the initial bounding box of the map
- Add layers to the map and set their visibility
- Style layers using colors, line thicknesses, line styles, marker styles, etc.
- Label map elements such as points lines and polygons.
Mapzania support the following types of layers:
Tiled Raster Layers
Tiled Raster layers consist of tiles of image files (such as PNG, JPG or GIF) and generally form the background of a map.
Vector layers represent underlying feature data as vectors such as points, line or polygons.
LayerSources are data-connections to items such as database tables, files or urls that contain spatial data that can be represented on a map Layer.
Mapzania supports a variety of layersource types such as Microsoft SQL Spatial, PostGIS, Shapefile, GeoJSON and KML.
LayerSource Providers are connections to a group of LayerSource objects.
Typically, these providers are either folders of file-based LayerSources or a database of table-based LayerSources.
By default, Mapzania adds three file-based LayerSource providers that point to the App_Data/Mapzania_Data folder of your project. These providers are:
- Shapefile LayerSource Provider
- GeoJSON LayerSource Provider
- KML LayerSource Provider
This means that if you place a .shp, .geojson or .kml file in the the App_Data/Mapzania_Data folder of your project, it will be registered as a LayerSource when Mapzania starts up.
Additionally, Mapzania includes the following providers:
- Microsoft SQL Spatial database (see Adding MSSQL Spatial LayerSources)
- PostGIS database (see Adding PosGIS LayerSources)
Once a Map has been configured and rendered on a web page, filters can be applied to layers to change the way the map data is returned from the server.
Examples of these filters include:
- Buffering (map features are expanded or shrunk)
- Converting to centroids (map features such as polygons or lines are converted a single point at their centroids).
- Filtering by text (a text statement is used to filter features based on their attribute values)
- Filtering or clipping by geometry (map features that are returned are constrained by other features)
Filters can also be used to with the Mapzania QueryEngine.
See the Transforming Layers section for more information on filtering.
The Mapzania QueryEngine provides an entry point for interacting with spatial data without renderering it graphically in the browser.
It allows the user to fetch data, manipulate and filter that data and then decide where that data can be used.
See the Working with the QueryEngine section for more information on using the QueryEngine.
The Mapzania MapStyler is a user-friendly way to create, configure and style your maps by performing function such as:
- changing the background color of your map
- changing the starting bounds of your map
- adding tiled raster layers to use as backgrounds
- adding vector layers to your map using existing layer-sources
- setting up styles on vector layers
- setting up labels