Skip to main content

Geomap

<ui5-geomap>

The ui5-geomap component is the main container of the Geomap webcomponent.

ES6 Module Import​

import "@ui5/webcomponents-geomap/dist/Geomap.js";

Basic Sample​

Properties​

centerLng​

DescriptionLongitude of the point where the map is centered
Typenumber
Default0

centerLat​

DescriptionLatitude of the point where the map is centered
Typenumber
Default0

zoom​

DescriptionZoom level of the map - the bigger, the more the map is zoomed
Typenumber
Default2

rotation​

DescriptionRotation of the map in degrees, counter-clockwise from the north
Typenumber
Default0

tilt​

DescriptionTilt of the map in degrees (0-60) relative to the screen's plane
Typenumber
Default0

restrictedAreaWestSouthPointLng​

DescriptionLatitude of the West-South point, defining the map's restricted area The restricted area is provided as a rectangle, defined by its bottom-left (West-South) and top-right (East-North) coordinates
Note: Setting all 4 restrictedArea properties to 0 removes the restriction
Typenumber
Default0

restrictedAreaWestSouthPointLat​

DescriptionLongitude of the West-South point, defining the map's restricted area The restricted area is provided as a rectangle, defined by its bottom-left (West-South) and top-right (East-North) coordinates
Note: Setting all 4 restrictedArea properties to 0 removes the restriction
Typenumber
Default0

restrictedAreaEastNorthPointLng​

DescriptionLatitude of the West-South point, defining the map's restricted area The restricted area is provided as a rectangle, defined by its bottom-left (West-South) and top-right (East-North) coordinates
Note: Setting all 4 restrictedArea properties to 0 removes the restriction
Typenumber
Default0

restrictedAreaEastNorthPointLat​

DescriptionLongitude of the West-South point, defining the map's restricted area The restricted area is provided as a rectangle, defined by its bottom-left (West-South) and top-right (East-North) coordinates
Note: Setting all 4 restrictedArea properties to 0 removes the restriction
Typenumber
Default0

minZoom​

DescriptionThe minimum allowed zoom level
Typenumber
Default0

maxZoom​

DescriptionThe maximum allowed zoom level
Typenumber
Default24

minTilt​

DescriptionThe minimum allowed tilt level
Typenumber
Default0

maxTilt​

DescriptionThe maximum allowed tilt level
Typenumber
Default60

canvas​

DescriptionReturns the canvas element of the map
TypeHTMLCanvasElement
Defaultnull
Readonlytrue

Slots​

default​

DescriptionDescribes the content of the map - provider, controls, markers, etc.
TypeArray<HTMLElement>

mapControls​

DescriptionDescribes the controls of the map
TypeArray<HTMLElement>

Events​

map-center​

DescriptionThe user changed the center of the map (dragged or zoomed)
TypeCustomEvent
BubblesNo
CancelableNo

map-zoom​

DescriptionThe user zoomed the map
TypeCustomEvent
BubblesNo
CancelableNo

map-rotate​

DescriptionThe user rotated the map
TypeCustomEvent
BubblesNo
CancelableNo

map-tilt​

DescriptionThe user tilted the map
TypeCustomEvent
BubblesNo
CancelableNo

map-click​

DescriptionThe user clicked on the map
TypeCustomEvent
BubblesNo
CancelableYes - via preventDefault()

map-dblclick​

DescriptionThe user double-clicked on the map
TypeCustomEvent
BubblesNo
CancelableYes - via preventDefault()

map-mouseup​

DescriptionThe user released the mouse button
TypeCustomEvent
BubblesNo
CancelableYes - via preventDefault()

map-mousemove​

DescriptionThe user moved the mouse over the map
TypeCustomEvent
BubblesNo
CancelableNo

map-contextmenu​

DescriptionThe user right-clicked on the map
TypeCustomEvent
BubblesNo
CancelableYes - via preventDefault()

map-bounds-change​

DescriptionThe map's bounds have changed
TypeCustomEvent
BubblesNo
CancelableNo

map-error​

DescriptionThe map has encountered an error
TypeCustomEvent
BubblesNo
CancelableYes - via preventDefault()

selection-set​

DescriptionFired when a selection is set programmatically via setSelection().
TypeCustomEvent
BubblesNo
CancelableNo

Methods​

flyTo​

DescriptionChanges any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight.
Return typevoid
Parameterslng: number
Describes the longitude of the center.
lat: number
Describe the latitude of the center.
zoom: number
Describes the zoom level.

getLayersAt​

Description-
Return typeany

getBounds​

DescriptionReturns the map boundaries (for the visible viewport).
Return typeany

perfectZoom​

DescriptionZooms the map to the perfect level to display an area by its boundaries.
Return typevoid

getElementsInSelectedArea​

DescriptionReturns the elements in given area (described as a polygon).
Return typeArray<F>
Parametersarea: PolygonCoordinatesType

setSelection​

DescriptionSets one or more features as the active programmatic selection on the map.
Accepted shape types and the required GeoJSON geometry for each:
Return typevoid
Parametersfeature: GeoJSONFeature
A single GeoJSON Feature

getSelection​

DescriptionReturns the current programmatic selection features as GeoJSON Features.
Return typeArray<GeoJSONFeature>

removeSelection​

DescriptionRemoves all programmatically-added selection features from the map.
Return typevoid

takeScreenshot​

DescriptionCaptures the current map view and returns it as a data URL. The result includes both the WebGL map canvas and HTML marker overlays (spots).
Return typePromise<string>
Parameterstype: string
MIME type of the output image (default: "image/png")
quality: number
Compression quality 0–1, applies to lossy formats like "image/jpeg"

CSS Parts​

No CSS parts available for this component.