Search

MapLibre

The props available for MapWeave when used with the MapLibre 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

An object describing the click.

Returns any

Fires when the drag is finished and pointer is released, or when the drag is canceled.

Parameters

An object describing the drag end.

Returns any

Fires continuously as the cursor moves during a drag.

Parameters

An object describing the drag movement.

Returns any

Fires when a drag is started. Default action: Creates a dragger.

Parameters

An object describing the drag.

Returns any

Fires when the user hovers over the map.

Parameters

An object describing the hover.

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.

Returns any

The MapWeave options to set.

ref

optional
RefObject<MapWeaveRef>

view

optional

The current MapWeave viewport.

Returns ReactNode

MapWeaveOptions

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.

number default: 0

The radius of a circle around the pointer used to detect interactions in pixels.

style

optional
string default: 'https://demotiles.maplibre.org/style.json'

The MapLibre style URL. See the MapLibre Style Spec for more information.

boolean default: false

Enables view rotation if set to true.

MapWeaveRef

Fits the map to the bounds of all visible layers or to the options specified.

Parameters

options
optional

The options to use for fitting the map.

Returns Promise<void>

Animates a transition to a defined point on the map. Retains the current values for any options not specified.

Parameters

The center to fly to.

options
optional

The options to use for the fly transition.

Returns Promise<void>

Map

Readonly access to the MapLibre Map object.

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.