-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Plan changes to Android annotation API #1189
Comments
I was asked my opinion on the two PRs above, so here it is 😊. I don't exactly know the implementation details, but this does not seem like a super quick task (this issue is 2 weeks old, and there are discussions about it from at least a month ago). Since the plugins seem to have been unmaintained for a while (last released artifact is from 2021, CI is failing, ...), I guess it makes sense to give them some attention 👍. Now personally, I have a couple concerns, which are:
I guess my point is that as long as those changes don't prevent us from using MapLibre and we somehow see a way to get our fixes upstream, then that is fine for us 😇. |
@JonasVautherin MapLibre Native has a paid maintainer (me!) so I would not worry about not being able to upstream changes. Feel free to ping me on Slack at any time, I'll likely respond pretty quickly during office hours in Europe. The reason why the plugins repo is stale is because bringing it to a good state again would require a lot of duplicate work that has been done for the main repo. As an example, we now have pretty good CI for this repo, including for example even running the UI tests for Android on AWS Device Farm.
We will make sure no functionality is lost. This issue just exists to make a design proposal, you will be able to comment on the design when it is proposed at a later stage. That said, would you want to help to make an official release of the plugins package? |
@JonasVautherin I think the question this issue raises is: are there any specific design choices that have bothered you when working with the API for annotations in the past, something that could be made more user-friendly by designing it differently? Then we can consider it when writing the proposal in the first place. |
I think @RomanBapst can comment better on this, but to me it seems like it was pretty fine.
Honestly I did not manage to build https://github.com/maplibre/maplibre-plugins-android, so instead I made the plugin we modify standalone (https://github.com/ramani-maps/maplibre-plugins-android/tree/main/plugin-annotation). So we can just go there and run I could change it such that I can Would that help? Or is it not what you were asking? |
I have been working with the newer API (e.g. CircleManager) in the last couple of weeks and was quite happy with it. There are some really weird things like Text not being loaded on the map when you don't have an internet connection (I live somewhere in Tasania in the bush and that can happen :-p). I would be really careful to reduce this flexibility, let me try to explain with an example. In the past I have been using google-maps-compose for an app where I wanted to create an interactive polygon where the user should have been able to drag the vertices of the polygon around. The lib offered a |
@RomanBapst @JonasVautherin Thanks for your input. @louwers Feel free to assign the issue to me, so I can start working on it. |
@RomanBapst @JonasVautherin My proposal is here: #1255 Feel free to comment in that PR 🙂 |
This bounty can be paid out. |
When starting work on #1154, I noticed it can't be implemented as easily as we were hoping, for the following reasons:
Symbol
,Fill
and so on, thatthe older implementation in
maplibre-native
does not have.Marker
,Polygon
and more that imitate the Google Maps API and call some native code:maplibre-native/platform/android/MapboxGLAndroidSDK/src/cpp/native_map_view.cpp
Lines 655 to 673 in 749458d
FillAnnotation
,SymbolAnnotation
and probably generatesGeometry
somewhere, which the annotations code also does, but not in C++ code.maplibre-native
) tries to immitate the Google Maps API whilst the new one (in annotations plugin) does not, there is no obvious path towards moving the code whilst un-deprecating the deprecated methods like we planned, without making the migration from the current API – which I imagine most users are using – unnecessarily complex.Due to these considerations, we should make a plan for how we want the API to look like in the future. Some points that I think are important for this, regarding what aspects are nice about each of the APIs:
addMarker
, not bothering users with creating an object likeSymbolAnnotations
. I like that.SymbolOptions.withIconImage
takes aString
that references the icon, and it is the user's responsibility to put their resource into the style, whereasMarker.setIcon
takes an Icon object where it is easy to find out how to construct it. The latter is much preferrable and we should keep such an easy interface for the future.Goals of this issue:
maplibre-native
according to this design proposal.The text was updated successfully, but these errors were encountered: