-
Notifications
You must be signed in to change notification settings - Fork 120
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
Traffic plugin #4
Comments
Missing an API to completely port the iOS code mapbox/mapbox-gl-native#8663. |
👍 @tobrun Is here a branch/PR we can play with? |
The code isn't PR ready yet, most of implementation is done but hitting some unforeseen issues.
|
If you're looking for a workaround until there's a Looking through the Mapbox core styles, the top road layer is generally one of the following two:
On iOS, runtime styling layers can't be reused when switching styles. Generally every time the style changes, we listen for a extension TrafficOverlayViewController: MGLMapViewDelegate {
func mapView(_ mapView: MGLMapView, didFinishLoading style: MGLStyle) {
Traffic.setVisible(self.trafficEnabled, inStyle: self.mapView.style!)
}
} |
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 Looking great. Just two quick UI-suggestions:
@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. |
Remaining item to hit from #4 (comment) is changing icons. |
# This is the 1st commit message: add Building plugin # The commit message #2 will be skipped: # fixed issues reviewed by me # The commit message #3 will be skipped: # fixed bitrise script # The commit message #4 will be skipped: # added DDS for building height # The commit message #5 will be skipped: # removed commented out code
* # This is a combination of 5 commits. # This is the 1st commit message: add Building plugin # The commit message #2 will be skipped: # fixed issues reviewed by me # The commit message #3 will be skipped: # fixed bitrise script # The commit message #4 will be skipped: # added DDS for building height # The commit message #5 will be skipped: # removed commented out code * cleaned up gradle file * updated Makefile * added optional constructor param to place buildings below layer * added comment with more information
We'd like to add a traffic plugin that lets you add a traffic layer to any Mapbox basemap. To do that, we could use runtime styling.
We'd also like to add a sample activity to the test app that lets you switch between a few basemaps, including a toggle to turn traffic on and off.
cc: @ericrwolfe
The text was updated successfully, but these errors were encountered: