-
Notifications
You must be signed in to change notification settings - Fork 131
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
MapApplier and MapNode is not public #28
Comments
@kozaxinan Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
Can you provide more info/examples on what kind of customizations you would like to make? |
Hi, main idea is using already existing GoogleMap features while migrating Compose. We have a class that gets GoogleMaps as parameter and configure it. If the MapApplier is public, we can write our own composable and configure GoogleMap as we configure now. And one by one migrate to new APIs. Besides at the moment, we are unable to use full features. for example, #29 |
Thanks for clarifying @kozaxinan. If you wouldn't mind sharing, what are other extensions you want to write in the form of composable elements? Anything other than GeoJson? I'd like to eventually add the functionality in the utility library here. Probably as a separate maven artifact. Since so much of the |
As long as we will get geojson function, we don't mind the artifacts. I can also create a pr into this repo to add function. I also agree increasing Api surface might lead more problems. Or if you guide me, I can try to add in utils repo. One other usecase we need is projection.visibleBounds. I will open a new issue for new feature request about getting visibleBounds of map since I cannot use MapApplier. |
@kozaxinan I'd like for the utility library to be a separate module/artifact but it also would entail modifying the visibility of |
Thank you for the brainstorm. We have features that directly depend on geojson and visibleBounds. We are in process of rewriting main result screen including map. If map compose won't have geojson feature, we have to continue using map fragment we have. I am thinking of what might go wrong if MapApplier is public. People have to continue using compose APIs after using MapApplier. That should be okay. (More experienced compose library developer can correct me) Is it possible to have a ComposeMapNode method that has factory and update parameters like original ComposeNode method but passes map instance to factory. In that case only MapNode needs to be public. (This is best I can come up with my compose knowledge) |
Actually, I remember Let me try to add our missing features and I can experience what would happen if MapAppier becomes public. |
I managed to make geojson work with two simple java helper classes. I rendered geojson. With that approach a solution can be created in utils library. I am not proud but using workaround but calling kotlin from java is already possible. |
I think it could also be achieved with a bit of reflection, also NotAdvised™️ I totally agree with the concern that it could lead to abuse of the API, but for some projects that need a staged migration to Compose, from an XML layout based infrastructure, it's really hard to adapt to an all-or-nothing approach. Creating a potential point of exploit is undesirable, but allowing some kind of interop would really help facilitate the adoption of this library IMO. Rather than provide a facility to retrieve the |
Ultimately, if people need the behaviour, people are going to find a way to do it, what I could imagine would be to create a composition local for The library itself already casts the |
An experimental I'm going to close this issue as I believe it should cover the use cases discussed here, but if not please feel free to re-open. |
Is your feature request related to a problem? Please describe.
In order to be able to add more functionality with GoogleMap instance, I wanted to create new Composable like existing ones; Polygon, Polyline... But MapApplier and MapNode are internal and we cannot extend the composable google map functionality.
We already have classes to configure GoogleMap instance. If we can write our own Composable function to update GoogleMap instance, we can migrate to Compose Map much easier.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Make MapApplier and MapNode public
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Create and API to provide GoogleMap instance so we can configure.
The text was updated successfully, but these errors were encountered: