-
A continuation for this messages in another thread: #543 (comment) Is it possible to add Composables on the map ?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can look at how the PointerPinButton works to overlay a Compose UI element on the map, tied to some lat/lon coordinates: https://github.com/maplibre/maplibre-compose/blob/main/lib/maplibre-compose-material3/src/commonMain/kotlin/org/maplibre/compose/material3/PointerPinButton.kt But if you're trying to render some custom data on the map, I'd recommend adding a custom Source and Layers instead. You can check out the API reference for all the different source and layer types; an easy way to get started is rememberGeoJsonSource and CircleLayer. |
Beta Was this translation helpful? Give feedback.
You can look at how the PointerPinButton works to overlay a Compose UI element on the map, tied to some lat/lon coordinates: https://github.com/maplibre/maplibre-compose/blob/main/lib/maplibre-compose-material3/src/commonMain/kotlin/org/maplibre/compose/material3/PointerPinButton.kt
But if you're trying to render some custom data on the map, I'd recommend adding a custom Source and Layers instead. You can check out the API reference for all the different source and layer types; an easy way to get started is rememberGeoJsonSource and CircleLayer.