Namespaces
Methods
-
<static> addGeoJson(layer) → {undefined}
-
Adds a locally hosted GeoJSON file to the map as a vector layer
Parameters:
Name Type Description layerstring the relative path of the GeoJSON file (hosted locally)
Returns:
- Type
- undefined
-
<static> addKml(layer) → {undefined}
-
Adds a locally hosted KML file to the map as a vector layer
Parameters:
Name Type Description layerobject the KMLLayer to add to the map
Returns:
- Type
- undefined
-
<static> addLine(featureId, layerId, coordinates)
-
adds a line to the map
Parameters:
Name Type Description featureIdstring the ID of the line
layerIdstring the ID of the layer to add the polygon to
coordinatesArray a Coordinate Array
-
<static> addMultipoint(featureId, layerId, coordinates)
-
adds a multipoint to the map
Parameters:
Name Type Description featureIdstring the ID of the multipoint
layerIdstring the ID of the layer
coordinatesArray a Coordinate Array
-
<static> addPoint(featureId, layerId, coordinate, image) → {undefined}
-
adds a point to the map if an Image object is supplied, the image is used in lieu of the default point icon
Parameters:
Name Type Argument Description featureIdstring the ID of the point
layerIdstring the ID of the layer
coordinateObject a Coordinate object
imageObject <optional>
an optional Image object
Returns:
- Type
- undefined
-
<static> addPolygon(featureId, layerId, coordinates)
-
adds a polygon to the map
Parameters:
Name Type Description featureIdstring the ID of the polygon
layerIdstring the ID of the layer to add the polygon to
coordinatesArray a Coordinate Array
-
<static> addVectorLayer(layerId, options) → {undefined}
-
Adds a vector layer to the map
Parameters:
Name Type Argument Description layerIdstring the unique name of the layer
optionsobject <optional>
optional object encapsulating various advanced options, such as layer styles and cluster strategy
Returns:
- Type
- undefined
-
<static> addWmsLayer(layer) → {undefined}
-
Adds a WMS layer to the map
Parameters:
Name Type Description layerobject the WMSLayer to add to the map
Returns:
- Type
- undefined
-
<static> addWmtsLayer(layer) → {undefined}
-
Adds a WMTS layer to the map
Parameters:
Name Type Description layerobject the WMTSLayer to add to the map
Returns:
- Type
- undefined
-
<static> clearAllFeatures() → {undefined}
-
removes all features from the active map
Returns:
- Type
- undefined
-
<static> createMap(divId, mapType, callback, baseLayer) → {undefined}
-
Creates a new map instance
Parameters:
Name Type Argument Description divIdstring the DIV to bind the map to
mapTypestring the type of the map @see mapapi.constant.mapType
callbackfunction <optional>
optional callback function to be called once the base layer has loaded
baseLayerObject <optional>
optional baseLayer, defaults to OpenStreetMaps
Returns:
- Type
- undefined
-
<static> destroyMap(divId) → {undefined}
-
Destroys the given map
Parameters:
Name Type Description divIdstring the ID of the map to destroy
Returns:
- Type
- undefined
-
<static> getActiveMapObject() → {undefined}
-
returns the implementation-specific (native) active map object to serve as a "backdoor" allows developers to leverage API while simultaneously providing the ability to fill in gaps in functionality that the API does not currently provide
Returns:
- Type
- undefined
-
<static> getCenter() → {Object}
-
Returns the center of the map view
Returns:
- the center Coordinate
- Type
- Object
-
<static> getFeatures(featureId) → {array}
-
returns the feature(s) associated with featureId
Parameters:
Name Type Description featureIdstring the ID of the feature
Returns:
- the feature(s)
- Type
- array
-
<static> getLayer(layerId) → {object}
-
Returns the layer object associated with the given ID
Parameters:
Name Type Description layerIdstring the ID of the layer
Returns:
- the layer
- Type
- object
-
<static> getLayerOpacity(layerId) → {number}
-
Gets the opacity of a Layer Note: API functionality only supports the retrieval of user-created layer opacity
Parameters:
Name Type Description layerIdstring the ID of the Layer whose opacity will be returned
Returns:
- Type
- number
-
<static> getLayerOrder(layerId) → {number}
-
Gets the order of a Layer Note: API functionality only supports the retrieval of user-created layer orders
Parameters:
Name Type Description layerIdstring the ID of the Layer whose order will be returned
Returns:
- Type
- number
-
<static> getZoom() → {number}
-
gets the current zoom level of the map
Returns:
- the current zoom level of the map
- Type
- number
-
<static> registerClickListener(functionId, clickHandler) → {undefined}
-
register a listener function to be called when points/markers are clicked
Parameters:
Name Type Description functionIdstring an ID to associate with the click listener
clickHandlerfunction the Function to be called when a Point/Marker is clicked
Returns:
- Type
- undefined
-
<static> registerHoverListener(functionId, hoverHandler) → {undefined}
-
register a listener function to be called when points/markers are hovered
Parameters:
Name Type Description functionIdstring an ID to associate with the hover listener
hoverHandlerfunction the Function to be called when a Point/Marker is hovered
Returns:
- Type
- undefined
-
<static> registerMapMoveListener(functionId, handler) → {undefined}
-
register a listener function to be called when the map is moved
Parameters:
Name Type Description functionIdstring an ID to associate with the listener
handlerfunction the Function to be called when the map is moved
Returns:
- Type
- undefined
-
<static> registerOutListener(functionId, handler) → {undefined}
-
register a listener function to be called when the mouse un-hovers a feature
Parameters:
Name Type Description functionIdstring an ID to associate with the listener
handlerfunction the Function to be called
Returns:
- Type
- undefined
-
<static> registerZoomEndListener(functionId, handler) → {undefined}
-
register a listener function to be called when the map is zoomed
Parameters:
Name Type Description functionIdstring an ID to associate with the listener
handlerfunction the Function to be called when the map is zoomed
Returns:
- Type
- undefined
-
<static> removeLayer(layerId) → {undefined}
-
Removes a layer from the map
Parameters:
Name Type Description layerIdstring the ID of the Layer to remove
Returns:
- Type
- undefined
-
<static> removeLine(featureId) → {undefined}
-
removes a line from the map
Parameters:
Name Type Description featureIdstring the ID of the line to remove
Returns:
- Type
- undefined
-
<static> removeMultipoint(featureId) → {undefined}
-
removes a multipoint from the map
Parameters:
Name Type Description featureIdstring the ID of the multipoint to remove
Returns:
- Type
- undefined
-
<static> removePoint(featureId) → {undefined}
-
removes a point from the map
Parameters:
Name Type Description featureIdstring the ID of the point to remove
Returns:
- Type
- undefined
-
<static> removePolygon(featureId) → {undefined}
-
removes a polygon from the map
Parameters:
Name Type Description featureIdstring the ID of the polygon to remove
Returns:
- Type
- undefined
-
<static> resetMap(divId) → {undefined}
-
Resets the given map
Parameters:
Name Type Description divIdstring the ID of the map to reset
Returns:
- Type
- undefined
-
<static> setActiveMap(divId) → {undefined}
-
toggles the active map to the map currently bound to divId API methods operate on the currently active map
Parameters:
Name Type Description divIdstring the ID of the DIV the map is bound to
Returns:
- Type
- undefined
-
<static> setBaseLayer(layerId) → {undefined}
-
Set an existing layer as the map base layer
Parameters:
Name Type Description layerIdstring the ID of the existing layer to set as the base layer
Returns:
- Type
- undefined
-
<static> setCenter(coordinate) → {undefined}
-
Sets the center of the map view
Parameters:
Name Type Description coordinateObject the desired center Coordinate
Returns:
- Type
- undefined
-
<static> setLayerOpacity(layerId, opacity) → {undefined}
-
Sets the opacity of a Layer Note: API functionality only supports the setting of opacity for user created layers
Parameters:
Name Type Description layerIdstring the ID of the Layer whose opacity will be set
opacitynumber the opacity to set for the referenced Layer
Returns:
- Type
- undefined
-
<static> setLayerOrder(layerId, zOrder) → {undefined}
-
Sets the order of a Layer Note: API functionality only supports the ordering of user created layers
Parameters:
Name Type Description layerIdstring the ID of the Layer whose order will be set
zOrdernumber the order to set for the referenced Layer
Returns:
- Type
- undefined
-
<static> setZoom(zoomVal) → {undefined}
-
sets the current zoom level of the map
Parameters:
Name Type Description zoomValnumber the new zoom level of the map
Returns:
- Type
- undefined
-
<static> toggleCoordinatesControl() → {undefined}
-
toggles the user interface coordinates control (visible vs. hidden)
Returns:
- Type
- undefined
-
<static> toggleGraticuleControl() → {undefined}
-
toggles the user interface graticule control (visible vs. hidden)
Returns:
- Type
- undefined
-
<static> toggleLayer(layerId) → {undefined}
-
Toggles the visibility (visible vs. hidden) of a Layer
Parameters:
Name Type Description layerIdstring the ID of the Layer to toggle
Returns:
- Type
- undefined
-
<static> toggleScaleControl() → {undefined}
-
toggles the user interface scale control (visible vs. hidden)
Returns:
- Type
- undefined
-
<static> toggleZoomControl() → {undefined}
-
toggles the user interface zoom control (visible vs. hidden)
Returns:
- Type
- undefined
-
<static> unregisterClickListener(functionId) → {undefined}
-
Un-subscribe an existing click listener function
Parameters:
Name Type Description functionIdstring the ID of the existing click listener function
Returns:
- Type
- undefined
-
<static> unregisterHoverListener(functionId) → {undefined}
-
Un-subscribe an existing hover listener function
Parameters:
Name Type Description functionIdstring the ID of the existing hover listener function
Returns:
- Type
- undefined
-
<static> unregisterMapMoveListener(functionId) → {undefined}
-
Un-subscribe an existing listener function
Parameters:
Name Type Description functionIdstring the ID of the existing listener function
Returns:
- Type
- undefined
-
<static> unregisterOutListener(functionId) → {undefined}
-
Un-subscribe an existing listener function
Parameters:
Name Type Description functionIdstring the ID of the existing listener function
Returns:
- Type
- undefined
-
<static> unregisterZoomEndListener(functionId) → {undefined}
-
Un-subscribe an existing listener function
Parameters:
Name Type Description functionIdstring the ID of the existing listener function
Returns:
- Type
- undefined
-
<static> updateSize(divId) → {undefined}
-
updates the size of the map after the containing DIV has been resized
Parameters:
Name Type Argument Description divIdstring <optional>
optional divId, uses currently active map if not supplied
Returns:
- Type
- undefined
-
<static> zoomIn() → {undefined}
-
zooms the map in by one level
Returns:
- Type
- undefined
-
<static> zoomOut() → {undefined}
-
zooms the map out by one level
Returns:
- Type
- undefined
-
<static> zoomToData() → {undefined}
-
Calculates the bounding box of all feature data for the given layer and zooms accordingly
Parameters:
Type Description string the ID of the layer
Returns:
- Type
- undefined
-
<static> zoomToMaxExtent() → {undefined}
-
zoom to the full extent and recenter
Returns:
- Type
- undefined