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
Displaying Layers
The Layer Object provides a number of methods for setting the layer display namely:
show/hide
The show and hide methods change the visibility of the layer.
window.onload = function () {
var map = new Mapzania.Map("map-div", "LONDON", function () {
map.usingLayer("SIGHTS")
.hide();
map.usingLayer("RAILWAY")
.show();
});
};
update
The update method will redraw the layer once a number of changes have been made to the layer.
window.onload = function () {
var map = new Mapzania.Map("map-div", "LONDON", function () {
map.usingNewLayer("MY_LAYER")
.addFeatureCollection(features)
.style({ fillColor: "#000000" })
.update();
});
};
The following interactive example shows this in action: