Constructor
(abstract) new Map(context)
Parameters:
| Name | Type | Description |
|---|---|---|
context |
bemap.Context | BeMap-JS-API Context. |
options. |
object |
- Source:
Members
(static) DEFAULT_LAYER
List of available layer name by default.
Properties:
| Name | Type | Description |
|---|---|---|
BACKGROUND |
||
CIRCLE |
||
POLYGON |
||
POLYLINE |
||
MARKER |
||
ROUTE |
- Source:
(protected, static) ENGINE_SURFACE
Overlay methods that some engines implement and others do not. Declaring the
surface in ONE place is the point: previously nothing in the codebase knew
which methods were supposed to exist, so a gap was undetectable. The
cross-engine parity spec (src-test/test-engine-parity.js) reads this list.
- Since:
- 2.0.2
- Source:
(static) OWNREF
Reserved name used to store the bemap object into the native properties of OpenLayers.
- Source:
(static) PROJ
List of available projections.
Properties:
| Name | Type | Description |
|---|---|---|
EPSG_WGS84 |
||
EPSG_MERCATOR |
- Source:
(static) ZoomPosition :String
Cross-engine zoom-control positions. Each engine has its own naming —
`bemap.Map._translateZoomPosition(engine, pos)` does the conversion.
Type:
- String
- Since:
- 1.5.0
- Source:
(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.
- Source:
(protected) callback
- Source:
(protected) ctx
- Source:
(protected) events
- Source:
(protected) layers
- Source:
(protected) native
- Source:
Methods
(static) _checkDependencies(engine, optsopt)
Verify the runtime dependencies for an engine. Emits a loud console
banner and throws on missing critical (JS) deps. Missing CSS produces
a single warn line — non-fatal because rendering still kinda works.
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
engine |
String | `'maplibre'` | `'leaflet'` | `'ol'` | |||||||||
opts |
Object |
<optional> |
Properties
|
- Since:
- 2.0.0
- Source:
(static) _resolveControlOptions(optionsopt) → {Object}
Resolve the `nativeAttribution` and `zoomControl` map-constructor options
into concrete flags + an optional explicit position. Shared by every
engine adapter (Leaflet, OpenLayers, MapLibre) so the contract is
uniform across them.
**`nativeAttribution`** — Boolean, controls whether the engine-native
attribution UI (Leaflet's `.leaflet-control-attribution`, OL's
`.ol-attribution`, MapLibre's `.maplibregl-ctrl-attrib`) is rendered.
When `bemap.AttributionWidget` is enabled (which is the default —
`options.attribution !== false`), the native UI is hidden by default
to avoid duplicating the legal mentions. When the BeMap widget is off,
the native UI is shown by default so customers never end up with no
attribution at all. Pass `nativeAttribution: true` to force-show, or
`nativeAttribution: false` to force-hide regardless of the widget.
**`zoomControl`** — controls whether the zoom (+/-) buttons are
rendered and where. Accepted forms:
- omitted / `false` (default) — **hide the zoom buttons**. Zoom control
is OFF unless the consumer explicitly opts in, matching the
`keyboard` and `nativeAttribution` defaults (all controls opt-in).
- `true` — show at the engine default position (`top-left`). On
MapLibre this auto-adds a `NavigationControl` so the contract is
consistent across engines.
- `'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'` — show
at that position. Same four values across every engine.
- `{ position: '', enabled?: boolean }` — long form. Set
`enabled: false` to hide while still recording the chosen position.
**`keyboard`** — controls whether the engine-native keyboard interactions
(arrow-key pan and `+`/`-` / arrow zoom on Leaflet, `KeyboardPan` +
`KeyboardZoom` on OL, `KeyboardHandler` on MapLibre) are active.
**Default: `false`** — keyboard navigation is OFF unless the consumer
explicitly opts in, because it surprises users who expect arrow keys to
scroll the page rather than the map. Accepted forms:
- omitted / `false` (default) — keyboard disabled (pan + zoom).
- `true` — full keyboard support enabled (arrow pan + `+`/`-` zoom).
- `{ pan?: boolean, zoom?: boolean }` — granular toggle; either omitted
half defaults to `false`.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
options |
Object |
<optional> |
Map-constructor options. |
- Since:
- 1.5.0
- Source:
Returns:
`zoomPosition` is always one of the four `bemap.Map.ZoomPosition`
values; defaults to `TOP_LEFT` when the user did not pick one.
- Type
- Object
(static) _translateZoomPosition(engine, pos) → {String}
Translate a `bemap.Map.ZoomPosition` value to the engine-specific
convention.
- 'leaflet' → `'topleft'` / `'topright'` / `'bottomleft'` / `'bottomright'`
- 'ol' → the CSS-class suffix `'top-left'` (used as `bemap-zoom-pos-`)
- 'maplibre' → unchanged (`'top-left'` matches MapLibre's own convention)
Parameters:
| Name | Type | Description |
|---|---|---|
engine |
String | 'leaflet' | 'ol' | 'maplibre' |
pos |
String | One of the `bemap.Map.ZoomPosition` values. |
- Since:
- 1.5.0
- Source:
Returns:
- Type
- String
(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
- Source:
(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
- Source:
Returns:
this
- Type
- bemap.Map
(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
- 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
- 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. |
- Source:
Returns:
this
- Type
- bemap.Map
addCircle(circle, options) → {bemap.Map}
Add circle to the map.
Parameters:
| Name | Type | Description |
|---|---|---|
circle |
bemap.Circle | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
addDrawControl(options) → {bemap.Map}
Add a drawing toolbar to the map.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | See below.
Properties
|
- 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. |
- 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. |
- Source:
Returns:
this
- Type
- bemap.Map
addLayer(layer, options) → {bemap.Map}
Add a layer to the map
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) addMarker(marker, options) → {bemap.Map}
Add a marker to the layer
Parameters:
| Name | Type | Description |
|---|---|---|
marker |
bemap.Marker | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) addMultiMarker(multipoint, options) → {bemap.Map}
Add a multipoint to the layer
Parameters:
| Name | Type | Description |
|---|---|---|
multipoint |
bemap.MultiPoint | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
addPolygon(polygon, options) → {bemap.Map}
Add polygon to the map.
Parameters:
| Name | Type | Description |
|---|---|---|
polygon |
bemap.Polygon | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) addPolyline(Polyline, options) → {bemap.Map}
Add a Polyline to the layer
Parameters:
| Name | Type | Description |
|---|---|---|
Polyline |
bemap.Polyline | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
addPopup(popup, options) → {bemap.Map}
Add a popup to the map
Parameters:
| Name | Type | Description |
|---|---|---|
popup |
bemap.Popup | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
backgroundLayers(geoservers) → {bemap.Map}
Create a background layer for each geoserver name.
Parameters:
| Name | Type | Description |
|---|---|---|
geoservers |
array | List of geoserver name. |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) buildIcon(icon, options) → {bemap.Map}
Build icon resource.
Parameters:
| Name | Type | Description |
|---|---|---|
icon |
bemap.Icon | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) buildLineStyle(LineStyle, options) → {bemap.Map}
Build LineStyle resource.
Parameters:
| Name | Type | Description |
|---|---|---|
LineStyle |
bemap.LineStyle | |
options |
object |
- Source:
Returns:
this
- Type
- bemap.Map
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
- Source:
Returns:
- Type
- bemap.Map
(abstract) clearLayer(layer) → {bemap.Map}
Remove all objects from a layer.
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | the layer object to clear. |
- Source:
Returns:
this
- Type
- bemap.Map
clearPopup() → {bemap.Map}
Remove all the popups from the map.
- Source:
Returns:
this;
- Type
- bemap.Map
defaultLayers(options) → {bemap.Map}
Add default layers.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- 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
|
- Source:
Returns:
this
- Type
- bemap.Map
(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
|
- 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
|
- 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
|
- 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
|
- 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
|
- Source:
Returns:
bemap.listener.
- Type
- bemap.Listener
drawPolygon(options, callback) → {bemap.Listener}
Draw a polygon interactively. User clicks vertices, double-clicks to finish.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
Object | See below.
Properties
|
||||||
callback |
function | Called with bemap.MapEvent when drawing is complete. evt.bemapObject = bemap.Polygon. |
- Source:
Returns:
- Type
- bemap.Listener
easeTo(options) → {bemap.Map}
Smooth animated camera transition. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | center, zoom, pitch, bearing, duration. |
- 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 |
- 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
- Source:
Returns:
- Type
- Array.<String>
getBearing() → {number}
Get the current bearing. MapLibre only.
- Source:
Returns:
bearing in degrees (0 if not supported).
- Type
- number
getBoundingBox() → {bemap.BoundingBox}
Get the limits of the map on the current zoom.
- Source:
Returns:
the bounding box containing the limits.
- Type
- bemap.BoundingBox
getCenter() → {bemap.Coordinate}
Get the center of the map in bemap.Coordinate.
- Source:
Returns:
the center of the map.
- Type
- bemap.Coordinate
getLayerByName(name) → {bemap.Layer}
Search the layer by name.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | of layer. |
- Source:
Returns:
Return the layer or null if not found.
- Type
- bemap.Layer
getPitch() → {number}
Get the current pitch angle. MapLibre only.
- Source:
Returns:
pitch in degrees (0 if not supported).
- Type
- number
getRotation() → {int}
Get current rotation angle of map.
- Source:
Returns:
-1 if not supported.
- Type
- int
getZoom() → {int}
Get current zoom of map.
- Source:
Returns:
-1 if not supported.
- Type
- int
getZoomControl()
- Source:
(abstract) isDragPan() → {boolean}
Return the satus of drag pan of map.
Parameters:
| Name | Type | Description |
|---|---|---|
options.dragPan. |
Object |
- 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. |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) move(lon, lat, zoom, options) → {bemap.Map}
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). |
- Source:
Returns:
this
- Type
- bemap.Map
moveToBoundingBox(boundingBox, options) → {bemap.Map}
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. |
options |
Object | Options (optional). |
- 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). |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) on(eventType, callback, options) → {bemap.Listener}
Set the listner when an specified eventType occur on bemap.Map.
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
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
- 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
|
- Source:
Returns:
listener;
- Type
- bemap.Listener
(abstract) 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. |
- Source:
Returns:
this.
- Type
- bemap.Listener
(abstract) 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. |
- Source:
Returns:
this.
- Type
- bemap.Listener
(abstract) onMultiMarkers(eventType, callback, 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. |
callback |
function | Function will be called when the specified eventType is occur. |
options |
object | options. |
- Source:
Returns:
this.
- Type
- bemap.Listener
(abstract) 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. |
- Source:
Returns:
this.
- Type
- bemap.Listener
(abstract) 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. |
- 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). |
- Source:
Returns:
Array of feature objects.
- Type
- Array
(abstract) refresh(options) → {bemap.Map}
Refresh map.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | Options (optional). |
- Source:
Returns:
this
- Type
- bemap.Map
refreshLayer(layer) → {bemap.Map}
Refresh all objects from a layer.
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | the layer object to refresh. |
- Source:
Returns:
this
- Type
- bemap.Map
removeCircle(circle) → {bemap.Map}
Remove circle from the map.
Parameters:
| Name | Type | Description |
|---|---|---|
circle |
bemap.Circle |
- Source:
Returns:
this
- Type
- bemap.Map
removeImage(id) → {bemap.Map}
Remove a registered image. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | Image identifier. |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) removeLayer(layer) → {bemap.Map}
Remove a layer from the map.
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | layer to remove from the map. |
- Source:
Returns:
this.
- Type
- bemap.Map
(abstract) removeMarker(marker) → {bemap.Map}
Remove a marker from the layer
Parameters:
| Name | Type | Description |
|---|---|---|
marker |
bemap.Marker |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) removeMultimarker(multimarker) → {bemap.Map}
Remove a multimarker from the layer
Parameters:
| Name | Type | Description |
|---|---|---|
multimarker |
bemap.MultiMarker |
- Source:
Returns:
this
- Type
- bemap.Map
removePolygon(polygon) → {bemap.Map}
Remove polygon from the map.
Parameters:
| Name | Type | Description |
|---|---|---|
polygon |
bemap.Polygon |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) removePolyline(polyline) → {bemap.Map}
Remove a polyline from the layer
Parameters:
| Name | Type | Description |
|---|---|---|
polyline |
bemap.Polyline |
- Source:
Returns:
this
- Type
- bemap.Map
removePopup(popup) → {bemap.Map}
Remove a popup from the map.
Parameters:
| Name | Type | Description |
|---|---|---|
popup |
bemap.Popup | the popup to remove from the map. |
- Source:
Returns:
this;
- Type
- bemap.Map
removeTerrain() → {bemap.Map}
Disable 3D terrain. MapLibre only.
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) rotation(angle, options) → {bemap.Map}
Rotation of map, set new angle of map.
Parameters:
| Name | Type | Description |
|---|---|---|
angle |
int | in degrees. |
options |
Object | Options (optional). |
- Source:
Returns:
this
- Type
- bemap.Map
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). |
- Source:
Returns:
this
- Type
- bemap.Map
setCoordinatePopup(popup, coordinate, options) → {bemap.Map}
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
|
- Source:
Returns:
this.
- Type
- bemap.Map
(abstract) setDragPan(active) → {bemap.Map}
Enable or disable the drag pan of map.
Parameters:
| Name | Type | Description |
|---|---|---|
active |
boolean | true to enable the drag pan of map, otherwise false. |
options.dragPan. |
Object |
- Source:
Returns:
this
- Type
- bemap.Map
setLight(options) → {bemap.Map}
Set 3D light position and properties. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | Light options (position, color, intensity, anchor). |
- 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). |
- 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. |
- Source:
Returns:
this
- Type
- bemap.Map
setSky(options) → {bemap.Map}
Set sky/atmosphere effects. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | sky options. |
- Source:
Returns:
this
- Type
- bemap.Map
setStyle(style) → {bemap.Map}
Set the map style URL or object. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
style |
string | object | Style URL or JSON object. |
- Source:
Returns:
this
- Type
- bemap.Map
setTerrain(options) → {bemap.Map}
Enable 3D terrain rendering. MapLibre only.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | terrain options (source, exaggeration). |
- 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. |
- 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
- Source:
Returns:
this
- Type
- bemap.Map
switchBackgroundLayer(geoserver) → {bemap.Map}
Switch bytween several background layers.
Parameters:
| Name | Type | Description |
|---|---|---|
geoserver |
String | Name of geoserver. |
- Source:
Returns:
this
- Type
- bemap.Map
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. |
- Source:
Returns:
this
- Type
- bemap.Map
(abstract) visibleLayer(layer) → {bemap.Map}
Set the visibility of the layer.
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | the layer of wich to set the visibility. |
visible. |
boolean |
- Source:
Returns:
return this.
- Type
- bemap.Map
(abstract) zIndexLayer(layer) → {bemap.Map}
Set the zIndex of the layer.
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
bemap.Layer | the layer of wich to set the zIndex. |
zIndex. |
boolean |
- Source:
Returns:
return this.
- Type
- bemap.Map
(abstract) zoom(zoom, options) → {bemap.Map}
Zoom on map, set new zoom level.
Parameters:
| Name | Type | Description |
|---|---|---|
zoom |
int | Zoom level (optional). |
options |
Object | Options (optional). |
- Source:
Returns:
this
- Type
- bemap.Map