-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Jetbrain compose support #1
Comments
I will consider that once jb compose hits beta. |
(According to the names of the of their releases they have hit beta and even RC :)) |
This will be my next priority after #19 |
Any news?) |
I plan to start working on it in a few weeks. |
I just found this project and it looks like exactly what I need. My app targets both desktop and android though. Is there any ETA for this? |
As I don't have much experience in KMM right now, my initial attempt to make this library a KMM project was a bit too much. |
@wefhy Some time ago I was need multiplatform map. So I created one. https://github.com/Lewik/mapview It's a bit outdated, but demos (main.kt files) should work. If it interesting, I can update it. We used it in desktop and android. If you have any questions - feel free to text me, I'll help. |
Thanks for the update! I was able to port the project to desktop compose yesterday: https://github.com/krzysztofsroga/MapComposeDesktop So to be honest we just need some gradle magician to merge these two projects together. In theory both Compose Desktop and Android Canvas use Skia under the hood so the changes are minimal and could probably be solved with expect/actual. |
@krzysztofsroga That's amazing news! I'll have a look. You're right, ideally desktop and Android should be under the same project. However, having a working desktop version is a major step. |
This commit contains all the changes that were required to make it compile for desktop (commits before were just copying the files and correcting package names) Honestly it's just a proof of concept, as much as I could do in a limited amount of time. I left like two TODO items (mainly dp conversion and something with drawing patches). I didn't check whether it all works good, just that it displays the map and lets me move it. But it generally wasn't much work. I won't have much time for the next two-three weeks, but after that I can work on fixing any issues that might be there and maybe trying to merge these two into one project. I'd just need to learn a little about how gradle work and make sure both can use the same file structure. |
Based on a coarse reading, I made a couple of comments. So that's really interesting. It shows the differences between the two platforms. So I guess the next step it to make it work properly on desktop, and then take a step back and see how the two projects can be merged. |
Hmm.. tile size does not depend on dpi. If I had to guess, I would say the gap between tiles has something to do with the changes on tile positioning (the comment I made about the state). Anyway, we'll see. This is really nice for a proof of concept ;) |
Hey guys, I hate to ask this question to open source devs... is this still somewhat of a priority? |
I made this library mostly because I'm using it on Android. Right now, I don't have time to make it multiplatform. |
I was searching for compose library to use for openstreet map tile and i stumbled onto your library which seems promising and nice.Please update it for kotlin multiplatform, compose multiplatform. The usecase might be huge for those who dont want to use google or apple map.Thank you for your contribution and really apreciate it. |
@prabinshrestha Yes. Actually, I'd like to make an ios version. However, Compose for ios is still in alpha. Updating it for compose multiplatform might be a better start as it would require most necessary structural changes. |
Would love to see this for compose multiplatform. I started a new repo and started to change the code from of @krzysztofsroga in the repo MapComposeDesktop to make it work for multiplatform, but am not finished yet and couldn't test the changes by now. For me it is more of a learning opportunity, because I am relatively new to kotlin, especially to coroutines. If it helps, I can share my repo with the changes by now. |
I believe making it work for Compose desktop is the first step (and hard enough). |
@krzysztofsroga I faced the same issue when porting mapcompose to multiplatform by using your code as starting point. by changing I now have a working map for iOS, desktop and android. Next step for me is to port all the demos of mapcompose. |
Excellent news ! Looking forward to see all the changes your made to make it work. |
@rkreienbuehl Could you please share your fork of MapCompose? (even it's still in WIP) I'd like to start looking at the changes and think about what to do next. |
@p-lr I copied the files and made a complete new Repo by using the https://kmp.jetbrains.com. The repo is available at https://github.com/rkreienbuehl/MapComposeKMP. Biggest changes are:
With these changes there is very little code that had to be written per platform. The iOS demo app works, but you have to change I started porting the demo app, hope to finish this on saturday. |
@rkreienbuehl This is huge! Honestly, I thought making the KMP version would require more structural changes. My plan is to make a Finally, thank you very much for what you're doing. |
@p-lr I saw that the code of MapComposeDesktop was not updated for a year, so I started with your code from commit 4235d0c34752d2845e0da1644b9addbccd156be3 and took the changes from MapComposeDesktop as a little help, so there are only the changes of the last 5 commits missing. I don't know if I changed the code to not use BitmapPool.kt, but I can look at this when I finished porting the demo apps. |
@rkreienbuehl Alright. I answered here. |
Work is underway : https://github.com/p-lr/MapComposeMP |
MapCompose Multiplatform is officially released. |
Great news, thanks for the work of the past days. |
Any plans on supporting multiplatform with jb compose for desktop app? 🥰
The text was updated successfully, but these errors were encountered: