Class: OlMap

bemap.OlMap(context, target)

Base class for OpenLayers.

Constructor

new OlMap(context, target)

Parameters:
Name Type Description
context bemap.Context BeMap-JS-API Context.
target string HTML element.
options.
Source:

Extends

Members

(protected) _zoomControlVisible

Whether the zoom (+/-) control is currently visible. Initialised from the resolved `zoomControl` option (default OFF — opt-in) and flipped at runtime by `setZoomControl()`. Kept in sync so `getZoomControl()` is accurate before any runtime toggle.
Overrides:
Source:

(protected) callback

Overrides:
Source:

(protected) ctx

Overrides:
Source:

(protected) events

Overrides:
Source:

(protected) layers

Overrides:
Source:

(protected) native

Overrides:
Source:

(protected) target

Source:

(protected) target

Source:

Methods

(protected) _addOwnToProperties(bemapObject)

Sotre the bemap object into the native OpenLayers properties.
Parameters:
Name Type Description
bemapObject Object a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Source:

(protected) _addOwnToProperties(bemapObject)

Sotre the bemap object into the native OpenLayers properties.
Parameters:
Name Type Description
bemapObject Object a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Source:

(protected) _checkModeOfEvent(mode, bemapObject, declaredObj) → {function}

Check the event mode.
Parameters:
Name Type Description
mode object enable modes.
bemapObject object bemap object like bemap.Marker, bemap.Polyline, etc.
declaredObj object bemap object like bemap.Marker, bemap.Polyline, etc.
Source:
Returns:
Type
function

(protected) _checkModeOfEvent(mode, bemapObject, declaredObj) → {function}

Check the event mode.
Parameters:
Name Type Description
mode object enable modes.
bemapObject object bemap object like bemap.Marker, bemap.Polyline, etc.
declaredObj object bemap object like bemap.Marker, bemap.Polyline, etc.
Source:
Returns:
Type
function

(protected) _draggableFeature(declaredObj, callback, options, mode) → {bemap.Listener}

Define the draggable capability for bemap object (like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.).
Parameters:
Name Type Description
declaredObj Object bemap object like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
mode object Mode of slection feature.
Source:
Returns:
Listener.
Type
bemap.Listener

(protected) _draggableFeature(declaredObj, callback, options, mode) → {bemap.Listener}

Define the draggable capability for bemap object (like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.).
Parameters:
Name Type Description
declaredObj Object bemap object like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
mode object Mode of slection feature.
Source:
Returns:
Listener.
Type
bemap.Listener

(protected) _fireError(err)

Fire an error onto the map's error channel(s). Used by the warn-and-no-op fallback and by the new auth/tile/cache error paths.
Parameters:
Name Type Description
err bemap.Error
Since:
  • 2.0.0
Overrides:
Source:

(protected) _fromLonLat(lon, lat)

Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
Source:

(protected) _fromLonLat(lon, lat)

Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
Source:

(protected) _fromNativeToLonLat(coordinate) → {array}

Parameters:
Name Type Description
coordinate array Array contains the longitude and latitude in format of OpenLayers Map object.
Source:
Returns:
Array contains the longitude and latitude in degres decimal (WGS84).
Type
array

(protected) _fromNativeToLonLat(coordinate) → {array}

Parameters:
Name Type Description
coordinate array Array contains the longitude and latitude in format of OpenLayers Map object.
Source:
Returns:
Array contains the longitude and latitude in degres decimal (WGS84).
Type
array

(protected) _getOwnFromProperties(olObject) → {Object}

Get the bemap object from the native OpenLayers properties.
Parameters:
Name Type Description
olObject Object native Openlayers object like ol.Feature.
Source:
Returns:
a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Type
Object

(protected) _getOwnFromProperties(olObject) → {Object}

Get the bemap object from the native OpenLayers properties.
Parameters:
Name Type Description
olObject Object native Openlayers object like ol.Feature.
Source:
Returns:
a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Type
Object

(protected) _notSupportedByEngine(methodName) → {bemap.Map}

Report that the ACTIVE engine does not implement `methodName`, then no-op. The base class is a hand-maintained stub list, and it was only half populated (BEMAP-1898 audit). The same defect — an engine not implementing an overlay method — therefore failed two different ways: silently (`return this` for the names that were listed) or with `TypeError: … is not a function` (for the ones that were not). Neither told the developer anything useful, and the silent half is how several Leaflet gaps shipped unnoticed. Every previously-absent name now lands here: one console.warn per method per map, plus a `bemap.Error` on the map's error channel, then a harmless no-op. A TypeError becomes a visible warning; a silent nothing becomes a visible warning. Nothing that already worked changes.
Parameters:
Name Type Description
methodName String
Since:
  • 2.0.2
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) _onFeature(marker, eventType, callback, options, mode) → {bemap.Listener}

Set the listner when a specified eventType occur on OpenLayers Feature object.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
mode object Mode of slection feature.
Source:
Returns:
listener.
Type
bemap.Listener

(protected) _onFeature(marker, eventType, callback, options, mode) → {bemap.Listener}

Set the listner when a specified eventType occur on OpenLayers Feature object.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
mode object Mode of slection feature.
Source:
Returns:
listener.
Type
bemap.Listener

(protected) _requiresGlobe()

Emit a one-time `info`-level error on the map's error channel when a `setLight` / `setSky` / etc. is called on a non-globe projection where the effect won't be visible. NOT auto-enabling globe — too surprising for a public API. The customer's error subscriber sees the hint; dev console gets a one-time `console.info`.
Since:
  • 2.0.0
Overrides:
Source:

(protected) _subscribeErrorChannel(eventType, callback) → {Boolean}

Wire `on('error' | 'error:auth' | 'error:network' | 'error:maplibre-only')` through to the error channel, and report whether it did. The class doc for `_onError` has always claimed "the library version of `on()` calls this when the event name starts with 'error'" — but the base `on()` is an abstract `return new bemap.Listener()`, and all three engines override it and route straight to `_onFeature` / the native map. So the DOCUMENTED way to observe auth, tile and network failures silently subscribed to nothing on every engine (BEMAP-1898 audit). Deliberately ADDITIVE: each engine calls this first and then continues with whatever it did before, so a consumer relying on an engine's native `'error'` event (MapLibre fires one) keeps receiving it — it now simply also receives the `bemap.Error` objects that `_fireError` produces.
Parameters:
Name Type Description
eventType String
callback function
Since:
  • 2.0.2
Overrides:
Source:
Returns:
true when the error channel was subscribed
Type
Boolean

add3DBuildings(options) → {bemap.Map}

Add 3D extruded buildings. MapLibre only.
Parameters:
Name Type Description
options object Building configuration.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addCircle(options) → {bemap.OlMap}

Add a bemap.Circle to the layer
Parameters:
Name Type Description
bemap.Circle. bemap.Circle
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addCircle(options) → {bemap.OlMap}

Add a bemap.Circle to the layer
Parameters:
Name Type Description
bemap.Circle. bemap.Circle
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addDrawControl(options) → {bemap.Map}

Add a drawing toolbar to the map.
Parameters:
Name Type Description
options Object See below.
Properties
Name Type Description
polygon boolean Enable polygon drawing (default: true).
polyline boolean Enable polyline drawing (default: false).
rectangle boolean Enable rectangle drawing (default: false).
circle boolean Enable circle drawing (default: false).
marker boolean Enable marker drawing (default: false).
position String Toolbar position: 'topright','topleft','bottomright','bottomleft' (default: 'topright').
onDrawEnd function Callback when a shape is drawn.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addGeoJsonSource(id, data) → {bemap.Map}

Add a GeoJSON data source. MapLibre only.
Parameters:
Name Type Description
id string Source identifier.
data object GeoJSON data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addImage(id, image) → {bemap.Map}

Register a custom image for use in symbol layers. MapLibre only.
Parameters:
Name Type Description
id string Image identifier.
image object Image data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addLayer(layer, options) → {bemap.OlMap}

Add a layer to the OpenLayers map.
Parameters:
Name Type Description
layer bemap.Layer
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addLayer(layer, options) → {bemap.OlMap}

Add a layer to the OpenLayers map.
Parameters:
Name Type Description
layer bemap.Layer
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMarker(marker, options) → {bemap.OlMap}

Add a marker to the layer
Parameters:
Name Type Description
marker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMarker(marker, options) → {bemap.OlMap}

Add a marker to the layer
Parameters:
Name Type Description
marker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMultiMarker(multimarker, options) → {bemap.OlMap}

Add a multimarker to the layer
Parameters:
Name Type Description
multimarker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMultiMarker(multimarker, options) → {bemap.OlMap}

Add a multimarker to the layer
Parameters:
Name Type Description
multimarker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addPolygon(options) → {bemap.OlMap}

Add a bemap.Polygon to the layer
Parameters:
Name Type Description
bemap.Polygon. bemap.Polygon
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolygon(options) → {bemap.OlMap}

Add a bemap.Polygon to the layer
Parameters:
Name Type Description
bemap.Polygon. bemap.Polygon
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolyline(options) → {bemap.OlMap}

Add a bemap.Polyline to the layer
Parameters:
Name Type Description
bemap.Polyline. bemap.Polyline
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolyline(options) → {bemap.OlMap}

Add a bemap.Polyline to the layer
Parameters:
Name Type Description
bemap.Polyline. bemap.Polyline
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPopup(popup, options) → {bemap.OlMap}

Add a popup to the map
Parameters:
Name Type Description
popup bemap.Popup
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addPopup(popup, options) → {bemap.OlMap}

Add a popup to the map
Parameters:
Name Type Description
popup bemap.Popup
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

backgroundLayers(geoservers) → {bemap.Map}

Create a background layer for each geoserver name.
Parameters:
Name Type Description
geoservers array List of geoserver name.
Overrides:
Source:
Returns:
this
Type
bemap.Map

buildCircleStyle(circleStyle, options) → {bemap.OlMap}

Build circleStyle resource.
Parameters:
Name Type Description
circleStyle bemap.CircleStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildCircleStyle(circleStyle, options) → {bemap.OlMap}

Build circleStyle resource.
Parameters:
Name Type Description
circleStyle bemap.CircleStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildIcon(icon, options) → {bemap.OlMap}

Build icon resource.
Parameters:
Name Type Description
icon bemap.Icon
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildIcon(icon, options) → {bemap.OlMap}

Build icon resource.
Parameters:
Name Type Description
icon bemap.Icon
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildLineStyle(lineStyle, options) → {bemap.OlMap}

Build lineStyle resource.
Parameters:
Name Type Description
lineStyle bemap.LineStyle
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildLineStyle(lineStyle, options) → {bemap.OlMap}

Build lineStyle resource.
Parameters:
Name Type Description
lineStyle bemap.LineStyle
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildPolygonStyle(polygonStyle, options) → {bemap.OlMap}

Build polygonStyle resource.
Parameters:
Name Type Description
polygonStyle bemap.PolygonStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildPolygonStyle(polygonStyle, options) → {bemap.OlMap}

Build polygonStyle resource.
Parameters:
Name Type Description
polygonStyle bemap.PolygonStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildTextStyle(text, name, options) → {bemap.OlMap}

Build text style resource.
Parameters:
Name Type Description
text bemap.TextStyle style object.
name String Name (label) of marker.
options object
Source:
Returns:
this
Type
bemap.OlMap

buildTextStyle(text, name, options) → {bemap.OlMap}

Build text style resource.
Parameters:
Name Type Description
text bemap.TextStyle style object.
name String Name (label) of marker.
options object
Source:
Returns:
this
Type
bemap.OlMap

clearAllEffects() → {bemap.Map}

Tear down every registered effect. Invokes each teardown in registration order, swallowing errors per-teardown so one failure doesn't block the rest. Each teardown is expected to call `_unregisterEffect` itself via the matching `remove*`/`stop*` path; the registry is cleared at the end regardless.
Since:
  • 2.0.0
Overrides:
Source:
Returns:
Type
bemap.Map

clearLayer(layer) → {bemap.OlMap}

Remove all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to clear.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

clearLayer(layer) → {bemap.OlMap}

Remove all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to clear.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

clearPopup() → {bemap.OlMap}

Remove all the popups from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

clearPopup() → {bemap.OlMap}

Remove all the popups from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

defaultLayers(options) → {bemap.Map}

Add default layers.
Parameters:
Name Type Description
options object
Properties
Name Type Description
markerAsCluster boolean
Overrides:
Source:
Returns:
this
Type
bemap.Map

defaultOverlayLayers(options) → {bemap.Map}

Add default overlay layers, like dedicated for markers or polyline, etc.
Parameters:
Name Type Description
options object
Properties
Name Type Description
markerAsCluster boolean
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) draggableCircle(circle, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircle(circle, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircles(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Circle.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircles(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Circle.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarker(marker, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarker(marker, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Marker.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Marker.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMultiMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.MultiMarkers.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMultiMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.MultiMarkers.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygon(polygon, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygon(polygon, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygons(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polygon.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygons(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polygon.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolyline(polyline, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolyline(polyline, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolylines(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polyline.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolylines(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polyline.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

drawPolygon()

BeNomad BeMap JavaScript API - OpenLayers v10 - Draw Interaction
Overrides:
Source:

easeTo(options) → {bemap.Map}

Smooth animated camera transition. MapLibre only.
Parameters:
Name Type Description
options object center, zoom, pitch, bearing, duration.
Overrides:
Source:
Returns:
this
Type
bemap.Map

flyTo(lon, lat, zoom, options)

Fly map to new coordinate.
Parameters:
Name Type Description
lon double longitude
lat double latitude
zoom double zoom
options Object options
Overrides:
Source:

flyTo(lon, lat, zoom, options)

Fly map to new coordinate.
Parameters:
Name Type Description
lon double longitude
lat double latitude
zoom double zoom
options Object options
Overrides:
Source:

getActiveEffects() → {Array.<String>}

Names of every currently-active effect. Snapshot — does not auto- update; subscribe via `onEffectChange` for live notification.
Since:
  • 2.0.0
Overrides:
Source:
Returns:
Type
Array.<String>

getBearing() → {number}

Get the current bearing. MapLibre only.
Overrides:
Source:
Returns:
bearing in degrees (0 if not supported).
Type
number

getBoundingBox() → {bemap.BoundingBox}

Get the limits of the map on the current zoom.
Overrides:
Source:
Returns:
the bounding box containing the limits.
Type
bemap.BoundingBox

getBoundingBox() → {bemap.BoundingBox}

Get the limits of the map on the current zoom.
Overrides:
Source:
Returns:
the bounding box containing the limits.
Type
bemap.BoundingBox

getCenter() → {bemap.Coordinate}

Get the center of the map in bemap.Coordinate.
Overrides:
Source:
Returns:
the center of the map.
Type
bemap.Coordinate

getCenter() → {bemap.Coordinate}

Get the center of the map in bemap.Coordinate.
Overrides:
Source:
Returns:
the center of the map.
Type
bemap.Coordinate

getKeyboard()

Source:

getLayerByName(name) → {bemap.Layer}

Search the layer by name.
Parameters:
Name Type Description
name String of layer.
Overrides:
Source:
Returns:
Return the layer or null if not found.
Type
bemap.Layer

getPitch() → {number}

Get the current pitch angle. MapLibre only.
Overrides:
Source:
Returns:
pitch in degrees (0 if not supported).
Type
number

getRotation() → {Number}

Get current rotation angle of map.
Overrides:
Source:
Returns:
current rotation in DEGREES (clockwise, matching setBearing convention). Previously returned raw radians — fixed in v2.0.
Type
Number

getRotation() → {int}

Get current rotation angle of map.
Overrides:
Source:
Returns:
current rotation angle of map in degrees.
Type
int

getXYFromCoordinate() → {Array}

Get the pixel coordinate from bemap coordinate.
Source:
Returns:
the corresponding XY coords.
Type
Array

getXYFromCoordinate() → {Array}

Get the pixel coordinate from bemap coordinate.
Source:
Returns:
the corresponding XY coords.
Type
Array

getZoom() → {int}

Get current zoom level of map.
Overrides:
Source:
Returns:
current zoom level of map.
Type
int

getZoom() → {int}

Get current zoom level of map.
Overrides:
Source:
Returns:
current zoom level of map.
Type
int

getZoomControl()

Overrides:
Source:

(abstract) isDragPan() → {boolean}

Return the satus of drag pan of map.
Parameters:
Name Type Description
options.dragPan. Object
Overrides:
Source:
Returns:
true to enable the drag pan of map, otherwise false.
Type
boolean

(abstract) isDragPan() → {boolean}

Return the satus of drag pan of map.
Parameters:
Name Type Description
options.dragPan. Object
Overrides:
Source:
Returns:
true to enable the drag pan of map, otherwise false.
Type
boolean

jumpTo(options) → {bemap.Map}

Instant camera change with pitch/bearing support. MapLibre only.
Parameters:
Name Type Description
options object center, zoom, pitch, bearing.
Overrides:
Source:
Returns:
this
Type
bemap.Map

move(lon, lat, zoom, options) → {bemap.OlMap}

Move map to new coordinate.
Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
zoom int Zoom level (optional).
options Object Options (optional).
Properties
Name Type Description
animate String Enable the animation.
fly String Enable the animation (same as animate).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

move(lon, lat, zoom, options) → {bemap.OlMap}

Move map to new coordinate.
Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
zoom int Zoom level (optional).
options Object Options (optional).
Properties
Name Type Description
animate String Enable the animation.
fly String Enable the animation (same as animate).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

moveToBoundingBox(boundingBox) → {bemap.OlMap}

Set the center and the zoom of the map to fit the bounding box.
Parameters:
Name Type Description
boundingBox bemap.BoundingBox the bounding box to fit.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

moveToBoundingBox(boundingBox) → {bemap.OlMap}

Set the center and the zoom of the map to fit the bounding box.
Parameters:
Name Type Description
boundingBox bemap.BoundingBox the bounding box to fit.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(abstract) moveToLayerData(layer, options) → {bemap.Map}

Move map and zoom on data contains in layers.
Parameters:
Name Type Description
layer bemap.Layer Layer.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.Map

(abstract) moveToLayerData(layer, options) → {bemap.Map}

Move map and zoom on data contains in layers.
Parameters:
Name Type Description
layer bemap.Layer Layer.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.Map

on(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.OlMap.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
listner.
Type
bemap.Listener

on(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.OlMap.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
listner.
Type
bemap.Listener

onCircle(circle, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onCircle(circle, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onEffectChange()

Subscribe to active-effect changes. Fires `{name, active}` whenever an effect is registered (`active: true`) or torn down (`active: false`). The dashboard's active-effects bar consumes this.
Since:
  • 2.0.0
Overrides:
Source:

onGetFeatureInfo(layer, options) → {bemap.Listener}

Set get feature info call back.
Parameters:
Name Type Description
layer bemap.Layer set the bemap layer.
options object options.
Properties
Name Type Description
beforeCallback function callback called at data reception and before display the popup.
afterCallback function callback called after display the popup.
panningMap function enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
listner;
Type
bemap.Listener

onGetFeatureInfo(layer, options) → {bemap.Listener}

Set get feature info call back.
Parameters:
Name Type Description
layer bemap.Layer set the bemap layer.
options object options.
Properties
Name Type Description
beforeCallback function callback called at data reception and before display the popup.
afterCallback function callback called after display the popup.
panningMap function enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
listner;
Type
bemap.Listener

onMarker(marker, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarker(marker, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarkers(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Marker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarkers(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Marker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMultiMarker(multimarker, eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.MultiMarker.
Parameters:
Name Type Description
multimarker bemap.MultiMarker
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarker(multimarker, eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.MultiMarker.
Parameters:
Name Type Description
multimarker bemap.MultiMarker
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarkers(eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.MultiMarker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarkers(eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.MultiMarker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onPolygon(polygon, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygon(polygon, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygons(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polygon.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygons(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polygon.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolyline(polyline, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolyline(polyline, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolylines(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polyline.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolylines(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polyline.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

queryRenderedFeatures(point, options) → {Array}

Query rendered features at a point or in a box. MapLibre only.
Parameters:
Name Type Description
point object Screen point or bounding box.
options object Query options (layers, filter).
Overrides:
Source:
Returns:
Array of feature objects.
Type
Array

(abstract) refresh(options) → {bemap.OlMap}

Refresh map.
Parameters:
Name Type Description
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

(abstract) refresh(options) → {bemap.OlMap}

Refresh map.
Parameters:
Name Type Description
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

refreshLayer(layer) → {bemap.OlMap}

Refresh all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to refresh.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

refreshLayer(layer) → {bemap.OlMap}

Refresh all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to refresh.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeCircle(circle)

Remove a circle from his layer.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Overrides:
Source:

removeCircle(circle)

Remove a circle from his layer.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Overrides:
Source:

removeImage(id) → {bemap.Map}

Remove a registered image. MapLibre only.
Parameters:
Name Type Description
id string Image identifier.
Overrides:
Source:
Returns:
this
Type
bemap.Map

removeLayer(layer) → {bemap.OlMap}

Remove a layer from the map.
Parameters:
Name Type Description
layer bemap.Layer layer to remove from the map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

removeLayer(layer) → {bemap.OlMap}

Remove a layer from the map.
Parameters:
Name Type Description
layer bemap.Layer layer to remove from the map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(protected) removeListener(listener, options) → {bemap.OlMap}

Remove listener.
Parameters:
Name Type Description
listener bemap.Listener Function will be called when the specified eventType is occur.
options object Options.
Source:
Returns:
this.
Type
bemap.OlMap

(protected) removeListener(listener, options) → {bemap.OlMap}

Remove listener.
Parameters:
Name Type Description
listener bemap.Listener Function will be called when the specified eventType is occur.
options object Options.
Source:
Returns:
this.
Type
bemap.OlMap

removeMarker(marker) → {bemap.OlMap}

Remove a marker from his layer.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMarker(marker) → {bemap.OlMap}

Remove a marker from his layer.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMultimarker(multimarker) → {bemap.OlMap}

Remove a multimarker from his layer.
Parameters:
Name Type Description
multimarker bemap.MultiMarker the multimarker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMultimarker(multimarker) → {bemap.OlMap}

Remove a multimarker from his layer.
Parameters:
Name Type Description
multimarker bemap.MultiMarker the multimarker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removePolygon(polygon)

Remove a polygon from his layer.
Parameters:
Name Type Description
polygon bemap.Polygon the polygon object to remove.
Overrides:
Source:

removePolygon(polygon)

Remove a polygon from his layer.
Parameters:
Name Type Description
polygon bemap.Polygon the polygon object to remove.
Overrides:
Source:

removePolyline(polyline)

Remove a polyline from his layer.
Parameters:
Name Type Description
polyline bemap.Polyline the polyline object to remove.
Overrides:
Source:

removePolyline(polyline)

Remove a polyline from his layer.
Parameters:
Name Type Description
polyline bemap.Polyline the polyline object to remove.
Overrides:
Source:

removePopup(popup) → {bemap.OlMap}

Remove a popup from the map.
Parameters:
Name Type Description
popup bemap.Popup the popup to remove from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

removePopup(popup) → {bemap.OlMap}

Remove a popup from the map.
Parameters:
Name Type Description
popup bemap.Popup the popup to remove from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

removeTerrain() → {bemap.Map}

Disable 3D terrain. MapLibre only.
Overrides:
Source:
Returns:
this
Type
bemap.Map

rotation(angle, options) → {bemap.OlMap}

Rotation of map, set new angle of map.
Parameters:
Name Type Description
angle int in degrees, clockwise (matches MapLibre's setBearing convention; previously this method rotated counter-clockwise — that was the OL native direction but inconsistent with MapLibre, fixed in v2.0).
options Object Options (optional).
Overrides:
Deprecated:
  • Since 2.0 — use `setBearing(deg)` for a cross-engine API consistent with MapLibre's compass-bearing convention.
Source:
Returns:
this
Type
bemap.OlMap

rotation(angle, options) → {bemap.OlMap}

Rotation of map, set new angle of map.
Parameters:
Name Type Description
angle int in degrees.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setBearing(bearing) → {bemap.Map}

Set the bearing (compass rotation) of the map. MapLibre only.
Parameters:
Name Type Description
bearing number Bearing in degrees (0-360).
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) setCoordinateCircle(circle) → {bemap.OlMap}

Set the coordinates of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to move.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateCircle(circle) → {bemap.OlMap}

Set the coordinates of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateMarker(marker) → {bemap.OlMap}

Set the coordinates of the marker.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateMarker(marker) → {bemap.OlMap}

Set the coordinates of the marker.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Source:
Returns:
this
Type
bemap.OlMap

setCoordinatePopup(popup, coordinate, options) → {bemap.OlMap}

Set the coordinate of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup of wich to set the coordinate.
coordinate bemap.Coordinate the new coordinate.
options object Options.
Properties
Name Type Description
panningMap bemap.Layer enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

setCoordinatePopup(popup, coordinate, options) → {bemap.OlMap}

Set the coordinate of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup of wich to set the coordinate.
coordinate bemap.Coordinate the new coordinate.
options object Options.
Properties
Name Type Description
panningMap bemap.Layer enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(abstract) setDragPan(active) → {bemap.OlMap}

Enable or diable the drag pan of map.
Parameters:
Name Type Description
active boolean true to enable the drag pan of map, otherwise false.
options.dragPan. Object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

(abstract) setDragPan(active) → {bemap.OlMap}

Enable or diable the drag pan of map.
Parameters:
Name Type Description
active boolean true to enable the drag pan of map, otherwise false.
options.dragPan. Object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setKeyboard(enabled) → {bemap.OlMap}

Toggle keyboard navigation (arrow-pan + `+`/`-` zoom) at runtime by adding / removing the `KeyboardPan` and `KeyboardZoom` interactions.
Parameters:
Name Type Description
enabled Boolean
Source:
Returns:
Type
bemap.OlMap

setLight(options) → {bemap.Map}

Set 3D light position and properties. MapLibre only.
Parameters:
Name Type Description
options object Light options (position, color, intensity, anchor).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setPitch(pitch) → {bemap.Map}

Set the pitch (tilt) angle of the map in degrees. MapLibre only.
Parameters:
Name Type Description
pitch number Pitch angle (0-85).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setProjection(type) → {bemap.Map}

Set map projection ('mercator' or 'globe'). MapLibre only.
Parameters:
Name Type Description
type string projection type.
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) setRadiusCircle(circle) → {bemap.OlMap}

Set the radius of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to resize.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setRadiusCircle(circle) → {bemap.OlMap}

Set the radius of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Source:
Returns:
this
Type
bemap.OlMap

setSky(options) → {bemap.Map}

Set sky/atmosphere effects. MapLibre only.
Parameters:
Name Type Description
options object sky options.
Overrides:
Source:
Returns:
this
Type
bemap.Map

setStyle(urlOrSpec) → {bemap.OlMap}

Cross-engine `setStyle` for OL. The MapLibre wrapper has the same name but a richer contract (vector style name / URL / object); on Leaflet/OL "style" means the WMS theme or the raster tile source. The argument is interpreted as: • bare NAME (no '/' or ':') → re-applied as the WMS `STYLES` on the BeNomad TileWMS source(s) — the dark/light theme switch (`'benomadGrayLevel'` / `'benomadLight'`). Vector style names are MapLibre-only. • URL string (contains '/' or ':') → swaps the XYZ raster source URL. • inline style object → MapLibre-only; warn-once no-op here.
Parameters:
Name Type Description
urlOrSpec String | Object WMS style name, a raster URL template, or a MapLibre vector style object (no-op).
Since:
  • 2.0.0
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setTerrain(options) → {bemap.Map}

Enable 3D terrain rendering. MapLibre only.
Parameters:
Name Type Description
options object terrain options (source, exaggeration).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setVisiblePopup(popup, visible) → {bemap.Popup}

Set the visiblility of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup.
visible Boolean true for visible and false for hidden.
Overrides:
Source:
Returns:
this.
Type
bemap.Popup

setVisiblePopup(popup, visible) → {bemap.Popup}

Set the visiblility of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup.
visible Boolean true for visible and false for hidden.
Overrides:
Source:
Returns:
this.
Type
bemap.Popup

setZoomControl(enabled) → {bemap.Map}

Show or hide the engine's native zoom (+/-) buttons at runtime. Uniform across Leaflet, OpenLayers and MapLibre — toggles a class on the map container so the engine-specific selectors all hit at once.
Parameters:
Name Type Description
enabled Boolean
Since:
  • 1.5.0
Overrides:
Source:
Returns:
this
Type
bemap.Map

switchBackgroundLayer(geoserver) → {bemap.Map}

Switch bytween several background layers.
Parameters:
Name Type Description
geoserver String Name of geoserver.
Overrides:
Source:
Returns:
this
Type
bemap.Map

updateCircleCenter()

Update the coordinate from the native map browser.
Source:

updateCircleCenter()

Update the coordinate from the native map browser.
Source:

updateGeoJsonSource(id, data) → {bemap.Map}

Update an existing GeoJSON source data. MapLibre only.
Parameters:
Name Type Description
id string Source identifier.
data object New GeoJSON data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

updatePolygonCoordinates()

Update the coordinates from the native map browser.
Source:

updatePolygonCoordinates()

Update the coordinates from the native map browser.
Source:

visibleLayer(layer) → {bemap.OlMap}

Set the visibility of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the visibility.
visible. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

visibleLayer(layer) → {bemap.OlMap}

Set the visibility of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the visibility.
visible. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zIndexLayer(layer) → {bemap.OlMap}

Set the zIndex of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the zIndex.
zIndex. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zIndexLayer(layer) → {bemap.OlMap}

Set the zIndex of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the zIndex.
zIndex. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zoom(zoom, options) → {bemap.OlMap}

Zoom on map, set new zoom level.
Parameters:
Name Type Description
zoom int Zoom level (optional).
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

zoom(zoom, options) → {bemap.OlMap}

Zoom on map, set new zoom level.
Parameters:
Name Type Description
zoom int Zoom level (optional).
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

bemap.OlMap(context, target)

Base class for OpenLayers.

Constructor

new OlMap(context, target)

Parameters:
Name Type Description
context bemap.Context BeMap-JS-API Context.
target string HTML element.
options.
Source:

Extends

Members

(protected) _zoomControlVisible

Whether the zoom (+/-) control is currently visible. Initialised from the resolved `zoomControl` option (default OFF — opt-in) and flipped at runtime by `setZoomControl()`. Kept in sync so `getZoomControl()` is accurate before any runtime toggle.
Overrides:
Source:

(protected) callback

Overrides:
Source:

(protected) ctx

Overrides:
Source:

(protected) events

Overrides:
Source:

(protected) layers

Overrides:
Source:

(protected) native

Overrides:
Source:

(protected) target

Source:

(protected) target

Source:

Methods

(protected) _addOwnToProperties(bemapObject)

Sotre the bemap object into the native OpenLayers properties.
Parameters:
Name Type Description
bemapObject Object a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Source:

(protected) _addOwnToProperties(bemapObject)

Sotre the bemap object into the native OpenLayers properties.
Parameters:
Name Type Description
bemapObject Object a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Source:

(protected) _checkModeOfEvent(mode, bemapObject, declaredObj) → {function}

Check the event mode.
Parameters:
Name Type Description
mode object enable modes.
bemapObject object bemap object like bemap.Marker, bemap.Polyline, etc.
declaredObj object bemap object like bemap.Marker, bemap.Polyline, etc.
Source:
Returns:
Type
function

(protected) _checkModeOfEvent(mode, bemapObject, declaredObj) → {function}

Check the event mode.
Parameters:
Name Type Description
mode object enable modes.
bemapObject object bemap object like bemap.Marker, bemap.Polyline, etc.
declaredObj object bemap object like bemap.Marker, bemap.Polyline, etc.
Source:
Returns:
Type
function

(protected) _draggableFeature(declaredObj, callback, options, mode) → {bemap.Listener}

Define the draggable capability for bemap object (like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.).
Parameters:
Name Type Description
declaredObj Object bemap object like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
mode object Mode of slection feature.
Source:
Returns:
Listener.
Type
bemap.Listener

(protected) _draggableFeature(declaredObj, callback, options, mode) → {bemap.Listener}

Define the draggable capability for bemap object (like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.).
Parameters:
Name Type Description
declaredObj Object bemap object like bemap.Marker, bemap.MultiMarker, bemap.Polyline, etc.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
mode object Mode of slection feature.
Source:
Returns:
Listener.
Type
bemap.Listener

(protected) _fireError(err)

Fire an error onto the map's error channel(s). Used by the warn-and-no-op fallback and by the new auth/tile/cache error paths.
Parameters:
Name Type Description
err bemap.Error
Since:
  • 2.0.0
Overrides:
Source:

(protected) _fromLonLat(lon, lat)

Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
Source:

(protected) _fromLonLat(lon, lat)

Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
Source:

(protected) _fromNativeToLonLat(coordinate) → {array}

Parameters:
Name Type Description
coordinate array Array contains the longitude and latitude in format of OpenLayers Map object.
Source:
Returns:
Array contains the longitude and latitude in degres decimal (WGS84).
Type
array

(protected) _fromNativeToLonLat(coordinate) → {array}

Parameters:
Name Type Description
coordinate array Array contains the longitude and latitude in format of OpenLayers Map object.
Source:
Returns:
Array contains the longitude and latitude in degres decimal (WGS84).
Type
array

(protected) _getOwnFromProperties(olObject) → {Object}

Get the bemap object from the native OpenLayers properties.
Parameters:
Name Type Description
olObject Object native Openlayers object like ol.Feature.
Source:
Returns:
a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Type
Object

(protected) _getOwnFromProperties(olObject) → {Object}

Get the bemap object from the native OpenLayers properties.
Parameters:
Name Type Description
olObject Object native Openlayers object like ol.Feature.
Source:
Returns:
a bemap object like bemap.marker, bemap.multimarker or bemap.polyline.
Type
Object

(protected) _notSupportedByEngine(methodName) → {bemap.Map}

Report that the ACTIVE engine does not implement `methodName`, then no-op. The base class is a hand-maintained stub list, and it was only half populated (BEMAP-1898 audit). The same defect — an engine not implementing an overlay method — therefore failed two different ways: silently (`return this` for the names that were listed) or with `TypeError: … is not a function` (for the ones that were not). Neither told the developer anything useful, and the silent half is how several Leaflet gaps shipped unnoticed. Every previously-absent name now lands here: one console.warn per method per map, plus a `bemap.Error` on the map's error channel, then a harmless no-op. A TypeError becomes a visible warning; a silent nothing becomes a visible warning. Nothing that already worked changes.
Parameters:
Name Type Description
methodName String
Since:
  • 2.0.2
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) _onFeature(marker, eventType, callback, options, mode) → {bemap.Listener}

Set the listner when a specified eventType occur on OpenLayers Feature object.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
mode object Mode of slection feature.
Source:
Returns:
listener.
Type
bemap.Listener

(protected) _onFeature(marker, eventType, callback, options, mode) → {bemap.Listener}

Set the listner when a specified eventType occur on OpenLayers Feature object.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
mode object Mode of slection feature.
Source:
Returns:
listener.
Type
bemap.Listener

(protected) _requiresGlobe()

Emit a one-time `info`-level error on the map's error channel when a `setLight` / `setSky` / etc. is called on a non-globe projection where the effect won't be visible. NOT auto-enabling globe — too surprising for a public API. The customer's error subscriber sees the hint; dev console gets a one-time `console.info`.
Since:
  • 2.0.0
Overrides:
Source:

(protected) _subscribeErrorChannel(eventType, callback) → {Boolean}

Wire `on('error' | 'error:auth' | 'error:network' | 'error:maplibre-only')` through to the error channel, and report whether it did. The class doc for `_onError` has always claimed "the library version of `on()` calls this when the event name starts with 'error'" — but the base `on()` is an abstract `return new bemap.Listener()`, and all three engines override it and route straight to `_onFeature` / the native map. So the DOCUMENTED way to observe auth, tile and network failures silently subscribed to nothing on every engine (BEMAP-1898 audit). Deliberately ADDITIVE: each engine calls this first and then continues with whatever it did before, so a consumer relying on an engine's native `'error'` event (MapLibre fires one) keeps receiving it — it now simply also receives the `bemap.Error` objects that `_fireError` produces.
Parameters:
Name Type Description
eventType String
callback function
Since:
  • 2.0.2
Overrides:
Source:
Returns:
true when the error channel was subscribed
Type
Boolean

add3DBuildings(options) → {bemap.Map}

Add 3D extruded buildings. MapLibre only.
Parameters:
Name Type Description
options object Building configuration.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addCircle(options) → {bemap.OlMap}

Add a bemap.Circle to the layer
Parameters:
Name Type Description
bemap.Circle. bemap.Circle
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addCircle(options) → {bemap.OlMap}

Add a bemap.Circle to the layer
Parameters:
Name Type Description
bemap.Circle. bemap.Circle
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addDrawControl(options) → {bemap.Map}

Add a drawing toolbar to the map.
Parameters:
Name Type Description
options Object See below.
Properties
Name Type Description
polygon boolean Enable polygon drawing (default: true).
polyline boolean Enable polyline drawing (default: false).
rectangle boolean Enable rectangle drawing (default: false).
circle boolean Enable circle drawing (default: false).
marker boolean Enable marker drawing (default: false).
position String Toolbar position: 'topright','topleft','bottomright','bottomleft' (default: 'topright').
onDrawEnd function Callback when a shape is drawn.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addGeoJsonSource(id, data) → {bemap.Map}

Add a GeoJSON data source. MapLibre only.
Parameters:
Name Type Description
id string Source identifier.
data object GeoJSON data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addImage(id, image) → {bemap.Map}

Register a custom image for use in symbol layers. MapLibre only.
Parameters:
Name Type Description
id string Image identifier.
image object Image data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

addLayer(layer, options) → {bemap.OlMap}

Add a layer to the OpenLayers map.
Parameters:
Name Type Description
layer bemap.Layer
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addLayer(layer, options) → {bemap.OlMap}

Add a layer to the OpenLayers map.
Parameters:
Name Type Description
layer bemap.Layer
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMarker(marker, options) → {bemap.OlMap}

Add a marker to the layer
Parameters:
Name Type Description
marker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMarker(marker, options) → {bemap.OlMap}

Add a marker to the layer
Parameters:
Name Type Description
marker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMultiMarker(multimarker, options) → {bemap.OlMap}

Add a multimarker to the layer
Parameters:
Name Type Description
multimarker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addMultiMarker(multimarker, options) → {bemap.OlMap}

Add a multimarker to the layer
Parameters:
Name Type Description
multimarker bemap.Marker
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addPolygon(options) → {bemap.OlMap}

Add a bemap.Polygon to the layer
Parameters:
Name Type Description
bemap.Polygon. bemap.Polygon
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolygon(options) → {bemap.OlMap}

Add a bemap.Polygon to the layer
Parameters:
Name Type Description
bemap.Polygon. bemap.Polygon
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolyline(options) → {bemap.OlMap}

Add a bemap.Polyline to the layer
Parameters:
Name Type Description
bemap.Polyline. bemap.Polyline
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPolyline(options) → {bemap.OlMap}

Add a bemap.Polyline to the layer
Parameters:
Name Type Description
bemap.Polyline. bemap.Polyline
options object
Overrides:
Source:
Returns:
Type
bemap.OlMap

addPopup(popup, options) → {bemap.OlMap}

Add a popup to the map
Parameters:
Name Type Description
popup bemap.Popup
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

addPopup(popup, options) → {bemap.OlMap}

Add a popup to the map
Parameters:
Name Type Description
popup bemap.Popup
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

backgroundLayers(geoservers) → {bemap.Map}

Create a background layer for each geoserver name.
Parameters:
Name Type Description
geoservers array List of geoserver name.
Overrides:
Source:
Returns:
this
Type
bemap.Map

buildCircleStyle(circleStyle, options) → {bemap.OlMap}

Build circleStyle resource.
Parameters:
Name Type Description
circleStyle bemap.CircleStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildCircleStyle(circleStyle, options) → {bemap.OlMap}

Build circleStyle resource.
Parameters:
Name Type Description
circleStyle bemap.CircleStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildIcon(icon, options) → {bemap.OlMap}

Build icon resource.
Parameters:
Name Type Description
icon bemap.Icon
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildIcon(icon, options) → {bemap.OlMap}

Build icon resource.
Parameters:
Name Type Description
icon bemap.Icon
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildLineStyle(lineStyle, options) → {bemap.OlMap}

Build lineStyle resource.
Parameters:
Name Type Description
lineStyle bemap.LineStyle
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildLineStyle(lineStyle, options) → {bemap.OlMap}

Build lineStyle resource.
Parameters:
Name Type Description
lineStyle bemap.LineStyle
options object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

buildPolygonStyle(polygonStyle, options) → {bemap.OlMap}

Build polygonStyle resource.
Parameters:
Name Type Description
polygonStyle bemap.PolygonStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildPolygonStyle(polygonStyle, options) → {bemap.OlMap}

Build polygonStyle resource.
Parameters:
Name Type Description
polygonStyle bemap.PolygonStyle
options object
Source:
Returns:
this
Type
bemap.OlMap

buildTextStyle(text, name, options) → {bemap.OlMap}

Build text style resource.
Parameters:
Name Type Description
text bemap.TextStyle style object.
name String Name (label) of marker.
options object
Source:
Returns:
this
Type
bemap.OlMap

buildTextStyle(text, name, options) → {bemap.OlMap}

Build text style resource.
Parameters:
Name Type Description
text bemap.TextStyle style object.
name String Name (label) of marker.
options object
Source:
Returns:
this
Type
bemap.OlMap

clearAllEffects() → {bemap.Map}

Tear down every registered effect. Invokes each teardown in registration order, swallowing errors per-teardown so one failure doesn't block the rest. Each teardown is expected to call `_unregisterEffect` itself via the matching `remove*`/`stop*` path; the registry is cleared at the end regardless.
Since:
  • 2.0.0
Overrides:
Source:
Returns:
Type
bemap.Map

clearLayer(layer) → {bemap.OlMap}

Remove all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to clear.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

clearLayer(layer) → {bemap.OlMap}

Remove all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to clear.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

clearPopup() → {bemap.OlMap}

Remove all the popups from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

clearPopup() → {bemap.OlMap}

Remove all the popups from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

defaultLayers(options) → {bemap.Map}

Add default layers.
Parameters:
Name Type Description
options object
Properties
Name Type Description
markerAsCluster boolean
Overrides:
Source:
Returns:
this
Type
bemap.Map

defaultOverlayLayers(options) → {bemap.Map}

Add default overlay layers, like dedicated for markers or polyline, etc.
Parameters:
Name Type Description
options object
Properties
Name Type Description
markerAsCluster boolean
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) draggableCircle(circle, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircle(circle, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircles(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Circle.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableCircles(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Circle.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarker(marker, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarker(marker, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Marker.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Marker.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMultiMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.MultiMarkers.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggableMultiMarkers(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.MultiMarkers.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygon(polygon, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygon(polygon, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygons(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polygon.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolygons(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polygon.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolyline(polyline, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolyline(polyline, callback, options) → {bemap.Listener}

Define the draggable capability for bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline bemap object.
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolylines(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polyline.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

(protected) draggablePolylines(callback, options) → {bemap.Listener}

Define the draggable capability for all bemap.Polyline.
Parameters:
Name Type Description
callback function Function will be called when the specified eventType is occur.
options object Options.
Properties
Name Type Description
layerFilter bemap.Layer set the bemap layer used as filter.
Overrides:
Source:
Returns:
bemap.listener.
Type
bemap.Listener

drawPolygon()

BeNomad BeMap JavaScript API - OpenLayers v10 - Draw Interaction
Overrides:
Source:

easeTo(options) → {bemap.Map}

Smooth animated camera transition. MapLibre only.
Parameters:
Name Type Description
options object center, zoom, pitch, bearing, duration.
Overrides:
Source:
Returns:
this
Type
bemap.Map

flyTo(lon, lat, zoom, options)

Fly map to new coordinate.
Parameters:
Name Type Description
lon double longitude
lat double latitude
zoom double zoom
options Object options
Overrides:
Source:

flyTo(lon, lat, zoom, options)

Fly map to new coordinate.
Parameters:
Name Type Description
lon double longitude
lat double latitude
zoom double zoom
options Object options
Overrides:
Source:

getActiveEffects() → {Array.<String>}

Names of every currently-active effect. Snapshot — does not auto- update; subscribe via `onEffectChange` for live notification.
Since:
  • 2.0.0
Overrides:
Source:
Returns:
Type
Array.<String>

getBearing() → {number}

Get the current bearing. MapLibre only.
Overrides:
Source:
Returns:
bearing in degrees (0 if not supported).
Type
number

getBoundingBox() → {bemap.BoundingBox}

Get the limits of the map on the current zoom.
Overrides:
Source:
Returns:
the bounding box containing the limits.
Type
bemap.BoundingBox

getBoundingBox() → {bemap.BoundingBox}

Get the limits of the map on the current zoom.
Overrides:
Source:
Returns:
the bounding box containing the limits.
Type
bemap.BoundingBox

getCenter() → {bemap.Coordinate}

Get the center of the map in bemap.Coordinate.
Overrides:
Source:
Returns:
the center of the map.
Type
bemap.Coordinate

getCenter() → {bemap.Coordinate}

Get the center of the map in bemap.Coordinate.
Overrides:
Source:
Returns:
the center of the map.
Type
bemap.Coordinate

getKeyboard()

Source:

getLayerByName(name) → {bemap.Layer}

Search the layer by name.
Parameters:
Name Type Description
name String of layer.
Overrides:
Source:
Returns:
Return the layer or null if not found.
Type
bemap.Layer

getPitch() → {number}

Get the current pitch angle. MapLibre only.
Overrides:
Source:
Returns:
pitch in degrees (0 if not supported).
Type
number

getRotation() → {Number}

Get current rotation angle of map.
Overrides:
Source:
Returns:
current rotation in DEGREES (clockwise, matching setBearing convention). Previously returned raw radians — fixed in v2.0.
Type
Number

getRotation() → {int}

Get current rotation angle of map.
Overrides:
Source:
Returns:
current rotation angle of map in degrees.
Type
int

getXYFromCoordinate() → {Array}

Get the pixel coordinate from bemap coordinate.
Source:
Returns:
the corresponding XY coords.
Type
Array

getXYFromCoordinate() → {Array}

Get the pixel coordinate from bemap coordinate.
Source:
Returns:
the corresponding XY coords.
Type
Array

getZoom() → {int}

Get current zoom level of map.
Overrides:
Source:
Returns:
current zoom level of map.
Type
int

getZoom() → {int}

Get current zoom level of map.
Overrides:
Source:
Returns:
current zoom level of map.
Type
int

getZoomControl()

Overrides:
Source:

(abstract) isDragPan() → {boolean}

Return the satus of drag pan of map.
Parameters:
Name Type Description
options.dragPan. Object
Overrides:
Source:
Returns:
true to enable the drag pan of map, otherwise false.
Type
boolean

(abstract) isDragPan() → {boolean}

Return the satus of drag pan of map.
Parameters:
Name Type Description
options.dragPan. Object
Overrides:
Source:
Returns:
true to enable the drag pan of map, otherwise false.
Type
boolean

jumpTo(options) → {bemap.Map}

Instant camera change with pitch/bearing support. MapLibre only.
Parameters:
Name Type Description
options object center, zoom, pitch, bearing.
Overrides:
Source:
Returns:
this
Type
bemap.Map

move(lon, lat, zoom, options) → {bemap.OlMap}

Move map to new coordinate.
Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
zoom int Zoom level (optional).
options Object Options (optional).
Properties
Name Type Description
animate String Enable the animation.
fly String Enable the animation (same as animate).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

move(lon, lat, zoom, options) → {bemap.OlMap}

Move map to new coordinate.
Parameters:
Name Type Description
lon double Longitude in degres decimal (WGS84).
lat double Latitude in degres decimal (WGS84).
zoom int Zoom level (optional).
options Object Options (optional).
Properties
Name Type Description
animate String Enable the animation.
fly String Enable the animation (same as animate).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

moveToBoundingBox(boundingBox) → {bemap.OlMap}

Set the center and the zoom of the map to fit the bounding box.
Parameters:
Name Type Description
boundingBox bemap.BoundingBox the bounding box to fit.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

moveToBoundingBox(boundingBox) → {bemap.OlMap}

Set the center and the zoom of the map to fit the bounding box.
Parameters:
Name Type Description
boundingBox bemap.BoundingBox the bounding box to fit.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(abstract) moveToLayerData(layer, options) → {bemap.Map}

Move map and zoom on data contains in layers.
Parameters:
Name Type Description
layer bemap.Layer Layer.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.Map

(abstract) moveToLayerData(layer, options) → {bemap.Map}

Move map and zoom on data contains in layers.
Parameters:
Name Type Description
layer bemap.Layer Layer.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.Map

on(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.OlMap.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
listner.
Type
bemap.Listener

on(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.OlMap.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
listner.
Type
bemap.Listener

onCircle(circle, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onCircle(circle, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Circle.
Parameters:
Name Type Description
circle bemap.Circle
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onEffectChange()

Subscribe to active-effect changes. Fires `{name, active}` whenever an effect is registered (`active: true`) or torn down (`active: false`). The dashboard's active-effects bar consumes this.
Since:
  • 2.0.0
Overrides:
Source:

onGetFeatureInfo(layer, options) → {bemap.Listener}

Set get feature info call back.
Parameters:
Name Type Description
layer bemap.Layer set the bemap layer.
options object options.
Properties
Name Type Description
beforeCallback function callback called at data reception and before display the popup.
afterCallback function callback called after display the popup.
panningMap function enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
listner;
Type
bemap.Listener

onGetFeatureInfo(layer, options) → {bemap.Listener}

Set get feature info call back.
Parameters:
Name Type Description
layer bemap.Layer set the bemap layer.
options object options.
Properties
Name Type Description
beforeCallback function callback called at data reception and before display the popup.
afterCallback function callback called after display the popup.
panningMap function enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
listner;
Type
bemap.Listener

onMarker(marker, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarker(marker, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Marker.
Parameters:
Name Type Description
marker bemap.Marker
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarkers(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Marker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMarkers(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Marker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onMultiMarker(multimarker, eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.MultiMarker.
Parameters:
Name Type Description
multimarker bemap.MultiMarker
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarker(multimarker, eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.MultiMarker.
Parameters:
Name Type Description
multimarker bemap.MultiMarker
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarkers(eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.MultiMarker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onMultiMarkers(eventType, listener, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.MultiMarker.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
listener function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
bemap.Listener.
Type
bemap.Listener

onPolygon(polygon, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygon(polygon, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polygon.
Parameters:
Name Type Description
polygon bemap.Polygon
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygons(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polygon.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolygons(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polygon.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Source:
Returns:
this.
Type
bemap.Listener

onPolyline(polyline, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolyline(polyline, eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on bemap.Polyline.
Parameters:
Name Type Description
polyline bemap.Polyline
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolylines(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polyline.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

onPolylines(eventType, callback, options) → {bemap.Listener}

Set the listner when an specified eventType occur on all bemap.Polyline.
Parameters:
Name Type Description
eventType bemap.Map.EventType Event type.
callback function Function will be called when the specified eventType is occur.
options object options.
Overrides:
Source:
Returns:
this.
Type
bemap.Listener

queryRenderedFeatures(point, options) → {Array}

Query rendered features at a point or in a box. MapLibre only.
Parameters:
Name Type Description
point object Screen point or bounding box.
options object Query options (layers, filter).
Overrides:
Source:
Returns:
Array of feature objects.
Type
Array

(abstract) refresh(options) → {bemap.OlMap}

Refresh map.
Parameters:
Name Type Description
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

(abstract) refresh(options) → {bemap.OlMap}

Refresh map.
Parameters:
Name Type Description
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

refreshLayer(layer) → {bemap.OlMap}

Refresh all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to refresh.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

refreshLayer(layer) → {bemap.OlMap}

Refresh all objects from a layer.
Parameters:
Name Type Description
layer bemap.Layer the layer object to refresh.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeCircle(circle)

Remove a circle from his layer.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Overrides:
Source:

removeCircle(circle)

Remove a circle from his layer.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Overrides:
Source:

removeImage(id) → {bemap.Map}

Remove a registered image. MapLibre only.
Parameters:
Name Type Description
id string Image identifier.
Overrides:
Source:
Returns:
this
Type
bemap.Map

removeLayer(layer) → {bemap.OlMap}

Remove a layer from the map.
Parameters:
Name Type Description
layer bemap.Layer layer to remove from the map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

removeLayer(layer) → {bemap.OlMap}

Remove a layer from the map.
Parameters:
Name Type Description
layer bemap.Layer layer to remove from the map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(protected) removeListener(listener, options) → {bemap.OlMap}

Remove listener.
Parameters:
Name Type Description
listener bemap.Listener Function will be called when the specified eventType is occur.
options object Options.
Source:
Returns:
this.
Type
bemap.OlMap

(protected) removeListener(listener, options) → {bemap.OlMap}

Remove listener.
Parameters:
Name Type Description
listener bemap.Listener Function will be called when the specified eventType is occur.
options object Options.
Source:
Returns:
this.
Type
bemap.OlMap

removeMarker(marker) → {bemap.OlMap}

Remove a marker from his layer.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMarker(marker) → {bemap.OlMap}

Remove a marker from his layer.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMultimarker(multimarker) → {bemap.OlMap}

Remove a multimarker from his layer.
Parameters:
Name Type Description
multimarker bemap.MultiMarker the multimarker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removeMultimarker(multimarker) → {bemap.OlMap}

Remove a multimarker from his layer.
Parameters:
Name Type Description
multimarker bemap.MultiMarker the multimarker object to remove.
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

removePolygon(polygon)

Remove a polygon from his layer.
Parameters:
Name Type Description
polygon bemap.Polygon the polygon object to remove.
Overrides:
Source:

removePolygon(polygon)

Remove a polygon from his layer.
Parameters:
Name Type Description
polygon bemap.Polygon the polygon object to remove.
Overrides:
Source:

removePolyline(polyline)

Remove a polyline from his layer.
Parameters:
Name Type Description
polyline bemap.Polyline the polyline object to remove.
Overrides:
Source:

removePolyline(polyline)

Remove a polyline from his layer.
Parameters:
Name Type Description
polyline bemap.Polyline the polyline object to remove.
Overrides:
Source:

removePopup(popup) → {bemap.OlMap}

Remove a popup from the map.
Parameters:
Name Type Description
popup bemap.Popup the popup to remove from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

removePopup(popup) → {bemap.OlMap}

Remove a popup from the map.
Parameters:
Name Type Description
popup bemap.Popup the popup to remove from the map.
Overrides:
Source:
Returns:
this;
Type
bemap.OlMap

removeTerrain() → {bemap.Map}

Disable 3D terrain. MapLibre only.
Overrides:
Source:
Returns:
this
Type
bemap.Map

rotation(angle, options) → {bemap.OlMap}

Rotation of map, set new angle of map.
Parameters:
Name Type Description
angle int in degrees, clockwise (matches MapLibre's setBearing convention; previously this method rotated counter-clockwise — that was the OL native direction but inconsistent with MapLibre, fixed in v2.0).
options Object Options (optional).
Overrides:
Deprecated:
  • Since 2.0 — use `setBearing(deg)` for a cross-engine API consistent with MapLibre's compass-bearing convention.
Source:
Returns:
this
Type
bemap.OlMap

rotation(angle, options) → {bemap.OlMap}

Rotation of map, set new angle of map.
Parameters:
Name Type Description
angle int in degrees.
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setBearing(bearing) → {bemap.Map}

Set the bearing (compass rotation) of the map. MapLibre only.
Parameters:
Name Type Description
bearing number Bearing in degrees (0-360).
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) setCoordinateCircle(circle) → {bemap.OlMap}

Set the coordinates of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to move.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateCircle(circle) → {bemap.OlMap}

Set the coordinates of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateMarker(marker) → {bemap.OlMap}

Set the coordinates of the marker.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setCoordinateMarker(marker) → {bemap.OlMap}

Set the coordinates of the marker.
Parameters:
Name Type Description
marker bemap.Marker the marker object to remove.
Source:
Returns:
this
Type
bemap.OlMap

setCoordinatePopup(popup, coordinate, options) → {bemap.OlMap}

Set the coordinate of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup of wich to set the coordinate.
coordinate bemap.Coordinate the new coordinate.
options object Options.
Properties
Name Type Description
panningMap bemap.Layer enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

setCoordinatePopup(popup, coordinate, options) → {bemap.OlMap}

Set the coordinate of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup of wich to set the coordinate.
coordinate bemap.Coordinate the new coordinate.
options object Options.
Properties
Name Type Description
panningMap bemap.Layer enable the map panning animation. move map from the current position to the popup anchor at the center of map.
Overrides:
Source:
Returns:
this.
Type
bemap.OlMap

(abstract) setDragPan(active) → {bemap.OlMap}

Enable or diable the drag pan of map.
Parameters:
Name Type Description
active boolean true to enable the drag pan of map, otherwise false.
options.dragPan. Object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

(abstract) setDragPan(active) → {bemap.OlMap}

Enable or diable the drag pan of map.
Parameters:
Name Type Description
active boolean true to enable the drag pan of map, otherwise false.
options.dragPan. Object
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setKeyboard(enabled) → {bemap.OlMap}

Toggle keyboard navigation (arrow-pan + `+`/`-` zoom) at runtime by adding / removing the `KeyboardPan` and `KeyboardZoom` interactions.
Parameters:
Name Type Description
enabled Boolean
Source:
Returns:
Type
bemap.OlMap

setLight(options) → {bemap.Map}

Set 3D light position and properties. MapLibre only.
Parameters:
Name Type Description
options object Light options (position, color, intensity, anchor).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setPitch(pitch) → {bemap.Map}

Set the pitch (tilt) angle of the map in degrees. MapLibre only.
Parameters:
Name Type Description
pitch number Pitch angle (0-85).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setProjection(type) → {bemap.Map}

Set map projection ('mercator' or 'globe'). MapLibre only.
Parameters:
Name Type Description
type string projection type.
Overrides:
Source:
Returns:
this
Type
bemap.Map

(protected) setRadiusCircle(circle) → {bemap.OlMap}

Set the radius of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to resize.
Source:
Returns:
this
Type
bemap.OlMap

(protected) setRadiusCircle(circle) → {bemap.OlMap}

Set the radius of the circle.
Parameters:
Name Type Description
circle bemap.Circle the circle object to remove.
Source:
Returns:
this
Type
bemap.OlMap

setSky(options) → {bemap.Map}

Set sky/atmosphere effects. MapLibre only.
Parameters:
Name Type Description
options object sky options.
Overrides:
Source:
Returns:
this
Type
bemap.Map

setStyle(urlOrSpec) → {bemap.OlMap}

Cross-engine `setStyle` for OL. The MapLibre wrapper has the same name but a richer contract (vector style name / URL / object); on Leaflet/OL "style" means the WMS theme or the raster tile source. The argument is interpreted as: • bare NAME (no '/' or ':') → re-applied as the WMS `STYLES` on the BeNomad TileWMS source(s) — the dark/light theme switch (`'benomadGrayLevel'` / `'benomadLight'`). Vector style names are MapLibre-only. • URL string (contains '/' or ':') → swaps the XYZ raster source URL. • inline style object → MapLibre-only; warn-once no-op here.
Parameters:
Name Type Description
urlOrSpec String | Object WMS style name, a raster URL template, or a MapLibre vector style object (no-op).
Since:
  • 2.0.0
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

setTerrain(options) → {bemap.Map}

Enable 3D terrain rendering. MapLibre only.
Parameters:
Name Type Description
options object terrain options (source, exaggeration).
Overrides:
Source:
Returns:
this
Type
bemap.Map

setVisiblePopup(popup, visible) → {bemap.Popup}

Set the visiblility of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup.
visible Boolean true for visible and false for hidden.
Overrides:
Source:
Returns:
this.
Type
bemap.Popup

setVisiblePopup(popup, visible) → {bemap.Popup}

Set the visiblility of the popup.
Parameters:
Name Type Description
popup bemap.Popup the popup.
visible Boolean true for visible and false for hidden.
Overrides:
Source:
Returns:
this.
Type
bemap.Popup

setZoomControl(enabled) → {bemap.Map}

Show or hide the engine's native zoom (+/-) buttons at runtime. Uniform across Leaflet, OpenLayers and MapLibre — toggles a class on the map container so the engine-specific selectors all hit at once.
Parameters:
Name Type Description
enabled Boolean
Since:
  • 1.5.0
Overrides:
Source:
Returns:
this
Type
bemap.Map

switchBackgroundLayer(geoserver) → {bemap.Map}

Switch bytween several background layers.
Parameters:
Name Type Description
geoserver String Name of geoserver.
Overrides:
Source:
Returns:
this
Type
bemap.Map

updateCircleCenter()

Update the coordinate from the native map browser.
Source:

updateCircleCenter()

Update the coordinate from the native map browser.
Source:

updateGeoJsonSource(id, data) → {bemap.Map}

Update an existing GeoJSON source data. MapLibre only.
Parameters:
Name Type Description
id string Source identifier.
data object New GeoJSON data.
Overrides:
Source:
Returns:
this
Type
bemap.Map

updatePolygonCoordinates()

Update the coordinates from the native map browser.
Source:

updatePolygonCoordinates()

Update the coordinates from the native map browser.
Source:

visibleLayer(layer) → {bemap.OlMap}

Set the visibility of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the visibility.
visible. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

visibleLayer(layer) → {bemap.OlMap}

Set the visibility of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the visibility.
visible. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zIndexLayer(layer) → {bemap.OlMap}

Set the zIndex of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the zIndex.
zIndex. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zIndexLayer(layer) → {bemap.OlMap}

Set the zIndex of the layer.
Parameters:
Name Type Description
layer bemap.Layer the layer of wich to set the zIndex.
zIndex. boolean
Overrides:
Source:
Returns:
return this.
Type
bemap.OlMap

zoom(zoom, options) → {bemap.OlMap}

Zoom on map, set new zoom level.
Parameters:
Name Type Description
zoom int Zoom level (optional).
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap

zoom(zoom, options) → {bemap.OlMap}

Zoom on map, set new zoom level.
Parameters:
Name Type Description
zoom int Zoom level (optional).
options Object Options (optional).
Overrides:
Source:
Returns:
this
Type
bemap.OlMap