Documentation / @gebeta/react
@gebeta/react
References
addProtocol
Renames and re-exports LngLat
AttributionControl
Renames and re-exports LngLat
FullscreenControl
Renames and re-exports LngLat
GeoJSONSource
Renames and re-exports LngLat
GeolocateControl
Renames and re-exports LngLat
MapMouseEvent
Renames and re-exports LngLat
MercatorCoordinate
Renames and re-exports LngLat
removeProtocol
Renames and re-exports LngLat
ScaleControl
Renames and re-exports LngLat
TerrainControl
Renames and re-exports LngLat
Classes
BrowserLocationProvider
Implements
ILocationProvider
Methods
start()
start(onLocation): voidParameters
| Parameter | Type |
|---|---|
onLocation | (location) => void |
Returns
void
Implementation of
ILocationProvider.start
Defined in
client/js/dist/adapters/LocationProvider.d.ts:12
stop()
stop(): voidReturns
void
Implementation of
ILocationProvider.stop
Defined in
client/js/dist/adapters/LocationProvider.d.ts:13
getInstance()
static getInstance(options?): BrowserLocationProviderParameters
| Parameter | Type |
|---|---|
options? | LocationProviderOptions |
Returns
Defined in
client/js/dist/adapters/LocationProvider.d.ts:11
ClusteringManager
Manages marker clustering on a MapLibre map.
Groups nearby markers into clusters at lower zoom levels and renders individual markers when zoomed in. Cluster markers automatically expand on click unless a custom clusterOnClick handler is provided.
Enable via the constructor: new GebetaMaps({ clustering: { enabled: true } }), then access via sdk.clustering.
Constructors
new ClusteringManager()
new ClusteringManager(
mapAdapter,
markerFactory,
popupFactory,
options?): ClusteringManagerParameters
| Parameter | Type |
|---|---|
mapAdapter | IMapAdapter |
markerFactory | IMarkerFactory |
popupFactory | IPopupFactory |
options? | ClusteringOptions |
Returns
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:24
Methods
addMarker()
addMarker(marker): voidAdd a marker to clustering.
Parameters
| Parameter | Type | Description |
|---|---|---|
marker | MarkerData | Marker data to add |
Returns
void
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:29
clearMarkers()
clearMarkers(): voidClear all markers.
Returns
void
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:39
getMarker()
getMarker(markerId): undefined | MarkerDataGet marker by ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
markerId | string | ID of marker to find |
Returns
undefined | MarkerData
Marker data or undefined if not found
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:50
getMarkers()
getMarkers(): MarkerData[]Get all markers.
Returns
MarkerData[]
Array of all markers
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:44
getOptions()
getOptions(): anyGet clustering options.
Returns
any
Current clustering options
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:60
removeMarker()
removeMarker(markerId): booleanRemove a marker by ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
markerId | string | ID of marker to remove |
Returns
boolean
True if marker was removed, false if not found
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:35
updateOptions()
updateOptions(options): voidUpdate clustering options.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | Partial<ClusteringOptions> | Partial options to update |
Returns
void
Defined in
client/js/dist/Clustering/ClusteringManager.d.ts:55
DirectionsManager
Manages route display on the map.
Wraps the core DirectionsManager and adds MapLibre GL rendering: draws the route line and places origin/destination/waypoint markers.
Use via sdk.getDirections() and sdk.displayRoute(), or access directly for advanced use cases.
Constructors
new DirectionsManager()
new DirectionsManager(
mapAdapter,
markerFactory,
auth,
clientId?): DirectionsManagerParameters
| Parameter | Type |
|---|---|
mapAdapter | IMapAdapter |
markerFactory | IMarkerFactory |
auth | AuthInput |
clientId? | string |
Returns
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:25
Methods
clearRoute()
clearRoute(): voidReturns
void
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:30
displayRoute()
displayRoute(routeData, options?): voidParameters
| Parameter | Type |
|---|---|
routeData | RouteData |
options? | DisplayRouteOptions & object |
Returns
void
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:27
getCurrentRoute()
getCurrentRoute(): null | RouteDataReturns
null | RouteData
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:31
getDirections()
getDirections(
origin,
destination,
options?): Promise<RouteData>Parameters
| Parameter | Type |
|---|---|
origin | LngLat |
destination | LngLat |
options? | DirectionsOptions |
Returns
Promise<RouteData>
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:26
getRouteSummary()
getRouteSummary(): null | objectReturns
null | object
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:32
updateRouteStyle()
updateRouteStyle(style): voidParameters
| Parameter | Type |
|---|---|
style | RouteStyleOptions |
Returns
void
Defined in
client/js/dist/Directions/DirectionsManager.d.ts:39
FenceManager
Manages geofences (polygons) on the map.
Supports interactive fence drawing, rendering pre-defined fences, and attaching overlays (HTML labels) at fence centroids.
Access via sdk.fencing after calling sdk.init().
Constructors
new FenceManager()
new FenceManager(
mapAdapter,
markerFactory,
popupFactory,
options?): FenceManagerParameters
| Parameter | Type |
|---|---|
mapAdapter | IMapAdapter |
markerFactory | IMarkerFactory |
popupFactory | IPopupFactory |
options? | FenceManagerOptions |
Returns
Defined in
client/js/dist/Fencing/FenceManager.d.ts:39
Methods
addPoint()
addPoint(point, options?): voidAdd a point to the current fence.
Parameters
| Parameter | Type | Description |
|---|---|---|
point | LngLatLike | Point to add |
options? | FencePointOptions & object | Optional point options |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:54
canCloseFence()
canCloseFence(): booleanCheck if current fence can be closed (has at least 3 points).
Returns
boolean
True if fence can be closed
Defined in
client/js/dist/Fencing/FenceManager.d.ts:143
clearAllFences()
clearAllFences(): voidClear all stored fences.
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:98
clearCurrentFence()
clearCurrentFence(): voidClear the current fence being drawn.
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:65
closeFence()
closeFence(): null | FenceDefinitionClose the current fence.
Returns
null | FenceDefinition
Fence definition if closed successfully, null otherwise
Defined in
client/js/dist/Fencing/FenceManager.d.ts:61
getCurrentFencePoints()
getCurrentFencePoints(): LngLatLike[]Get the current fence points.
Returns
LngLatLike[]
Array of points or empty array if not drawing
Defined in
client/js/dist/Fencing/FenceManager.d.ts:138
getCurrentStyle()
getCurrentStyle(): FenceStyleOptionsGet current fence style (if drawing).
Returns
FenceStyleOptions
Current fence style or default style
Defined in
client/js/dist/Fencing/FenceManager.d.ts:118
getDefaultStyle()
getDefaultStyle(): FenceStyleOptionsGet current default style.
Returns
FenceStyleOptions
Copy of default style
Defined in
client/js/dist/Fencing/FenceManager.d.ts:113
getFence()
getFence(fenceId): undefined | FenceDefinitionGet a fence by ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
fenceId | string | number | Fence ID |
Returns
undefined | FenceDefinition
Fence definition or undefined if not found
Defined in
client/js/dist/Fencing/FenceManager.d.ts:76
getFenceByName()
getFenceByName(name): undefined | FenceDefinitionGet a fence by name.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Fence name |
Returns
undefined | FenceDefinition
Fence definition or undefined if not found
Defined in
client/js/dist/Fencing/FenceManager.d.ts:82
getFenceCentroid()
getFenceCentroid(fence): LngLatGet fence centroid.
Parameters
| Parameter | Type | Description |
|---|---|---|
fence | string | number | FenceDefinition | Fence definition or fence ID |
Returns
LngLat
Centroid coordinates
Defined in
client/js/dist/Fencing/FenceManager.d.ts:149
getFences()
getFences(): FenceDefinition[]Get all stored fences.
Returns
FenceDefinition[]
Array of fence definitions
Defined in
client/js/dist/Fencing/FenceManager.d.ts:70
getProximityThreshold()
getProximityThreshold(): numberGet proximity threshold.
Returns
number
Threshold in meters
Defined in
client/js/dist/Fencing/FenceManager.d.ts:128
isDrawingFence()
isDrawingFence(): booleanCheck if currently drawing a fence.
Returns
boolean
True if drawing is active
Defined in
client/js/dist/Fencing/FenceManager.d.ts:133
off()
off(event, callback): voidRemove event listener for fence events.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | "fenceCompleted" | Event name |
callback | (event) => void | Callback function to remove |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:170
on()
on(event, callback): voidAdd event listener for fence events.
Parameters
| Parameter | Type | Description |
|---|---|---|
event | "fenceCompleted" | Event name |
callback | (event) => void | Callback function |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:164
removeFence()
removeFence(fenceId): booleanRemove a fence by ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
fenceId | string | number | Fence ID |
Returns
boolean
True if fence was removed
Defined in
client/js/dist/Fencing/FenceManager.d.ts:88
removeFenceByName()
removeFenceByName(name): booleanRemove a fence by name.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Fence name |
Returns
boolean
True if fence was removed
Defined in
client/js/dist/Fencing/FenceManager.d.ts:94
renderFences()
renderFences(fences, options?): voidRender multiple fences from an array of definitions.
Parameters
| Parameter | Type | Description |
|---|---|---|
fences | FenceDefinition[] | Array of fence definitions |
options? | object | Render options |
options.clearExisting? | boolean | - |
options.persistent? | boolean | - |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:155
setDefaultStyle()
setDefaultStyle(style): voidSet default fence style for future fences.
Parameters
| Parameter | Type | Description |
|---|---|---|
style | FenceStyleOptions | Style options |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:108
setProximityThreshold()
setProximityThreshold(meters): voidSet proximity threshold for auto-closing fences.
Parameters
| Parameter | Type | Description |
|---|---|---|
meters | number | Threshold distance in meters |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:123
startDrawing()
startDrawing(style?): voidStart drawing a new fence.
Parameters
| Parameter | Type | Description |
|---|---|---|
style? | FenceStyleOptions | Optional style options for this fence |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:44
stopDrawing()
stopDrawing(): voidStop drawing the current fence.
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:48
updateCurrentFenceStyle()
updateCurrentFenceStyle(style): voidUpdate the style for the current fence being drawn.
Parameters
| Parameter | Type | Description |
|---|---|---|
style | Partial<FenceStyleOptions> | Style options to update |
Returns
void
Defined in
client/js/dist/Fencing/FenceManager.d.ts:103
GeocodingManager
GeocodingManager handles forward and reverse geocoding operations. Platform-agnostic: uses fetch API which is available in all JS environments.
Constructors
new GeocodingManager()
new GeocodingManager(auth, clientId?): GeocodingManagerParameters
| Parameter | Type |
|---|---|
auth | AuthInput |
clientId? | string |
Returns
Defined in
core/dist/Geocoding/GeocodingManager.d.ts:11
Methods
geocode()
geocode(name): Promise<GeocodeResult[]>Forward geocoding: search by name/address.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Place name or address to search for |
Returns
Promise<GeocodeResult[]>
Promise resolving to array of geocoding results
Defined in
core/dist/Geocoding/GeocodingManager.d.ts:17
reverseGeocode()
reverseGeocode(latlng): Promise<GeocodeResult[]>Reverse geocoding: search by coordinates.
Parameters
| Parameter | Type |
|---|---|
latlng | LngLat |
Returns
Promise<GeocodeResult[]>
Promise resolving to array of geocoding results
Defined in
core/dist/Geocoding/GeocodingManager.d.ts:23
LngLatBounds
Constructors
new LngLatBounds()
new LngLatBounds(): LngLatBoundsReturns
Defined in
client/react/src/maplibre-gl.d.ts:57
Methods
extend()
extend(point): thisParameters
| Parameter | Type |
|---|---|
point | [number, number] |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:58
getEast()
getEast(): numberReturns
number
Defined in
client/react/src/maplibre-gl.d.ts:61
getNorth()
getNorth(): numberReturns
number
Defined in
client/react/src/maplibre-gl.d.ts:62
getSouth()
getSouth(): numberReturns
number
Defined in
client/react/src/maplibre-gl.d.ts:60
getWest()
getWest(): numberReturns
number
Defined in
client/react/src/maplibre-gl.d.ts:59
Marker
Constructors
new Marker()
new Marker(options?): MarkerParameters
| Parameter | Type |
|---|---|
options? | object |
options.anchor? | string |
options.element? | HTMLElement |
options.offset? | number | [number, number] |
Returns
Defined in
client/react/src/maplibre-gl.d.ts:32
Methods
addTo()
addTo(map): thisParameters
| Parameter | Type |
|---|---|
map | Map |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:38
remove()
remove(): voidReturns
void
Defined in
client/react/src/maplibre-gl.d.ts:39
setLngLat()
setLngLat(lngLat): thisParameters
| Parameter | Type |
|---|---|
lngLat | [number, number] | object |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:37
setPopup()
setPopup(popup): thisParameters
| Parameter | Type |
|---|---|
popup | null | Popup |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:40
NavigationControl
Constructors
new NavigationControl()
new NavigationControl(): NavigationControlReturns
Defined in
client/react/src/maplibre-gl.d.ts:28
NavigationManager
Browser navigation manager — wraps the core NavigationManager and adds map rendering: a live location marker and a camera that follows the driver.
Access via sdk.navigation after calling sdk.init().
Example
const route = await sdk.getDirections(origin, destination);
sdk.displayRoute(route);
sdk.navigation.on('progress', e => console.log('remaining:', e.remainingDistance));
sdk.navigation.on('arrive', () => console.log('Arrived!'));
sdk.navigation.start(route, { userId: 'user-123' }, BrowserLocationProvider.getInstance());Constructors
new NavigationManager()
new NavigationManager(
auth,
mapAdapter,
markerFactory,
options?,
clientId?): NavigationManagerCreates a new NavigationManager instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
auth | AuthInput | API key or service key authentication input |
mapAdapter | IMapAdapter | Map adapter for camera control |
markerFactory | IMarkerFactory | Marker factory for location marker |
options? | NavigationManagerOptions | Configuration options for navigation behavior |
clientId? | string | - |
Returns
Throws
If apiKey, mapAdapter, or markerFactory is missing
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:41
Methods
getCurrentRoute()
getCurrentRoute(): null | RouteDataGets the current route being navigated.
Returns
null | RouteData
Current route data or null if not navigating
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:100
getCurrentStepIndex()
getCurrentStepIndex(): numberGets the current step index in the route instructions.
Returns
number
Current step index
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:105
isNavigating()
isNavigating(): booleanChecks if navigation is currently active.
Returns
boolean
True if navigating, false otherwise
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:110
off()
off<K>(event, callback): voidRemove a navigation event listener.
Type Parameters
| Type Parameter |
|---|
K extends keyof NavigationEventMap |
Parameters
| Parameter | Type |
|---|---|
event | K |
callback | NavigationEventMap[K] |
Returns
void
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:116
on()
on<K>(event, callback): voidRegister a navigation event listener. Payload type is inferred from the event name.
Type Parameters
| Type Parameter |
|---|
K extends keyof NavigationEventMap |
Parameters
| Parameter | Type |
|---|---|
event | K |
callback | NavigationEventMap[K] |
Returns
void
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:114
start()
start(
route,
startOptions,
locationProvider): voidStarts navigation along the provided route.
Parameters
| Parameter | Type | Description |
|---|---|---|
route | RouteData | Route data containing geometry and instructions |
startOptions | NavigationStartOptions | Options for starting navigation (userId, role, precision) |
locationProvider | ILocationProvider | Provider that supplies location data |
Returns
void
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:48
stop()
stop(): voidStops navigation and removes location marker.
Returns
void
Defined in
client/js/dist/Navigation/NavigationManager.d.ts:59
Popup
Constructors
new Popup()
new Popup(options?): PopupParameters
| Parameter | Type |
|---|---|
options? | object |
options.anchor? | string |
options.closeButton? | boolean |
options.offset? | number | [number, number] |
Returns
Defined in
client/react/src/maplibre-gl.d.ts:44
Methods
addTo()
addTo(map): thisParameters
| Parameter | Type |
|---|---|
map | Map |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:52
remove()
remove(): voidReturns
void
Defined in
client/react/src/maplibre-gl.d.ts:53
setDOMContent()
setDOMContent(element): thisParameters
| Parameter | Type |
|---|---|
element | HTMLElement |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:50
setHTML()
setHTML(html): thisParameters
| Parameter | Type |
|---|---|
html | string |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:49
setLngLat()
setLngLat(lngLat): thisParameters
| Parameter | Type |
|---|---|
lngLat | [number, number] |
Returns
this
Defined in
client/react/src/maplibre-gl.d.ts:51
Interfaces
GebetaMarkerOptions
Options for sdk.addMarker().
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
anchor? | Anchor | Part of the marker placed at lngLat (default: 'center', or 'bottom' for imageUrl). | client/js/dist/Markers/helpers.d.ts:19 |
className? | string | CSS class added to the marker element. | client/js/dist/Markers/helpers.d.ts:27 |
color? | string | Color of the default pin (ignored with element / imageUrl). | client/js/dist/Markers/helpers.d.ts:17 |
draggable? | boolean | Allow the user to drag the marker. | client/js/dist/Markers/helpers.d.ts:23 |
element? | HTMLElement | Custom HTML element. Takes precedence over imageUrl and color. | client/js/dist/Markers/helpers.d.ts:11 |
imageUrl? | string | Image URL for the marker icon. | client/js/dist/Markers/helpers.d.ts:13 |
lngLat | LngLatLike | Marker position [lng, lat] or { lng, lat }. | client/js/dist/Markers/helpers.d.ts:9 |
offset? | [number, number] | Pixel offset [x, y]. | client/js/dist/Markers/helpers.d.ts:21 |
onClick? | (marker: Marker, event: MouseEvent) => void | Click handler. | client/js/dist/Markers/helpers.d.ts:31 |
onDragEnd? | (lngLat: object, marker: Marker) => void | Called after the user finishes dragging (requires draggable). | client/js/dist/Markers/helpers.d.ts:33 |
popup? | string | HTMLElement | Popup opened when the marker is clicked: plain text, or an HTMLElement. | client/js/dist/Markers/helpers.d.ts:29 |
rotation? | number | Rotation in degrees. | client/js/dist/Markers/helpers.d.ts:25 |
size? | [number, number] | Icon size [width, height] in pixels when using imageUrl (default: [30, 30]). | client/js/dist/Markers/helpers.d.ts:15 |
GebetaPopupOptions
Options for sdk.addPopup().
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
anchor? | Anchor | Popup anchor relative to lngLat. | client/js/dist/Markers/helpers.d.ts:53 |
className? | string | CSS class added to the popup container. | client/js/dist/Markers/helpers.d.ts:59 |
closeButton? | boolean | Show the close button (default: true). | client/js/dist/Markers/helpers.d.ts:49 |
closeOnClick? | boolean | Close when the map is clicked (default: true). | client/js/dist/Markers/helpers.d.ts:51 |
element? | HTMLElement | DOM element content. | client/js/dist/Markers/helpers.d.ts:47 |
html? | string | HTML content. Only use with trusted markup. | client/js/dist/Markers/helpers.d.ts:45 |
lngLat | LngLatLike | Popup position [lng, lat] or { lng, lat }. | client/js/dist/Markers/helpers.d.ts:41 |
maxWidth? | string | CSS max-width (default: '240px'). | client/js/dist/Markers/helpers.d.ts:57 |
offset? | number | [number, number] | Pixel offset. | client/js/dist/Markers/helpers.d.ts:55 |
text? | string | Plain text content (safe for user data). | client/js/dist/Markers/helpers.d.ts:43 |
UseClusteringResult
Properties
| Property | Type | Defined in |
|---|---|---|
addMarker | (marker: MarkerData) => void | client/react/src/hooks/useClustering.ts:9 |
clearMarkers | () => void | client/react/src/hooks/useClustering.ts:11 |
getMarker | (markerId: string) => undefined | MarkerData | client/react/src/hooks/useClustering.ts:13 |
getMarkers | () => MarkerData[] | client/react/src/hooks/useClustering.ts:12 |
getOptions | () => any | client/react/src/hooks/useClustering.ts:15 |
removeMarker | (markerId: string) => boolean | client/react/src/hooks/useClustering.ts:10 |
updateOptions | (options: Partial<ClusteringOptions>) => void | client/react/src/hooks/useClustering.ts:14 |
Type Aliases
GebetaMapInstance
type GebetaMapInstance: MapLibreMap;The map instance returned by sdk.init() / sdk.getMap().
Defined in
client/js/dist/gebeta.d.ts:23
GebetaMapsProps
type GebetaMapsProps: AuthOptions & ForwardedMapOptions & object;Type declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
center? | [number, number] | Initial center [lng, lat]. Only read on mount. | client/react/src/GebetaMaps.tsx:40 |
children? | ReactNode | Rendered over the map once it has loaded. | client/react/src/GebetaMaps.tsx:62 |
className? | string | CSS class for the map wrapper element. | client/react/src/GebetaMaps.tsx:60 |
clustering? | Options | Clustering configuration (read on mount). | client/react/src/GebetaMaps.tsx:48 |
mapStyle? | string | object | Map style URL or style object; takes precedence over styleUrl. | client/react/src/GebetaMaps.tsx:46 |
navigationControl? | boolean | Show zoom/compass controls (default: false). | client/react/src/GebetaMaps.tsx:50 |
navigationControlPosition? | string | Corner for navigation controls (default: 'top-right'). | client/react/src/GebetaMaps.tsx:52 |
onError? | (error) => void | Called on map errors. | client/react/src/GebetaMaps.tsx:56 |
onLoad? | (instance) => void | Called once the map style has loaded, with the GebetaMaps instance. | client/react/src/GebetaMaps.tsx:54 |
style? | CSSProperties | CSS styles for the map wrapper element (defaults to filling the parent). | client/react/src/GebetaMaps.tsx:58 |
styleUrl? | string | Map style JSON URL (defaults to the Gebeta standard style). | client/react/src/GebetaMaps.tsx:44 |
zoom? | number | Initial zoom. Only read on mount. | client/react/src/GebetaMaps.tsx:42 |
Defined in
client/react/src/GebetaMaps.tsx:37
GebetaMapsRef
type GebetaMapsRef: GebetaMaps;Defined in
client/react/src/GebetaMaps.tsx:64
MarkerData
type MarkerData: MarkerData;Defined in
client/react/src/hooks/useClustering.ts:6
Variables
gebeta
const gebeta: object;Namespace object with every Gebeta building block (also window.gebeta on CDN).
Type declaration
| Name | Type | Defined in |
|---|---|---|
addProtocol | typeof LngLat | client/js/dist/gebeta.d.ts:38 |
AttributionControl | typeof LngLat | client/js/dist/gebeta.d.ts:36 |
FullscreenControl | typeof LngLat | client/js/dist/gebeta.d.ts:34 |
GeolocateControl | typeof LngLat | client/js/dist/gebeta.d.ts:33 |
LngLat | typeof LngLat | client/js/dist/gebeta.d.ts:29 |
LngLatBounds | typeof LngLatBounds | client/js/dist/gebeta.d.ts:30 |
Marker | typeof Marker | client/js/dist/gebeta.d.ts:27 |
MercatorCoordinate | typeof LngLat | client/js/dist/gebeta.d.ts:31 |
NavigationControl | typeof NavigationControl | client/js/dist/gebeta.d.ts:32 |
Popup | typeof Popup | client/js/dist/gebeta.d.ts:28 |
removeProtocol | typeof LngLat | client/js/dist/gebeta.d.ts:39 |
ScaleControl | typeof LngLat | client/js/dist/gebeta.d.ts:35 |
TerrainControl | typeof LngLat | client/js/dist/gebeta.d.ts:37 |
Defined in
client/js/dist/gebeta.d.ts:26
LngLat
LngLat: any;Functions
GebetaMaps()
function GebetaMaps(props): ReactNodeParameters
| Parameter | Type |
|---|---|
props | GebetaMapsProps & object |
Returns
ReactNode
Defined in
client/react/src/GebetaMaps.tsx:215
useClustering()
function useClustering(): UseClusteringResultReact hook for managing clustered markers on a Gebeta map.
Must be used inside a GebetaMaps component with clustering enabled.
Returns
Throws
If clustering is not enabled on the parent GebetaMaps component.