I've just released <v0.9.0 of MapLibre Compose>, a...
# feed
s
I've just released v0.9.0 of MapLibre Compose, a library for adding interactive vector maps to your Compose Multiplatform apps. Highlights of this release: • Support downloading regions of the map to view offline • Overhaul the gesture and ornament settings API to account for differences between platforms • Bunch of bug fixes, including the attribution bar crash on older iOS versions • Internally, switch from Cocoapods to Swift Package Manager • And more, including i18n improvements and other API tweaks
kodee loving 2
metal 2
❤️ 12
j
Hi, I might be missing something basic but are there any examples of adding markers (based on lat/long) to map at runtime?
s
Yeah, you can check out the demo app for sample code of adding map layers
j
Thanks, I'll take a look again...I probably missed something (looking btw specifically at adding locations at runtime)
d
@Sargun Vohra Hi, thanks for the update. I have a generic question not related to this release, is there a way to handle the onClick event on any places on the map ( 🛒QFC; 🍴Ooink Ramen; etc) - for example could onClick event open a custom modal or do something else?
j
Looks like my issue was probably related to testing on desktop.....don't think what I was trying to do is supported there yet https://maplibre.org/maplibre-compose/#status
👍 1
s
@Dumitru Preguza yes, you can add click listeners to the map and then query for which features are at that point, or you can add a click listener directly to a programmatically added Layer (then we do the querying for you). https://maplibre.org/maplibre-compose/interaction/#click-listeners https://maplibre.org/maplibre-compose/layers/#interacting-with-layers
👍🏻 1