-
addGeocoderICGC([options], [position]) ⇒
Object
-
Add geocoder.
-
Add geocoder with customizable options.
-
getConfigStyles() ⇒
Array
-
Retrieves the available base styles from default options.
-
getConfigWMSLayers() ⇒
Array
-
Retrieves the available WMS image layers from default options.
-
getConfigOrtoLayers() ⇒
Array
-
Retrieves the available orto image layers from default options.
-
getConfigVectorLayers() ⇒
Array
-
Retrieves the available vector layers from default options.
-
getConfigVectorAdminLayers() ⇒
Array
-
Retrieves the available vector layers from default options.
-
getConfigFGBAdminLayers() ⇒
Array
-
Retrieves the available fgb layers from default options.
- fetchData(url, idLayer, options)
-
Fetches GeoJSON data from a URL and adds a corresponding layer to the map based on the specified geometry type.
- fetchDataAndMenu(url, idLayer, filterField, options)
-
Fetches GeoJSON data from a URL and adds a corresponding layer to the map based on the specified geometry type and adds to the Menu as a checkbox item.
- on(type, func)
-
Adds an event listener to the map.
- setStyle(style, [options])
-
Sets the style of the map.
- addControl(control, [position])
-
Adds a control to the map with the specified position.
- setSky(options)
-
Sets the sky properties of the map.
- addMouseCoordControl([position])
-
Adds a mouse coordinate control to the map.
- addGeolocateControl(options, [position])
-
Adds a geolocate control to the map.
- addFullscreenControl(options, [position])
-
Adds a fullscreen control to the map.
- addLayer(layer, layerIdOrder)
-
Adds a layer to the map.
-
addImage(id, image, options) ⇒
this
-
Adds an image to the map.
-
addSource(id, source) ⇒
this
-
Adds a source to the map.
-
addSprite(id, url, options) ⇒
this
-
Adds a sprite to the map.
-
areTilesLoaded() ⇒
boolean
-
Checks if all tiles in the viewport are loaded.
-
cameraForBounds(bounds, options) ⇒
CenterZoomBearing
|undefined
-
Calculates the camera position for given bounds.
-
easeTo(options, eventData) ⇒
this
-
Eases the camera to a new position.
-
fitBounds(bounds, options, eventData) ⇒
this
-
Fits the map to the given geographical bounds.
-
fitScreenCoordinates(p0, p1, bearing, options, eventData) ⇒
this
-
Fits the map to the given screen coordinates.
-
flyTo(options, eventData) ⇒
this
-
Flies the camera to a new position.
-
getBearing() ⇒
number
-
Gets the current bearing of the map.
-
getBounds() ⇒
LngLatBounds
-
Gets the current geographical bounds of the map.
-
getCameraTargetElevation() ⇒
number
-
Gets the elevation for the point where the camera is looking.
-
getCanvas() ⇒
HTMLCanvasElement
-
Gets the map's element.
-
getCanvasContainer() ⇒
HTMLElement
-
Gets the HTML element containing the map's element.
-
getCenter() ⇒
LngLat
-
Returns the map's geographical centerpoint.
-
getContainer() ⇒
HTMLElement
-
Returns the map's containing HTML element.
-
getFeatureState(feature) ⇒
any
-
Gets the state of a feature.
-
getFilter(layerId) ⇒
void
|FilterSpecification
-
Returns the filter applied to the specified style layer.
-
getGlyphs() ⇒
string
-
Returns the value of the style's glyphs URL.
-
getImage(id) ⇒
StyleImage
-
Returns an image currently available in the map.
-
getLayer(id) ⇒
StyleLayer
-
Returns the layer with the specified ID in the map's style.
-
getLayersOrder() ⇒
Array.<string>
-
Return the ids of all layers currently in the style, including custom layers, in order.
-
getLayoutProperty(layerId, name) ⇒
any
-
Returns the value of a layout property in the specified style layer.
-
getLight() ⇒
LightSpecification
-
Returns the value of the light object.
-
getMaxBounds() ⇒
LngLatBounds
-
Returns the maximum geographical bounds the map is constrained to.
-
getMaxPitch() ⇒
number
-
Returns the map's maximum allowable pitch.
-
getMaxZoom() ⇒
number
-
Returns the map's maximum allowable zoom level.
-
getMinPitch() ⇒
number
-
Returns the map's minimum allowable pitch.
-
getMinZoom() ⇒
number
-
Returns the map's minimum allowable zoom level.
-
getPadding() ⇒
PaddingOptions
-
Returns the current padding applied around the map viewport.
-
getPaintProperty(layerId, name) ⇒
unknown
-
Returns the value of a paint property in the specified style layer.
-
getPitch() ⇒
number
-
Returns the map's current pitch (tilt).
-
getPixelRatio() ⇒
number
-
Returns the map's pixel ratio.
-
getRenderWorldCopies() ⇒
boolean
-
Returns the state of renderWorldCopies.
-
getSource(id) ⇒
Source
-
Returns the source with the specified ID in the map's style.
-
getSprite() ⇒
Array.<object>
-
Returns the as-is value of the style's sprite.
-
getStyle() ⇒
StyleSpecification
-
Returns the map's MapLibre style object.
-
getTerrain() ⇒
TerrainSpecification
-
Get the terrain-options if terrain is loaded.
-
getZoom() ⇒
number
-
Returns the map's current zoom level.
-
hasControl(control) ⇒
boolean
-
Checks if a control exists on the map.
-
hasImage(id) ⇒
boolean
-
Check whether or not an image with a specific ID exists in the style.
-
isMoving() ⇒
boolean
-
Returns true if the map is panning, zooming, rotating, or pitching due to a camera animation or user gesture.
-
isRotating() ⇒
boolean
-
Returns true if the map is rotating due to a camera animation or user gesture.
-
isSourceLoaded(id) ⇒
boolean
-
Returns a Boolean indicating whether the source is loaded.
-
isStyleLoaded() ⇒
boolean
|void
-
Returns a Boolean indicating whether the map's style is fully loaded.
-
isZooming() ⇒
boolean
-
Returns true if the map is zooming due to a camera animation or user gesture.
-
jumpTo(options, [eventData]) ⇒
this
-
Changes any combination of center, zoom, bearing, and pitch, without an animated transition.
-
listImages() ⇒
Array.<string>
-
Returns an Array of strings containing the IDs of all images currently available in the map.
-
listens(type) ⇒
boolean
-
Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
-
loadImage(url) ⇒
Promise.<GetResourceResponse.<(ImageBitmap|HTMLImageElement)>>
-
Load an image from an external URL to be used with Map#addImage.
-
loaded() ⇒
boolean
-
Returns a Boolean indicating whether the map is fully loaded.
-
addProtocol(customProtocol, loadFn) ⇒
void
-
Adds a custom load resource function that will be called when using a URL that starts with a custom URL schema.
-
moveLayer(id, [beforeId]) ⇒
this
-
Moves a layer to a different z-position.
-
panBy(offset, [options], [eventData]) ⇒
this
-
Pans the map by the specified offset.
-
panTo(lnglat, [options], [eventData]) ⇒
this
-
Pans the map to the specified location with an animated transition.
-
project(lnglat) ⇒
Point
-
Returns a Point representing pixel coordinates, relative to the map's container, that correspond to the specified geographical location.
-
queryRenderedFeatures([geometryOrOptions], [options]) ⇒
Array
-
Queries rendered features within a specified geometry or bounding box.
-
querySourceFeatures(sourceId, parameters) ⇒
Array
-
Queries source features within a specified source.
-
queryTerrainElevation(lngLatLike) ⇒
number
-
Queries the terrain elevation at a specified geographical location.
-
redraw() ⇒
this
-
Redraws the map.
-
remove() ⇒
this
-
Removes the map from the DOM.
-
removeControl(control) ⇒
this
-
Removes a control from the map.
-
removeFeatureState(target, [key]) ⇒
this
-
Removes the state of a feature.
-
removeImage(id) ⇒
this
-
Removes an image from the style's sprite.
- removeLayer(idLayer)
-
Removes a layer from the map.
- removeSource(idLayer)
-
Removes a source from the map.
-
removeSprite(id) ⇒
this
-
Removes a sprite from the style.
-
resetNorth([options], [eventData]) ⇒
this
-
Resets the map orientation so that north is up.
-
resetNorthPitch([options], [eventData]) ⇒
this
-
Resets the map orientation so that north is up and pitch is set to 0┬░.
-
resize([eventData]) ⇒
this
-
Resizes the map to fit its container.
-
rotateTo(bearing, [options], [eventData]) ⇒
this
-
Rotates the map to the specified bearing with an animated transition.
-
setBearing(bearing, [eventData]) ⇒
this
-
Sets the map's bearing with an optional animated transition.
-
setCenter(center, [eventData]) ⇒
this
-
Sets the map's center coordinates with an optional animated transition.
-
setEventedParent([parent], [data]) ⇒
this
-
Sets the parent of the map's event emitter.
-
setFeatureState(feature, state) ⇒
this
-
Sets the state of a feature.
-
setFilter(layerId, [filter], [options]) ⇒
this
-
Sets the filter for a specified layer.
-
setGlyphs(glyphsUrl, [options]) ⇒
this
-
Sets the glyphs for the map's style.
-
setLayerZoomRange(layerId, minzoom, maxzoom) ⇒
this
-
Sets the zoom range for a specified layer.
-
setLayoutProperty(layerId, name, value, [options]) ⇒
this
-
Sets a layout property for a specified layer.
-
setLight(light, [options]) ⇒
this
-
Sets the light for the map's style.
-
setMaxBounds(bounds) ⇒
this
-
Sets the maximum bounds for the map.
-
setMaxPitch(maxPitch) ⇒
this
-
Sets the maximum pitch for the map.
-
setMaxZoom(maxZoom) ⇒
this
-
Sets the maximum zoom level for the map.
-
setMinPitch(minPitch) ⇒
this
-
Sets the minimum pitch for the map.
-
setMinZoom(minZoom) ⇒
this
-
Sets the minimum zoom level for the map.
-
setPadding(padding, [eventData]) ⇒
this
-
Sets padding for the map's container.
-
setPaintProperty(layerId, name, value, [options]) ⇒
this
-
Sets a paint property for a specified layer.
-
setPitch(pitch, [eventData]) ⇒
this
-
Sets the map's pitch angle with an optional animated transition.
-
setPixelRatio(pixelRatio) ⇒
this
-
Sets the pixel ratio for the map.
-
setRenderWorldCopies(renderWorldCopies) ⇒
this
-
Sets whether the map should render world copies when the center longitude is greater than or less than ┬▒180 degrees.
-
setSprite(spriteUrl, [options]) ⇒
this
-
Sets the sprite for the map's style.
-
setTerrain(options) ⇒
this
-
Loads a 3D terrain mesh based on a "raster-dem" source.
-
setTransformRequest(transformRequest) ⇒
this
-
Updates the requestManager's transform request with a new function.
-
setZoom(zoom, [eventData]) ⇒
this
-
Sets the map's zoom level.
-
snapToNorth([options], [eventData]) ⇒
this
-
Snaps the map so that north is up (0┬░ bearing), if the current bearing is close enough to it.
-
stop() ⇒
this
-
Stops any animated transition underway.
-
triggerRepaint() ⇒
void
-
Triggers the rendering of a single frame.
-
unproject(point) ⇒
LngLat
-
Returns geographical coordinates corresponding to the specified pixel coordinates.
-
updateImage(id, image) ⇒
this
-
Updates an existing image in the style's sprite.
-
zoomIn([options], [eventData]) ⇒
this
-
Increases the map's zoom level by 1.
-
zoomOut([options], [eventData]) ⇒
this
-
Decreases the map's zoom level by 1.
-
zoomTo(zoom, [options], [eventData]) ⇒
this
-
Zooms the map to the specified zoom level with an animated transition.
- addLayerGeoJSON(layer, layerPosition)
-
Adds a GeoJSON layer to the map.
- addLayerWMS(tiles, idLayer, options)
-
Adds a WMS layer to the map.
- addLogo(options)
-
Adds a logo to the map.
- addBasemapsICGC(basesArray)
-
Adds base layers to the map.
- addBasemaps(baseLayers)
-
Adds base layers to the map.
- addFeatureQuery(idLayer, queryFields, popupStyle)
-
Adds feature query function to a layer.
- addScaleControl(options, position)
-
Adds a scale control to the map.
- @function addScaleControl
- addExportControl(options, [position])
-
Adds an export control to the map with the provided options and position.
-
addMarker(options) ⇒
Object
-
Adds a marker to the map.
-
addPopup(options, coord, text, popupStyle) ⇒
Object
-
Adds a popup to the map.
- addFullScreen([position])
-
Adds a fullscreen control to the map.
- addMenuItem(name)
-
Adds a menu item with a checkbox for controlling the visibility of a layer on the map.
- addLayerTree(options)
-
Adds a layer tree to the map.
-
createNavigationControl(options, [position]) ⇒
Object
-
Creates a navigation control with the provided options.
- addNavigationControl(options, [position])
-
Adds a navigation control to the map with the provided options.
- addAttributionControl(options, [position])
-
Adds an attribution control to the map with the provided options.
- addImageLayerICGC(url, idLayer, options)
-
Adds an ICGC image layer to the map based on the specified name and year.
- addVectorLayerICGC(url, idLayer, options)
-
Adds an ICGC vector layer to the map based on the specified name and year.
- addFGBLayerICGC(url, idLayer, options)
-
Adds an ICGC FGB layer to the map based on the specified name and year.
- addTerrainICGC(url, controlPosition)
-
Adds 3D terrain to the map using hillshade.
- addLegend(url, idLayer)
-
Add image legend.
-
_findImageType(url, var1, var2, var3, var4) ⇒
string
|null
-
Finds the type of image based on the provided URL and specified vectors.
-
_getKeyByUrlFGB(url) ⇒
string
|null
-
Gets the key by URL from the FGBAdmin layers.
-
_getLegendByName(name) ⇒
string
|null
-
Gets the legend by name from the default vector layers.
-
_getKeyByUrlVector(url) ⇒
string
|null
-
Gets the key by URL from the Vector layers.
-
_raiseText3DStyle() ⇒
Promise.<void>
-
Raises text 3D style on the map.
-
_dealStyleMaps(name) ⇒
Object
|string
|null
-
Deals with map styles based on the name.
-
_dealOrto3dStyle(name) ⇒
void
|null
-
Deals with the 3D ortho style based on the name.
-
_dealOrderLayer(order) ⇒
string
-
Deals with the order of the layer.
-
_firstSymbolLayer() ⇒
string
|undefined
-
Retrieves the id of the first symbol layer.
-
_firstLineLayer() ⇒
string
|undefined
-
Retrieves the id of the first line layer.
-
_createCitiesMapboxLayer() ⇒
MapboxLayer
|null
-
Creates a Mapbox layer for displaying cities in 3D.
addGeocoderICGC([options], [position]) ⇒ Object
Add geocoder.
Add geocoder with customizable options.
Kind: global function
Returns: Object
- - The current position of the search resultmerged configuration options for the geocoder, including the position.
Param | Type | Default | Description |
---|---|---|---|
[position] | string | "'top-right'" | Position to add the control on the map. |
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | {} | Optional configuration options for the geocoder. Defaults to an empty object. |
[position] | string | "'top-right'" | Position to add the geocoder control on the map. Defaults to 'top-right'. |