React
Standalone
The MapWeave standalone adapter allows you to use MapWeave without any third party basemap library. It is most commonly used together with a TileLayer.
The props available for MapWeave when used with the Standalone adapter.
Parameters
-
object
children
optional ReactNode Defines the MapWeave layers to be rendered. The layers available are:
Fires when the user clicks or taps on the map.
Parameters
Returns
any
Fires when the drag is finished and pointer is released, or when the drag is canceled.
Parameters
Returns
any
Fires continuously as the cursor moves during a drag.
Parameters
Returns
any
Fires when a drag is started. Default action: Creates a dragger.
Parameters
Returns
any
Fires when the user hovers over the map.
Parameters
Returns
any
Fires when the initial loading completes in MapWeave.
Returns
any
Fires continuously when the MapWeave view changes, e.g. during zooming or panning.
Parameters
Returns
any
options
optionalThe MapWeave options to set.
ref
optional RefObject<MapWeaveRef>
Returns
ReactNode
ChangeReason "auto" | "user" The reason the event was fired:
- 'auto' - The event was triggered by internal MapWeave state.
- 'user' - The event was triggered by user action.
An object to describe the event fired when the user clicks or taps on the map.
string The id of the targeted item, or null for the background map.
The targeted item, or null for the background map.
Layer<any, any, any> The layer of the targeted item, or null for the background map.
The geographic position and height above sea level of the event, or null if not a valid position on the map.
number The distance from the left of the canvas to the pointer position in pixels.
number The distance from the top of the canvas to the pointer position in pixels.
An object to describe the event fired when the drag is finished and pointer is released, or when the drag is canceled.
string The id of the targeted item, or null for the background map.
The targeted item, or null for the background map.
Layer<any, any, any> The layer of the targeted item, or null for the background map.
The geographic position and height above sea level of the event, or null if not a valid position on the map.
number The distance from the left of the canvas to the pointer position in pixels.
number The distance from the top of the canvas to the pointer position in pixels.
An object to describe the event fired continuously as the cursor moves during a drag.
string When dragging a tracker node, the associated entity id of this trajectory tracker. Otherwise null.
string The id of the targeted item, or null for the background map.
The targeted item, or null for the background map.
Layer<any, any, any> The layer of the targeted item, or null for the background map.
The geographic position and height above sea level of the event, or null if not a valid position on the map.
Date When dragging a tracker node, the time corresponding to the node's position along the trajectory. Otherwise null.
number The distance from the left of the canvas to the pointer position in pixels.
number The distance from the top of the canvas to the pointer position in pixels.
An object to describe the event fired when a drag is started. Default action: Creates a dragger.
If the default action was prevented.
string The id of the targeted item, or null for the background map.
The targeted item, or null for the background map.
Layer<any, any, any> The layer of the targeted item, or null for the background map.
The geographic position and height above sea level of the event, or null if not a valid position on the map.
number The distance from the left of the canvas to the pointer position in pixels.
number The distance from the top of the canvas to the pointer position in pixels.
Can be called to prevent the default action of the event.
Returns
void
An object to describe the event fired when the user hovers over the map.
string The id of the targeted item, or null for the background map.
The targeted item, or null for the background map.
Layer<any, any, any> The layer of the targeted item, or null for the background map.
The geographic position and height above sea level of the event, or null if not a valid position on the map.
number The distance from the left of the canvas to the pointer position in pixels.
number The distance from the top of the canvas to the pointer position in pixels.
Shows the events available in MapWeave and the object returned to an event handler for that event.
Fires when the user clicks or taps on the map.
Parameters
Returns
any
Fires when the drag is finished and pointer is released, or when the drag is canceled.
Parameters
Returns
any
Fires continuously as the cursor moves during a drag.
Parameters
Returns
any
Fires when a drag is started. Default action: Creates a dragger.
Parameters
Returns
any
Fires when the user hovers over the map.
Parameters
Returns
any
Fires when the initial loading completes in MapWeave.
Returns
any
Fires continuously when the MapWeave view changes, e.g. during zooming or panning.
Parameters
Returns
any
fitOnFirstLoad
optional boolean
default: true Fits the map to the bounds of all visible layers when MapWeave first loads and the view prop is not set.
maxZoom
optional number
default: 20 Sets the maximum zoom level, which controls how far the map can zoom in.
pickingRadius
optional number
default: 0 The radius of a circle around the pointer used to detect interactions in pixels.
repeat
optional boolean
default: true Enable or disable the repeated tiling of basemaps in the viewport.
viewRotation
optional boolean
default: false Enables view rotation if set to true.
Fits the map to the bounds of all visible layers or to the options specified.
Parameters
Returns
Promise<void>
Animates a transition to a defined point on the map. Retains the current values for any options not specified.
Parameters
Returns
Promise<void>
An object to describe the event fired when the map view changes.
The new view state after the change.
The reason the view changed.