Examples
filter and style layer

This example loads a map of Africa using the "AFRICA" key.

The "AFRICA" map was created using the Mapzania MapStyler.

See www.mapzania.com/manual/concepts-mapstyler for more details on how to use the styler.

This example combines the functionality of the other filtering and styling examples to showcase how one simple chained function call can make big changes to the map.

window.onload = function () {
    var map = new Mapzania.Map("map-div", "AFRICA", function () {

        map.usingLayer("COUNTRIES")
            .filterByText("LandLocked=='Y'")
            .style({ fillColor: "#FFFF00" })
            .styleFeature("5", { fillColor: "#FF0000"})
            .update();
    });
};
#map-div {
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    right: 0px;
}
<div id="map-div"></div>