You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code isn't PR ready yet, most of implementation is done but hitting some unforeseen issues.
MapboxMap doesn't expose OnMapChangeListener anymore, we probably need to rely on both MapView and MapboxMap as a dependency.
Missing API to get layer positioning completely right
Crash when switching styles, on iOS it's allowed to reuse sources and layers while on Android you are required to do the following: remove/switch style/readd. The means we need a hook into style loading while we don't have that atm.
If you're looking for a workaround until there's a sourceLayerIdentifier, might be easy to just hard-code a few layer ids to check for. Looking through the Mapbox core styles, the top road layer is generally one of the following two:
bridge-construction
bridge-motorway
I ended up using these in the meantime, but the plugin should be able to handle any kind of setup. I'm working today on adding that feature in the SDK so we can continue working from a SNAPSHOT.
On iOS, runtime styling layers can't be reused when switching styles.
On Android neither.
Generally every time the style changes, we listen for a style did finish loading callback, and re-invoke any runtime styling there:
@tobrun Looking great. Just two quick UI-suggestions:
How about the traffic toggle includes a car icon to make it more explicit? Or we replace the FAB with a lower button centered that simply says "toggle traffic".
Instead of rotating through the base styles one by one, how about we add a button row on the top of the screen with the names of the styles?
@ericrwolfe Anything else you'd like to see it here?
@tobrun Awesome work, this looks great. I think what we have in terms of changing the style and toggling the traffic is all we need in terms of the example.
Activity
tobrun commentedon Apr 6, 2017
Missing an API to completely port the iOS code mapbox/mapbox-gl-native#8663.
tobrun commentedon Apr 6, 2017
zugaldia commentedon Apr 6, 2017
👍
@tobrun Is here a branch/PR we can play with?
tobrun commentedon Apr 6, 2017
The code isn't PR ready yet, most of implementation is done but hitting some unforeseen issues.
ericrwolfe commentedon Apr 6, 2017
If you're looking for a workaround until there's a
sourceLayerIdentifier, might be easy to just hard-code a few layer ids to check for.Looking through the Mapbox core styles, the top road layer is generally one of the following two:
bridge-constructionbridge-motorwayOn iOS, runtime styling layers can't be reused when switching styles.
Generally every time the style changes, we listen for a
style did finish loadingcallback, and re-invoke any runtime styling there:tobrun commentedon Apr 7, 2017
I ended up using these in the meantime, but the plugin should be able to handle any kind of setup. I'm working today on adding that feature in the SDK so we can continue working from a SNAPSHOT.
On Android neither.
This is the part that is resulting in a crash, ticketed in mapbox/mapbox-gl-native#8675
tobrun commentedon Apr 7, 2017
Ok, think the crash was an issue from my end:
tobrun commentedon Apr 10, 2017
Current state:
zugaldia commentedon Apr 10, 2017
@tobrun Looking great. Just two quick UI-suggestions:
How about the traffic toggle includes a car icon to make it more explicit? Or we replace the FAB with a lower button centered that simply says "toggle traffic".
Instead of rotating through the base styles one by one, how about we add a button row on the top of the screen with the names of the styles?
@ericrwolfe Anything else you'd like to see it here?
ericrwolfe commentedon Apr 10, 2017
@tobrun Awesome work, this looks great. I think what we have in terms of changing the style and toggling the traffic is all we need in terms of the example.
tobrun commentedon Apr 11, 2017
Remaining item to hit from #4 (comment) is changing icons.
# This is a combination of 5 commits.
Building plugin (#26)