-
Notifications
You must be signed in to change notification settings - Fork 1.3k
AnnotationOptions.alpha Needs To Return SuperType #2631
Comments
Interesting, the other options support this. Also core GL marker don't support alpha, so only needed for lines and polygons. |
Remove unimplemented properties. Make annotations immutable. Correct defintions of equals() and hasCode(). Change anchor U/V to int. Move .alpha to MultiPoint and anchor() to PolylineOptions and PolygonOptions. Make InfoWindow classes package private. Add setOnInfoWindowClickListener and remove old method from Marker. JavaDoc internal methods with "Do not use." Refactor showInfoWindow() to remove need for exposing internal method. Make select/deselectMarker public. Add getSelectedMarker. Fix bug where you couldn't reselect a closed info window. Fixes #2546 Fixes #2631 Fixes #2448
@bleege didn't the generic builder pattern solve this? |
@tobrun I didn't have time to finish yesterday afternoon so I just created this issue to make sure this was known. Hoping to get it to today. |
Looking at Google's implementation they avoided this problem all together by keeping PolygonOptions, PolyLineOptions, and MarkerOptions all independent. In other words, they don't use DRY and each one of these Option classes extends from |
Doing some R&D on this shows that the |
@bleege Does the same apply to the Also should point out this was an easy fix in my large PR, I just pushed |
I decided to remove |
Rebased and merged. |
Remove unimplemented properties. Correct defintions of equals() and hasCode(). Add setOnInfoWindowClickListener and remove old method from Marker. Refactor showInfoWindow() to remove need for exposing internal method. Make select/deselectMarker public. Add getSelectedMarker. Fix bug where you couldn't reselect a closed info window. Add empty constructor to LatLng and LatLngZoom. Fixes #2546 Fixes #2631 Fixes #2448
…ions in favor of concrete implementation
Remove unimplemented properties. Correct defintions of equals() and hasCode(). Add setOnInfoWindowClickListener and remove old method from Marker. Refactor showInfoWindow() to remove need for exposing internal method. Make select/deselectMarker public. Add getSelectedMarker. Fix bug where you couldn't reselect a closed info window. Add empty constructor to LatLng and LatLngZoom. Fixes mapbox#2546 Fixes mapbox#2631 Fixes mapbox#2448
Currently
AnnotationOptions.alpha()
returns anAnnotationsOptions
object. While this is functional, it requires casting to be applied in common Builder patterns which isn't good. For example:/cc @tobrun @ljbade
The text was updated successfully, but these errors were encountered: