Is it possible to add `PolylineOptions` in Jetpack...
# compose
k
Is it possible to add
PolylineOptions
in Jetpack Compose Google Maps?
j
I think it should be possible, but just incase its not and you need it anyhow then consider using AndroidView component and use GoogleMap View. I'm using it this way in production and its working absolutely fine for us
y
I thought there was a whole bunch of lifecycle code needed when you go this route. For me it was much simpler just using Compose Google Maps
j
Yeh that's very true. But I have it setup ready. If needed, I can provide gist.
k
@jasu I already started to look into this. My concern is, beyond basic tools compose Maps gives us, it might be hard to write something custom. Can you please provide gist for basic setup?
@yschimke Does in your case Map just shows basics, like location etc. or you go deeper into different lines, polygons, messurements etc with Map?
y
No, just a demo and sample app. Nothing fancy or in prod
j
@K Merle hey yeah, I'll provide you the gist asap. In my case I'm not only having basic things but includes polylineOptions, groundOverlays, zoomLevels and all
k
I was able to come up with proof of concept for the company. I have used AndroidView (includes polyline, polygon, groundOverlay, zoom, bearing..), however, I do have to mention after doing POC, I've tried to do all with Jetpack Compose Map lib, and was able to do it there too. I am still not keen on using JC version in case client wants some out of the box funcionality.
y
It's open source. You can fork it if you really need some extra functionality, and suggest upstreaming your changes. The outcome where your new feature is supported and maintained by that Google team seems better in long run.
Likely your requirement are not completely novel, so probably hooks exist for extending.