User Manual
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
Creating a Map Object
The Map Object is the primary object that you will create to perform functionality on the client.
To get started with Mapzania in the browser, the first step is to provide an HTML DIV element.
...
<div id="map-div" style="position:absolute;top:10px;left:10px;bottom:40px;right:10px;"></div>
...
Next, to link a map to a HTML DIV object on the client and to choose which map (from the server) will be rendered, a JavaScript Map object is created like this:
window.onload = function () {
var map = new Mapzania.Map("map-div","LONDON", function(){
//After map has loaded do stuff here
});
}
NOTE: The "LONDON" parameter is the name of the map (configured using MapStyler) that should be displayed in the DIV.
The following interactive example shows this in action: