creates a new alloy map instance
the options to initialise the map
the active basemap shown under all layers
the coordinates of the current map centre
the current hover mode
layers currently on display in the map
overlays currently on display in the map
the currently selected features
the current selection mode
the current viewport representing the south west and north east corners of the map
the current zoom level
adds an AlloyDrawFeature
to the draw layer
feature to process and add to draw layer
adds an event handler to listen for the AlloyDrawEvent
event
the handler to call when the event is raised
adds an event handler to listen for the FeatureSelectionChangeEvent
event
the handler to call when the event is raised
adds an event handler to listen for the FeaturesUnderSelectionEvent
event
the handler to call when the event is raised
adds a layer to the map
the layer to add to the map
adds an event handler to listen for the LayersChangeEvent
event
the handler to call when the event is raised
adds an event handler to listen for the MapChangeCentreEvent
event
the handler to call when the event is raised
adds an event handler to listen for the MapChangeZoomEvent
event
the handler to call when the event is raised
adds an overlay to the map
the overlay to add to the map
cancels the draw interaction
cancels the draw layer vertices remove interaction
cancels interaction for selecting features in a drawn polygon
clears the drawing layer and interactions
deselects a feature, this will retain any other existing selected feature(s)
and trigger the FeatureSelectionChangeEvent
if selected features were modified.
the feature to deselect
finds features close to provided source across all layers
AlloyCoordinate
, AlloyFeature
or Geometry
source to measure distance of
features from
distance (in metres) from source for which to return features
an array of results ordered by closest first
Fits viewport around provided features
AlloyFeature
array to fit in veiwport
whether to add a buffer around wrapped features
whether to animate to the viewport
Gets all features in the draw layer
an array of AlloyDrawFeature
Gets all features geometries in the draw layer as a single geometry
a merged geometry GeoJSON of all draw features
Returns an array of current feature geometry types in the draw layer.
array of GeoJSONObjectType
Unsets the map from DOM
removes an AlloyDrawFeature
from draw layer and related interactions
the feature to remove
removes an event handler listening to the AlloyDrawEvent
event
the handler to stop listening
removes an event handler listening to the FeatureSelectionChangeEvent
event
the handler to stop listening
removes an event handler listening to the FeaturesUnderSelectionEvent
event
the handler to stop listening
removes a layer from the map
the layer to remove
removes an event handler listening to the LayersChangeEvent
event
the handler to stop listening
removes an event handler listening to the MapChangeCentreEvent
event
the handler to stop listening
removes an event handler listening to the MapChangeZoomEvent
event
the handler to stop listening
removes an overlay from the map
the overlay to remove
Request a map rendering (at the next animation frame).
takes a screenshot and returns the blob data that can be saved as a png
selects a feature in addition to the already selected features, this will retain any existing
selected feature(s) and trigger the FeatureSelectionChangeEvent
if selected features were
modified.
the feature to select
selects features in addition to the already selected features, this will retain any existing
selected feature(s) and trigger the FeatureSelectionChangeEvent
if selected features were
modified.
the features to select
sets the active basemap to render layers on top of
the basemap to use
centres the map viewport on a location
the location to centre the map on
sets the hover mode for the map and resets any applicable state
the mode to set
sets the currently selected feature, this will remove any existing selected feature(s) and
trigger the FeatureSelectionChangeEvent
if selected features were modified.
the feature to select or null to deselect all features
sets the currently selected features, this will remove any existing selected feature(s) and
trigger the FeatureSelectionChangeEvent
if selected features were modified.
the features to select, passing an empty array will deselect all features
sets the selection mode for the map and resets any applicable state
the mode to set
sets the size of the map
DOM width in pixels
DOM height in pixels
attempts to set the viewport to the bounds provided, it will attempt a "best fit" approach which makes sure both north east and south west are visible
the bounds to fit on the screen
whether to animate to the viewport
sets the zoom level of the map
the zoom level
starts the draw interaction for a geometry type
geometry type to start drawing for
properties for created draw features
starts the drawing layer vertices remove interaction
starts interaction to draw a polygon and select all features inside of it
custom filter function to be called with alloy feature to check whether selection is allowed
custom function to be called when interaction is finished
whether to append the final selection to the existing selection
Force a recalculation of the map viewport size. This should be called when third-party code changes the size of the map viewport.
Generated using TypeDoc
the alloy map manages basemaps, layers and drawing