User Manual

Concepts

Mapzania is a powerful mapping-toolkit that can quickly be installed in your .NET applications from NuGet.

Use Mapzania to design maps, add a variety of layer-sources and render and manipulate your maps in the browser using JavaScript.

JavaScript manipulations include:

  • 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

Maps

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.

Layers

Layers (like streets, countries or rivers) can be added to the Map using the built-in MapStyler.

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

Vector layers represent underlying feature data as vectors such as points, line or polygons.

LayerSources

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.

LayerSources are set up independently from Maps or Layers so that they can be reused across multiple maps.

Mapzania supports a variety of layersource types such as Microsoft SQL Spatial, PostGIS, Shapefile, GeoJSON and KML.

LayerSource Providers

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:

Filters

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.

QueryEngine

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.

MapStyler

Map Styler

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

The MapStyler is launched using the GET [ROOT]/STYLER/HTML endpoint and is part of the REST API.