MaplibreMap
Displays a MapLibre based map.
The map has no intrinsic size and will expand to fill its container by default. If placed in a scrollable container or other layout that doesn't provide constraints, you must specify an explicit size using modifiers like Modifier.size.
Parameters
The modifier to be applied to the layout.
The URI or JSON of the map style to use. See MapLibre Style.
The camera state specifies what position of the map is rendered, at what zoom, at what tilt, etc.
The allowable camera zoom range.
The allowable camera pitch range.
The allowable bounds for the camera position. On iOS and Web, it prevents the camera edges from going out of bounds. If null is provided, the bounds are reset. On Android, it prevents the camera center from going out of bounds. See this GH Issue.
Invoked when the map is clicked. A click callback can be defined per layer, too, see e.g. the onClick parameter for LineLayer. However, this callback is always called first and can thus prevent subsequent callbacks to be invoked by consuming the event.
Invoked when the map is long-clicked. See onMapClick.
Invoked on every rendered frame.
kermit logger to use.
Invoked when the map failed to load.
Invoked when the map finished loading.
The map content additional to what is already part of the map as defined in the base map style linked in baseStyle.
Additional sources can be added via:
rememberVectorSource (see VectorSource),
A source that is already defined in the base map style can be referenced via getBaseSource.
The data from a source can then be used in layer definition(s), which define how that data is rendered, see:
By default, the layers defined in this scope are put on top of the layers from the base style, in the order they are defined. Alternatively, it is possible to anchor layers at certain layers from the base style. This is done, for example, in order to add a layer just below the first symbol layer from the base style so that it isn't above labels. See: