-
Notifications
You must be signed in to change notification settings - Fork 320
Replace deprecated maker usage in NavigationMapboxMap with SymbolManager #1707
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
Conversation
fbeb65a to
7be8915
Compare
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| class MapSymbolManager { |
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.
What about renaming this to be NavigationSymbolManager, to make it more clear that this is a Navigation wrapper for SymbolManager?
| private final List<Symbol> mapMarkersSymbols = new ArrayList<>(); | ||
| private final SymbolManager symbolManager; | ||
|
|
||
| MapSymbolManager(SymbolManager symbolManager) { |
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.
How about adding an overloaded constructor that takes the parameters needed to instantiate the SymbolManager to remove that extra step? i.e., MapSymbolManager(MapView mapView, MapboxMap mapboxMap) { this(new SymbolManager(mapView, mapboxMap, mapboxMap.getStyle())); }
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.
@devotaaabel are you speaking in terms of the work to do this in NavigationMapboxMap? The reason the SymbolManager is "injected" is for easier unit testing.
...n-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/map/NavigationMapboxMap.java
Show resolved
Hide resolved
7be8915 to
7ccbddd
Compare
Codecov Report
@@ Coverage Diff @@
## master #1707 +/- ##
===========================================
+ Coverage 29.16% 29.36% +0.2%
- Complexity 810 820 +10
===========================================
Files 202 203 +1
Lines 7913 7913
Branches 619 619
===========================================
+ Hits 2308 2324 +16
+ Misses 5384 5368 -16
Partials 221 221 |
7ccbddd to
8e1a0b4
Compare
|
@devotaaabel this is ready for another round of review. I don't think it's necessary to push logic into a new constructor, then have another constructor for testing - if we can accomplish this in a cleaner manner, let's please discuss this further. |
Closes #1706