JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

once

Adds an event listener to the Map object. The listener will fire once and then be disabled.

Parameters

Name Required Description
type Yes The type (name) of the event for which to listen.
fn Yes The function to run when the event is fired. This function will be passed an object containing the event results. The properties of this object will depend on the event that was fired.

Example

var map = new Mapzania.Map("map-div", "WORLD");

map.once("roads_layer_queried", function (data) {
    console.log(data);
});

var filter = Mapzania.Filters.filterByText("StreetType=='HIGHWAY'");

map.query("STREETS", filter, {
    ignoreAppliedFilters: true
});