More of a discussion/question for folks that have ...
# compose
c
More of a discussion/question for folks that have used Google Maps Compose Library. I'm starting on a new project, and we're going to be 100% compose, but a big feature of our project is a map view. I've never worked with maps before, and I'm curious to hear if anyone has used it before and found any issues or any missing apis. Or is it pretty much a 1:1 drop in replacement for the view-based google maps library?
f
I've used it for a pet project and it was okay until i had to add a window info adapter and was stopped by https://github.com/googlemaps/android-maps-compose/issues/46 The pet project is somewhat a rewrite of an app i had, having 4 screens with maps and each of them handles from 20.000 - 50.000 markers with custom info window UI and pins Also it's missing cluster manager which is crucial for that amount of info https://github.com/googlemaps/android-maps-compose/issues/44 So I postponed the migration for now and would definitely use an Android view and handle things manually like I would in a fragment for now at least
n
I also fiddled with the Maps Compose ; the issue with the cluster manager missing is not that we don't have "visual" clusters on the map, but rather we can't display a high number of markers without having a big freeze (even with compose, we have to iterate on a list of +1000 elements and create a node for each, then the render starts to fall and freeze when the composition is complete)
basically if you don't need a high marker count rendered, and won't have any of the things listed here needed : https://github.com/googlemaps/android-maps-compose/issues you should be good to go
a trick that can be used for the high markers count is to only display a small numbers (based on the current viewport for example), or do some kind of clustering but on the compose side
c
Gotcha. I will definitely have a high marker count. So I won't use this for now. I guess I can just put a regular maps view into AndroidView and still use it in my fully compose app?
n
you definitelly can but it's a bit hacky
c
damn. okay. back to the drawing board.
we definitelly got it working on our apps, it's just that it's hard to make this block "clean" with many features :
but we implemented clustering, some camera follow of the user position etc... I'd show the code if I could 😕
c
Thanks! Yeah. I tseems like I just need a map with clustering support, and then basically being able to "click" on these pins individually. I'm new to Google Maps, and so I'm super limited in my knowledge with it. but cool
Glad to know someone that has done this! I might reach out directly in the coming weeks/months if you don't mind if I start banging my head against a wall. The google maps api has me nervous. lol. I'm glad I didn't just start with maps compose. Thank you all!
n
no problem
by the way, if you start this in the coming weeks/months I have (probably false) hopes that the clustering will be available by then
c
yeah. i need this done by end of may... so its something i probably wont hold out on. lol