Concepts
Get Started
- Pre-Requisites
- Install the NuGet Package
- Obtain Leaflet
- Obtain a License
- Initialize Mapzania
- Initialize Endpoints
- Adding a JavaScript Reference
- Add a Map to a Web Page
- Add Data to a Map
- Style a Map
- Further Reading
JavaScript Client
- Introduction
- 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
DotNet Server
Style a Map
Styling a Mapzania map can be done in two ways:
Server-Side Styling
Creating server-side maps and then styling them provides a repository of pre-configured maps that can be used in your project.
To add server-side maps, use the Mapzania Map Styler. This can be accessed using the url http://[your site]/mz/styler/html. The maps that are styled using this method are stored in the Mapzania.config file that is located in the root of the .NET project.
These maps can be activated in client-side JavaScript using their assigned keys. This is shown below for a map with the key of 'LONDON':
window.onload = function () {
var map = new Mapzania.Map("map-div","LONDON");
}
Client-Side Styling
Client-side map styling is done through JavaScript and can be used to re-style existing layers that have been styled server-side (as above) or to style layers that have been added on the fly.
The Mapzania Javascript Library Documentation is a reference guide with all the styling functions that can be performed client-side.
There a a number of examples that show how client-side styling works in the Javascript Examples section of this site.