JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.03k stars 1.16k forks source link

Using GoogleMap Android composable in Desktop #2784

Closed JonasVautherin closed 1 month ago

JonasVautherin commented 1 year ago

Can Android elements like e.g. GoogleMap be used for a desktop app using compose-jb?

I am interested in what would make it Android-specific or not. Is it just the fact that it is packaged as an .aar, or is there something more fundamental?

kirill-grouchnikov commented 1 year ago

From https://developers.google.com/maps/documentation/android-sdk/maps-compose#installation - a required dependency is com.google.android.gms:play-services-maps and that is not something that exists for Desktop.

igordmn commented 1 year ago

Yes, it should be ported.

Looking at the source code, it seems it is written from scratch on Compose, uses some Android API (like Location API) and, as Kirill mentioned, uses an Android library com.google.android.gms:play-services-maps (that communicates with Google Maps API probably). The Compose code itself can be easely ported, not sure about com.google.android.gms:play-services-maps.

aabolfazl commented 9 months ago

@igordmn Did you test that we can use Android components on the KMP desktop?

cryptrr commented 5 months ago

Any updates?

skillAndroid commented 5 months ago

https://github.com/skillAndroid/openStreetMapComposeMultiplatform this is my Code pls look here for desktope Map for Compose Multiplatform and do not forget to put Starts thank you All )

JonasVautherin commented 1 month ago

Closing because I am not interested anymore. Rather I am looking at MapLibre for Compose Multiplatform: https://github.com/maplibre/maplibre-native/issues/2638.

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.