Can the Maps Compose library be used with Compose ...
# multiplatform
h
Can the Maps Compose library be used with Compose Multiplatform on iOS?
🚫 1
yes black 1
Short answer: not yet unfortunately. I ended up using maps-android + the google maps ios sdk in my app
h
I see, thanks for answering @Alexander Eggers! Found this article that seems to tackle the issue: https://medium.com/@chrisathanas/kmp-android-ios-using-google-maps-and-100-compose-ui-45271d0bead9
👍 2
😀 1
c
@Håkon Pettersen Thanks for the plug! I am the author of the app “Fred’s Roadtrip Storyteller”, and it finally passed the
.xcprivacy
checks and is available in both Google and Apple stores. I use Google Maps for both of them, with some limitations, which I have documented in the YouTube series. @Alexander Eggers So, yes, it’s possible! And there are some current limitations that seem to be worked on by Google, so this approach will only get better.
b
My airbnb sample also has an example of both being used. (Compose maps on Android; Google maps cocoapod on iOS)
c
@brandonmcansh Link? Are you able to get the Heat Maps working?
b
https://github.com/bmcreations/airbnb-multiplatform-sample Haven’t attempted heat maps yet but do have custom markers drawn for price bubbles https://x.com/brandonmcansh/status/1722854957811191925?s=46
👍 1
a
@Chris Athanas Neither the example in your article or the example by @brandonmcansh are just using common code. Yes, you've got a good amount shared across both platform but you still built the "bridge" components across iOS and Android. My answer was refering to that if iOS can be used with the "google compose map library". So, there is no single multiplatform solution by Google maps compose which currently supports both platforms. Of course you can always write your own bridge components - that doesn't just apply to maps IMO.
c
Yes, thats true. I’m using the GoogleMaps compose implementation on Android (which is just wrapping the android component, not written from scratch.) And on the iOS side, I built my own wrapper around the current iOS viewKit Google Maps component from a CocoaPod. I assume that the Google Maps team are creating pure compose-based Maps implementations, but I’m not aware of any announcements about this yet. The Google Map on iOS side hasn’t caught up to Compose-for-iOS, as compose for ios is still in alpha. So we are the vanguards here releasing products for iOS that are still in alpha…
🔥 1
@brandonmcansh Nice work! Google Maps is pretty messy to deal with still… hoping the team is working on this because it’s definitely not intuitive how it currently is implemented!
🙏 1
b
Thanks man! Was a fun project, wish I could spend more time on it.
👍 1