Examples
basics
filtering
- text filter
- bounding box filter
- nearest filter
- feature collection clipped
- feature collection filter
- convert to centroids
- buffer polygons
drawing
styling
querying
extended toolbar
This example loads a map of London using the "LONDON" key.
The "LONDON" map was created using the Mapzania MapStyler.
See www.mapzania.com/manual/concepts-mapstyler for more details on how to use the styler.
Also see www.mapzania.com/jsapi/map-object for more details on how to create a Mapzania.Map object.
The Mapzania.Map object is instantiated with additional parameters to create an extended toolbar.
See www.mapzania.com/jsapi/map-object-options for toolbar setup options.
window.onload = function () {
var map = new Mapzania.Map("map-div", "LONDON", {
toolbar: {
layout: [
"ZoomIn",
"ZoomOut",
"Reset",
"Pan",
"DrawPoint",
"DrawLine"
]
}
});
};
#map-div {
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
}
#toolbar-div {
position: absolute;
top: 5px;
right: 5px;
opacity: 0.75;
}
#notification-div {
position: absolute;
top: 35px;
right: 5px;
opacity: 0.75;
width: 133px;
text-align: center;
background-color: white;
border: solid 1px rgb(204,204,204);
border-top: none;
font-size: 9px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
<div id="map-div"></div>