-
Notifications
You must be signed in to change notification settings - Fork 504
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
Add symbol API #25
Add symbol API #25
Conversation
In the last two commits, I have added support for:
The main thing that needs to be fixed before calling this feature ready is correctly handling state. Atm if you have update the rotation to say 270 degrees and change the opacity. It will reset the rotation to 0 instead of keeping the old value applied. |
Was able to track down where the symbol update is going wrong. Instead of providing default options as how Google Maps Flutter Plugin is doing, we need to provide default values during conversion time in the dart code. Reason is that the Mapbox Annotation Plugin is different as the Marker API on Google Maps SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
I attached some questions. I would be working on adding line annotataions as soon as this PR get merged.
@@ -48,7 +49,7 @@ public void setCompassEnabled(boolean compassEnabled) { | |||
|
|||
@Override | |||
public void setCameraTargetBounds(LatLngBounds bounds) { | |||
Log.e(TAG,"setCameraTargetBounds is supported only after map initiated."); | |||
Log.e(TAG, "setCameraTargetBounds is supported only after map initiated."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not implemented yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes correct, delete for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep it, but I though you may think differently and wanted to point it out.
android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/mapbox/mapboxgl/SymbolController.java
Outdated
Show resolved
Hide resolved
@yoavrofe thank you for the review and apologies for the delay (I was on holiday). I revisited this PR with your comments. Could you take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
WIP, not ready for review yet. Closes #11
A symbol is the Mapbox equivalent of Google Marker.
See more information in the style-spec here.
Most of the code in this PR is created using the code generator of https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation. Once this API for symbol lands we can easily extend with with circles, fills and lines.
Current state is generating all code + showing a simple symbol:
cc @yoavrofe