diff options
author | m-stephen <truestyle2005@163.com> | 2019-07-23 10:28:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 10:28:43 +0800 |
commit | 1a68ceef69d8f23541ed4fa9ab380a51d6b8cce2 (patch) | |
tree | e4e81af62deafe5694cf53f9ff1c10664f616340 | |
parent | 60b8829004511e1e5bf0c144502937c576fd028d (diff) | |
parent | dabf5d0c3a76f9fbe8b866f64f51accf12d1a2a6 (diff) | |
download | qtlocation-mapboxgl-1a68ceef69d8f23541ed4fa9ab380a51d6b8cce2.tar.gz |
Merge branch 'master' into stephen-MGLLoggingConfiguration
77 files changed, 14996 insertions, 10724 deletions
diff --git a/circle.yml b/circle.yml index b15eb6610d..a60e83fa72 100644 --- a/circle.yml +++ b/circle.yml @@ -618,7 +618,7 @@ jobs: # ------------------------------------------------------------------------------ android-release: docker: - - image: mbgl/android-ndk-r19:8e91a7ebab + - image: mbgl/android-ndk-r20:7b7c4b42cf resource_class: xlarge working_directory: /src environment: diff --git a/include/mbgl/storage/offline.hpp b/include/mbgl/storage/offline.hpp index f884c8b465..f702f47edc 100644 --- a/include/mbgl/storage/offline.hpp +++ b/include/mbgl/storage/offline.hpp @@ -193,8 +193,7 @@ public: * tiles stored for offline regions has been reached. * * Once the limit has been reached, the SDK will not download further offline - * tiles from Mapbox APIs until existing tiles have been removed. Contact your - * Mapbox sales representative to raise the limit. + * tiles from Mapbox APIs until existing tiles have been removed. * * This limit does not apply to non-Mapbox tile sources. * diff --git a/mapbox-gl-js b/mapbox-gl-js -Subproject 8e77fc87ad0e477df7d01dc0534ddacc23358cd +Subproject 3abd5d518bade8d83eb609598b861432a83f869 diff --git a/platform/android/.editorconfig b/platform/android/.editorconfig index 7ebd2b7bb0..8a6c90a0d5 100644 --- a/platform/android/.editorconfig +++ b/platform/android/.editorconfig @@ -1,2 +1,4 @@ [*.{kt,kts}] -indent_size=2
\ No newline at end of file +indent_size=2 +insert_final_newline=false +disabled_rules=no-wildcard-imports
\ No newline at end of file diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index f27e641780..cf9e1b5819 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -4,54 +4,67 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to ## master -### Bugs - - Fixed a custom geometry source bug caused by using the outdated tiles after style update [#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112) +### Bug fixes + - Fixed flickering on style change for the same tile set [#15127](https://github.com/mapbox/mapbox-gl-native/pull/15127) + +## 8.2.0-beta.1 - July 18, 2019 +[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0-alpha.3...android-v8.2.0-beta.1) since [Mapbox Maps SDK for Android v8.2.0-alpha.3](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0-alpha.3): + +### Bug fixes + - Fix `CustomGeometrySource` bug caused by usage of outdated tiles after a style update [#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112) + - Fix bug where previous anchors set in `text-variable-anchor` were still preferred after anchor options were reset [#15129](https://github.com/mapbox/mapbox-gl-native/pull/15129) + - Fix issue where annotations could not be selected due to a regression in content insets [#15130](https://github.com/mapbox/mapbox-gl-native/pull/15130) ## 8.2.0-alpha.3 - July 11, 2019 +[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0-alpha.2...android-v8.2.0-alpha.3) since [Mapbox Maps SDK for Android v8.2.0-alpha.2](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0-alpha.2): -### Bugs - - Fixed a map update bug caused by the render tiles and the render passes getting unsynchronized [#15092](https://github.com/mapbox/mapbox-gl-native/pull/15092) - - Performance improvements for queryRenderedFeatures API and optimization that allocates containers based on a number of rendered layers [#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930) - - Fixed rendering layers after fill-extrusion regression caused by optimization of fill-extrusion rendering [#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065) - - Decrease the minimum pixel distance required to interpolate during camera animation [#15073](https://github.com/mapbox/mapbox-gl-native/pull/15073) - - Ensure location shadow's gradient radius is greater than 0 [#15099](https://github.com/mapbox/mapbox-gl-native/pull/15099) - - Allow map panning after quick zoom is disabled but a phantom gesture is executed [#15093](https://github.com/mapbox/mapbox-gl-native/pull/15093) - - Ensure that move detector is enabled if double-tap is interrupted [#15103](https://github.com/mapbox/mapbox-gl-native/pull/15103) +### Bug fixes + - Fix map update bug caused by render tiles and render passes becoming unsynchronized [#15092](https://github.com/mapbox/mapbox-gl-native/pull/15092) + - Fix fill-extrusion layers always rendered above other layers [#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065) + - Fix a bug where map panning would be blocked after a quick zoom gesture was attempted when quick zoom is set to be ignored by `UiSettings` preferences [#15093](https://github.com/mapbox/mapbox-gl-native/pull/15093) + - Fix a bug where map panning would be blocked if double-tap is interrupted [#15103](https://github.com/mapbox/mapbox-gl-native/pull/15103) -### Feature - - Introduce MapboxMapOptions facility creation method [#15069](https://github.com/mapbox/mapbox-gl-native/pull/15069) +### Minor features and improvements + - Improve performance of queryRenderedFeatures by removing unnecessary iterations over vectors and unneeded layers [#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930) + - Decrease the minimum pixel distance between the current camera position and the target required to interpolate during camera animation [#15073](https://github.com/mapbox/mapbox-gl-native/pull/15073) + - Introduce `MapboxMapOptions` facility creation method [#15069](https://github.com/mapbox/mapbox-gl-native/pull/15069) - Throw configuration exception when accessing Mapbox services with an invalid token [#15081](https://github.com/mapbox/mapbox-gl-native/pull/15081) - Allow setting a null access token in the runtime [#15081](https://github.com/mapbox/mapbox-gl-native/pull/15081) + - Ensure location shadow's gradient radius is greater than 0 [#15099](https://github.com/mapbox/mapbox-gl-native/pull/15099) -### Build +### Other Changes - Update okhttp to latest stable version that support pre lollipop (`3.12.3`) [#15087](https://github.com/mapbox/mapbox-gl-native/pull/15087) - -### Documentation - Fix up "match" expressions docs with stop arguments [#15102](https://github.com/mapbox/mapbox-gl-native/pull/15102) ## 8.2.0-alpha.2 - July 3, 2019 +[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.2.0-alpha.1...android-v8.2.0-alpha.2) since [Mapbox Maps SDK for Android v8.2.0-alpha.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.0-alpha.1): -### Bugs - - Fixed style change transition regression caused by delayed setting of the updated layer properties [#15016](https://github.com/mapbox/mapbox-gl-native/pull/15016) - -### Features +### Major features - Cache management API [#14962](https://github.com/mapbox/mapbox-gl-native/pull/14962) + +### Bug fixes + - Fix style change transition regression caused by delayed setting of the updated layer properties [#15016](https://github.com/mapbox/mapbox-gl-native/pull/15016) + +### Minor features and improvements - Include Hiragana and Katakana glyph ranges to LocalGlyphRasterizer [#15009](https://github.com/mapbox/mapbox-gl-native/pull/15009) -### Build +### Other Changes - Update CI image with NDK r20 [#15005](https://github.com/mapbox/mapbox-gl-native/pull/15005) ## 8.2.0-alpha.1 - June 26, 2019 +[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.1.0...android-v8.2.0-alpha.1) since [Mapbox Maps SDK for Android v8.1.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.1.0): -### Bugs - - Fixed queryRenderedFeatues bug caused by incorrect sort feature index calculation [#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884) - - Switch back to a more compact line attributes layout [#14851](https://github.com/mapbox/mapbox-gl-native/pull/14851) - - Correct reset viewport restriction [#14882](https://github.com/mapbox/mapbox-gl-native/pull/14882) - - Allow null updates to GeoJsonSource [#14898](https://github.com/mapbox/mapbox-gl-native/pull/14898) - - Accept floating point numbers during core and platform color conversion [#14954](https://github.com/mapbox/mapbox-gl-native/pull/14954) +### Bug fixes + - Fix `queryRenderedFeatues` bug caused by incorrect sort feature index calculation [#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884) + - Fix performance regression by switching back to a more compact line attributes layout [#14851](https://github.com/mapbox/mapbox-gl-native/pull/14851) + - Fix a bug that restricted camera viewport after camera bounds were reset [#14882](https://github.com/mapbox/mapbox-gl-native/pull/14882) + - Fix a bug that ignored floating point values during core to platform color conversion [#14954](https://github.com/mapbox/mapbox-gl-native/pull/14954) - Implemented asymmetric center of perspective: fixed an issue that caused the focal point to be always based on the view's horizontal center when setting [MapboxMap setPadding](https://docs.mapbox.com/android/api/map-sdk/8.0.0/com/mapbox/mapboxsdk/maps/MapboxMap.html#setPadding-int-int-int-int-). [#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664) -### Features +### Minor features and improvements + - Allow null updates to GeoJsonSource [#14898](https://github.com/mapbox/mapbox-gl-native/pull/14898) + +### Other Changes - Add resource usage to HttpRequest, add offline query flag to HttpRequest [#14837](https://github.com/mapbox/mapbox-gl-native/pull/14837) ## 8.1.0 - June 20, 2019 diff --git a/platform/android/LICENSE.md b/platform/android/LICENSE.md index 1079b4696a..fdb2d43849 100644 --- a/platform/android/LICENSE.md +++ b/platform/android/LICENSE.md @@ -12,6 +12,12 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== +Mapbox GL uses portions of the Android Lifecycle LiveData. +URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html) +License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox GL uses portions of the Android Lifecycle LiveData Core. URL: [https://developer.android.com/topic/libraries/architecture/index.html](https://developer.android.com/topic/libraries/architecture/index.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -42,12 +48,30 @@ License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2. =========================================================================== +Mapbox GL uses portions of the Android Support Library Async Layout Inflater. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library collections. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox GL uses portions of the Android Support Library compat. URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== +Mapbox GL uses portions of the Android Support Library Coordinator Layout. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox GL uses portions of the Android Support Library core UI. URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -60,12 +84,78 @@ License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2. =========================================================================== +Mapbox GL uses portions of the Android Support Library Cursor Adapter. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Custom View. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Custom View. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Document File. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Drawer Layout. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox GL uses portions of the Android Support Library fragment. URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== +Mapbox GL uses portions of the Android Support Library Interpolators. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library loader. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Local Broadcast Manager. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Print. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library Sliding Pane Layout. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + +Mapbox GL uses portions of the Android Support Library View Pager. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox GL uses portions of the Gson. License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -119,7 +209,13 @@ License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) Mapbox GL uses portions of the SoLoader. URL: [https://github.com/facebook/soloader](https://github.com/facebook/soloader) -License: [BSD License](https://github.com/facebook/soloader/blob/master/LICENSE) +License: [Apache-2](https://github.com/facebook/soloader/blob/master/LICENSE) + +=========================================================================== + +Mapbox GL uses portions of the VersionedParcelable and friends. +URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) +License: [The Apache Software License](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== diff --git a/platform/android/MapboxGLAndroidSDK/gradle.properties b/platform/android/MapboxGLAndroidSDK/gradle.properties index d996dd7eca..989a56fd63 100644 --- a/platform/android/MapboxGLAndroidSDK/gradle.properties +++ b/platform/android/MapboxGLAndroidSDK/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=8.2.0-SNAPSHOT +VERSION_NAME=8.3.0-SNAPSHOT # Only build native dependencies for the current ABI # See https://code.google.com/p/android/issues/detail?id=221098#c20 diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java index 5ff4104ea8..16285468ee 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraUpdateFactory.java @@ -10,7 +10,6 @@ import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.maps.MapboxMap; import com.mapbox.mapboxsdk.maps.Projection; import com.mapbox.mapboxsdk.maps.UiSettings; -import junit.framework.Assert; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -329,8 +328,8 @@ public final class CameraUpdateFactory { return mapboxMap.getCameraForLatLngBounds(bounds, padding); } else { // use provided tilt and bearing - Assert.assertNotNull(bearing); - Assert.assertNotNull(tilt); + assert bearing != null; + assert tilt != null; return mapboxMap.getCameraForLatLngBounds(bounds, padding, bearing, tilt); } } diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java index 07e0daef54..a449ad8a06 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java @@ -518,13 +518,6 @@ public class Style { */ void clear() { fullyLoaded = false; - for (Source source : sources.values()) { - if (source != null) { - source.setDetached(); - nativeMap.removeSource(source); - } - } - for (Layer layer : layers.values()) { if (layer != null) { layer.setDetached(); @@ -532,6 +525,13 @@ public class Style { } } + for (Source source : sources.values()) { + if (source != null) { + source.setDetached(); + nativeMap.removeSource(source); + } + } + for (Map.Entry<String, Bitmap> bitmapEntry : images.entrySet()) { nativeMap.removeImage(bitmapEntry.getKey()); bitmapEntry.getValue().recycle(); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java index 2217850a2e..f13128da63 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java @@ -96,8 +96,7 @@ public class OfflineRegion { * tiles stored for offline regions has been reached. * * Once the limit has been reached, the SDK will not download further offline - * tiles from Mapbox APIs until existing tiles have been removed. Contact your - * Mapbox sales representative to raise the limit. + * tiles from Mapbox APIs until existing tiles have been removed. * * This limit does not apply to non-Mapbox tile sources. * diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/StyleTest.kt b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/StyleTest.kt index 7b5ed67184..9a7462b8d0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/StyleTest.kt +++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/StyleTest.kt @@ -8,10 +8,7 @@ import com.mapbox.mapboxsdk.style.layers.SymbolLayer import com.mapbox.mapboxsdk.style.layers.TransitionOptions import com.mapbox.mapboxsdk.style.sources.CannotAddSourceException import com.mapbox.mapboxsdk.style.sources.GeoJsonSource -import io.mockk.every -import io.mockk.mockk -import io.mockk.spyk -import io.mockk.verify +import io.mockk.* import org.junit.Assert import org.junit.Before import org.junit.Test @@ -408,4 +405,22 @@ class StyleTest { Assert.assertEquals("Layer that failed to be added shouldn't be cached", layer1, mapboxMap.style!!.getLayer("layer1")) } } + + @Test + fun testClearRemovesSourcesFirst() { + val source1 = mockk<GeoJsonSource>(relaxed = true) + every { source1.id } returns "source1" + val layer1 = mockk<SymbolLayer>(relaxed = true) + every { layer1.id } returns "layer1" + + val builder = Style.Builder().withLayer(layer1).withSource(source1) + mapboxMap.setStyle(builder) + mapboxMap.notifyStyleLoaded() + mapboxMap.setStyle(Style.MAPBOX_STREETS) + + verifyOrder { + nativeMapView.removeLayer(layer1) + nativeMapView.removeSource(source1) + } + } }
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationLayerControllerTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationLayerControllerTest.kt index c2d95d0e80..ab70f188c3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationLayerControllerTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/LocationLayerControllerTest.kt @@ -27,6 +27,7 @@ import com.mapbox.mapboxsdk.testapp.R import com.mapbox.mapboxsdk.testapp.activity.EspressoTest import com.mapbox.mapboxsdk.testapp.utils.TestingAsyncUtils import com.mapbox.mapboxsdk.utils.BitmapUtils +import kotlin.math.abs import org.hamcrest.CoreMatchers.`is` import org.hamcrest.CoreMatchers.notNullValue import org.hamcrest.Matchers.equalTo @@ -37,7 +38,6 @@ import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import kotlin.math.abs @RunWith(AndroidJUnit4::class) class LocationLayerControllerTest : EspressoTest() { @@ -77,10 +77,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.NORMAL TestingAsyncUtils.waitForLayer(uiController, mapView) @@ -105,10 +107,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.NORMAL component.forceLocationUpdate(location) @@ -134,10 +138,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.COMPASS component.forceLocationUpdate(location) @@ -163,10 +169,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.GPS component.forceLocationUpdate(location) @@ -192,10 +200,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.forceLocationUpdate(location) component.isLocationComponentEnabled = false @@ -222,10 +232,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.NORMAL component.forceLocationUpdate(location) @@ -253,10 +265,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.renderMode = RenderMode.NORMAL component.forceLocationUpdate(location) @@ -290,22 +304,30 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.applyStyle(LocationComponentOptions.builder(context).staleStateTimeout(100).build()) component.forceLocationUpdate(location) TestingAsyncUtils.waitForLayer(uiController, mapView) uiController.loopMainThreadForAtLeast(150) - assertThat(mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getBooleanProperty(PROPERTY_LOCATION_STALE), `is`(true)) + assertThat( + mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getBooleanProperty(PROPERTY_LOCATION_STALE), + `is`(true) + ) mapboxMap.setStyle(Style.Builder().fromUrl(Style.LIGHT)) TestingAsyncUtils.waitForLayer(uiController, mapView) - assertThat(mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getBooleanProperty(PROPERTY_LOCATION_STALE), `is`(true)) + assertThat( + mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getBooleanProperty(PROPERTY_LOCATION_STALE), + `is`(true) + ) } } executeComponentTest(componentAction) @@ -321,10 +343,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.forceLocationUpdate(location) TestingAsyncUtils.waitForLayer(uiController, mapView) @@ -333,9 +357,9 @@ class LocationLayerControllerTest : EspressoTest() { assertThat(mapboxMap.queryRenderedFeatures(location, FOREGROUND_LAYER).isEmpty(), `is`(true)) val options = component.locationComponentOptions - .toBuilder() - .layerBelow("road-label") - .build() + .toBuilder() + .layerBelow("road-label") + .build() component.applyStyle(options) TestingAsyncUtils.waitForLayer(uiController, mapView) @@ -355,10 +379,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.applyStyle(LocationComponentOptions.builder(context).staleStateTimeout(1).build()) styleChangeIdlingResource.waitForStyle(mapboxMap, MAPBOX_HEAVY_STYLE) @@ -386,10 +412,12 @@ class LocationLayerControllerTest : EspressoTest() { styleChangeIdlingResource.waitForStyle(mapboxMap, MAPBOX_HEAVY_STYLE) uiController.loopMainThreadForAtLeast(100) var show = true - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, mapboxMap.style!!) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, mapboxMap.style!!) + .useDefaultLocationEngine(false) + .build() + ) pushSourceUpdates(styleChangeIdlingResource) { component.isLocationComponentEnabled = show show = !show @@ -414,19 +442,23 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(location), 16.0)) component.forceLocationUpdate(location) TestingAsyncUtils.waitForLayer(uiController, mapView) uiController.loopMainThreadForAtLeast(ACCURACY_RADIUS_ANIMATION_DURATION) - assertEquals(Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/, + assertEquals( + Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/, mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0] - .getNumberProperty(PROPERTY_ACCURACY_RADIUS).toFloat(), 0.1f) + .getNumberProperty(PROPERTY_ACCURACY_RADIUS).toFloat(), 0.1f + ) } } executeComponentTest(componentAction) @@ -442,10 +474,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.forceLocationUpdate(location) @@ -455,15 +489,23 @@ class LocationLayerControllerTest : EspressoTest() { uiController.loopMainThreadForAtLeast(300) TestingAsyncUtils.waitForLayer(uiController, mapView) - assertThat(Math.abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1 && - Math.abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 && - Math.abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1, - `is`(true)) - - val expectedRadius = Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/ assertThat( - Math.abs(expectedRadius - mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getNumberProperty(PROPERTY_ACCURACY_RADIUS).toFloat()) < 0.1, - `is`(true)) + Math.abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1 && + Math.abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 && + Math.abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1, + `is`(true) + ) + + val expectedRadius = + Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/ + assertThat( + Math.abs( + expectedRadius - mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getNumberProperty( + PROPERTY_ACCURACY_RADIUS + ).toFloat() + ) < 0.1, + `is`(true) + ) } } executeComponentTest(componentAction) @@ -479,10 +521,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.forceLocationUpdate(location) @@ -493,14 +537,21 @@ class LocationLayerControllerTest : EspressoTest() { assertThat( abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1 && - abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 && - abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1, - `is`(true)) + abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 && + abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1, + `is`(true) + ) - val expectedRadius = Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/ + val expectedRadius = + Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/ assertThat( - Math.abs(expectedRadius - mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getNumberProperty(PROPERTY_ACCURACY_RADIUS).toFloat()) < 0.1, - `is`(true)) + Math.abs( + expectedRadius - mapboxMap.querySourceFeatures(LOCATION_SOURCE)[0].getNumberProperty( + PROPERTY_ACCURACY_RADIUS + ).toFloat() + ) < 0.1, + `is`(true) + ) } } executeComponentTest(componentAction) @@ -516,10 +567,12 @@ class LocationLayerControllerTest : EspressoTest() { uiController: UiController, context: Context ) { - component.activateLocationComponent(LocationComponentActivationOptions - .builder(context, style) - .useDefaultLocationEngine(false) - .build()) + component.activateLocationComponent( + LocationComponentActivationOptions + .builder(context, style) + .useDefaultLocationEngine(false) + .build() + ) component.isLocationComponentEnabled = true component.forceLocationUpdate(location) TestingAsyncUtils.waitForLayer(uiController, mapView) diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/LocationComponentAction.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/LocationComponentAction.kt index daf6b89f59..3cb9e51bf7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/LocationComponentAction.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/LocationComponentAction.kt @@ -5,8 +5,8 @@ import android.support.test.espresso.UiController import android.support.test.espresso.ViewAction import android.support.test.espresso.matcher.ViewMatchers.isDisplayed import android.view.View -import com.mapbox.mapboxsdk.maps.MapboxMap import com.mapbox.mapboxsdk.location.LocationComponent +import com.mapbox.mapboxsdk.maps.MapboxMap import com.mapbox.mapboxsdk.maps.Style import org.hamcrest.Matcher diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/OnMapFragmentReadyIdlingResource.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/OnMapFragmentReadyIdlingResource.kt deleted file mode 100644 index 4d02a4d2bf..0000000000 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/location/utils/OnMapFragmentReadyIdlingResource.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.mapbox.mapboxsdk.location.utils - -import android.os.Handler -import android.os.Looper -import android.support.test.espresso.IdlingResource - -import com.mapbox.mapboxsdk.maps.MapboxMap -import com.mapbox.mapboxsdk.maps.OnMapReadyCallback -import com.mapbox.mapboxsdk.maps.SupportMapFragment - -class OnMapFragmentReadyIdlingResource(fragment: SupportMapFragment?) : IdlingResource, OnMapReadyCallback { - - lateinit var mapboxMap: MapboxMap - - private var resourceCallback: IdlingResource.ResourceCallback? = null - - init { - Handler(Looper.getMainLooper()).post { - fragment?.getMapAsync(this) - } - } - - override fun getName(): String { - return javaClass.simpleName - } - - override fun isIdleNow(): Boolean { - return this::mapboxMap.isInitialized - } - - override fun registerIdleTransitionCallback(resourceCallback: IdlingResource.ResourceCallback) { - this.resourceCallback = resourceCallback - } - - override fun onMapReady(mapboxMap: MapboxMap) { - this.mapboxMap = mapboxMap - resourceCallback?.onTransitionToIdle() - } -}
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/GesturesUiTestUtils.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/GesturesUiTestUtils.kt index 2f6346d37d..f3af386457 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/GesturesUiTestUtils.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/GesturesUiTestUtils.kt @@ -9,14 +9,18 @@ import android.support.test.espresso.ViewAction import android.support.test.espresso.matcher.ViewMatchers import android.view.MotionEvent import android.view.View - import org.hamcrest.Matcher object GesturesUiTestUtils { private const val DEFAULT_GESTURE_DURATION = 500L - fun pinch(startSpan: Float, endSpan: Float, center: PointF? = null, duration: Long = DEFAULT_GESTURE_DURATION): ViewAction { + fun pinch( + startSpan: Float, + endSpan: Float, + center: PointF? = null, + duration: Long = DEFAULT_GESTURE_DURATION + ): ViewAction { return object : ViewAction { override fun getConstraints(): Matcher<View> { return ViewMatchers.isEnabled() @@ -40,7 +44,13 @@ object GesturesUiTestUtils { } } - fun quickScale(deltaY: Float, startPoint: PointF? = null, withVelocity: Boolean = true, duration: Long = DEFAULT_GESTURE_DURATION, interrupt: Boolean = false): ViewAction { + fun quickScale( + deltaY: Float, + startPoint: PointF? = null, + withVelocity: Boolean = true, + duration: Long = DEFAULT_GESTURE_DURATION, + interrupt: Boolean = false + ): ViewAction { return object : ViewAction { override fun getConstraints(): Matcher<View> = ViewMatchers.isEnabled() @@ -59,7 +69,13 @@ object GesturesUiTestUtils { } } - fun move(deltaX: Float, deltaY: Float, startPoint: PointF? = null, withVelocity: Boolean = true, duration: Long = DEFAULT_GESTURE_DURATION): ViewAction { + fun move( + deltaX: Float, + deltaY: Float, + startPoint: PointF? = null, + withVelocity: Boolean = true, + duration: Long = DEFAULT_GESTURE_DURATION + ): ViewAction { return object : ViewAction { override fun getConstraints(): Matcher<View> = ViewMatchers.isEnabled() @@ -85,7 +101,8 @@ object GesturesUiTestUtils { val viewWidth = view.width * view.scaleX return PointF( (locationOnScreen[0] + viewWidth / 2).toInt().toFloat(), - (locationOnScreen[1] + viewHeight / 2).toInt().toFloat()) + (locationOnScreen[1] + viewHeight / 2).toInt().toFloat() + ) } // https://stackoverflow.com/a/46443628/9126211 @@ -147,15 +164,19 @@ object GesturesUiTestUtils { try { // Step 1 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_DOWN, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 2 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_POINTER_DOWN + (pp2.id shl MotionEvent.ACTION_POINTER_INDEX_SHIFT), 2, - properties, pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + properties, pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 3, 4 @@ -187,9 +208,11 @@ object GesturesUiTestUtils { pointerCoords[0] = pc1 pointerCoords[1] = pc2 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_MOVE, 2, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } @@ -202,23 +225,34 @@ object GesturesUiTestUtils { pointerCoords[1] = pc2 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_POINTER_UP + (pp2.id shl MotionEvent.ACTION_POINTER_INDEX_SHIFT), 2, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 6 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_UP, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } catch (ex: InjectEventSecurityException) { throw RuntimeException("Could not perform pinch", ex) } } - private fun performQuickScale(uiController: UiController, startPoint: PointF, endPoint: PointF, withVelocity: Boolean, duration: Long, interrupt: Boolean) { + private fun performQuickScale( + uiController: UiController, + startPoint: PointF, + endPoint: PointF, + withVelocity: Boolean, + duration: Long, + interrupt: Boolean + ) { val eventMinInterval: Long = 10 val tapDownMinInterval: Long = 40 // ViewConfiguration#DOUBLE_TAP_MIN_TIME = 40 val startTime = SystemClock.uptimeMillis() @@ -252,23 +286,29 @@ object GesturesUiTestUtils { */ try { // Step 1 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_DOWN, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 2 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_UP, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 3 eventTime += tapDownMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_DOWN, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 4 @@ -293,9 +333,11 @@ object GesturesUiTestUtils { pointerCoords[0] = pc1 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_MOVE, if (interrupted) 2 else 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) if (interrupt && i == moveEventNumber / 2) { @@ -320,9 +362,11 @@ object GesturesUiTestUtils { pointerCoords[1] = pc2 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_POINTER_DOWN + (pp2.id shl MotionEvent.ACTION_POINTER_INDEX_SHIFT), 2, - properties, pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + properties, pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) interrupted = true } @@ -330,24 +374,34 @@ object GesturesUiTestUtils { if (!withVelocity) { eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_MOVE, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } // Step 5 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_UP, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } catch (ex: InjectEventSecurityException) { throw RuntimeException("Could not perform quick scale", ex) } } - private fun performMove(uiController: UiController, startPoint: PointF, endPoint: PointF, withVelocity: Boolean, duration: Long) { + private fun performMove( + uiController: UiController, + startPoint: PointF, + endPoint: PointF, + withVelocity: Boolean, + duration: Long + ) { val eventMinInterval: Long = 10 val startTime = SystemClock.uptimeMillis() var eventTime = startTime @@ -378,9 +432,11 @@ object GesturesUiTestUtils { */ try { // Step 1 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_DOWN, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) // Step 2 @@ -403,25 +459,31 @@ object GesturesUiTestUtils { pointerCoords[0] = pc1 - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_MOVE, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } if (!withVelocity) { eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_MOVE, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } // Step 3 eventTime += eventMinInterval - event = MotionEvent.obtain(startTime, eventTime, + event = MotionEvent.obtain( + startTime, eventTime, MotionEvent.ACTION_UP, 1, properties, - pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0) + pointerCoords, 0, 0, 1f, 1f, 0, 0, 0, 0 + ) injectMotionEventToUiController(uiController, event) } catch (ex: InjectEventSecurityException) { throw RuntimeException("Could not perform quick scale", ex) diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/VisibleRegionTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/VisibleRegionTest.kt index 684b13af5d..14722ea37c 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/VisibleRegionTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/VisibleRegionTest.kt @@ -5,7 +5,6 @@ import android.support.test.espresso.UiController import com.mapbox.mapboxsdk.camera.CameraUpdateFactory import com.mapbox.mapboxsdk.geometry.LatLng import com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke - import com.mapbox.mapboxsdk.testapp.activity.BaseTest import com.mapbox.mapboxsdk.testapp.activity.espresso.PixelTestActivity import org.junit.Assert.* diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/offline/OfflineDownloadTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/offline/OfflineDownloadTest.kt index 5c574f9332..93b59d6e33 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/offline/OfflineDownloadTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/offline/OfflineDownloadTest.kt @@ -6,12 +6,12 @@ import com.mapbox.geojson.Point import com.mapbox.mapboxsdk.log.Logger import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.TimeoutException +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith /** * Integration test that validates downloading an offline region from a point geometry at zoomlevel 17 diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt index 5044c077a8..9fca11c017 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotterTest.kt @@ -6,18 +6,21 @@ import com.mapbox.mapboxsdk.camera.CameraPosition import com.mapbox.mapboxsdk.geometry.LatLng import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeoutException import junit.framework.Assert.assertNotNull +import org.junit.Assert +import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch -import java.util.concurrent.TimeUnit -import java.util.concurrent.TimeoutException /** * Integration test that validates if a snapshotter creation */ @RunWith(AndroidJUnit4::class) +@Ignore("Ignored until https://github.com/mapbox/mapbox-gl-native/issues/11669 is resolved.") class MapSnapshotterTest { @Rule @@ -39,11 +42,13 @@ class MapSnapshotterTest { .build() ) val mapSnapshotter = MapSnapshotter(rule.activity, options) - mapSnapshotter.start { + mapSnapshotter.start({ assertNotNull(it) assertNotNull(it.bitmap) countDownLatch.countDown() - } + }, { + Assert.fail(it) + }) } if (!countDownLatch.await(30, TimeUnit.SECONDS)) { throw TimeoutException() diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/ImageMissingTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/ImageMissingTest.kt index b569f7ca3d..dd046f0189 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/ImageMissingTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/ImageMissingTest.kt @@ -7,14 +7,14 @@ import com.mapbox.mapboxsdk.maps.MapView import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.testapp.R import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeoutException import junit.framework.Assert.assertEquals import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch -import java.util.concurrent.TimeUnit -import java.util.concurrent.TimeoutException @RunWith(AndroidJUnit4::class) class ImageMissingTest : AppCenter() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/RemoveUnusedImagesTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/RemoveUnusedImagesTest.kt index 41b100b4d2..d586a7e2d1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/RemoveUnusedImagesTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/maps/RemoveUnusedImagesTest.kt @@ -11,14 +11,14 @@ import com.mapbox.mapboxsdk.maps.MapboxMap import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.testapp.R import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeoutException import org.junit.Assert.* import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch -import java.util.concurrent.TimeUnit -import java.util.concurrent.TimeoutException @RunWith(AndroidJUnit4::class) class RemoveUnusedImagesTest : AppCenter() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/CacheTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/CacheTest.kt index e28aec558c..a3214c9f11 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/CacheTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/CacheTest.kt @@ -5,11 +5,11 @@ import android.support.test.rule.ActivityTestRule import android.support.test.runner.AndroidJUnit4 import com.mapbox.mapboxsdk.offline.OfflineManager import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity +import java.util.concurrent.CountDownLatch import org.junit.Assert import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch @RunWith(AndroidJUnit4::class) class CacheTest { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/OfflineManagerTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/OfflineManagerTest.kt index 6b73623ae7..e07dc1e9f1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/OfflineManagerTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/offline/OfflineManagerTest.kt @@ -9,13 +9,13 @@ import com.mapbox.mapboxsdk.offline.OfflineRegion import com.mapbox.mapboxsdk.storage.FileSource import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity import com.mapbox.mapboxsdk.testapp.utils.FileUtils +import java.io.IOException +import java.util.concurrent.CountDownLatch import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters -import java.io.IOException -import java.util.concurrent.CountDownLatch @FixMethodOrder(MethodSorters.NAME_ASCENDING) @RunWith(AndroidJUnit4::class) diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceMapTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceMapTest.kt index b67e6eded5..d08507470e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceMapTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceMapTest.kt @@ -6,6 +6,7 @@ import android.support.test.runner.AndroidJUnit4 import com.mapbox.mapboxsdk.AppCenter import com.mapbox.mapboxsdk.storage.FileSource import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity +import java.util.concurrent.CountDownLatch import junit.framework.Assert import org.junit.After import org.junit.Before @@ -13,7 +14,6 @@ import org.junit.Rule import org.junit.Test import org.junit.rules.TestName import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch @RunWith(AndroidJUnit4::class) open class FileSourceMapTest : AppCenter() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceStandaloneTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceStandaloneTest.kt index 428d0ed757..59f0d04237 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceStandaloneTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceStandaloneTest.kt @@ -6,11 +6,11 @@ import android.support.test.runner.AndroidJUnit4 import com.mapbox.mapboxsdk.AppCenter import com.mapbox.mapboxsdk.storage.FileSource import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit import org.junit.* import org.junit.rules.TestName import org.junit.runner.RunWith -import java.util.concurrent.CountDownLatch -import java.util.concurrent.TimeUnit @RunWith(AndroidJUnit4::class) class FileSourceStandaloneTest : AppCenter() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceTestUtils.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceTestUtils.kt index 0010880414..6bd97056a6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceTestUtils.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/storage/FileSourceTestUtils.kt @@ -4,9 +4,9 @@ import android.app.Activity import android.support.annotation.WorkerThread import com.mapbox.mapboxsdk.AppCenter import com.mapbox.mapboxsdk.storage.FileSource -import junit.framework.Assert import java.io.File import java.util.concurrent.CountDownLatch +import junit.framework.Assert class FileSourceTestUtils(private val activity: Activity) : AppCenter() { val originalPath = FileSource.getResourcesCachePath(activity) diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/ImageTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/ImageTest.kt index 9cef677e7c..eb45ab52c6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/ImageTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/ImageTest.kt @@ -6,11 +6,11 @@ import android.support.test.runner.AndroidJUnit4 import com.mapbox.mapboxsdk.testapp.R import com.mapbox.mapboxsdk.testapp.action.MapboxMapAction import com.mapbox.mapboxsdk.testapp.activity.EspressoTest +import java.util.* import org.junit.Assert.assertNull import org.junit.Assert.assertTrue import org.junit.Test import org.junit.runner.RunWith -import java.util.* /** * CRUD tests around Image diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml index d2a5032c81..03e530e174 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.mapbox.mapboxsdk.testapp"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + package="com.mapbox.mapboxsdk.testapp"> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> @@ -13,7 +13,9 @@ android:label="@string/app_name" android:roundIcon="@drawable/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + tools:replace="android:appComponentFactory" + android:appComponentFactory="customComponentFactory"> <activity android:name=".activity.FeatureOverviewActivity" diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/assets/streets.json b/platform/android/MapboxGLAndroidSDKTestApp/src/main/assets/streets.json index 5ab289344a..b7ad1513a6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/assets/streets.json +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/assets/streets.json @@ -1,1449 +1,2567 @@ { "version": 8, - "name": "mapbox-gl-native-test-style", + "name": "Mapbox Streets", "metadata": { - "mapbox:autocomposite": true, "mapbox:type": "default", - "mapbox:origin": "streets-v10", + "mapbox:origin": "streets-v11", + "mapbox:autocomposite": true, "mapbox:groups": { - "1444934828655.3389": {"name": "Aeroways", "collapsed": true}, - "1444933322393.2852": { - "name": "POI labels (scalerank 1)", - "collapsed": true - }, - "1444855786460.0557": {"name": "Roads", "collapsed": true}, - "1444933575858.6992": { - "name": "Highway shields", + "1444855786460.0557": { + "name": "Roads", "collapsed": true }, "1444934295202.7542": { "name": "Admin boundaries", "collapsed": true }, - "1444856151690.9143": {"name": "State labels", "collapsed": true}, - "1444933721429.3076": {"name": "Road labels", "collapsed": true}, - "1444933358918.2366": { - "name": "POI labels (scalerank 2)", - "collapsed": true - }, - "1444933808272.805": {"name": "Water labels", "collapsed": true}, - "1444933372896.5967": { - "name": "POI labels (scalerank 3)", + "1444855799204.86": { + "name": "Bridges", "collapsed": true }, - "1444855799204.86": {"name": "Bridges", "collapsed": true}, - "1444856087950.3635": {"name": "Marine labels", "collapsed": true}, - "1456969573402.7817": {"name": "Hillshading", "collapsed": true}, - "1444862510685.128": {"name": "City labels", "collapsed": true}, - "1444855769305.6016": {"name": "Tunnels", "collapsed": true}, - "1456970288113.8113": {"name": "Landcover", "collapsed": true}, - "1444856144497.7825": {"name": "Country labels", "collapsed": true}, - "1444933456003.5437": { - "name": "POI labels (scalerank 4)", + "1444855769305.6016": { + "name": "Tunnels", "collapsed": true } - }, - "mapbox:sdk-support": { - "js": "0.49.0", - "android": "6.5.0", - "ios": "4.4.0" } }, - "center": [0.0, 0.0], - "zoom": 0, - "bearing": 0, - "pitch": 0, "sources": { "composite": { - "url": "mapbox://mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7", + "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2", "type": "vector" } }, - "sprite": "mapbox://sprites/lukaspaczos/cjnkdt02b0b2p2ss40skwpvs1", - "glyphs": "mapbox://fonts/lukaspaczos/{fontstack}/{range}.pbf", + "sprite": "mapbox://sprites/mapbox/streets-v11", + "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "layers": [ { - "id": "background", + "id": "land", "type": "background", + "metadata": {}, "layout": {}, "paint": { - "background-color": { - "base": 1, - "stops": [ - [11, "hsl(35, 32%, 91%)"], - [13, "hsl(35, 12%, 89%)"] - ] - } - } - }, - { - "id": "landcover_snow", - "type": "fill", - "metadata": {"mapbox:group": "1456970288113.8113"}, - "source": "composite", - "source-layer": "landcover", - "filter": ["==", "class", "snow"], - "layout": {}, - "paint": { - "fill-color": "hsl(0, 0%, 100%)", - "fill-opacity": 0.2, - "fill-antialias": false - } - }, - { - "id": "landcover_wood", - "type": "fill", - "metadata": {"mapbox:group": "1456970288113.8113"}, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "filter": ["==", "class", "wood"], - "layout": {}, - "paint": { - "fill-color": "hsl(75, 62%, 81%)", - "fill-opacity": {"base": 1.5, "stops": [[2, 0.3], [7, 0]]}, - "fill-antialias": false - } - }, - { - "id": "landcover_scrub", - "type": "fill", - "metadata": {"mapbox:group": "1456970288113.8113"}, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "filter": ["==", "class", "scrub"], - "layout": {}, - "paint": { - "fill-color": "hsl(75, 62%, 81%)", - "fill-opacity": {"base": 1.5, "stops": [[2, 0.3], [7, 0]]}, - "fill-antialias": false - } - }, - { - "id": "landcover_grass", - "type": "fill", - "metadata": {"mapbox:group": "1456970288113.8113"}, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "filter": ["==", "class", "grass"], - "layout": {}, - "paint": { - "fill-color": "hsl(75, 62%, 81%)", - "fill-opacity": {"base": 1.5, "stops": [[2, 0.3], [7, 0]]}, - "fill-antialias": false + "background-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + "hsl(35, 32%, 91%)", + 13, + "hsl(35, 12%, 89%)" + ] } }, { - "id": "landcover_crop", + "id": "landcover", "type": "fill", - "metadata": {"mapbox:group": "1456970288113.8113"}, + "metadata": {}, "source": "composite", "source-layer": "landcover", - "maxzoom": 14, - "filter": ["==", "class", "crop"], + "maxzoom": 7, "layout": {}, "paint": { - "fill-color": "hsl(75, 62%, 81%)", - "fill-opacity": {"base": 1.5, "stops": [[2, 0.3], [7, 0]]}, + "fill-color": [ + "match", + [ + "get", + "class" + ], + "snow", + "hsl(0, 0%, 100%)", + "hsl(75, 62%, 81%)" + ], + "fill-opacity": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 2, + 0.3, + 7, + 0 + ], "fill-antialias": false } }, { - "id": "national_park", + "id": "national-park", "type": "fill", + "metadata": {}, "source": "composite", "source-layer": "landuse_overlay", - "filter": ["==", "class", "national_park"], + "minzoom": 5, + "filter": [ + "==", + [ + "get", + "class" + ], + "national_park" + ], "layout": {}, "paint": { "fill-color": "hsl(100, 58%, 76%)", - "fill-opacity": {"base": 1, "stops": [[5, 0], [6, 0.5]]} + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 0, + 6, + 0.5, + 10, + 0.5 + ] } }, { - "id": "hospital", + "id": "landuse", "type": "fill", + "metadata": {}, "source": "composite", "source-layer": "landuse", - "filter": ["==", "class", "hospital"], + "minzoom": 5, + "filter": [ + "match", + [ + "get", + "class" + ], + [ + "park", + "airport", + "cemetery", + "glacier", + "hospital", + "pitch", + "sand", + "school" + ], + true, + false + ], "layout": {}, "paint": { - "fill-color": { - "base": 1, - "stops": [ - [15.5, "hsl(340, 37%, 87%)"], - [16, "hsl(340, 63%, 89%)"] + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + [ + "match", + [ + "get", + "class" + ], + "park", + "hsl(100, 58%, 76%)", + "airport", + "hsl(230, 15%, 86%)", + "cemetery", + "hsl(75, 37%, 81%)", + "glacier", + "hsl(196, 72%, 93%)", + "hospital", + "hsl(340, 37%, 87%)", + "pitch", + "hsl(100, 57%, 72%)", + "sand", + "hsl(60, 46%, 87%)", + "school", + "hsl(50, 47%, 81%)", + "hsla(0, 0%, 0%, 0)" + ], + 16, + [ + "match", + [ + "get", + "class" + ], + "park", + "hsl(100, 58%, 76%)", + "airport", + "hsl(230, 29%, 89%)", + "cemetery", + "hsl(75, 37%, 81%)", + "glacier", + "hsl(196, 72%, 93%)", + "hospital", + "hsl(340, 63%, 89%)", + "pitch", + "hsl(100, 57%, 72%)", + "sand", + "hsl(60, 46%, 87%)", + "school", + "hsl(50, 63%, 84%)", + "hsla(0, 0%, 0%, 0)" ] - } - } - }, - { - "id": "school", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "school"], - "layout": {}, - "paint": { - "fill-color": { - "base": 1, - "stops": [ - [15.5, "hsl(50, 47%, 81%)"], - [16, "hsl(50, 63%, 84%)"] + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 0, + 6, + [ + "match", + [ + "get", + "class" + ], + "glacier", + 0.5, + 1 ] - } - } - }, - { - "id": "park", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "park"], - "layout": {}, - "paint": { - "fill-color": "hsl(100, 58%, 76%)", - "fill-opacity": {"base": 1, "stops": [[5, 0], [6, 1]]} + ] } }, { - "id": "pitch", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "pitch"], - "layout": {}, - "paint": {"fill-color": "hsl(100, 57%, 72%)"} - }, - { - "id": "pitch-line", + "id": "pitch-outline", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "landuse", "minzoom": 15, - "filter": ["==", "class", "pitch"], - "layout": {"line-join": "miter"}, - "paint": {"line-color": "hsl(75, 57%, 84%)"} - }, - { - "id": "cemetery", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "cemetery"], - "layout": {}, - "paint": {"fill-color": "hsl(75, 37%, 81%)"} - }, - { - "id": "industrial", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "industrial"], - "layout": {}, - "paint": { - "fill-color": { - "base": 1, - "stops": [ - [15.5, "hsl(230, 15%, 86%)"], - [16, "hsl(230, 29%, 89%)"] - ] - } - } - }, - { - "id": "sand", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "filter": ["==", "class", "sand"], - "layout": {}, - "paint": {"fill-color": "hsl(60, 46%, 87%)"} - }, - { - "id": "hillshade_highlight_bright", - "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 94], - "layout": {}, - "paint": { - "fill-color": "hsl(0, 0%, 100%)", - "fill-opacity": {"stops": [[14, 0.12], [16, 0]]}, - "fill-antialias": false - } - }, - { - "id": "hillshade_highlight_med", - "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 90], - "layout": {}, - "paint": { - "fill-color": "hsl(0, 0%, 100%)", - "fill-opacity": {"stops": [[14, 0.12], [16, 0]]}, - "fill-antialias": false - } - }, - { - "id": "hillshade_shadow_faint", - "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 89], - "layout": {}, - "paint": { - "fill-color": "hsl(56, 59%, 22%)", - "fill-opacity": {"stops": [[14, 0.05], [16, 0]]}, - "fill-antialias": false - } - }, - { - "id": "hillshade_shadow_med", - "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 78], - "layout": {}, - "paint": { - "fill-color": "hsl(56, 59%, 22%)", - "fill-opacity": {"stops": [[14, 0.05], [16, 0]]}, - "fill-antialias": false - } - }, - { - "id": "hillshade_shadow_dark", - "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 67], + "filter": [ + "==", + [ + "get", + "class" + ], + "pitch" + ], "layout": {}, "paint": { - "fill-color": "hsl(56, 59%, 22%)", - "fill-opacity": {"stops": [[14, 0.06], [16, 0]]}, - "fill-antialias": false + "line-color": "hsl(75, 57%, 84%)" } }, { - "id": "hillshade_shadow_extreme", + "id": "water-shadow", "type": "fill", - "metadata": {"mapbox:group": "1456969573402.7817"}, + "metadata": {}, "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "filter": ["==", "level", 56], + "source-layer": "water", "layout": {}, "paint": { - "fill-color": "hsl(56, 59%, 22%)", - "fill-opacity": {"stops": [[14, 0.06], [16, 0]]}, - "fill-antialias": false + "fill-color": "hsl(215, 84%, 69%)", + "fill-translate": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 7, + [ + "literal", + [ + 0, + 0 + ] + ], + 16, + [ + "literal", + [ + -1, + -1 + ] + ] + ], + "fill-translate-anchor": "viewport" } }, { - "id": "waterway-river-canal", + "id": "waterway", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "waterway", "minzoom": 8, - "filter": ["in", "class", "canal", "river"], "layout": { - "line-cap": {"base": 1, "stops": [[0, "butt"], [11, "round"]]}, + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 11, + "round" + ], "line-join": "round" }, "paint": { "line-color": "hsl(205, 87%, 76%)", - "line-width": {"base": 1.3, "stops": [[8.5, 0.1], [20, 8]]}, - "line-opacity": {"base": 1, "stops": [[8, 0], [8.5, 1]]} - } - }, - { - "id": "waterway-small", - "type": "line", - "source": "composite", - "source-layer": "waterway", - "minzoom": 13, - "filter": ["!in", "class", "canal", "river"], - "layout": {"line-join": "round", "line-cap": "round"}, - "paint": { - "line-color": "hsl(205, 87%, 76%)", - "line-width": {"base": 1.35, "stops": [[13.5, 0.1], [20, 3]]}, - "line-opacity": {"base": 1, "stops": [[13, 0], [13.5, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.3 + ], + [ + "zoom" + ], + 9, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 0.1, + 0 + ], + 20, + [ + "match", + [ + "get", + "class" + ], + [ + "canal", + "river" + ], + 8, + 3 + ] + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 0, + 8.5, + 1 + ] } }, { - "id": "water-shadow", + "id": "water", "type": "fill", + "metadata": {}, "source": "composite", "source-layer": "water", "layout": {}, "paint": { - "fill-color": "hsl(215, 84%, 69%)", - "fill-translate": { - "base": 1.2, - "stops": [[7, [0, 0]], [16, [-1, -1]]] - }, - "fill-translate-anchor": "viewport", - "fill-opacity": 1 + "fill-color": "hsl(196, 80%, 70%)" } }, { - "id": "water", + "id": "hillshade", "type": "fill", + "metadata": {}, "source": "composite", - "source-layer": "water", + "source-layer": "hillshade", + "maxzoom": 16, "layout": {}, - "paint": {"fill-color": "hsl(196, 80%, 70%)"} + "paint": { + "fill-color": [ + "match", + [ + "get", + "class" + ], + "shadow", + "hsl(56, 59%, 22%)", + "hsl(0, 0%, 100%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "match", + [ + "get", + "level" + ], + [ + 67, + 56 + ], + 0.06, + [ + 89, + 78 + ], + 0.05, + 0.12 + ], + 16, + 0 + ], + "fill-antialias": false + } }, { - "id": "barrier_line-land-polygon", + "id": "land-structure-polygon", "type": "fill", + "metadata": {}, "source": "composite", - "source-layer": "barrier_line", + "source-layer": "structure", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "Polygon"], - ["==", "class", "land"] + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ], + [ + "==", + [ + "get", + "class" + ], + "land" + ] ], "layout": {}, - "paint": {"fill-color": "hsl(35, 12%, 89%)"} + "paint": { + "fill-color": "hsl(35, 12%, 89%)" + } }, { - "id": "barrier_line-land-line", + "id": "land-structure-line", "type": "line", + "metadata": {}, "source": "composite", - "source-layer": "barrier_line", + "source-layer": "structure", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], - ["==", "class", "land"] + [ + "==", + [ + "geometry-type" + ], + "LineString" + ], + [ + "==", + [ + "get", + "class" + ], + "land" + ] ], - "layout": {"line-cap": "round"}, + "layout": { + "line-cap": "round" + }, "paint": { - "line-width": {"base": 1.99, "stops": [[14, 0.75], [20, 40]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.99 + ], + [ + "zoom" + ], + 14, + 0.75, + 20, + 40 + ], "line-color": "hsl(35, 12%, 89%)" } }, { "id": "aeroway-polygon", "type": "fill", - "metadata": {"mapbox:group": "1444934828655.3389"}, + "metadata": {}, "source": "composite", "source-layer": "aeroway", "minzoom": 11, "filter": [ "all", - ["!=", "type", "apron"], - ["==", "$type", "Polygon"] - ], - "layout": {}, - "paint": { - "fill-color": { - "base": 1, - "stops": [ - [15, "hsl(230, 23%, 82%)"], - [16, "hsl(230, 37%, 84%)"] - ] - }, - "fill-opacity": {"base": 1, "stops": [[11, 0], [11.5, 1]]} - } - }, - { - "id": "aeroway-runway", - "type": "line", - "metadata": {"mapbox:group": "1444934828655.3389"}, - "source": "composite", - "source-layer": "aeroway", - "minzoom": 9, - "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "type", "runway"] + [ + "==", + [ + "geometry-type" + ], + "Polygon" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "runway", + "taxiway", + "helipad" + ], + true, + false + ] ], "layout": {}, "paint": { - "line-color": { - "base": 1, - "stops": [ - [15, "hsl(230, 23%, 82%)"], - [16, "hsl(230, 37%, 84%)"] - ] - }, - "line-width": {"base": 1.5, "stops": [[9, 1], [18, 80]]} + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(230, 23%, 82%)", + 16, + "hsl(230, 37%, 84%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 0, + 11.5, + 1 + ] } }, { - "id": "aeroway-taxiway", + "id": "aeroway-line", "type": "line", - "metadata": {"mapbox:group": "1444934828655.3389"}, + "metadata": {}, "source": "composite", "source-layer": "aeroway", "minzoom": 9, "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "type", "taxiway"] + "==", + [ + "geometry-type" + ], + "LineString" ], "layout": {}, "paint": { - "line-color": { - "base": 1, - "stops": [ - [15, "hsl(230, 23%, 82%)"], - [16, "hsl(230, 37%, 84%)"] + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(230, 23%, 82%)", + 16, + "hsl(230, 37%, 84%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 9, + [ + "match", + [ + "get", + "type" + ], + "runway", + 1, + "taxiway", + 0.5, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "type" + ], + "runway", + 80, + "taxiway", + 20, + 20 ] - }, - "line-width": {"base": 1.5, "stops": [[10, 0.5], [18, 20]]} + ] } }, { - "id": "building-line", + "id": "building-outline", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "building", "minzoom": 15, "filter": [ "all", - ["!=", "type", "building:part"], - ["==", "underground", "false"] + [ + "!=", + [ + "get", + "type" + ], + "building:part" + ], + [ + "==", + [ + "get", + "underground" + ], + "false" + ] ], "layout": {}, "paint": { "line-color": "hsl(35, 6%, 79%)", - "line-width": {"base": 1.5, "stops": [[15, 0.75], [20, 3]]}, - "line-opacity": {"base": 1, "stops": [[15.5, 0], [16, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 0.75, + 20, + 3 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 1 + ] } }, { "id": "building", "type": "fill", + "metadata": {}, "source": "composite", "source-layer": "building", "minzoom": 15, "filter": [ "all", - ["!=", "type", "building:part"], - ["==", "underground", "false"] + [ + "!=", + [ + "get", + "type" + ], + "building:part" + ], + [ + "==", + [ + "get", + "underground" + ], + "false" + ] ], "layout": {}, "paint": { - "fill-color": { - "base": 1, - "stops": [ - [15, "hsl(35, 11%, 88%)"], - [16, "hsl(35, 8%, 85%)"] - ] - }, - "fill-opacity": {"base": 1, "stops": [[15.5, 0], [16, 1]]}, + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(35, 11%, 86%)", + 16, + "hsl(35, 8%, 85%)" + ], + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 1 + ], "fill-outline-color": "hsl(35, 6%, 79%)" } }, { - "id": "tunnel-street-low", + "id": "tunnel-street-minor-low", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11.5, 0], [12, 1], [14, 1], [14.01, 0]] - } - } - }, - { - "id": "tunnel-street_limited-low", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "tunnel"] + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11.5, 0], [12, 1], [14, 1], [14.01, 0]] - } - } - }, - { - "id": "tunnel-service-link-track-case", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 14, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!=", "type", "trunk_link"], - ["==", "structure", "tunnel"], - ["in", "class", "link", "service", "track"] + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(230, 19%, 75%)", - "line-gap-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, - "line-dasharray": [3, 3] } }, { - "id": "tunnel-street_limited-case", + "id": "tunnel-street-minor-case", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(230, 19%, 75%)", - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - }, - "line-dasharray": [3, 3], - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "tunnel-street-case", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["==", "class", "street"], - ["==", "structure", "tunnel"] + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(230, 19%, 75%)", - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - }, - "line-dasharray": [3, 3], - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "tunnel-secondary-tertiary-case", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["==", "structure", "tunnel"], - ["in", "class", "secondary", "tertiary"] + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ], + "line-dasharray": [ + 3, + 3 ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.2, "stops": [[10, 0.75], [18, 2]]}, - "line-dasharray": [3, 3], - "line-gap-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-color": "hsl(230, 19%, 75%)" } }, { - "id": "tunnel-primary-case", + "id": "tunnel-primary-secondary-tertiary-case", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "primary"], - ["==", "structure", "tunnel"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, - "line-dasharray": [3, 3], - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(230, 19%, 75%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "class" + ], + "primary", + 1, + [ + "secondary", + "tertiary" + ], + 0.75, + 0.75 + ], + 18, + 2 + ], + "line-color": "hsl(230, 19%, 75%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", + [ + "get", + "class" + ], + "primary", + 0.75, + [ + "secondary", + "tertiary" + ], + 0.1, + 0.1 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + "primary", + 32, + [ + "secondary", + "tertiary" + ], + 26, + 26 + ] + ], + "line-dasharray": [ + 3, + 3 + ] } }, { - "id": "tunnel-trunk_link-case", + "id": "tunnel-major-link-case", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "tunnel"], - ["==", "type", "trunk_link"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-dasharray": [3, 3] + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-dasharray": [ + 3, + 3 + ] } }, { - "id": "tunnel-motorway_link-case", + "id": "tunnel-motorway-trunk-case", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "motorway_link"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-dasharray": [3, 3] - } - }, - { - "id": "tunnel-trunk-case", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], - ["all", ["==", "structure", "tunnel"], ["==", "type", "trunk"]] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-opacity": 1, - "line-dasharray": [3, 3] - } - }, - { - "id": "tunnel-motorway-case", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["==", "class", "motorway"], - ["==", "structure", "tunnel"] + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-opacity": 1, - "line-dasharray": [3, 3] + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-dasharray": [ + 3, + 3 + ] } }, { "id": "tunnel-construction", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "construction"], - ["==", "structure", "tunnel"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "miter"}, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], "line-color": "hsl(230, 24%, 87%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]}, - "line-dasharray": { - "base": 1, - "stops": [ - [14, [0.4, 0.8]], - [15, [0.3, 0.6]], - [16, [0.2, 0.3]], - [17, [0.2, 0.25]], - [18, [0.15, 0.15]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] ] - } + ] } }, { "id": "tunnel-path", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "steps"], - ["==", "class", "path"], - ["==", "structure", "tunnel"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[15, 1], [18, 4]]}, - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [1, 0.5]] + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.5 + ] ] - }, - "line-color": "hsl(35, 26%, 95%)", - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} + ], + "line-color": "hsl(35, 26%, 95%)" } }, { "id": "tunnel-steps", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", + "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], - ["all", ["==", "structure", "tunnel"], ["==", "type", "steps"]] + [ + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "class" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[15, 1], [16, 1.6], [18, 6]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], "line-color": "hsl(35, 26%, 95%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [0.3, 0.3]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] ] - }, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} - } - }, - { - "id": "tunnel-trunk_link", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 13, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["==", "structure", "tunnel"], - ["==", "type", "trunk_link"] ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(46, 77%, 78%)", - "line-opacity": 1, - "line-dasharray": [1, 0] } }, { - "id": "tunnel-motorway_link", + "id": "tunnel-major-link", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "motorway_link"], - ["==", "structure", "tunnel"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(26, 100%, 78%)", - "line-opacity": 1, - "line-dasharray": [1, 0] + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(26, 100%, 78%)", + "trunk_link", + "hsl(46, 77%, 78%)", + "hsl(46, 77%, 78%)" + ] } }, { "id": "tunnel-pedestrian", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "pedestrian"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [[14, [1, 0]], [15, [1.5, 0.4]], [16, [1, 0.2]]] - } - } - }, - { - "id": "tunnel-service-link-track", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 14, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["!=", "type", "trunk_link"], - ["==", "structure", "tunnel"], - ["in", "class", "link", "service", "track"] + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": [1, 0] - } - }, - { - "id": "tunnel-street_limited", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "tunnel"] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(35, 14%, 93%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} } }, { - "id": "tunnel-street", + "id": "tunnel-street-minor", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "tunnel-secondary-tertiary", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["==", "structure", "tunnel"], - ["in", "class", "secondary", "tertiary"] + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1, - "line-dasharray": [1, 0], - "line-blur": 0 + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(35, 14%, 93%)", + "hsl(0, 0%, 100%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "tunnel-primary", + "id": "tunnel-primary-secondary-tertiary", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "primary"], - ["==", "structure", "tunnel"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1, - "line-dasharray": [1, 0], - "line-blur": 0 - } - }, - { - "id": "tunnel-oneway-arrows-blue-minor", - "type": "symbol", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "minzoom": 16, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "tunnel" + ], [ - "all", - ["!=", "type", "trunk_link"], - ["==", "oneway", "true"], - ["==", "structure", "tunnel"], + "match", [ - "in", - "class", - "link", - "path", - "pedestrian", - "service", - "track" - ] + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[17, "oneway-small"], [18, "oneway-large"]] - }, - "symbol-spacing": 200, - "icon-padding": 2 + "line-cap": "round", + "line-join": "round" }, - "paint": {} + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", + [ + "get", + "class" + ], + "primary", + 0.75, + [ + "secondary", + "tertiary" + ], + 0.1, + 0.1 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + "primary", + 32, + [ + "secondary", + "tertiary" + ], + 26, + 26 + ] + ], + "line-color": "hsl(0, 0%, 100%)" + } }, { - "id": "tunnel-oneway-arrows-blue-major", + "id": "tunnel-oneway-arrow-blue", "type": "symbol", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 15, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "trunk_link"], - ["==", "oneway", "true"], - ["==", "structure", "tunnel"], + "==", [ - "in", - "class", - "primary", - "secondary", - "street", - "street_limited", - "tertiary" + "get", + "structure" + ], + "tunnel" + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "street", + "street_limited", + "tertiary" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "path", + "pedestrian", + "service", + "track" + ], + true, + false ] ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[16, "oneway-small"], [17, "oneway-large"]] - }, + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 17, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + "oneway-large", + "oneway-small" + ], + 18, + "oneway-large" + ], "symbol-spacing": 200, - "icon-padding": 2 + "icon-rotation-alignment": "map" }, "paint": {} }, { - "id": "tunnel-trunk", + "id": "tunnel-motorway-trunk", "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], - ["all", ["==", "class", "trunk"], ["==", "structure", "tunnel"]] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(46, 77%, 78%)" - } - }, - { - "id": "tunnel-motorway", - "type": "line", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "motorway"], - ["==", "structure", "tunnel"] + "==", + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-dasharray": [1, 0], - "line-opacity": 1, - "line-color": "hsl(26, 100%, 78%)", - "line-blur": 0 + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 100%, 78%)", + "trunk", + "hsl(46, 77%, 78%)", + "hsl(46, 77%, 78%)" + ] } }, { - "id": "tunnel-oneway-arrows-white", + "id": "tunnel-oneway-arrow-white", "type": "symbol", - "metadata": {"mapbox:group": "1444855769305.6016"}, + "metadata": { + "mapbox:group": "1444855769305.6016" + }, "source": "composite", "source-layer": "road", "minzoom": 16, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", + "==", [ - "!in", - "type", - "primary_link", - "secondary_link", - "tertiary_link" + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" ], - ["==", "oneway", "true"], - ["==", "structure", "tunnel"], [ - "in", - "class", - "link", "motorway", "motorway_link", - "trunk" - ] + "trunk", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [ - [16, "oneway-white-small"], - [17, "oneway-white-large"] - ] - }, - "symbol-spacing": 200, - "icon-padding": 2 + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-white-small", + 17, + "oneway-white-large" + ], + "symbol-spacing": 200 }, "paint": {} }, { "id": "ferry", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "road", + "minzoom": 8, "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "type", "ferry"] + "==", + [ + "get", + "type" + ], + "ferry" ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "base": 1, - "stops": [ - [15, "hsl(205, 73%, 63%)"], - [17, "hsl(230, 73%, 63%)"] + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(205, 73%, 63%)", + 17, + "hsl(230, 73%, 63%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 13, + [ + "literal", + [ + 12, + 4 + ] ] - }, - "line-opacity": 1, - "line-width": {"base": 1.5, "stops": [[14, 0.5], [20, 1]]}, - "line-dasharray": { - "base": 1, - "stops": [[12, [1, 0]], [13, [12, 4]]] - } + ] } }, { - "id": "ferry_auto", + "id": "ferry-auto", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "road", "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "type", "ferry_auto"] + "==", + [ + "get", + "type" + ], + "ferry_auto" ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "base": 1, - "stops": [ - [15, "hsl(205, 73%, 63%)"], - [17, "hsl(230, 73%, 63%)"] - ] - }, - "line-opacity": 1, - "line-width": {"base": 1.5, "stops": [[14, 0.5], [20, 1]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + "hsl(205, 73%, 63%)", + 17, + "hsl(230, 73%, 63%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] } }, { "id": "road-path-bg", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", + "minzoom": 12, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["!in", "type", "crossing", "sidewalk", "steps"], - ["==", "class", "path"] + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "step", + [ + "zoom" + ], + [ + "!", + [ + "match", + [ + "get", + "type" + ], + [ + "steps", + "sidewalk", + "crossing" + ], + true, + false + ] + ], + 16, + [ + "!=", + [ + "get", + "type" + ], + "steps" + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[15, 2], [18, 7]]}, - "line-dasharray": [1, 0], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 18, + 7 + ], "line-color": "hsl(230, 17%, 82%)", - "line-blur": 0, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 0.75]]} + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 0.75 + ] } }, { "id": "road-steps-bg", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", + "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "type", "steps"] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[15, 2], [17, 4.6], [18, 7]] - }, - "line-color": "hsl(230, 17%, 82%)", - "line-dasharray": [1, 0], - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 0.75]]} - } - }, - { - "id": "road-sidewalk-bg", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 16, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "type" + ], + "steps" + ], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "type", "crossing", "sidewalk"] + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[15, 2], [18, 7]]}, - "line-dasharray": [1, 0], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 17, + 4.6, + 18, + 7 + ], "line-color": "hsl(230, 17%, 82%)", - "line-blur": 0, - "line-opacity": {"base": 1, "stops": [[16, 0], [16.25, 0.75]]} + "line-opacity": 0.75 } }, { - "id": "turning-features-outline", + "id": "turning-feature-outline", "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 15, "filter": [ "all", - ["==", "$type", "Point"], - ["in", "class", "turning_circle", "turning_loop"] + [ + "==", + [ + "geometry-type" + ], + "Point" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "turning_circle", + "turning_loop" + ], + true, + false + ] ], "layout": { "icon-image": "turning-circle-outline", - "icon-size": { - "base": 1.5, - "stops": [[14, 0.122], [18, 0.969], [20, 1]] - }, + "icon-size": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.122, + 18, + 0.969, + 20, + 1 + ], "icon-allow-overlap": true, "icon-ignore-placement": true, "icon-padding": 0, @@ -1454,557 +2572,1440 @@ { "id": "road-pedestrian-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 12, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "pedestrian"], - ["==", "structure", "none"] + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[14, 2], [18, 14.5]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": 0, - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "road-street-low", + "id": "road-minor-low", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], - ["all", ["==", "class", "street"], ["==", "structure", "none"]] + [ + "step", + [ + "zoom" + ], + [ + "==", + [ + "get", + "class" + ], + "track" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "track", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + "track", + 1, + 0.5 + ], + 18, + 12 + ], "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11, 0], [11.25, 1], [14, 1], [14.01, 0]] - } + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 + ] } }, { - "id": "road-street_limited-low", + "id": "road-street-low", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 11, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "none"] + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11, 0], [11.25, 1], [14, 1], [14.01, 0]] - } - } - }, - { - "id": "road-service-link-track-case", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 14, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!=", "type", "trunk_link"], - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "link", "service", "track"] + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]} } }, { - "id": "road-street_limited-case", + "id": "road-minor-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "none"] + "step", + [ + "zoom" + ], + [ + "==", + [ + "get", + "class" + ], + "track" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "track", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + "track", + 1, + 0.5 + ], + 18, + 12 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { "id": "road-street-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 11, "filter": [ "all", - ["==", "$type", "LineString"], - ["all", ["==", "class", "street"], ["==", "structure", "none"]] + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { "id": "road-secondary-tertiary-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "secondary", "tertiary"] + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.2, "stops": [[10, 0.75], [18, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 0.75, + 18, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-opacity": {"base": 1, "stops": [[9.99, 0], [10, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.1, + 18, + 26 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ] } }, { "id": "road-primary-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "primary"] + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-opacity": {"base": 1, "stops": [[9.99, 0], [10, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ] } }, { - "id": "road-motorway_link-case", + "id": "road-major-link-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 10, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "motorway_link"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[10.99, 0], [11, 1]]} - } - }, - { - "id": "road-trunk_link-case", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "type", "trunk_link"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[10.99, 0], [11, 1]]} - } - }, - { - "id": "road-trunk-case", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "trunk"] + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-opacity": {"base": 1, "stops": [[6, 0], [6.1, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] } }, { - "id": "road-motorway-case", + "id": "road-motorway-trunk-case", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "motorway"] + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + "motorway", + 1, + 0 + ], + 6, + 1 + ] } }, { "id": "road-construction", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "construction"], - ["==", "structure", "none"] + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "miter"}, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], "line-color": "hsl(230, 24%, 87%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]}, - "line-dasharray": { - "base": 1, - "stops": [ - [14, [0.4, 0.8]], - [15, [0.3, 0.6]], - [16, [0.2, 0.3]], - [17, [0.2, 0.25]], - [18, [0.15, 0.15]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] ] - } - } - }, - { - "id": "road-sidewalks", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 16, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "type", "crossing", "sidewalk"] ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[15, 1], [18, 4]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [1, 0.5]] - ] - }, - "line-opacity": {"base": 1, "stops": [[16, 0], [16.25, 1]]} } }, { "id": "road-path", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", + "minzoom": 12, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["!in", "type", "crossing", "sidewalk", "steps"], - ["==", "class", "path"] + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "step", + [ + "zoom" + ], + [ + "!", + [ + "match", + [ + "get", + "type" + ], + [ + "steps", + "sidewalk", + "crossing" + ], + true, + false + ] + ], + 16, + [ + "!=", + [ + "get", + "type" + ], + "steps" + ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[15, 1], [18, 4]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 13, + 0.5, + 14, + 1, + 15, + 1, + 18, + 4 + ], "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [1, 0.5]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.5 + ] ] - }, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} + ] } }, { "id": "road-steps", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", + "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "type", "steps"] + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[15, 1], [16, 1.6], [18, 6]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [0.3, 0.3]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] ] - }, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} - } - }, - { - "id": "road-trunk_link", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "type", "trunk_link"] ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(46, 85%, 67%)", - "line-opacity": 1 } }, { - "id": "road-motorway_link", + "id": "road-major-link", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 10, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "motorway_link"] + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(26, 100%, 68%)", - "line-opacity": 1 + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(26, 100%, 68%)", + "trunk_link", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" + ] } }, { "id": "road-pedestrian", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 12, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "pedestrian"], - ["==", "structure", "none"] + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [[14, [1, 0]], [15, [1.5, 0.4]], [16, [1, 0.2]]] - } + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] + ] } }, { "id": "road-pedestrian-polygon-fill", "type": "fill", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 12, "filter": [ "all", - ["==", "$type", "Polygon"], [ - "all", - ["==", "structure", "none"], - ["in", "class", "path", "pedestrian"] + "==", + [ + "geometry-type" + ], + "Polygon" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": {}, "paint": { - "fill-color": { - "base": 1, - "stops": [ - [16, "hsl(230, 16%, 94%)"], - [16.25, "hsl(230, 50%, 98%)"] - ] - }, - "fill-outline-color": "hsl(230, 26%, 88%)", - "fill-opacity": 1 + "fill-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + "hsl(230, 16%, 94%)", + 16.25, + "hsl(230, 50%, 98%)" + ], + "fill-outline-color": "hsl(230, 26%, 88%)" } }, { "id": "road-pedestrian-polygon-pattern", "type": "fill", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 12, "filter": [ "all", - ["==", "$type", "Polygon"], [ - "all", - ["==", "structure", "none"], - ["in", "class", "path", "pedestrian"] + "==", + [ + "geometry-type" + ], + "Polygon" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "path", + "pedestrian" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": {}, @@ -2012,23 +4013,72 @@ "fill-color": "hsl(0, 0%, 100%)", "fill-outline-color": "hsl(35, 10%, 83%)", "fill-pattern": "pedestrian-polygon", - "fill-opacity": {"base": 1, "stops": [[16, 0], [16.25, 1]]} + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 16, + 0, + 16.25, + 1 + ] } }, { "id": "road-polygon", "type": "fill", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 12, "filter": [ "all", - ["==", "$type", "Polygon"], [ - "all", - ["!in", "class", "motorway", "path", "pedestrian", "trunk"], - ["!in", "structure", "bridge", "tunnel"] + "==", + [ + "geometry-type" + ], + "Polygon" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "primary_link", + "secondary_link", + "tertiary_link", + "street", + "street_limited", + "track", + "service" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": {}, @@ -2038,395 +4088,836 @@ } }, { - "id": "road-service-link-track", + "id": "road-minor", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", - "minzoom": 14, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "trunk_link"], - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "link", "service", "track"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, - "line-color": "hsl(0, 0%, 100%)" - } - }, - { - "id": "road-street_limited", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "step", + [ + "zoom" + ], + [ + "==", + [ + "get", + "class" + ], + "track" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "track", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "none"] + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(35, 14%, 93%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", + [ + "get", + "class" + ], + "track", + 1, + 0.5 + ], + 18, + 12 + ], + "line-color": "hsl(0, 0%, 100%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { "id": "road-street", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 11, "filter": [ "all", - ["==", "$type", "LineString"], - ["all", ["==", "class", "street"], ["==", "structure", "none"]] + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(35, 14%, 93%)", + "hsl(0, 0%, 100%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { "id": "road-secondary-tertiary", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "secondary", "tertiary"] + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-color": { - "base": 1, - "stops": [[5, "hsl(35, 32%, 91%)"], [8, "hsl(0, 0%, 100%)"]] - }, - "line-opacity": {"base": 1.2, "stops": [[5, 0], [5.5, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.1, + 18, + 26 + ], + "line-color": "hsl(0, 0%, 100%)" } }, { "id": "road-primary", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "primary"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": { - "base": 1, - "stops": [[5, "hsl(35, 32%, 91%)"], [7, "hsl(0, 0%, 100%)"]] - }, - "line-opacity": 1 - } - }, - { - "id": "road-oneway-arrows-blue-minor", - "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "minzoom": 16, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "class" + ], + "primary" + ], [ - "all", - ["!=", "type", "trunk_link"], - ["!in", "structure", "bridge", "tunnel"], - ["==", "oneway", "true"], + "match", [ - "in", - "class", - "link", - "path", - "pedestrian", - "service", - "track" - ] + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[17, "oneway-small"], [18, "oneway-large"]] - }, - "icon-rotation-alignment": "map", - "icon-padding": 2, - "symbol-spacing": 200 + "line-cap": "round", + "line-join": "round" }, - "paint": {} + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": "hsl(0, 0%, 100%)" + } }, { - "id": "road-oneway-arrows-blue-major", + "id": "road-oneway-arrow-blue", "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 15, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "trunk_link"], - ["!in", "structure", "bridge", "tunnel"], - ["==", "oneway", "true"], + "==", [ - "in", - "class", - "primary", - "secondary", - "street", - "street_limited", - "tertiary" + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "path", + "pedestrian", + "service", + "track" + ], + true, + false ] + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[16, "oneway-small"], [17, "oneway-large"]] - }, - "icon-rotation-alignment": "map", - "icon-padding": 2, - "symbol-spacing": 200 + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 17, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + "oneway-large", + "oneway-small" + ], + 18, + "oneway-large" + ], + "symbol-spacing": 200, + "icon-rotation-alignment": "map" }, "paint": {} }, { - "id": "road-trunk", + "id": "road-motorway-trunk", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "trunk"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": { - "base": 1, - "stops": [ - [6, "hsl(0, 0%, 100%)"], - [6.1, "hsl(46, 80%, 60%)"], - [9, "hsl(46, 85%, 67%)"] - ] - } - } - }, - { - "id": "road-motorway", - "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["==", "class", "motorway"] + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": { - "base": 1, - "stops": [ - [8, "hsl(26, 87%, 62%)"], - [9, "hsl(26, 100%, 68%)"] + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 87%, 62%)", + "trunk", + "hsl(0, 0%, 100%)", + "hsl(0, 0%, 100%)" + ], + 6, + [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 87%, 62%)", + "trunk", + "hsl(46, 80%, 60%)", + "hsl(46, 80%, 60%)" + ], + 9, + [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 100%, 68%)", + "trunk", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" ] - } + ] } }, { "id": "road-rail", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "major_rail", "minor_rail"] + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "stops": [ - [13, "hsl(50, 17%, 82%)"], - [16, "hsl(230, 10%, 74%)"] - ] - }, - "line-width": {"base": 1.5, "stops": [[14, 0.5], [20, 1]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(50, 17%, 82%)", + 16, + "hsl(230, 10%, 74%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] } }, { "id": "road-rail-tracks", "type": "line", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], - ["in", "class", "major_rail", "minor_rail"] + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "stops": [ - [13, "hsl(50, 17%, 82%)"], - [16, "hsl(230, 10%, 74%)"] - ] - }, - "line-width": {"base": 1.5, "stops": [[14, 4], [20, 8]]}, - "line-dasharray": [0.1, 15], - "line-opacity": {"base": 1, "stops": [[13.75, 0], [14, 1]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(50, 17%, 82%)", + 16, + "hsl(230, 10%, 74%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 4, + 20, + 8 + ], + "line-dasharray": [ + 0.1, + 15 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13.75, + 0, + 14, + 1 + ] } }, { - "id": "level-crossings", + "id": "level-crossing", "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 16, "filter": [ - "all", - ["==", "$type", "Point"], - ["==", "class", "level_crossing"] + "==", + [ + "get", + "class" + ], + "level_crossing" ], "layout": { - "icon-size": 1, "icon-image": "level-crossing", "icon-allow-overlap": true }, "paint": {} }, { - "id": "road-oneway-arrows-white", + "id": "road-oneway-arrow-white", "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 16, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "structure", "bridge", "tunnel"], + "==", [ - "!in", - "type", - "primary_link", - "secondary_link", - "tertiary_link" + "get", + "oneway" + ], + "true" + ], + [ + "match", + [ + "get", + "class" ], - ["==", "oneway", "true"], [ - "in", - "class", - "link", "motorway", + "trunk", "motorway_link", - "trunk" - ] + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [ - [16, "oneway-white-small"], - [17, "oneway-white-large"] - ] - }, - "icon-padding": 2, + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-white-small", + 17, + "oneway-white-large" + ], "symbol-spacing": 200 }, "paint": {} }, { - "id": "turning-features", + "id": "turning-feature", "type": "symbol", - "metadata": {"mapbox:group": "1444855786460.0557"}, + "metadata": { + "mapbox:group": "1444855786460.0557" + }, "source": "composite", "source-layer": "road", "minzoom": 15, "filter": [ "all", - ["==", "$type", "Point"], - ["in", "class", "turning_circle", "turning_loop"] + [ + "==", + [ + "geometry-type" + ], + "Point" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "turning_circle", + "turning_loop" + ], + true, + false + ] ], "layout": { "icon-image": "turning-circle", - "icon-size": {"base": 1.5, "stops": [[14, 0.095], [18, 1]]}, + "icon-size": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.095, + 18, + 1 + ], "icon-allow-overlap": true, "icon-ignore-placement": true, "icon-padding": 0, @@ -2435,1210 +4926,2712 @@ "paint": {} }, { - "id": "bridge-path-bg", + "id": "golf-hole-line", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": {}, "source": "composite", "source-layer": "road", + "minzoom": 16, "filter": [ - "all", - ["==", "$type", "LineString"], + "==", [ - "all", - ["!=", "type", "steps"], - ["==", "class", "path"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[15, 2], [18, 7]]}, - "line-dasharray": [1, 0], - "line-color": "hsl(230, 17%, 82%)", - "line-blur": 0, - "line-opacity": {"base": 1, "stops": [[15, 0], [15.25, 1]]} - } - }, - { - "id": "bridge-steps-bg", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], - ["all", ["==", "structure", "bridge"], ["==", "type", "steps"]] + "get", + "class" + ], + "golf" ], - "layout": {"line-join": "round"}, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [[15, 2], [17, 4.6], [18, 7]] - }, - "line-color": "hsl(230, 17%, 82%)", - "line-dasharray": [1, 0], - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 0.75]]} + "line-color": "hsl(100, 47%, 58%)" } }, { - "id": "bridge-pedestrian-case", + "id": "bridge-path-bg", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "pedestrian"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[14, 2], [18, 14.5]]}, - "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": 0, - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "bridge-street-low", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["==", "class", "street"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11.5, 0], [12, 1], [14, 1], [14.01, 0]] - } - } - }, - { - "id": "bridge-street_limited-low", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "class" + ], + "path" + ], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "bridge"] + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": { - "stops": [[11.5, 0], [12, 1], [14, 1], [14.01, 0]] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 18, + 7 + ], + "line-color": "hsl(230, 17%, 82%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-service-link-track-case", + "id": "bridge-steps-bg", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "trunk_link"], - ["==", "structure", "bridge"], - ["in", "class", "link", "service", "track"] + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 2, + 17, + 4.6, + 18, + 7 + ], + "line-color": "hsl(230, 17%, 82%)", + "line-opacity": 0.75 } }, { - "id": "bridge-street_limited-case", + "id": "bridge-pedestrian-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - } + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-street-case", + "id": "bridge-street-minor-low", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(230, 24%, 87%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]}, - "line-gap-width": { - "base": 1.5, - "stops": [[13, 0], [14, 2], [18, 18]] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], + "line-color": "hsl(0, 0%, 100%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 + ] } }, { - "id": "bridge-secondary-tertiary-case", + "id": "bridge-street-minor-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["in", "class", "secondary", "tertiary"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.2, "stops": [[10, 0.75], [18, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-translate": [0, 0] + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-primary-case", + "id": "bridge-primary-secondary-tertiary-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "primary"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "class" + ], + "primary", + 1, + [ + "secondary", + "tertiary" + ], + 0.75, + 0.75 + ], + 18, + 2 + ], "line-color": "hsl(230, 24%, 87%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-translate": [0, 0] + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", + [ + "get", + "class" + ], + "primary", + 0.75, + [ + "secondary", + "tertiary" + ], + 0.1, + 0.1 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + "primary", + 32, + [ + "secondary", + "tertiary" + ], + 26, + 26 + ] + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ] } }, { - "id": "bridge-trunk_link-case", + "id": "bridge-major-link-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "structure", "bridge"], - ["==", "type", "trunk_link"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[10.99, 0], [11, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ] } }, { - "id": "bridge-motorway_link-case", + "id": "bridge-motorway-trunk-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "motorway_link"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": 1 - } - }, - { - "id": "bridge-trunk-case", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "trunk"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]} - } - }, - { - "id": "bridge-motorway-case", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "motorway"], - ["==", "structure", "bridge"] + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ] } }, { "id": "bridge-construction", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "construction"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "construction" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "miter"}, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], "line-color": "hsl(230, 24%, 87%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]}, - "line-dasharray": { - "base": 1, - "stops": [ - [14, [0.4, 0.8]], - [15, [0.3, 0.6]], - [16, [0.2, 0.3]], - [17, [0.2, 0.25]], - [18, [0.15, 0.15]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", + [ + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", + [ + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", + [ + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", + [ + 0.15, + 0.15 + ] ] - } + ] } }, { "id": "bridge-path", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!=", "type", "steps"], - ["==", "class", "path"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "path" + ], + [ + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[15, 1], [18, 4]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [1, 0.5]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 1, + 0.5 + ] ] - }, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} + ] } }, { "id": "bridge-steps", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 14, "filter": [ "all", - ["==", "$type", "LineString"], - ["all", ["==", "structure", "bridge"], ["==", "type", "steps"]] + [ + "==", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[15, 1], [16, 1.6], [18, 6]] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], "line-color": "hsl(0, 0%, 100%)", - "line-dasharray": { - "base": 1, - "stops": [ - [14, [1, 0]], - [15, [1.75, 1]], - [16, [1, 0.75]], - [17, [0.3, 0.3]] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.75, + 1 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.75 + ] + ], + 17, + [ + "literal", + [ + 0.3, + 0.3 + ] ] - }, - "line-opacity": {"base": 1, "stops": [[14, 0], [14.25, 1]]} - } - }, - { - "id": "bridge-trunk_link", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 13, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "structure", "bridge"], - ["==", "type", "trunk_link"] ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(46, 85%, 67%)" } }, { - "id": "bridge-motorway_link", + "id": "bridge-major-link", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "motorway_link"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(26, 100%, 68%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(26, 100%, 68%)", + "trunk_link", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" + ] } }, { "id": "bridge-pedestrian", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "pedestrian"], - ["==", "structure", "bridge"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [[14, [1, 0]], [15, [1.5, 0.4]], [16, [1, 0.2]]] - } - } - }, - { - "id": "bridge-service-link-track", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 14, - "filter": [ - "all", - ["==", "$type", "LineString"], - [ - "all", - ["!=", "type", "trunk_link"], - ["==", "structure", "bridge"], - ["in", "class", "link", "service", "track"] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 1, + 0 + ] + ], + 15, + [ + "literal", + [ + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 + ] + ] ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[14, 0.5], [18, 12]]}, - "line-color": "hsl(0, 0%, 100%)" } }, { - "id": "bridge-street_limited", + "id": "bridge-street-minor", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", - "minzoom": 11, + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "street_limited"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(35, 14%, 93%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "bridge-street", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["==", "class", "street"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12.5, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]} - } - }, - { - "id": "bridge-secondary-tertiary", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false + ] + ], [ - "all", - ["==", "structure", "bridge"], - ["in", "type", "secondary", "tertiary"] + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[8.5, 0.5], [10, 0.75], [18, 26]] - }, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": {"base": 1.2, "stops": [[5, 0], [5.5, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + 18, + 12 + ] + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "street_limited", + "hsl(35, 14%, 93%)", + "hsl(0, 0%, 100%)" + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-primary", + "id": "bridge-primary-secondary-tertiary", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["==", "type", "primary"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-opacity": 1 - } - }, - { - "id": "bridge-oneway-arrows-blue-minor", - "type": "symbol", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "minzoom": 16, - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["==", "oneway", "true"], - ["==", "structure", "bridge"], + "match", [ - "in", - "class", - "link", - "path", - "pedestrian", - "service", - "track" - ] + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[17, "oneway-small"], [18, "oneway-large"]] - }, - "symbol-spacing": 200, - "icon-rotation-alignment": "map", - "icon-padding": 2 + "line-cap": "round", + "line-join": "round" }, - "paint": {} + "paint": { + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", + [ + "get", + "class" + ], + "primary", + 0.75, + [ + "secondary", + "tertiary" + ], + 0.1, + 0.1 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + "primary", + 32, + [ + "secondary", + "tertiary" + ], + 26, + 26 + ] + ], + "line-color": "hsl(0, 0%, 100%)" + } }, { - "id": "bridge-oneway-arrows-blue-major", + "id": "bridge-oneway-arrow-blue", "type": "symbol", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 15, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "oneway", "true"], - ["==", "structure", "bridge"], + "==", [ - "in", - "class", - "primary", - "secondary", - "street", - "street_limited", - "tertiary" + "get", + "structure" + ], + "bridge" + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" + ], + [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + true, + false + ], + 16, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited", + "primary_link", + "secondary_link", + "tertiary_link", + "path", + "pedestrian", + "track", + "service" + ], + true, + false ] ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [[16, "oneway-small"], [17, "oneway-large"]] - }, + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-small", + 17, + [ + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary", + "street", + "street_limited" + ], + "oneway-large", + "oneway-small" + ], + 18, + "oneway-large" + ], "symbol-spacing": 200, - "icon-rotation-alignment": "map", - "icon-padding": 2 + "icon-rotation-alignment": "map" }, "paint": {} }, { - "id": "bridge-trunk", + "id": "bridge-motorway-trunk", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", + "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "trunk"], - ["==", "structure", "bridge"] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(46, 85%, 67%)" - } - }, - { - "id": "bridge-motorway", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["!in", "layer", 2, 3, 4, 5], - ["==", "class", "motorway"], - ["==", "structure", "bridge"] + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(26, 100%, 68%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 100%, 68%)", + "trunk", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" + ] } }, { "id": "bridge-rail", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["in", "class", "major_rail", "minor_rail"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "stops": [ - [13, "hsl(50, 17%, 82%)"], - [16, "hsl(230, 10%, 74%)"] - ] - }, - "line-width": {"base": 1.5, "stops": [[14, 0.5], [20, 1]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(50, 17%, 82%)", + 16, + "hsl(230, 10%, 74%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] } }, { "id": "bridge-rail-tracks", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["in", "class", "major_rail", "minor_rail"] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-color": { - "stops": [ - [13, "hsl(50, 17%, 82%)"], - [16, "hsl(230, 10%, 74%)"] - ] - }, - "line-width": {"base": 1.5, "stops": [[14, 4], [20, 8]]}, - "line-dasharray": [0.1, 15], - "line-opacity": {"base": 1, "stops": [[13.75, 0], [20, 1]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + "hsl(50, 17%, 82%)", + 16, + "hsl(230, 10%, 74%)" + ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 4, + 20, + 8 + ], + "line-dasharray": [ + 0.1, + 15 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13.75, + 0, + 14, + 1 + ] } }, { - "id": "bridge-trunk_link-2-case", + "id": "bridge-major-link-2-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["==", "type", "trunk_link"], - [">=", "layer", 2] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": {"base": 1, "stops": [[10.99, 0], [11, 1]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ] } }, { - "id": "bridge-motorway_link-2-case", + "id": "bridge-motorway-trunk-2-case", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "motorway_link"], - ["==", "structure", "bridge"], - [">=", "layer", 2] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[12, 0.75], [20, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-opacity": 1 - } - }, - { - "id": "bridge-trunk-2-case", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["==", "class", "trunk"], - ["==", "structure", "bridge"], - [">=", "layer", 2] - ] - ], - "layout": {"line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, - "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]} - } - }, - { - "id": "bridge-motorway-2-case", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + ">=", + [ + "get", + "layer" + ], + 2 + ], [ - "all", - ["==", "class", "motorway"], - ["==", "structure", "bridge"], - [">=", "layer", 2] + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[10, 1], [16, 2]]}, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 100%)", - "line-gap-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]} + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ] } }, { - "id": "bridge-trunk_link-2", + "id": "bridge-major-link-2", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "structure", "bridge"], - ["==", "type", "trunk_link"], - [">=", "layer", 2] + "==", + [ + "get", + "structure" + ], + "bridge" + ], + [ + ">=", + [ + "get", + "layer" + ], + 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(46, 85%, 67%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway_link", + "hsl(26, 100%, 68%)", + "trunk_link", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" + ] } }, { - "id": "bridge-motorway_link-2", + "id": "bridge-motorway-trunk-2", "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", - ["==", "class", "motorway_link"], - ["==", "structure", "bridge"], - [">=", "layer", 2] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": { - "base": 1.5, - "stops": [[12, 0.5], [14, 2], [18, 18]] - }, - "line-color": "hsl(26, 100%, 68%)" - } - }, - { - "id": "bridge-trunk-2", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + "==", + [ + "get", + "structure" + ], + "bridge" + ], [ - "all", - ["==", "class", "trunk"], - ["==", "structure", "bridge"], - [">=", "layer", 2] - ] - ], - "layout": {"line-cap": "round", "line-join": "round"}, - "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(46, 85%, 67%)" - } - }, - { - "id": "bridge-motorway-2", - "type": "line", - "metadata": {"mapbox:group": "1444855799204.86"}, - "source": "composite", - "source-layer": "road", - "filter": [ - "all", - ["==", "$type", "LineString"], + ">=", + [ + "get", + "layer" + ], + 2 + ], [ - "all", - ["==", "class", "motorway"], - ["==", "structure", "bridge"], - [">=", "layer", 2] + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": {"line-cap": "round", "line-join": "round"}, + "layout": { + "line-cap": "round", + "line-join": "round" + }, "paint": { - "line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}, - "line-color": "hsl(26, 100%, 68%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": [ + "match", + [ + "get", + "class" + ], + "motorway", + "hsl(26, 100%, 68%)", + "trunk", + "hsl(46, 85%, 67%)", + "hsl(46, 85%, 67%)" + ] } }, { - "id": "bridge-oneway-arrows-white", + "id": "bridge-oneway-arrow-white", "type": "symbol", - "metadata": {"mapbox:group": "1444855799204.86"}, + "metadata": { + "mapbox:group": "1444855799204.86" + }, "source": "composite", "source-layer": "road", "minzoom": 16, "filter": [ "all", - ["==", "$type", "LineString"], [ - "all", + "==", [ - "!in", - "type", - "primary_link", - "secondary_link", - "tertiary_link" + "get", + "structure" + ], + "bridge" + ], + [ + "match", + [ + "get", + "class" ], - ["==", "oneway", "true"], - ["==", "structure", "bridge"], [ - "in", - "class", - "link", "motorway", + "trunk", "motorway_link", - "trunk" - ] + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "get", + "oneway" + ], + "true" ] ], "layout": { "symbol-placement": "line", - "icon-image": { - "base": 1, - "stops": [ - [16, "oneway-white-small"], - [17, "oneway-white-large"] - ] - }, - "symbol-spacing": 200, - "icon-padding": 2 + "icon-image": [ + "step", + [ + "zoom" + ], + "oneway-white-small", + 17, + "oneway-white-large" + ], + "symbol-spacing": 200 }, "paint": {} }, { "id": "aerialway", "type": "line", + "metadata": {}, "source": "composite", "source-layer": "road", "minzoom": 13, "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "class", "aerialway"] + "==", + [ + "get", + "class" + ], + "aerialway" ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { "line-color": "hsl(230, 10%, 74%)", - "line-width": {"base": 1.5, "stops": [[14, 0.5], [20, 1]]} + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ] } }, { - "id": "admin-3-4-boundaries-bg", + "id": "admin-1-boundary-bg", "type": "line", - "metadata": {"mapbox:group": "1444934295202.7542"}, + "metadata": { + "mapbox:group": "1444934295202.7542" + }, "source": "composite", "source-layer": "admin", - "filter": ["all", ["==", "maritime", 0], [">=", "admin_level", 3]], - "layout": {"line-join": "bevel"}, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 1 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "layout": { + "line-join": "bevel" + }, "paint": { - "line-color": { - "base": 1, - "stops": [ - [8, "hsl(35, 12%, 89%)"], - [16, "hsl(230, 49%, 90%)"] - ] - }, - "line-width": {"base": 1, "stops": [[7, 3.75], [12, 5.5]]}, - "line-opacity": {"base": 1, "stops": [[7, 0], [8, 0.75]]}, - "line-dasharray": [1, 0], - "line-translate": [0, 0], - "line-blur": {"base": 1, "stops": [[3, 0], [8, 3]]} + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + "hsl(35, 12%, 89%)", + 16, + "hsl(230, 49%, 90%)" + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 3.75, + 12, + 5.5 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 0.75 + ], + "line-dasharray": [ + 1, + 0 + ], + "line-translate": [ + 0, + 0 + ], + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 8, + 3 + ] } }, { - "id": "admin-2-boundaries-bg", + "id": "admin-0-boundary-bg", "type": "line", - "metadata": {"mapbox:group": "1444934295202.7542"}, + "metadata": { + "mapbox:group": "1444934295202.7542" + }, "source": "composite", "source-layer": "admin", "minzoom": 1, - "filter": ["all", ["==", "admin_level", 2], ["==", "maritime", 0]], - "layout": {"line-join": "miter"}, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "layout": {}, "paint": { - "line-width": {"base": 1, "stops": [[3, 3.5], [10, 8]]}, - "line-color": { - "base": 1, - "stops": [ - [6, "hsl(35, 12%, 89%)"], - [8, "hsl(230, 49%, 90%)"] - ] - }, - "line-opacity": {"base": 1, "stops": [[3, 0], [4, 0.5]]}, - "line-translate": [0, 0], - "line-blur": {"base": 1, "stops": [[3, 0], [10, 2]]} + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 3.5, + 10, + 8 + ], + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 6, + "hsl(35, 12%, 89%)", + 8, + "hsl(230, 49%, 90%)" + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 4, + 0.5 + ], + "line-translate": [ + 0, + 0 + ], + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 10, + 2 + ] } }, { - "id": "admin-3-4-boundaries", + "id": "admin-1-boundary", "type": "line", - "metadata": {"mapbox:group": "1444934295202.7542"}, + "metadata": { + "mapbox:group": "1444934295202.7542" + }, "source": "composite", "source-layer": "admin", - "filter": ["all", ["==", "maritime", 0], [">=", "admin_level", 3]], - "layout": {"line-join": "round", "line-cap": "round"}, + "filter": [ + "all", + [ + "==", + [ + "get", + "admin_level" + ], + 1 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] + ], + "layout": { + "line-join": "round", + "line-cap": "round" + }, "paint": { - "line-dasharray": { - "base": 1, - "stops": [[6, [2, 0]], [7, [2, 2, 6, 2]]] - }, - "line-width": {"base": 1, "stops": [[7, 0.75], [12, 1.5]]}, - "line-opacity": {"base": 1, "stops": [[2, 0], [3, 1]]}, - "line-color": { - "base": 1, - "stops": [ - [3, "hsl(230, 14%, 77%)"], - [7, "hsl(230, 8%, 62%)"] + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + 2, + 0 + ] + ], + 7, + [ + "literal", + [ + 2, + 2, + 6, + 2 + ] ] - } + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0.75, + 12, + 1.5 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + 0, + 3, + 1 + ], + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + "hsl(230, 14%, 77%)", + 7, + "hsl(230, 8%, 62%)" + ] } }, { - "id": "admin-2-boundaries", + "id": "admin-0-boundary", "type": "line", - "metadata": {"mapbox:group": "1444934295202.7542"}, + "metadata": { + "mapbox:group": "1444934295202.7542" + }, "source": "composite", "source-layer": "admin", "minzoom": 1, "filter": [ "all", - ["==", "admin_level", 2], - ["==", "disputed", 0], - ["==", "maritime", 0] + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "disputed" + ], + "false" + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] ], - "layout": {"line-join": "round", "line-cap": "round"}, + "layout": { + "line-join": "round", + "line-cap": "round" + }, "paint": { "line-color": "hsl(230, 8%, 51%)", - "line-width": {"base": 1, "stops": [[3, 0.5], [10, 2]]} + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 10, + 2 + ] } }, { - "id": "admin-2-boundaries-dispute", + "id": "admin-0-boundary-disputed", "type": "line", - "metadata": {"mapbox:group": "1444934295202.7542"}, + "metadata": { + "mapbox:group": "1444934295202.7542" + }, "source": "composite", "source-layer": "admin", "minzoom": 1, "filter": [ "all", - ["==", "admin_level", 2], - ["==", "disputed", 1], - ["==", "maritime", 0] + [ + "==", + [ + "get", + "disputed" + ], + "true" + ], + [ + "==", + [ + "get", + "admin_level" + ], + 0 + ], + [ + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false + ] ], - "layout": {"line-join": "round"}, + "layout": { + "line-join": "round" + }, "paint": { - "line-dasharray": [1.5, 1.5], + "line-dasharray": [ + 1.5, + 1.5 + ], "line-color": "hsl(230, 8%, 51%)", - "line-width": {"base": 1, "stops": [[3, 0.5], [10, 2]]} + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 10, + 2 + ] } }, { - "id": "housenum-label", + "id": "building-number-label", "type": "symbol", + "metadata": {}, "source": "composite", "source-layer": "housenum_label", "minzoom": 17, "layout": { - "text-field": "{house_num}", + "text-field": [ + "get", + "house_num" + ], "text-font": [ "DIN Offc Pro Italic", "Arial Unicode MS Regular" @@ -3650,997 +7643,1873 @@ "paint": { "text-color": "hsl(35, 2%, 69%)", "text-halo-color": "hsl(35, 8%, 85%)", - "text-halo-width": 0.5, - "text-halo-blur": 0 + "text-halo-width": 0.5 } }, { - "id": "waterway-label", - "type": "symbol", - "source": "composite", - "source-layer": "waterway_label", - "minzoom": 12, - "filter": ["in", "class", "canal", "river"], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "symbol-placement": "line", - "text-pitch-alignment": "viewport", - "text-max-angle": 30, - "text-size": {"base": 1, "stops": [[13, 12], [18, 16]]} - }, - "paint": { - "text-halo-width": 0.5, - "text-halo-color": "hsl(196, 80%, 70%)", - "text-color": "hsl(230, 48%, 44%)", - "text-halo-blur": 0.5 - } - }, - { - "id": "poi-scalerank4-l15", + "id": "road-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933456003.5437"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", - "minzoom": 17, + "source-layer": "road", + "minzoom": 10, "filter": [ - "all", + "step", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "zoom" ], - ["==", "scalerank", 4], - [">=", "localrank", 15] - ], - "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{maki}-11", - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + true, + false ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-color": "hsl(26, 25%, 32%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 - } - }, - { - "id": "poi-scalerank4-l1", - "type": "symbol", - "metadata": {"mapbox:group": "1444933456003.5437"}, - "source": "composite", - "source-layer": "poi_label", - "minzoom": 15, - "filter": [ - "all", + 12, [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "pedestrian", + "street", + "street_limited" + ], + true, + false ], - ["<=", "localrank", 14], - ["==", "scalerank", 4] + 15, + [ + "match", + [ + "get", + "class" + ], + "golf", + false, + true + ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{maki}-11", - "text-max-angle": 38, - "symbol-spacing": 250, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + 10, + [ + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "pedestrian", + "street", + "street_limited" + ], + 9, + 6.5 + ], + 18, + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + 16, + [ + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "pedestrian", + "street", + "street_limited" + ], + 14, + 13 + ] + ], + "text-max-angle": 30, "text-font": [ - "DIN Offc Pro Medium", + "DIN Offc Pro Regular", "Arial Unicode MS Regular" ], + "symbol-placement": "line", "text-padding": 1, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-rotation-alignment": "map", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": 0.01 }, "paint": { - "text-color": "hsl(26, 25%, 32%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-color": [ + "match", + [ + "get", + "class" + ], + "ferry", + "hsl(230, 48%, 44%)", + "hsl(0, 0%, 0%)" + ], + "text-halo-color": [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + "hsla(0, 0%, 100%, 0.75)", + "ferry", + "hsl(196, 80%, 70%)", + "hsl(0, 0%, 100%)" + ], + "text-halo-width": 1, + "text-halo-blur": 1 } }, { - "id": "poi-parks_scalerank4", + "id": "road-number-shield", "type": "symbol", - "metadata": {"mapbox:group": "1444933456003.5437"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", - "minzoom": 15, + "source-layer": "road", + "minzoom": 6, "filter": [ "all", - ["==", "scalerank", 4], [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "has", + "reflen" + ], + [ + "<=", + [ + "get", + "reflen" + ], + 6 + ], + [ + "step", + [ + "zoom" + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ], + 11, + [ + ">", + [ + "get", + "len" + ], + 5000 + ], + 12, + [ + ">", + [ + "get", + "len" + ], + 2500 + ], + 13, + [ + ">", + [ + "get", + "len" + ], + 1000 + ], + 14, + true ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{maki}-11", + "text-size": 9, + "icon-image": [ + "concat", + [ + "get", + "shield" + ], + "-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ], + "icon-rotation-alignment": "viewport", "text-max-angle": 38, - "symbol-spacing": 250, + "symbol-spacing": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 150, + 14, + 200 + ], "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + "DIN Offc Pro Bold", + "Arial Unicode MS Bold" + ], + "symbol-placement": [ + "step", + [ + "zoom" + ], + "point", + 11, + "line" ], - "text-padding": 1, - "text-offset": [0, 0.65], "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-field": [ + "get", + "ref" + ], + "text-letter-spacing": 0.05 }, "paint": { - "text-color": "hsl(100, 100%, 20%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-color": [ + "match", + [ + "get", + "shield_text_color" + ], + "white", + "hsl(0, 0%, 100%)", + "black", + "hsl(0, 0%, 7%)", + "yellow", + "hsl(50, 100%, 70%)", + "orange", + "hsl(25, 100%, 75%)", + "blue", + "hsl(230, 48%, 34%)", + "hsl(0, 0%, 100%)" + ] } }, { - "id": "poi-scalerank3", + "id": "road-exit-shield", "type": "symbol", - "metadata": {"mapbox:group": "1444933372896.5967"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", + "source-layer": "motorway_junction", + "minzoom": 14, "filter": [ "all", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "has", + "reflen" ], - ["==", "scalerank", 3] + [ + "<=", + [ + "get", + "reflen" + ], + 9 + ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{maki}-11", - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + "text-field": [ + "get", + "ref" ], - "text-padding": 1, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-size": 9, + "icon-image": [ + "concat", + "motorway-exit-", + [ + "to-string", + [ + "get", + "reflen" + ] + ] + ], + "text-font": [ + "DIN Offc Pro Bold", + "Arial Unicode MS Bold" + ] }, "paint": { - "text-color": "hsl(26, 25%, 32%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-color": "hsl(0, 0%, 100%)", + "text-translate": [ + 0, + 0 + ] } }, { - "id": "poi-parks-scalerank3", + "id": "golf-hole-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933372896.5967"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", + "source-layer": "road", + "minzoom": 16, "filter": [ - "all", - ["==", "scalerank", 3], + "==", [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" - ] + "get", + "class" + ], + "golf" ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{maki}-11", - "text-max-angle": 38, - "symbol-spacing": 250, + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-size": 12 }, "paint": { - "text-color": "hsl(100, 100%, 20%)", "text-halo-color": "hsl(0, 0%, 100%)", "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-halo-blur": 0.5, + "text-color": "hsl(100, 100%, 20%)" } }, { - "id": "road-label-small", + "id": "waterway-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933721429.3076"}, + "metadata": {}, "source": "composite", - "source-layer": "road_label", - "minzoom": 15, + "source-layer": "natural_label", + "minzoom": 13, "filter": [ "all", [ - "!in", - "class", - "golf", - "link", - "motorway", - "pedestrian", - "primary", - "secondary", - "street", - "street_limited", - "tertiary", - "trunk" + "match", + [ + "get", + "class" + ], + [ + "canal", + "river", + "stream" + ], + true, + false ], - ["==", "$type", "LineString"] + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], "layout": { - "text-size": {"base": 1, "stops": [[15, 10], [20, 13]]}, - "text-max-angle": 30, - "symbol-spacing": 250, "text-font": [ - "DIN Offc Pro Regular", + "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], + "text-max-angle": 30, + "symbol-spacing": [ + "interpolate", + [ + "linear", + 1 + ], + [ + "zoom" + ], + 15, + 250, + 17, + 400 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 12, + 18, + 16 + ], "symbol-placement": "line", - "text-padding": 1, - "text-rotation-alignment": "map", "text-pitch-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.01 + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1.25, - "text-halo-blur": 1 + "text-color": "hsl(230, 48%, 44%)" } }, { - "id": "road-label-medium", + "id": "natural-line-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933721429.3076"}, + "metadata": {}, "source": "composite", - "source-layer": "road_label", - "minzoom": 11, + "source-layer": "natural_label", + "minzoom": 4, "filter": [ "all", - ["==", "$type", "LineString"], [ - "in", - "class", - "link", - "pedestrian", - "street", - "street_limited" + "match", + [ + "get", + "class" + ], + [ + "glacier", + "landform" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 2 ] ], "layout": { - "text-size": {"base": 1, "stops": [[11, 10], [20, 14]]}, - "text-max-angle": 30, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] ], - "symbol-placement": "line", - "text-padding": 1, - "text-rotation-alignment": "map", - "text-pitch-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.01 - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1 - } - }, - { - "id": "road-label-large", - "type": "symbol", - "metadata": {"mapbox:group": "1444933721429.3076"}, - "source": "composite", - "source-layer": "road_label", - "filter": [ - "in", - "class", - "motorway", - "primary", - "secondary", - "tertiary", - "trunk" - ], - "layout": { - "text-size": {"base": 1, "stops": [[9, 10], [20, 16]]}, "text-max-angle": 30, - "symbol-spacing": 250, + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], "text-font": [ - "DIN Offc Pro Regular", + "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "symbol-placement": "line", - "text-padding": 1, - "text-rotation-alignment": "map", - "text-pitch-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.01 - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsla(0, 0%, 100%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 1 - } - }, - { - "id": "road-shields-black", - "type": "symbol", - "metadata": {"mapbox:group": "1444933575858.6992"}, - "source": "composite", - "source-layer": "road_label", - "filter": [ - "all", - [ - "!in", - "shield", - "at-expressway", - "at-motorway", - "at-state-b", - "bg-motorway", - "bg-national", - "ch-main", - "ch-motorway", - "cz-motorway", - "cz-road", - "de-motorway", - "e-road", - "fi-main", - "gr-motorway", - "gr-national", - "hr-motorway", - "hr-state", - "hu-main", - "hu-motorway", - "nz-state", - "pl-expressway", - "pl-motorway", - "pl-national", - "ro-county", - "ro-motorway", - "ro-national", - "rs-motorway", - "rs-state-1b", - "se-main", - "si-expressway", - "si-motorway", - "sk-highway", - "sk-road", - "us-interstate", - "us-interstate-business", - "us-interstate-duplex", - "us-interstate-truck", - "za-metropolitan", - "za-national", - "za-provincial", - "za-regional" - ], - ["<=", "reflen", 6] - ], - "layout": { - "text-size": 9, - "icon-image": "{shield}-{reflen}", - "icon-rotation-alignment": "viewport", - "text-max-angle": 38, - "symbol-spacing": {"base": 1, "stops": [[11, 150], [14, 200]]}, - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"], - "symbol-placement": { - "base": 1, - "stops": [[10, "point"], [11, "line"]] - }, - "text-padding": 2, - "text-rotation-alignment": "viewport", - "text-field": "{ref}", - "text-letter-spacing": 0.05, - "icon-padding": 2 + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport" }, "paint": { - "text-color": "hsl(0, 0%, 7%)", - "icon-halo-color": "rgba(0, 0, 0, 1)", - "icon-halo-width": 1, - "text-opacity": 1, - "icon-color": "white", + "text-halo-width": 0.5, "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0 - } - }, - { - "id": "road-shields-white", - "type": "symbol", - "metadata": {"mapbox:group": "1444933575858.6992"}, - "source": "composite", - "source-layer": "road_label", - "filter": [ - "all", - ["<=", "reflen", 6], - [ - "in", - "shield", - "at-expressway", - "at-motorway", - "at-state-b", - "bg-motorway", - "bg-national", - "ch-main", - "ch-motorway", - "cz-motorway", - "cz-road", - "de-motorway", - "e-road", - "fi-main", - "gr-motorway", - "gr-national", - "hr-motorway", - "hr-state", - "hu-main", - "hu-motorway", - "nz-state", - "pl-expressway", - "pl-motorway", - "pl-national", - "ro-county", - "ro-motorway", - "ro-national", - "rs-motorway", - "rs-state-1b", - "se-main", - "si-expressway", - "si-motorway", - "sk-highway", - "sk-road", - "us-interstate", - "us-interstate-business", - "us-interstate-duplex", - "us-interstate-truck", - "za-metropolitan", - "za-national", - "za-provincial", - "za-regional" + "text-halo-blur": 0.5, + "text-color": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(26, 20%, 42%)", + 5, + "hsl(26, 25%, 32%)" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(26, 20%, 42%)", + 13, + "hsl(26, 25%, 32%)" + ] ] - ], - "layout": { - "text-size": 9, - "icon-image": "{shield}-{reflen}", - "icon-rotation-alignment": "viewport", - "text-max-angle": 38, - "symbol-spacing": {"base": 1, "stops": [[11, 150], [14, 200]]}, - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"], - "symbol-placement": { - "base": 1, - "stops": [[10, "point"], [11, "line"]] - }, - "text-padding": 2, - "text-rotation-alignment": "viewport", - "text-field": "{ref}", - "text-letter-spacing": 0.05, - "icon-padding": 2 - }, - "paint": { - "text-color": "hsl(0, 0%, 100%)", - "icon-halo-color": "rgba(0, 0, 0, 1)", - "icon-halo-width": 1, - "text-opacity": 1, - "icon-color": "white", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0 } }, { - "id": "motorway-junction", + "id": "natural-point-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933575858.6992"}, + "metadata": {}, "source": "composite", - "source-layer": "motorway_junction", - "minzoom": 14, - "filter": ["all", ["<=", "reflen", 9], [">", "reflen", 0]], - "layout": { - "text-field": "{ref}", - "text-size": 9, - "icon-image": "motorway-exit-{reflen}", - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"] - }, - "paint": { - "text-color": "hsl(0, 0%, 100%)", - "text-translate": [0, 0] - } - }, - { - "id": "poi-scalerank2", - "type": "symbol", - "metadata": {"mapbox:group": "1444933358918.2366"}, - "source": "composite", - "source-layer": "poi_label", + "source-layer": "natural_label", + "minzoom": 4, "filter": [ "all", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "match", + [ + "get", + "class" + ], + [ + "dock", + "glacier", + "landform", + "water_feature", + "wetland" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" ], - ["==", "scalerank", 2] + [ + "<=", + [ + "get", + "filterrank" + ], + 2 + ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[14, 11], [20, 14]]}, - "icon-image": {"stops": [[14, "{maki}-11"], [15, "{maki}-15"]]}, - "text-max-angle": 38, - "symbol-spacing": 250, + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "concat", + [ + "get", + "maki" + ], + "-11" + ], + 15, + [ + "concat", + [ + "get", + "maki" + ], + "-15" + ] + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 5, + [ + "literal", + [ + 0, + 0.75 + ] + ] + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 13, + [ + "literal", + [ + 0, + 0.75 + ] + ] + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 5, + "top" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 13, + "top" + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": "hsl(26, 25%, 32%)", + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 5, + 1 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 13, + 1 + ] + ], "text-halo-color": "hsl(0, 0%, 100%)", "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-halo-blur": 0.5, + "text-color": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(26, 20%, 42%)", + 5, + "hsl(26, 25%, 32%)" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(26, 20%, 42%)", + 13, + "hsl(26, 25%, 32%)" + ] + ] } }, { - "id": "poi-parks-scalerank2", + "id": "water-line-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933358918.2366"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", + "source-layer": "natural_label", "filter": [ "all", - ["==", "scalerank", 2], [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[14, 11], [20, 14]]}, - "icon-image": {"stops": [[14, "{maki}-11"], [15, "{maki}-15"]]}, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-color": "hsl(100, 100%, 20%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 - } - }, - { - "id": "rail-label", - "type": "symbol", - "source": "composite", - "source-layer": "rail_station_label", - "minzoom": 12, - "filter": ["!=", "maki", "entrance"], - "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[16, 11], [20, 13]]}, - "icon-image": "{network}", - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + [ + "step", + [ + "get", + "sizerank" + ], + 24, + 6, + 18, + 12, + 12 + ], + 10, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ], + 18, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 16 + ] ], - "text-offset": [0, 0.85], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": { - "base": 1, - "stops": [[0, ""], [13, "{name_en}"]] - }, - "text-letter-spacing": 0.01, - "icon-padding": 0, - "text-max-width": 7 - }, - "paint": { - "text-color": "hsl(230, 48%, 44%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "icon-halo-width": 4, - "icon-halo-color": "#fff", - "text-opacity": {"base": 1, "stops": [[13.99, 0], [14, 1]]}, - "text-halo-blur": 0.5 - } - }, - { - "id": "water-label-sm", - "type": "symbol", - "metadata": {"mapbox:group": "1444933808272.805"}, - "source": "composite", - "source-layer": "water_label", - "minzoom": 15, - "filter": ["<=", "area", 10000], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "text-max-angle": 30, + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "sea", + "bay" + ], + 0.15, + 0 ], - "text-max-width": 7, - "text-size": {"base": 1, "stops": [[16, 13], [20, 16]]} - }, - "paint": {"text-color": "hsl(230, 48%, 44%)"} - }, - { - "id": "water-label", - "type": "symbol", - "metadata": {"mapbox:group": "1444933808272.805"}, - "source": "composite", - "source-layer": "water_label", - "minzoom": 5, - "filter": [">", "area", 10000], - "layout": { - "text-field": "{name_en}", "text-font": [ "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], - "text-max-width": 7, - "text-size": {"base": 1, "stops": [[13, 13], [18, 18]]} + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, - "paint": {"text-color": "hsl(230, 48%, 44%)"} + "paint": { + "text-color": [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "sea" + ], + "hsl(205, 84%, 88%)", + "hsl(230, 48%, 44%)" + ] + } }, { - "id": "place-residential", + "id": "water-point-label", "type": "symbol", + "metadata": {}, "source": "composite", - "source-layer": "place_label", - "maxzoom": 18, + "source-layer": "natural_label", "filter": [ "all", - ["all", ["<=", "localrank", 10], ["==", "type", "residential"]], - ["in", "$type", "LineString", "Point", "Polygon"] + [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "Point" + ] ], "layout": { - "text-line-height": 1.2, - "text-size": {"base": 1, "stops": [[10, 11], [18, 14]]}, - "text-max-angle": 38, - "symbol-spacing": 250, + "text-line-height": 1.3, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + [ + "step", + [ + "get", + "sizerank" + ], + 24, + 6, + 18, + 12, + 12 + ], + 10, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ] + ], "text-font": [ - "DIN Offc Pro Regular", + "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0], - "text-rotation-alignment": "viewport", - "text-field": "{name_en}", - "text-max-width": 7 + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "bay", + "sea" + ], + 0.15, + 0.01 + ], + "text-max-width": [ + "match", + [ + "get", + "class" + ], + "ocean", + 4, + "sea", + 5, + [ + "bay", + "water" + ], + 7, + 10 + ] }, "paint": { - "text-color": "hsl(26, 25%, 32%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1, - "text-halo-blur": 0.5 + "text-color": [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "sea" + ], + "hsl(205, 84%, 88%)", + "hsl(230, 48%, 44%)" + ] } }, { - "id": "poi-parks-scalerank1", + "id": "poi-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933322393.2852"}, + "metadata": {}, "source": "composite", "source-layer": "poi_label", + "minzoom": 6, "filter": [ - "all", - ["<=", "scalerank", 1], + "<=", [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "get", + "filterrank" + ], + [ + "+", + [ + "step", + [ + "zoom" + ], + 0, + 16, + 1, + 17, + 2 + ], + 3 ] ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[10, 11], [18, 14]]}, - "icon-image": {"stops": [[13, "{maki}-11"], [14, "{maki}-15"]]}, - "text-max-angle": 38, - "symbol-spacing": 250, + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 5, + 12 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "icon-image": [ + "step", + [ + "zoom" + ], + [ + "concat", + [ + "get", + "maki" + ], + "-11" + ], + 15, + [ + "concat", + [ + "get", + "maki" + ], + "-15" + ] + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 5, + [ + "literal", + [ + 0, + 0.75 + ] + ] + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + [ + "literal", + [ + 0, + 0 + ] + ], + 13, + [ + "literal", + [ + 0, + 0.75 + ] + ] + ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 5, + "top" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "center", + 13, + "top" + ] + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": "hsl(100, 100%, 20%)", + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 5, + 1 + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + 0, + 13, + 1 + ] + ], "text-halo-color": "hsl(0, 0%, 100%)", "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-halo-blur": 0.5, + "text-color": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + [ + "match", + [ + "get", + "class" + ], + "food_and_drink", + "hsl(22, 55%, 55%)", + "park_like", + "hsl(100, 45%, 37%)", + "education", + "hsl(51, 40%, 40%)", + "medical", + "hsl(340, 30%, 52%)", + "hsl(26, 20%, 42%)" + ], + 5, + [ + "match", + [ + "get", + "class" + ], + "food_and_drink", + "hsl(22, 85%, 38%)", + "park_like", + "hsl(100, 100%, 20%)", + "education", + "hsl(51, 100%, 20%)", + "medical", + "hsl(340, 39%, 42%)", + "hsl(26, 25%, 32%)" + ] + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + [ + "match", + [ + "get", + "class" + ], + "food_and_drink", + "hsl(22, 55%, 55%)", + "park_like", + "hsl(100, 45%, 37%)", + "education", + "hsl(51, 40%, 40%)", + "medical", + "hsl(340, 30%, 52%)", + "hsl(26, 20%, 42%)" + ], + 13, + [ + "match", + [ + "get", + "class" + ], + "food_and_drink", + "hsl(22, 85%, 38%)", + "park_like", + "hsl(100, 100%, 20%)", + "education", + "hsl(51, 100%, 20%)", + "medical", + "hsl(340, 39%, 42%)", + "hsl(26, 25%, 32%)" + ] + ] + ] } }, { - "id": "poi-scalerank1", + "id": "transit-label", "type": "symbol", - "metadata": {"mapbox:group": "1444933322393.2852"}, + "metadata": {}, "source": "composite", - "source-layer": "poi_label", + "source-layer": "transit_stop_label", + "minzoom": 12, "filter": [ - "all", + "step", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "zoom" + ], + [ + "all", + [ + "match", + [ + "get", + "mode" + ], + [ + "rail", + "metro_rail" + ], + true, + false + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 15, + [ + "all", + [ + "match", + [ + "get", + "mode" + ], + [ + "rail", + "metro_rail", + "ferry", + "light_rail" + ], + true, + false + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] + ], + 16, + [ + "all", + [ + "!=", + [ + "get", + "mode" + ], + "bus" + ], + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ] ], - ["<=", "scalerank", 1] + 17, + [ + "!=", + [ + "get", + "stop_type" + ], + "entrance" + ], + 19, + true ], "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[10, 11], [18, 14]]}, - "icon-image": {"stops": [[13, "{maki}-11"], [14, "{maki}-15"]]}, - "text-max-angle": 38, - "symbol-spacing": 250, + "text-size": 12, + "icon-image": [ + "get", + "network" + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0.65], - "text-rotation-alignment": "viewport", - "text-anchor": "top", - "text-field": "{name_en}", + "text-justify": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + "left", + "center" + ], + "text-offset": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + [ + "literal", + [ + 1, + 0 + ] + ], + [ + "literal", + [ + 0, + 0.8 + ] + ] + ], + "text-anchor": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + "left", + "top" + ], + "text-field": [ + "step", + [ + "zoom" + ], + "", + 14, + [ + "match", + [ + "get", + "mode" + ], + [ + "rail", + "metro_rail" + ], + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "" + ], + 16, + [ + "match", + [ + "get", + "mode" + ], + [ + "bus", + "bicycle" + ], + "", + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + 18, + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-max-width": [ + "match", + [ + "get", + "stop_type" + ], + "entrance", + 15, + 9 + ] }, "paint": { - "text-color": "hsl(26, 25%, 32%)", "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-color": [ + "match", + [ + "get", + "network" + ], + "entrance", + "hsl(230, 48%, 44%)", + "tokyo-metro", + "hsl(180, 50%, 30%)", + "mexico-city-metro", + "hsl(25, 100%, 40%)", + [ + "barcelona-metro", + "delhi-metro", + "hong-kong-mtr", + "milan-metro", + "osaka-subway" + ], + "hsl(0, 90%, 47%)", + [ + "boston-t", + "washington-metro" + ], + "hsl(0, 0%, 0%)", + [ + "chongqing-rail-transit", + "kiev-metro", + "singapore-mrt", + "taipei-metro" + ], + "hsl(140, 90%, 25%)", + "hsl(230, 48%, 44%)" + ], + "text-halo-blur": 0.5, + "text-halo-width": 0.5 } }, { "id": "airport-label", "type": "symbol", + "metadata": {}, "source": "composite", "source-layer": "airport_label", - "minzoom": 9, - "filter": ["<=", "scalerank", 2], + "minzoom": 8, "layout": { "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[10, 12], [18, 18]]}, - "icon-image": {"stops": [[12, "{maki}-11"], [13, "{maki}-15"]]}, - "symbol-spacing": 250, + "text-size": [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ], + "icon-image": [ + "step", + [ + "get", + "sizerank" + ], + [ + "concat", + [ + "get", + "maki" + ], + "-15" + ], + 9, + [ + "concat", + [ + "get", + "maki" + ], + "-11" + ] + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [0, 0.75], + "text-offset": [ + 0, + 0.75 + ], "text-rotation-alignment": "viewport", "text-anchor": "top", - "text-field": {"stops": [[11, "{ref}"], [12, "{name_en}"]]}, + "text-field": [ + "step", + [ + "get", + "sizerank" + ], + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + 15, + [ + "get", + "ref" + ] + ], "text-letter-spacing": 0.01, "text-max-width": 9 }, "paint": { "text-color": "hsl(230, 48%, 44%)", "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 0.5, - "text-halo-blur": 0.5 + "text-halo-width": 1 } }, { - "id": "place-islet-archipelago-aboriginal", + "id": "settlement-subdivision-label", "type": "symbol", + "metadata": {}, "source": "composite", "source-layer": "place_label", - "maxzoom": 16, + "minzoom": 10, + "maxzoom": 15, "filter": [ - "in", - "type", - "aboriginal_lands", - "archipelago", - "islet" + "all", + [ + "==", + [ + "get", + "class" + ], + "settlement_subdivision" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 4 + ] ], "layout": { - "text-line-height": 1.2, - "text-size": {"base": 1, "stops": [[10, 11], [18, 16]]}, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] ], - "text-padding": 2, - "text-offset": [0, 0], - "text-rotation-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-color": "hsl(230, 29%, 35%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1 - } - }, - { - "id": "place-neighbourhood", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 10, - "maxzoom": 16, - "filter": ["==", "type", "neighbourhood"], - "layout": { - "text-field": "{name_en}", "text-transform": "uppercase", - "text-letter-spacing": 0.1, - "text-max-width": 7, "text-font": [ "DIN Offc Pro Regular", "Arial Unicode MS Regular" ], - "text-padding": 3, - "text-size": {"base": 1, "stops": [[12, 11], [16, 16]]} - }, - "paint": { - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1, - "text-color": "hsl(230, 29%, 35%)", - "text-halo-blur": 0.5 - } - }, - { - "id": "place-suburb", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 10, - "maxzoom": 16, - "filter": ["==", "type", "suburb"], - "layout": { - "text-field": "{name_en}", - "text-transform": "uppercase", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "text-letter-spacing": [ + "match", + [ + "get", + "type" + ], + "suburb", + 0.15, + [ + "quarter", + "neighborhood" + ], + 0.1, + 0.1 ], - "text-letter-spacing": 0.15, "text-max-width": 7, "text-padding": 3, - "text-size": {"base": 1, "stops": [[11, 11], [15, 18]]} + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.5, + 0, + 1, + 1 + ], + [ + "zoom" + ], + 11, + [ + "match", + [ + "get", + "type" + ], + "suburb", + 11, + [ + "quarter", + "neighborhood" + ], + 10.5, + 10.5 + ], + 15, + [ + "match", + [ + "get", + "type" + ], + "suburb", + 17, + [ + "quarter", + "neighborhood" + ], + 16, + 16 + ] + ] }, "paint": { "text-halo-color": "hsl(0, 0%, 100%)", @@ -4650,682 +9519,880 @@ } }, { - "id": "place-hamlet", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 10, - "maxzoom": 16, - "filter": ["==", "type", "hamlet"], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ], - "text-size": {"base": 1, "stops": [[12, 11.5], [15, 16]]} - }, - "paint": { - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1.25, - "text-color": "hsl(0, 0%, 0%)" - } - }, - { - "id": "place-village", + "id": "settlement-label", "type": "symbol", + "metadata": {}, "source": "composite", "source-layer": "place_label", - "minzoom": 8, "maxzoom": 15, - "filter": ["==", "type", "village"], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "filter": [ + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + 3 ], - "text-max-width": 7, - "text-size": {"base": 1, "stops": [[10, 11.5], [16, 18]]} - }, - "paint": { - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1.25, - "text-color": "hsl(0, 0%, 0%)" - } - }, - { - "id": "place-town", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 6, - "maxzoom": 15, - "filter": ["==", "type", "town"], - "layout": { - "icon-image": "dot-9", - "text-font": { - "base": 1, - "stops": [ + [ + "==", + [ + "get", + "class" + ], + "settlement" + ], + [ + "step", + [ + "zoom" + ], + true, + 13, + [ + ">=", [ - 11, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] + "get", + "symbolrank" ], + 11 + ], + 14, + [ + ">=", [ - 12, - ["DIN Offc Pro Medium", "Arial Unicode MS Regular"] - ] + "get", + "symbolrank" + ], + 13 ] - }, - "text-offset": { - "base": 1, - "stops": [[7, [0, -0.15]], [8, [0, 0]]] - }, - "text-anchor": { - "base": 1, - "stops": [[7, "bottom"], [8, "center"]] - }, - "text-field": "{name_en}", - "text-max-width": 7, - "text-size": {"base": 1, "stops": [[7, 11.5], [15, 20]]} - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1.25, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]} - } - }, - { - "id": "place-island", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "maxzoom": 16, - "filter": ["==", "type", "island"], - "layout": { - "text-line-height": 1.2, - "text-size": {"base": 1, "stops": [[10, 11], [18, 16]]}, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ], - "text-padding": 2, - "text-offset": [0, 0], - "text-rotation-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 7 - }, - "paint": { - "text-color": "hsl(230, 29%, 35%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1 - } - }, - { - "id": "place-city-sm", - "type": "symbol", - "metadata": {"mapbox:group": "1444862510685.128"}, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "filter": [ - "all", - ["!in", "scalerank", 0, 1, 2, 3, 4, 5], - ["==", "type", "city"] + ] ], "layout": { - "text-size": {"base": 1, "stops": [[6, 12], [14, 22]]}, - "icon-image": "dot-9", - "text-font": { - "base": 1, - "stops": [ + "icon-image": [ + "case", + [ + "==", + [ + "get", + "capital" + ], + 2 + ], + "border-dot-13", + [ + "step", [ - 7, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] + "get", + "symbolrank" ], - [8, ["DIN Offc Pro Medium", "Arial Unicode MS Regular"]] + "dot-11", + 9, + "dot-10", + 11, + "dot-9" ] - }, - "text-offset": { - "base": 1, - "stops": [[7.99, [0, -0.2]], [8, [0, 0]]] - }, - "text-anchor": { - "base": 1, - "stops": [[7, "bottom"], [8, "center"]] - }, - "text-field": "{name_en}", - "text-max-width": 7 - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1.25, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]} - } - }, - { - "id": "place-city-md-s", - "type": "symbol", - "metadata": {"mapbox:group": "1444862510685.128"}, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "filter": [ - "all", - ["==", "type", "city"], - ["in", "ldir", "E", "S", "SE", "SW"], - ["in", "scalerank", 3, 4, 5] - ], - "layout": { - "text-field": "{name_en}", - "icon-image": "dot-10", - "text-anchor": { - "base": 1, - "stops": [[7, "top"], [8, "center"]] - }, - "text-offset": { - "base": 1, - "stops": [[7.99, [0, 0.1]], [8, [0, 0]]] - }, - "text-font": { - "base": 1, - "stops": [ - [ - 7, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] - ], - [8, ["DIN Offc Pro Medium", "Arial Unicode MS Regular"]] + ], + "text-font": [ + "step", + [ + "zoom" + ], + [ + "literal", + [ + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" + ] + ], + 8, + [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] + ], + 11, + [ + "literal", + [ + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" + ] + ] + ], + 10, + [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] + ], + 12, + [ + "literal", + [ + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" + ] + ] + ], + 11, + [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] + ], + 13, + [ + "literal", + [ + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" + ] + ] + ], + 12, + [ + "step", + [ + "get", + "symbolrank" + ], + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] + ], + 15, + [ + "literal", + [ + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" + ] + ] + ], + 13, + [ + "literal", + [ + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" + ] ] - }, - "text-size": {"base": 0.9, "stops": [[5, 12], [12, 22]]} - }, - "paint": { - "text-halo-width": 1, - "text-halo-color": "hsl(0, 0%, 100%)", - "text-color": "hsl(0, 0%, 0%)", - "text-halo-blur": 1, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]} - } - }, - { - "id": "place-city-md-n", - "type": "symbol", - "metadata": {"mapbox:group": "1444862510685.128"}, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "filter": [ - "all", - ["==", "type", "city"], - ["in", "ldir", "N", "NE", "NW", "W"], - ["in", "scalerank", 3, 4, 5] - ], - "layout": { - "icon-image": "dot-10", - "text-font": { - "base": 1, - "stops": [ + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "capital" + ], + 2, [ - 7, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] + "match", + [ + "get", + "text_anchor" + ], + "bottom", + [ + "literal", + [ + 0, + -0.3 + ] + ], + "bottom-left", + [ + "literal", + [ + 0.3, + -0.1 + ] + ], + "left", + [ + "literal", + [ + 0.45, + 0.1 + ] + ], + "top-left", + [ + "literal", + [ + 0.3, + 0.1 + ] + ], + "top", + [ + "literal", + [ + 0, + 0.3 + ] + ], + "top-right", + [ + "literal", + [ + -0.3, + 0.1 + ] + ], + "right", + [ + "literal", + [ + -0.45, + 0 + ] + ], + "bottom-right", + [ + "literal", + [ + -0.3, + -0.1 + ] + ], + [ + "literal", + [ + 0, + -0.3 + ] + ] ], - [8, ["DIN Offc Pro Medium", "Arial Unicode MS Regular"]] + [ + "match", + [ + "get", + "text_anchor" + ], + "bottom", + [ + "literal", + [ + 0, + -0.25 + ] + ], + "bottom-left", + [ + "literal", + [ + 0.2, + -0.05 + ] + ], + "left", + [ + "literal", + [ + 0.4, + 0.05 + ] + ], + "top-left", + [ + "literal", + [ + 0.2, + 0.05 + ] + ], + "top", + [ + "literal", + [ + 0, + 0.25 + ] + ], + "top-right", + [ + "literal", + [ + -0.2, + 0.05 + ] + ], + "right", + [ + "literal", + [ + -0.4, + 0.05 + ] + ], + "bottom-right", + [ + "literal", + [ + -0.2, + -0.05 + ] + ], + [ + "literal", + [ + 0, + -0.25 + ] + ] + ] + ], + 8, + [ + "literal", + [ + 0, + 0 + ] ] - }, - "text-offset": { - "base": 1, - "stops": [[7.99, [0, -0.25]], [8, [0, 0]]] - }, - "text-anchor": { - "base": 1, - "stops": [[7, "bottom"], [8, "center"]] - }, - "text-field": "{name_en}", - "text-max-width": 7, - "text-size": {"base": 0.9, "stops": [[5, 12], [12, 22]]} - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]}, - "text-halo-blur": 1 - } - }, - { - "id": "place-city-lg-s", - "type": "symbol", - "metadata": {"mapbox:group": "1444862510685.128"}, - "source": "composite", - "source-layer": "place_label", - "minzoom": 1, - "maxzoom": 14, - "filter": [ - "all", - ["<=", "scalerank", 2], - ["==", "type", "city"], - ["in", "ldir", "E", "S", "SE", "SW"] - ], - "layout": { - "icon-image": "dot-11", - "text-font": { - "base": 1, - "stops": [ + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "get", + "text_anchor" + ], + 8, + "center" + ], + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "text_anchor" + ], + [ + "bottom", + "top" + ], + "center", + [ + "left", + "bottom-left", + "top-left" + ], + "left", [ - 7, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] + "right", + "bottom-right", + "top-right" ], - [8, ["DIN Offc Pro Medium", "Arial Unicode MS Regular"]] + "right", + "center" + ], + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - }, - "text-offset": { - "base": 1, - "stops": [[7.99, [0, 0.15]], [8, [0, 0]]] - }, - "text-anchor": { - "base": 1, - "stops": [[7, "top"], [8, "center"]] - }, - "text-field": "{name_en}", + ], "text-max-width": 7, - "text-size": {"base": 0.9, "stops": [[4, 12], [10, 22]]} - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]}, - "text-halo-blur": 1 - } - }, - { - "id": "place-city-lg-n", - "type": "symbol", - "metadata": {"mapbox:group": "1444862510685.128"}, - "source": "composite", - "source-layer": "place_label", - "minzoom": 1, - "maxzoom": 14, - "filter": [ - "all", - ["<=", "scalerank", 2], - ["==", "type", "city"], - ["in", "ldir", "N", "NE", "NW", "W"] - ], - "layout": { - "icon-image": "dot-11", - "text-font": { - "base": 1, - "stops": [ + "text-line-height": 1.1, + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.9, + 1 + ], + [ + "zoom" + ], + 3, + [ + "step", + [ + "get", + "symbolrank" + ], + 12, + 9, + 11, + 10, + 10.5, + 12, + 9.5, + 14, + 8.5, + 16, + 6.5, + 17, + 4 + ], + 15, + [ + "step", [ - 7, - ["DIN Offc Pro Regular", "Arial Unicode MS Regular"] + "get", + "symbolrank" ], - [8, ["DIN Offc Pro Medium", "Arial Unicode MS Regular"]] + 28, + 9, + 26, + 10, + 23, + 11, + 21, + 12, + 20, + 13, + 19, + 15, + 17 ] - }, - "text-offset": { - "base": 1, - "stops": [[7.99, [0, -0.25]], [8, [0, 0]]] - }, - "text-anchor": { - "base": 1, - "stops": [[7, "bottom"], [8, "center"]] - }, - "text-field": "{name_en}", - "text-max-width": 7, - "text-size": {"base": 0.9, "stops": [[4, 12], [10, 22]]} + ] }, "paint": { "text-color": "hsl(0, 0%, 0%)", - "text-opacity": 1, "text-halo-color": "hsl(0, 0%, 100%)", "text-halo-width": 1, - "icon-opacity": {"base": 1, "stops": [[7.99, 1], [8, 0]]}, + "icon-opacity": [ + "step", + [ + "zoom" + ], + 1, + 8, + 0 + ], "text-halo-blur": 1 } }, { - "id": "marine-label-sm-ln", + "id": "state-label", "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, + "metadata": {}, "source": "composite", - "source-layer": "marine_label", - "minzoom": 3, - "maxzoom": 10, - "filter": [ - "all", - ["==", "$type", "LineString"], - [">=", "labelrank", 4] - ], - "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1, "stops": [[3, 12], [6, 16]]}, - "symbol-spacing": {"base": 1, "stops": [[4, 100], [6, 400]]}, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "symbol-placement": "line", - "text-pitch-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.1, - "text-max-width": 5 - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "marine-label-sm-pt", - "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, - "source": "composite", - "source-layer": "marine_label", + "source-layer": "place_label", "minzoom": 3, - "maxzoom": 10, - "filter": ["all", ["==", "$type", "Point"], [">=", "labelrank", 4]], - "layout": { - "text-field": "{name_en}", - "text-max-width": 5, - "text-letter-spacing": 0.1, - "text-line-height": 1.5, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "text-size": {"base": 1, "stops": [[3, 12], [6, 16]]} - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "marine-label-md-ln", - "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 2, - "maxzoom": 8, + "maxzoom": 9, "filter": [ - "all", - ["==", "$type", "LineString"], - ["in", "labelrank", 2, 3] - ], - "layout": { - "text-line-height": 1.1, - "text-size": {"base": 1.1, "stops": [[2, 12], [5, 20]]}, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "==", + [ + "get", + "class" ], - "symbol-placement": "line", - "text-pitch-alignment": "viewport", - "text-field": "{name_en}", - "text-letter-spacing": 0.15, - "text-max-width": 5 - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "marine-label-md-pt", - "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 2, - "maxzoom": 8, - "filter": [ - "all", - ["==", "$type", "Point"], - ["in", "labelrank", 2, 3] + "state" ], "layout": { - "text-field": "{name_en}", - "text-max-width": 5, - "text-letter-spacing": 0.15, - "text-line-height": 1.5, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.85, + 0.7, + 0.65, + 1 + ], + [ + "zoom" + ], + 4, + [ + "step", + [ + "get", + "symbolrank" + ], + 10, + 6, + 9.5, + 7, + 9 + ], + 9, + [ + "step", + [ + "get", + "symbolrank" + ], + 24, + 6, + 18, + 7, + 14 + ] ], - "text-size": {"base": 1.1, "stops": [[2, 14], [5, 20]]} - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "marine-label-lg-ln", - "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 1, - "maxzoom": 4, - "filter": [ - "all", - ["==", "$type", "LineString"], - ["==", "labelrank", 1] - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": 4, - "text-letter-spacing": 0.25, - "text-line-height": 1.1, - "symbol-placement": "line", - "text-pitch-alignment": "viewport", + "text-transform": "uppercase", "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "DIN Offc Pro Bold", + "Arial Unicode MS Bold" ], - "text-size": {"base": 1, "stops": [[1, 14], [4, 30]]} - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "marine-label-lg-pt", - "type": "symbol", - "metadata": {"mapbox:group": "1444856087950.3635"}, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 1, - "maxzoom": 4, - "filter": ["all", ["==", "$type", "Point"], ["==", "labelrank", 1]], - "layout": { - "text-field": "{name_en}", - "text-max-width": 4, - "text-letter-spacing": 0.25, - "text-line-height": 1.5, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "text-field": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "symbolrank" + ], + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + 5, + [ + "coalesce", + [ + "get", + "abbr" + ], + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] + ], + 5, + [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] ], - "text-size": {"base": 1, "stops": [[1, 14], [4, 30]]} - }, - "paint": {"text-color": "hsl(205, 83%, 88%)"} - }, - { - "id": "state-label-sm", - "type": "symbol", - "metadata": {"mapbox:group": "1444856151690.9143"}, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 9, - "filter": ["<", "area", 20000], - "layout": { - "text-size": {"base": 1, "stops": [[6, 10], [9, 14]]}, - "text-transform": "uppercase", - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"], - "text-field": { - "base": 1, - "stops": [[0, "{abbr}"], [6, "{name_en}"]] - }, - "text-letter-spacing": 0.15, - "text-max-width": 5 - }, - "paint": { - "text-opacity": 1, - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1 - } - }, - { - "id": "state-label-md", - "type": "symbol", - "metadata": {"mapbox:group": "1444856151690.9143"}, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 8, - "filter": ["all", ["<", "area", 80000], [">=", "area", 20000]], - "layout": { - "text-size": {"base": 1, "stops": [[5, 10], [8, 16]]}, - "text-transform": "uppercase", - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"], - "text-field": { - "base": 1, - "stops": [[0, "{abbr}"], [5, "{name_en}"]] - }, - "text-letter-spacing": 0.15, - "text-max-width": 6 - }, - "paint": { - "text-opacity": 1, - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": "hsl(0, 0%, 100%)", - "text-halo-width": 1 - } - }, - { - "id": "state-label-lg", - "type": "symbol", - "metadata": {"mapbox:group": "1444856151690.9143"}, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 7, - "filter": [">=", "area", 80000], - "layout": { - "text-size": {"base": 1, "stops": [[4, 10], [7, 18]]}, - "text-transform": "uppercase", - "text-font": ["DIN Offc Pro Bold", "Arial Unicode MS Bold"], - "text-padding": 1, - "text-field": { - "base": 1, - "stops": [[0, "{abbr}"], [4, "{name_en}"]] - }, "text-letter-spacing": 0.15, "text-max-width": 6 }, "paint": { - "text-opacity": 1, "text-color": "hsl(0, 0%, 0%)", "text-halo-color": "hsl(0, 0%, 100%)", "text-halo-width": 1 } }, { - "id": "country-label-sm", + "id": "country-label", "type": "symbol", - "metadata": {"mapbox:group": "1444856144497.7825"}, + "metadata": {}, "source": "composite", - "source-layer": "country_label", + "source-layer": "place_label", "minzoom": 1, "maxzoom": 10, - "filter": [">=", "scalerank", 5], - "layout": { - "text-field": "{name_en}", - "text-max-width": 6, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + "filter": [ + "==", + [ + "get", + "class" ], - "text-size": {"base": 0.9, "stops": [[5, 14], [9, 22]]} - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": { - "base": 1, - "stops": [ - [2, "rgba(255,255,255,0.75)"], - [3, "hsl(0, 0%, 100%)"] - ] - }, - "text-halo-width": 1.25 - } - }, - { - "id": "country-label-md", - "type": "symbol", - "metadata": {"mapbox:group": "1444856144497.7825"}, - "source": "composite", - "source-layer": "country_label", - "minzoom": 1, - "maxzoom": 8, - "filter": ["in", "scalerank", 3, 4], + "country" + ], "layout": { - "text-field": { - "base": 1, - "stops": [[0, "{code}"], [2, "{name_en}"]] - }, + "icon-image": "dot-11", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], + "text-line-height": 1.1, "text-max-width": 6, "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-size": {"base": 1, "stops": [[3, 10], [8, 24]]} - }, - "paint": { - "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": { - "base": 1, - "stops": [ - [2, "rgba(255,255,255,0.75)"], - [3, "hsl(0, 0%, 100%)"] + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "coalesce", + [ + "get", + "text_anchor" + ], + "center" + ], + 7, + "center" + ], + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "text_anchor" + ], + "bottom", + [ + "literal", + [ + 0, + -0.25 + ] + ], + "bottom-left", + [ + "literal", + [ + 0.2, + -0.05 + ] + ], + "left", + [ + "literal", + [ + 0.4, + 0.05 + ] + ], + "top-left", + [ + "literal", + [ + 0.2, + 0.05 + ] + ], + "top", + [ + "literal", + [ + 0, + 0.25 + ] + ], + "top-right", + [ + "literal", + [ + -0.2, + 0.05 + ] + ], + "right", + [ + "literal", + [ + -0.4, + 0.05 + ] + ], + "bottom-right", + [ + "literal", + [ + -0.2, + -0.05 + ] + ], + [ + "literal", + [ + 0, + -0.25 + ] + ] + ], + 7, + [ + "literal", + [ + 0, + 0 + ] ] - }, - "text-halo-width": 1.25 - } - }, - { - "id": "country-label-lg", - "type": "symbol", - "metadata": {"mapbox:group": "1444856144497.7825"}, - "source": "composite", - "source-layer": "country_label", - "minzoom": 1, - "maxzoom": 7, - "filter": ["in", "scalerank", 1, 2], - "layout": { - "text-field": "{name_en}", - "text-max-width": {"base": 1, "stops": [[0, 5], [3, 6]]}, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" ], - "text-size": {"base": 1, "stops": [[1, 10], [6, 24]]} + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", + [ + "get", + "text_anchor" + ], + [ + "bottom", + "top" + ], + "center", + [ + "left", + "bottom-left", + "top-left" + ], + "left", + [ + "right", + "bottom-right", + "top-right" + ], + "right", + "center" + ], + 7, + "center" + ], + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.7, + 1 + ], + [ + "zoom" + ], + 1, + [ + "step", + [ + "get", + "symbolrank" + ], + 11, + 4, + 9, + 5, + 8 + ], + 9, + [ + "step", + [ + "get", + "symbolrank" + ], + 28, + 4, + 22, + 5, + 21 + ] + ] }, "paint": { + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "case", + [ + "has", + "text_anchor" + ], + 1, + 0 + ], + 7, + 0 + ], "text-color": "hsl(0, 0%, 0%)", - "text-halo-color": { - "base": 1, - "stops": [ - [2, "rgba(255,255,255,0.75)"], - [3, "hsl(0, 0%, 100%)"] - ] - }, + "text-halo-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + "rgba(255,255,255,0.75)", + 3, + "hsl(0, 0%, 100%)" + ], "text-halo-width": 1.25 } } ], - "created": "2018-10-22T14:13:43.210Z", - "id": "cjnkdt02b0b2p2ss40skwpvs1", - "modified": "2018-10-22T14:14:35.211Z", - "owner": "lukaspaczos", "visibility": "public", + "created": "1970-01-01T00:00:00.000Z", + "modified": "1970-01-01T00:00:00.000Z", + "owner": "mapbox", + "id": "streets-v11", "draft": false }
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java index 5bd59507a9..eebd937497 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java @@ -85,6 +85,7 @@ public class PressForMarkerActivity extends AppCompatActivity { if (mapboxMap == null) { return; } + markerList.clear(); mapboxMap.removeAnnotations(); } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/LatLngBoundsActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/LatLngBoundsActivity.kt index 23707f52a5..b83ba5c4cd 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/LatLngBoundsActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/LatLngBoundsActivity.kt @@ -19,8 +19,8 @@ import com.mapbox.mapboxsdk.style.sources.GeoJsonSource import com.mapbox.mapboxsdk.testapp.R import com.mapbox.mapboxsdk.testapp.utils.GeoParseUtil.loadStringFromAssets import com.mapbox.mapboxsdk.utils.BitmapUtils -import kotlinx.android.synthetic.main.activity_latlngbounds.* import java.net.URISyntaxException +import kotlinx.android.synthetic.main.activity_latlngbounds.* /** * Test activity showcasing using the LatLngBounds camera API. diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/FragmentBackStackActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/FragmentBackStackActivity.kt index a642ebe594..c0f93fce1f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/FragmentBackStackActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/fragment/FragmentBackStackActivity.kt @@ -2,7 +2,6 @@ package com.mapbox.mapboxsdk.testapp.activity.fragment import android.os.Bundle import android.support.v7.app.AppCompatActivity -import android.view.View import com.mapbox.mapboxsdk.maps.MapboxMap import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.maps.SupportMapFragment @@ -15,20 +14,32 @@ import kotlinx.android.synthetic.main.activity_backstack_fragment.* */ class FragmentBackStackActivity : AppCompatActivity() { + companion object { + private const val FRAGMENT_TAG = "map_fragment" + } + private lateinit var mapFragment: SupportMapFragment override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_backstack_fragment) - mapFragment = SupportMapFragment.newInstance() - mapFragment.getMapAsync { initMap(it) } + if (savedInstanceState == null) { + mapFragment = SupportMapFragment.newInstance() + mapFragment.getMapAsync { initMap(it) } - supportFragmentManager.beginTransaction().apply { - add(R.id.container, mapFragment) - }.commit() + supportFragmentManager.beginTransaction().apply { + add(R.id.container, mapFragment, FRAGMENT_TAG) + }.commit() + } else { + supportFragmentManager.findFragmentByTag(FRAGMENT_TAG)?.also { fragment -> + if (fragment is SupportMapFragment) { + fragment.getMapAsync { initMap(it) } + } + } + } - button.setOnClickListener { handleClick(it) } + button.setOnClickListener { handleClick() } } private fun initMap(mapboxMap: MapboxMap) { @@ -37,7 +48,7 @@ class FragmentBackStackActivity : AppCompatActivity() { } } - private fun handleClick(button: View) { + private fun handleClick() { supportFragmentManager.beginTransaction().apply { replace(R.id.container, NestedViewPagerActivity.ItemAdapter.EmptyFragment()) addToBackStack("map_empty_fragment") diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.kt index 7c111865d1..a55081d963 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/imagegenerator/SnapshotActivity.kt @@ -40,7 +40,7 @@ class SnapshotActivity : AppCompatActivity(), OnMapReadyCallback { override fun onMapReady(map: MapboxMap) { mapboxMap = map - mapboxMap.setStyle(Style.Builder().fromUrl(Style.OUTDOORS)) { mapView.addOnDidFinishRenderingFrameListener(idleListener) } + mapboxMap.setStyle(Style.Builder().fromUri(Style.OUTDOORS)) { mapView.addOnDidFinishRenderingFrameListener(idleListener) } } override fun onStart() { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationFragmentActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationFragmentActivity.kt index 9411c1c6a7..ff2afb50c5 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationFragmentActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationFragmentActivity.kt @@ -1,8 +1,8 @@ package com.mapbox.mapboxsdk.testapp.activity.location import android.annotation.SuppressLint -import android.app.Fragment import android.os.Bundle +import android.support.v4.app.Fragment import android.support.v7.app.AppCompatActivity import android.view.LayoutInflater import android.view.View @@ -30,9 +30,9 @@ class LocationFragmentActivity : AppCompatActivity() { setContentView(R.layout.activity_location_layer_fragment) fab.setOnClickListener { - val fragment = fragmentManager.findFragmentByTag(EmptyFragment.TAG) + val fragment = supportFragmentManager.findFragmentByTag(EmptyFragment.TAG) if (fragment == null) { - fragmentManager + supportFragmentManager .beginTransaction() .replace(R.id.container, EmptyFragment.newInstance(), EmptyFragment.TAG) .addToBackStack("transaction2") @@ -45,7 +45,7 @@ class LocationFragmentActivity : AppCompatActivity() { if (PermissionsManager.areLocationPermissionsGranted(this)) { if (savedInstanceState == null) { - fragmentManager + supportFragmentManager .beginTransaction() .replace(R.id.container, LocationFragment.newInstance(), LocationFragment.TAG) .commit() @@ -60,7 +60,7 @@ class LocationFragmentActivity : AppCompatActivity() { override fun onPermissionResult(granted: Boolean) { if (granted) { if (savedInstanceState == null) { - fragmentManager + supportFragmentManager .beginTransaction() .replace(R.id.container, LocationFragment.newInstance(), LocationFragment.TAG) .commit() @@ -96,7 +96,8 @@ class LocationFragmentActivity : AppCompatActivity() { } @SuppressLint("MissingPermission") - override fun onViewCreated(view: View?, savedInstanceState: Bundle?) { + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) mapView.onCreate(savedInstanceState) mapView.getMapAsync { mapboxMap = it @@ -104,9 +105,9 @@ class LocationFragmentActivity : AppCompatActivity() { val component = mapboxMap.locationComponent component.activateLocationComponent(LocationComponentActivationOptions - .builder(activity, style) - .useDefaultLocationEngine(true) - .build()) + .builder(activity!!, style) + .useDefaultLocationEngine(true) + .build()) component.isLocationComponentEnabled = true component.locationEngine?.getLastLocation(this) @@ -166,8 +167,8 @@ class LocationFragmentActivity : AppCompatActivity() { } } - override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View { - val textView = TextView(inflater?.context) + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + val textView = TextView(inflater.context) textView.text = "This is an empty Fragment" return textView } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/ChangeResourcesCachePathActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/ChangeResourcesCachePathActivity.kt index 4e1963d7fc..85ae845f67 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/ChangeResourcesCachePathActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/ChangeResourcesCachePathActivity.kt @@ -17,8 +17,8 @@ import com.mapbox.mapboxsdk.offline.OfflineManager import com.mapbox.mapboxsdk.offline.OfflineRegion import com.mapbox.mapboxsdk.storage.FileSource import com.mapbox.mapboxsdk.testapp.R -import kotlinx.android.synthetic.main.activity_change_resources_cache_path.* import java.io.File +import kotlinx.android.synthetic.main.activity_change_resources_cache_path.* class ChangeResourcesCachePathActivity : AppCompatActivity(), AdapterView.OnItemClickListener, diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/DownloadRegionActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/DownloadRegionActivity.kt index 36a8ccf0f1..1febe0bfd3 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/DownloadRegionActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/DownloadRegionActivity.kt @@ -14,10 +14,10 @@ import com.mapbox.mapboxsdk.geometry.LatLngBounds import com.mapbox.mapboxsdk.maps.Style import com.mapbox.mapboxsdk.offline.* import com.mapbox.mapboxsdk.testapp.R -import kotlinx.android.synthetic.main.activity_region_download.* -import timber.log.Timber import java.util.* import java.util.concurrent.TimeUnit +import kotlinx.android.synthetic.main.activity_region_download.* +import timber.log.Timber /** * Example showcasing how to download an offline region headless, allows to test pausing and resuming the download. diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/MergeOfflineRegionsActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/MergeOfflineRegionsActivity.kt index 0f59191d06..d6a840ad7e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/MergeOfflineRegionsActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/offline/MergeOfflineRegionsActivity.kt @@ -40,7 +40,7 @@ class MergeOfflineRegionsActivity : AppCompatActivity() { private val onRegionMergedListener = object : OfflineManager.MergeOfflineRegionsCallback { override fun onMerge(offlineRegions: Array<OfflineRegion>) { mapView.getMapAsync { - it.setStyle(Style.Builder().fromUrl(TEST_STYLE)) + it.setStyle(Style.Builder().fromUri(TEST_STYLE)) } Toast.makeText( this@MergeOfflineRegionsActivity, @@ -91,7 +91,7 @@ class MergeOfflineRegionsActivity : AppCompatActivity() { } mapView.getMapAsync { it.isDebugActive = true - it.setStyle(Style.Builder().fromUrl(TEST_STYLE)) + it.setStyle(Style.Builder().fromUri(TEST_STYLE)) } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/storage/CacheManagementActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/storage/CacheManagementActivity.kt index 54427ad20d..7ec6a5076f 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/storage/CacheManagementActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/storage/CacheManagementActivity.kt @@ -6,7 +6,6 @@ import android.support.design.widget.Snackbar import android.support.v7.app.AppCompatActivity import com.mapbox.mapboxsdk.offline.OfflineManager import com.mapbox.mapboxsdk.testapp.R -import junit.framework.Assert.assertTrue import kotlinx.android.synthetic.main.activity_cache_management.* /** @@ -70,7 +69,7 @@ class CacheManagementActivity : AppCompatActivity() { fun showSnackbar(message: String) { // validate that all callbacks occur on main thread - assertTrue(Looper.myLooper() == Looper.getMainLooper()) + assert(Looper.myLooper() == Looper.getMainLooper()) // show snackbar Snackbar.make(container, message, Snackbar.LENGTH_SHORT).show() diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt index 6de00e24f9..249c4e6ec8 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt @@ -70,7 +70,7 @@ class DraggableMarkerActivity : AppCompatActivity() { mapboxMap.setStyle( Style.Builder() - .fromUrl(Style.MAPBOX_STREETS) + .fromUri(Style.MAPBOX_STREETS) .withImage(markerImageId, IconFactory.getInstance(this).defaultMarker().bitmap) .withSource(source) .withLayer(layer) @@ -104,7 +104,7 @@ class DraggableMarkerActivity : AppCompatActivity() { } draggableSymbolsManager = DraggableSymbolsManager( - mapView, mapboxMap, featureCollection, source, layerId, 0, actionBarHeight) + mapView, mapboxMap, featureCollection, source, layerId, actionBarHeight, 0) // Adding symbol drag listeners draggableSymbolsManager?.addOnSymbolDragListener(object : DraggableSymbolsManager.OnSymbolDragListener { diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/textureview/TextureViewDebugModeActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/textureview/TextureViewDebugModeActivity.java index d2d527f6a7..08b3bce0b9 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/textureview/TextureViewDebugModeActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/textureview/TextureViewDebugModeActivity.java @@ -1,6 +1,5 @@ package com.mapbox.mapboxsdk.testapp.activity.textureview; -import android.view.MenuItem; import com.mapbox.mapboxsdk.maps.MapboxMapOptions; import com.mapbox.mapboxsdk.maps.OnMapReadyCallback; import com.mapbox.mapboxsdk.testapp.activity.maplayout.DebugModeActivity; @@ -19,19 +18,6 @@ public class TextureViewDebugModeActivity extends DebugModeActivity implements O } @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - // activity uses singleInstance for testing purposes - // code below provides a default navigation when using the app - onBackPressed(); - return true; - } - return super.onOptionsItemSelected(item); - } - - - @Override public void onBackPressed() { // activity uses singleInstance for testing purposes // code below provides a default navigation when using the app diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/turf/PhysicalUnitCircleActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/turf/PhysicalUnitCircleActivity.kt index e1a141433d..5f7377c920 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/turf/PhysicalUnitCircleActivity.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/turf/PhysicalUnitCircleActivity.kt @@ -52,7 +52,7 @@ class PhysicalUnitCircleActivity : AppCompatActivity(), SeekBar.OnSeekBarChangeL radiusBar.setOnSeekBarChangeListener(this) mapboxMap.setStyle(Style.Builder() - .fromUrl(Style.SATELLITE_STREETS) + .fromUri(Style.SATELLITE_STREETS) .withLayer(FillLayer(LAYER_ID, SOURCE_ID).withProperties(fillColor(interpolate( exponential(0.5f), zoom(), stop(8, color(Color.RED)), diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/local_style.json b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/local_style.json index 6c5b68f5be..2e24eeee42 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/local_style.json +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/local_style.json @@ -1,641 +1,374 @@ { "version": 8, - "name": "Dark", + "name": "Mapbox Dark", "metadata": { - "mapbox:autocomposite": true, "mapbox:type": "default", + "mapbox:origin": "dark-v10", + "mapbox:autocomposite": true, "mapbox:groups": { - "1444934828655.3389": { - "name": "Aeroways", - "collapsed": true - }, - "1444933322393.2852": { - "name": "POI labels (scalerank 1)", - "collapsed": true - }, "1444855786460.0557": { "name": "Roads", "collapsed": true }, - "1444856071629.7817": { - "name": "Place labels", - "collapsed": true - }, "1444934295202.7542": { "name": "Admin boundaries", "collapsed": true }, - "1444856151690.9143": { - "name": "State labels", - "collapsed": true - }, - "1444933721429.3076": { - "name": "Road labels", - "collapsed": true - }, - "1444933358918.2366": { - "name": "POI labels (scalerank 2)", - "collapsed": true - }, - "1444933808272.805": { - "name": "Water labels", - "collapsed": true - }, - "1444933372896.5967": { - "name": "POI labels (scalerank 3)", - "collapsed": true - }, "1444855799204.86": { "name": "Bridges", "collapsed": true }, - "1444856087950.3635": { - "name": "Marine labels", - "collapsed": true - }, - "1456969573402.7817": { - "name": "Hillshading", - "collapsed": true - }, - "1444856869758.2375": { - "name": "Wetlands", - "collapsed": true - }, - "1444862510685.128": { - "name": "City labels", - "collapsed": true - }, "1444855769305.6016": { "name": "Tunnels", "collapsed": true - }, - "1456970288113.8113": { - "name": "Landcover", - "collapsed": true - }, - "1444856144497.7825": { - "name": "Country labels", - "collapsed": true } } }, "sources": { "composite": { - "url": "mapbox://mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7", + "url": "mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2", "type": "vector" } }, - "sprite": "mapbox://sprites/ivovandongen/ciri9u6sk0005gjng30fkpx2o", + "sprite": "mapbox://sprites/mapbox/dark-v10", "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "layers": [ { - "id": "background", + "id": "land", "type": "background", - "interactive": true, "layout": {}, "paint": { "background-color": "hsl(55, 1%, 20%)" } }, { - "id": "landcover_wood", + "id": "landcover", "type": "fill", - "metadata": { - "mapbox:group": "1456970288113.8113" - }, "source": "composite", "source-layer": "landcover", - "maxzoom": 14, - "interactive": true, - "filter": [ - "==", - "class", - "wood" - ], - "layout": {}, - "paint": { - "fill-color": "hsl(55, 1%, 20%)", - "fill-opacity": 0.1, - "fill-antialias": false - } - }, - { - "id": "landcover_scrub", - "type": "fill", - "metadata": { - "mapbox:group": "1456970288113.8113" - }, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "interactive": true, - "filter": [ - "==", - "class", - "scrub" - ], - "layout": {}, - "paint": { - "fill-color": "hsl(55, 1%, 20%)", - "fill-opacity": 0.1, - "fill-antialias": false - } - }, - { - "id": "landcover_grass", - "type": "fill", - "metadata": { - "mapbox:group": "1456970288113.8113" - }, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "interactive": true, - "filter": [ - "==", - "class", - "grass" - ], - "layout": {}, - "paint": { - "fill-color": "hsl(55, 1%, 20%)", - "fill-opacity": 0.1, - "fill-antialias": false - } - }, - { - "id": "landcover_crop", - "type": "fill", - "metadata": { - "mapbox:group": "1456970288113.8113" - }, - "source": "composite", - "source-layer": "landcover", - "maxzoom": 14, - "interactive": true, - "filter": [ - "==", - "class", - "crop" - ], + "maxzoom": 7, "layout": {}, "paint": { "fill-color": "hsl(55, 1%, 20%)", - "fill-opacity": 0.1, + "fill-opacity": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 2, + 0.3, + 7, + 0 + ], "fill-antialias": false } }, { - "id": "national_park", + "id": "national-park", "type": "fill", "source": "composite", "source-layer": "landuse_overlay", - "interactive": true, + "minzoom": 5, "filter": [ "==", - "class", + [ + "get", + "class" + ], "national_park" ], "layout": {}, "paint": { "fill-color": "hsl(132, 2%, 20%)", - "fill-opacity": { - "base": 1, - "stops": [ - [ - 5, - 0 - ], - [ - 6, - 0.5 - ] - ] - } + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 0, + 6, + 0.5 + ] } }, { - "id": "parks", + "id": "landuse", "type": "fill", "source": "composite", "source-layer": "landuse", - "interactive": true, + "minzoom": 5, "filter": [ - "==", - "class", - "park" + "match", + [ + "get", + "class" + ], + [ + "park", + "airport", + "glacier", + "pitch", + "sand" + ], + true, + false ], "layout": {}, "paint": { - "fill-color": "hsl(132, 2%, 20%)", - "fill-opacity": { - "base": 1, - "stops": [ + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 5, + 0, + 6, + [ + "match", [ - 5, - 0 + "get", + "class" ], - [ - 6, - 0.75 - ] + "glacier", + 0.5, + 1 ] - } - } - }, - { - "id": "pitch", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "interactive": true, - "filter": [ - "==", - "class", - "pitch" - ], - "layout": {}, - "paint": { - "fill-color": "hsl(132, 2%, 20%)" - } - }, - { - "id": "industrial", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "interactive": true, - "filter": [ - "==", - "class", - "industrial" - ], - "layout": {}, - "paint": { - "fill-color": "hsl(0, 0%, 20%)" - } - }, - { - "id": "sand", - "type": "fill", - "source": "composite", - "source-layer": "landuse", - "interactive": true, - "filter": [ - "==", - "class", - "sand" - ], - "layout": {}, - "paint": { + ], "fill-color": "hsl(132, 2%, 20%)" } }, { - "id": "hillshade_highlight_bright", + "id": "water-shadow", "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 94 - ], + "source-layer": "water", "layout": {}, "paint": { - "fill-color": "#fff", - "fill-opacity": { - "stops": [ - [ - 14, - 0.04 - ], + "fill-translate-anchor": "viewport", + "fill-translate": [ + "interpolate", + [ + "exponential", + 1.2 + ], + [ + "zoom" + ], + 7, + [ + "literal", [ - 16, + 0, 0 ] - ] - }, - "fill-antialias": false - } - }, - { - "id": "hillshade_highlight_med", - "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 90 - ], - "layout": {}, - "paint": { - "fill-color": "#fff", - "fill-opacity": { - "stops": [ - [ - 14, - 0.04 - ], + ], + 16, + [ + "literal", [ - 16, - 0 + -1, + -1 ] ] - }, - "fill-antialias": false + ], + "fill-color": "hsl(185, 3%, 5%)" } }, { - "id": "hillshade_shadow_faint", - "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, + "id": "waterway", + "type": "line", "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 89 - ], - "layout": {}, + "source-layer": "waterway", + "minzoom": 8, + "layout": { + "line-cap": [ + "step", + [ + "zoom" + ], + "butt", + 11, + "round" + ], + "line-join": "round" + }, "paint": { - "fill-color": "hsl(0, 0%, 35%)", - "fill-opacity": { - "stops": [ + "line-color": "hsl(185, 2%, 10%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.3 + ], + [ + "zoom" + ], + 9, + [ + "match", [ - 14, - 0.033 + "get", + "class" ], [ - 16, - 0 - ] - ] - }, - "fill-antialias": false - } - }, - { - "id": "hillshade_shadow_med", - "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, - "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 78 - ], - "layout": {}, - "paint": { - "fill-color": "hsl(0, 0%, 35%)", - "fill-opacity": { - "stops": [ + "canal", + "river" + ], + 0.1, + 0 + ], + 20, + [ + "match", [ - 14, - 0.033 + "get", + "class" ], [ - 16, - 0 - ] + "canal", + "river" + ], + 8, + 3 ] - }, - "fill-antialias": false + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 8, + 0, + 8.5, + 1 + ] } }, { - "id": "hillshade_shadow_dark", + "id": "water", "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, "source": "composite", - "source-layer": "hillshade", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 67 - ], + "source-layer": "water", "layout": {}, "paint": { - "fill-color": "hsl(0, 0%, 35%)", - "fill-opacity": { - "stops": [ - [ - 14, - 0.06 - ], - [ - 16, - 0 - ] - ] - }, - "fill-antialias": false + "fill-color": "hsl(185, 2%, 10%)" } }, { - "id": "hillshade_shadow_extreme", + "id": "hillshade", "type": "fill", - "metadata": { - "mapbox:group": "1456969573402.7817" - }, "source": "composite", "source-layer": "hillshade", "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "level", - 56 - ], "layout": {}, "paint": { - "fill-color": "hsl(0, 0%, 35%)", - "fill-opacity": { - "stops": [ - [ - 14, - 0.06 - ], - [ - 16, - 0 - ] - ] - }, - "fill-antialias": false - } - }, - { - "id": "waterway-river-canal", - "type": "line", - "source": "composite", - "source-layer": "waterway", - "minzoom": 8, - "interactive": true, - "filter": [ - "any", - [ - "==", - "class", - "canal" + "fill-color": [ + "match", + [ + "get", + "class" + ], + "shadow", + "hsl(0, 0%, 35%)", + "hsl(0, 0%, 100%)" ], - [ - "==", - "class", - "river" - ] - ], - "layout": { - "line-cap": { - "base": 1, - "stops": [ - [ - 0, - "butt" - ], - [ - 11, - "round" - ] - ] - }, - "line-join": "round" - }, - "paint": { - "line-color": "hsl(185, 2%, 10%)", - "line-width": { - "base": 1.3, - "stops": [ + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 14, + [ + "match", [ - 8.5, - 0.1 + "get", + "level" ], [ - 20, - 8 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 8, - 0 + 67, + 56 ], + 0.06, [ - 8.5, - 1 - ] - ] - } - } - }, - { - "id": "water shadow", - "type": "fill", - "source": "composite", - "source-layer": "water", - "interactive": true, - "layout": {}, - "paint": { - "fill-color": "hsl(185, 3%, 5%)", - "fill-translate": { - "base": 1.2, - "stops": [ - [ - 7, - [ - 0, - 0 - ] + 89, + 78 ], - [ - 16, - [ - -1, - -1 - ] - ] - ] - }, - "fill-translate-anchor": "viewport", - "fill-opacity": 1 - } - }, - { - "id": "water", - "ref": "water shadow", - "interactive": true, - "paint": { - "fill-color": "hsl(185, 2%, 10%)" + 0.03, + 0.04 + ], + 16, + 0 + ], + "fill-antialias": false } }, { - "id": "barrier_line-land-polygon", + "id": "land-structure-polygon", "type": "fill", "source": "composite", - "source-layer": "barrier_line", - "interactive": true, + "source-layer": "structure", + "minzoom": 13, "filter": [ "all", [ "==", - "$type", + [ + "geometry-type" + ], "Polygon" ], [ "==", - "class", + [ + "get", + "class" + ], "land" ] ], "layout": {}, "paint": { - "fill-color": "hsl(55, 1%, 20%)", - "fill-outline-color": "hsl(55, 1%, 20%)" + "fill-color": "hsl(55, 1%, 20%)" } }, { - "id": "barrier_line-land-line", + "id": "land-structure-line", "type": "line", "source": "composite", - "source-layer": "barrier_line", - "interactive": true, + "source-layer": "structure", + "minzoom": 13, "filter": [ "all", [ "==", - "$type", + [ + "geometry-type" + ], "LineString" ], [ "==", - "class", + [ + "get", + "class" + ], "land" ] ], @@ -643,143 +376,180 @@ "line-cap": "round" }, "paint": { - "line-width": { - "base": 1.99, - "stops": [ - [ - 14, - 0.75 - ], - [ - 20, - 40 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.99 + ], + [ + "zoom" + ], + 14, + 0.75, + 20, + 40 + ], "line-color": "hsl(55, 1%, 20%)" } }, { "id": "aeroway-polygon", "type": "fill", - "metadata": { - "mapbox:group": "1444934828655.3389" - }, "source": "composite", "source-layer": "aeroway", "minzoom": 11, - "interactive": true, "filter": [ "all", [ - "!=", - "type", - "apron" - ], - [ "==", - "$type", + [ + "geometry-type" + ], "Polygon" + ], + [ + "match", + [ + "get", + "type" + ], + [ + "runway", + "taxiway", + "helipad" + ], + true, + false ] ], "layout": {}, "paint": { - "fill-color": "hsl(0, 0%, 27%)", - "fill-opacity": { - "base": 1, - "stops": [ - [ - 11, - 0 - ], - [ - 11.5, - 1 - ] - ] - } + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 11, + 0, + 11.5, + 1 + ], + "fill-color": "hsl(0, 0%, 27%)" } }, { - "id": "aeroway-runway", + "id": "aeroway-line", "type": "line", - "metadata": { - "mapbox:group": "1444934828655.3389" - }, "source": "composite", "source-layer": "aeroway", "minzoom": 9, - "interactive": true, "filter": [ - "all", + "==", [ - "==", - "$type", - "LineString" + "geometry-type" ], - [ - "==", - "type", - "runway" - ] + "LineString" ], "layout": {}, "paint": { - "line-color": "hsl(0, 0%, 27%)", - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 9, + [ + "match", [ - 9, - 1 + "get", + "type" ], + "runway", + 1, + "taxiway", + 0.5, + 0.5 + ], + 18, + [ + "match", [ - 18, - 80 - ] + "get", + "type" + ], + "runway", + 80, + "taxiway", + 20, + 20 ] - } + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "aeroway-taxiway", + "id": "building-outline", "type": "line", - "metadata": { - "mapbox:group": "1444934828655.3389" - }, "source": "composite", - "source-layer": "aeroway", - "minzoom": 9, - "interactive": true, + "source-layer": "building", + "minzoom": 15, "filter": [ "all", [ - "==", - "$type", - "LineString" + "!=", + [ + "get", + "type" + ], + "building:part" ], [ "==", - "type", - "taxiway" + [ + "get", + "underground" + ], + "false" ] ], "layout": {}, "paint": { - "line-color": "hsl(0, 0%, 27%)", - "line-width": { - "base": 1.5, - "stops": [ - [ - 10, - 0.5 - ], - [ - 18, - 20 - ] - ] - } + "line-color": "hsl(55, 1%, 15%)", + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 0.75, + 20, + 3 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 1 + ] } }, { @@ -788,121 +558,109 @@ "source": "composite", "source-layer": "building", "minzoom": 15, - "interactive": true, "filter": [ - "==", - "underground", - "false" + "all", + [ + "!=", + [ + "get", + "type" + ], + "building:part" + ], + [ + "==", + [ + "get", + "underground" + ], + "false" + ] ], "layout": {}, "paint": { - "fill-color": "hsl(55, 1%, 17%)", - "fill-opacity": { - "base": 1, - "stops": [ - [ - 15.5, - 0 - ], - [ - 16, - 1 - ] - ] - }, "fill-outline-color": "hsl(55, 1%, 15%)", - "fill-antialias": true + "fill-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 15, + 0, + 16, + 1 + ], + "fill-color": "hsl(55, 1%, 17%)" } }, { - "id": "tunnel-street-low", + "id": "tunnel-street-minor-low", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "minzoom": 11, - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "street" + [ + "get", + "structure" + ], + "tunnel" ], [ - "==", - "structure", - "tunnel" - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], + "step", + [ + "zoom" + ], + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "stops": [ - [ - 11.5, - 0 + "street", + "street_limited", + "track", + "primary_link" ], + true, + false + ], + 14, + [ + "match", [ - 12, - 1 + "get", + "class" ], [ - 14, - 1 + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" ], - [ - 14.01, - 0 - ] + true, + false ] - } - } - }, - { - "id": "tunnel-street_limited-low", - "type": "line", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "interactive": true, - "filter": [ - "all", - [ - "==", - "class", - "street_limited" ], [ "==", - "structure", - "tunnel" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -910,251 +668,247 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 12.5, - 0.5 + "get", + "class" ], [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "stops": [ - [ - 11.5, - 0 + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 12, - 1 + "get", + "class" ], [ - 14, - 1 + "street", + "street_limited", + "primary_link" ], - [ - 14.01, - 0 - ] + 18, + 12 ] - } + ], + "line-color": "hsl(185, 2%, 15%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 + ] } }, { - "id": "tunnel-service-link-track-case", + "id": "tunnel-street-minor-case", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!=", - "type", - "trunk_link" - ], - [ "==", - "structure", + [ + "get", + "structure" + ], "tunnel" ], [ - "in", - "class", - "link", - "service", - "track" - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 14, - 0.5 + "get", + "class" ], [ - 18, - 12 - ] - ] - }, - "line-dasharray": [ - 3, - 3 - ] - } - }, - { - "id": "tunnel-street_limited-case", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-street_limited-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 + "street", + "street_limited", + "track", + "primary_link" ], + true, + false + ], + 14, + [ + "match", [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 13, - 0 + "get", + "class" ], [ - 14, - 2 + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" ], - [ - 18, - 18 - ] + true, + false ] - }, - "line-dasharray": [ - 3, - 3 ], - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "tunnel-street-case", - "metadata": { - "mapbox:group": "1444855769305.6016" + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round" }, - "ref": "tunnel-street-low", - "interactive": true, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], + "line-color": "hsl(185, 2%, 29%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 12, - 0.75 + "get", + "class" ], [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 13, - 0 + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] + "street", + "street_limited", + "primary_link" + ], + 18, + 12 ] - }, + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ], "line-dasharray": [ 3, 3 - ], - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - } + ] } }, { - "id": "tunnel-secondary-tertiary-case", + "id": "tunnel-primary-secondary-tertiary-case", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "tunnel" ], [ - "in", - "class", - "secondary", - "tertiary" + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -1162,63 +916,121 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.2, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + [ + "match", [ - 10, - 0.75 + "get", + "class" ], + "primary", + 1, [ - 18, - 2 - ] - ] - }, - "line-dasharray": [ - 3, - 3 + "secondary", + "tertiary" + ], + 0.75, + 0.75 + ], + 18, + 2 ], - "line-gap-width": { - "base": 1.5, - "stops": [ + "line-color": "hsl(185, 2%, 29%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", [ - 8.5, - 0.5 + "get", + "class" ], + "primary", + 0.75, [ - 10, - 0.75 + "secondary", + "tertiary" ], + 0.1, + 0.1 + ], + 18, + [ + "match", [ - 18, - 26 - ] + "get", + "class" + ], + "primary", + 32, + [ + "secondary", + "tertiary" + ], + 26, + 26 ] - }, - "line-color": "hsl(185, 2%, 29%)" + ], + "line-dasharray": [ + 3, + 3 + ] } }, { - "id": "tunnel-primary-case", + "id": "tunnel-major-link-case", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "primary" + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false ], [ "==", - "structure", - "tunnel" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -1226,41 +1038,45 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 16, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], + "line-color": "hsl(185, 2%, 29%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-dasharray": [ 3, 3 - ], - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-color": "hsl(185, 2%, 29%)" + ] } }, { - "id": "tunnel-trunk_link-case", + "id": "tunnel-motorway-trunk-case", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" @@ -1268,18 +1084,35 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "tunnel" ], [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ "==", - "type", - "trunk_link" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -1287,37 +1120,35 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], "line-dasharray": [ 3, 3 @@ -1325,549 +1156,579 @@ } }, { - "id": "tunnel-motorway_link-case", + "id": "tunnel-construction", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "minzoom": 13, - "interactive": true, + "minzoom": 14, "filter": [ "all", [ "==", - "class", - "motorway_link" + [ + "get", + "structure" + ], + "tunnel" ], [ "==", - "structure", - "tunnel" + [ + "get", + "class" + ], + "construction" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], + "line-color": "hsl(187, 2%, 15%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 12, - 0.75 - ], + 0.4, + 0.8 + ] + ], + 15, + [ + "literal", [ - 20, - 2 + 0.3, + 0.6 ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + ], + 16, + [ + "literal", [ - 12, - 0.5 - ], + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", [ - 14, - 2 - ], + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", [ - 18, - 18 + 0.15, + 0.15 ] ] - }, - "line-dasharray": [ - 3, - 3 ] } }, { - "id": "tunnel-trunk-case", + "id": "tunnel-path", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "tunnel" ], [ "==", - "type", - "trunk" + [ + "get", + "class" + ], + "path" + ], + [ + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 5, - 0.75 - ], + 1, + 0 + ] + ], + 15, + [ + "literal", [ - 16, - 2 + 1.75, + 1 ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + ], + 16, + [ + "literal", [ - 5, + 1, 0.75 - ], + ] + ], + 17, + [ + "literal", [ - 18, - 32 + 1, + 0.5 ] ] - }, - "line-opacity": 1, - "line-dasharray": [ - 3, - 3 - ] + ], + "line-color": "hsl(185, 2%, 15%)" } }, { - "id": "tunnel-motorway-case", + "id": "tunnel-steps", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 14, "filter": [ "all", [ "==", - "class", - "motorway" + [ + "get", + "structure" + ], + "tunnel" ], [ "==", - "structure", - "tunnel" + [ + "get", + "class" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], + "line-color": "hsl(185, 2%, 15%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 5, - 0.75 - ], + 1, + 0 + ] + ], + 15, + [ + "literal", [ - 16, - 2 + 1.75, + 1 ] - ] - }, - "line-color": "hsl(185, 2%, 29%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + ], + 16, + [ + "literal", [ - 5, + 1, 0.75 - ], + ] + ], + 17, + [ + "literal", [ - 18, - 32 + 0.3, + 0.3 ] ] - }, - "line-opacity": 1, - "line-dasharray": [ - 3, - 3 ] } }, { - "id": "tunnel-construction", + "id": "tunnel-major-link", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "construction" + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false ], [ "==", - "structure", - "tunnel" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-join": "miter" + "line-cap": "round", + "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - }, - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 0.4, - 0.8 - ] - ], - [ - 15, - [ - 0.3, - 0.6 - ] - ], - [ - 16, - [ - 0.2, - 0.3 - ] - ], - [ - 17, - [ - 0.2, - 0.25 - ] - ], - [ - 18, - [ - 0.15, - 0.15 - ] - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": "hsl(185, 2%, 15%)" } }, { - "id": "tunnel-path", + "id": "tunnel-pedestrian", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!=", - "type", - "steps" + "==", + [ + "get", + "structure" + ], + "tunnel" ], [ "==", - "class", - "path" + [ + "get", + "class" + ], + "pedestrian" ], [ "==", - "structure", - "tunnel" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 15, - 1 - ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(185, 2%, 15%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 18, - 4 + 1, + 0 ] - ] - }, - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.75, - 1 - ] - ], - [ - 16, - [ - 1, - 0.75 - ] - ], + ], + 15, + [ + "literal", [ - 17, - [ - 1, - 0.5 - ] + 1.5, + 0.4 ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 14, - 0 - ], + ], + 16, + [ + "literal", [ - 14.25, - 1 + 1, + 0.2 ] ] - } + ] } }, { - "id": "tunnel-steps", + "id": "tunnel-street-minor", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "structure" + ], + "tunnel" ], [ - "all", + "step", [ - "==", - "structure", - "tunnel" + "zoom" ], [ - "==", - "type", - "steps" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "match", [ - 15, - 1 + "get", + "class" ], [ - 18, - 4 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] + "street", + "street_limited", + "track", + "primary_link" ], + true, + false + ], + 14, + [ + "match", [ - 15, - [ - 1.75, - 1 - ] + "get", + "class" ], [ - 16, - [ - 1, - 0.75 - ] + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" ], - [ - 17, - [ - 0.3, - 0.3 - ] - ] + true, + false ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 14, - 0 - ], - [ - 14.25, - 1 - ] - ] - } - } - }, - { - "id": "tunnel-trunk_link", - "metadata": { - "mapbox:group": "1444855769305.6016" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round" }, - "ref": "tunnel-trunk_link-case", - "interactive": true, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 12, - 0.5 + "get", + "class" ], [ - 14, - 2 + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": 1, - "line-dasharray": [ - 1, - 0 - ] - } - }, - { - "id": "tunnel-motorway_link", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-motorway_link-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 + "get", + "class" ], [ - 14, - 2 + "street", + "street_limited", + "primary_link" ], - [ - 18, - 18 - ] + 18, + 12 ] - }, + ], "line-color": "hsl(185, 2%, 15%)", - "line-opacity": 1, - "line-dasharray": [ - 1, - 0 + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 ] } }, { - "id": "tunnel-pedestrian", + "id": "tunnel-primary-secondary-tertiary", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" @@ -1875,269 +1736,126 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "structure" + ], + "tunnel" ], [ - "all", + "match", [ - "==", - "class", - "pedestrian" + "get", + "class" ], [ - "==", - "structure", - "tunnel" - ] + "primary", + "secondary", + "tertiary" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.5, - 0.4 - ] - ], - [ - 16, - [ - 1, - 0.2 - ] - ] - ] - } - } - }, - { - "id": "tunnel-service-link-track", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-service-link-track-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-dasharray": [ - 1, - 0 - ] - } - }, - { - "id": "tunnel-street_limited", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-street_limited-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "tunnel-street", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-street-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": { - "base": 1, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", [ - 13.99, - 0 + "get", + "class" ], + "primary", + 0.75, [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "tunnel-secondary-tertiary", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-secondary-tertiary-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 8.5, - 0.5 + "secondary", + "tertiary" ], + 0.1, + 0.1 + ], + 18, + [ + "match", [ - 10, - 0.75 + "get", + "class" ], + "primary", + 32, [ - 18, - 26 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": 1, - "line-dasharray": [ - 1, - 0 - ], - "line-blur": 0 - } - }, - { - "id": "tunnel-primary", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-primary-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 + "secondary", + "tertiary" ], - [ - 18, - 32 - ] + 26, + 26 ] - }, - "line-color": "hsl(185, 2%, 15%)", - "line-opacity": 1, - "line-dasharray": [ - 1, - 0 ], - "line-blur": 0 + "line-color": "hsl(185, 2%, 15%)" } }, { - "id": "tunnel-trunk", + "id": "tunnel-motorway-trunk", "type": "line", "metadata": { "mapbox:group": "1444855769305.6016" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "trunk" + [ + "get", + "structure" + ], + "tunnel" + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false ], [ "==", - "structure", - "tunnel" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2145,50 +1863,21 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-color": "hsl(185, 2%, 15%)" - } - }, - { - "id": "tunnel-motorway", - "metadata": { - "mapbox:group": "1444855769305.6016" - }, - "ref": "tunnel-motorway-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-dasharray": [ - 1, - 0 + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 ], - "line-opacity": 1, - "line-color": "hsl(185, 2%, 15%)", - "line-blur": 0 + "line-color": "hsl(185, 2%, 15%)" } }, { @@ -2200,167 +1889,127 @@ "source": "composite", "source-layer": "road", "minzoom": 12, - "interactive": true, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "class" + ], + "pedestrian" ], [ - "all", + "match", [ - "==", - "class", - "pedestrian" + "get", + "structure" ], [ - "==", - "structure", - "none" - ] + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 2 - ], - [ - 18, - 14.5 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": 0, - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.9, - 0 - ], - [ - 14, - 1 - ] - ] - } + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "road-street-low", + "id": "road-minor-low", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 11, - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "==", - "$type", - "LineString" - ], - [ - "all", + "step", [ - "==", - "class", - "street" + "zoom" ], [ "==", - "structure", - "none" - ] - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ [ - 12.5, - 0.5 + "get", + "class" ], + "track" + ], + 14, + [ + "match", [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "stops": [ - [ - 11, - 0 + "get", + "class" ], [ - 11.25, - 1 + "track", + "secondary_link", + "tertiary_link", + "service" ], - [ - 14, - 1 - ], - [ - 14.01, - 0 - ] + true, + false ] - } - } - }, - { - "id": "road-street_limited-low", - "type": "line", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "LineString" ], [ - "all", + "match", [ - "==", - "class", - "street_limited" + "get", + "structure" ], [ - "==", - "structure", - "none" - ] + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2368,253 +2017,180 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "stops": [ - [ - 11, - 0 - ], - [ - 11.25, - 1 - ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", [ - 14, - 1 + "get", + "class" ], - [ - 14.01, - 0 - ] - ] - } + "track", + 1, + 0.5 + ], + 18, + 12 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "road-service-link-track-case", + "id": "road-street-low", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, + "minzoom": 11, "filter": [ "all", [ - "!=", - "type", - "trunk_link" + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false ], [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ - "in", - "class", - "link", - "service", - "track" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.9, - 0 - ], - [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "road-street_limited-case", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-street_limited-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 13, - 0 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.9, - 0 - ], - [ - 14, - 1 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "road-street-case", + "id": "road-minor-case", + "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, - "ref": "road-street-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + "source": "composite", + "source-layer": "road", + "minzoom": 13, + "filter": [ + "all", + [ + "step", + [ + "zoom" + ], + [ + "==", [ - 13, - 0 + "get", + "class" ], + "track" + ], + 14, + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.9, - 0 + "track", + "secondary_link", + "tertiary_link", + "service" ], - [ - 14, - 1 - ] + true, + false ] - } - } - }, - { - "id": "road-main-case", - "type": "line", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "source": "composite", - "source-layer": "road", - "interactive": true, - "filter": [ - "all", + ], [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ - "in", - "class", - "secondary", - "tertiary" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2622,81 +2198,99 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.2, - "stops": [ - [ - 10, - 0.75 - ], - [ - 18, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 8.5, - 0.5 - ], - [ - 10, - 0.75 - ], - [ - 18, - 26 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 6, - 0 - ], - [ - 7, - 0.4 - ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", [ - 9, - 0.5 + "get", + "class" ], - [ - 10, - 1 - ] - ] - } + "track", + 1, + 0.5 + ], + 18, + 12 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "road-primary-case", + "id": "road-street-case", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 11, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "class", - "primary" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2704,78 +2298,90 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 16, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 6, - 0 - ], - [ - 7, - 0.4 - ], - [ - 9, - 0.5 - ], - [ - 10, - 1 - ] - ] - } + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "road-motorway_link-case", + "id": "road-secondary-tertiary-case", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 10, - "interactive": true, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "class", - "motorway_link" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2783,82 +2389,74 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 0.75, + 18, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 6, - 0 - ], - [ - 7, - 0.4 - ], - [ - 9, - 0.5 - ], - [ - 10, - 1 - ] - ] - } + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.1, + 18, + 26 + ] } }, { - "id": "road-trunk_link-case", + "id": "road-primary-case", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 11, - "interactive": true, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "==", + [ + "get", + "class" + ], + "primary" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "type", - "trunk_link" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2866,82 +2464,80 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 6, - 0 - ], - [ - 7, - 0.4 - ], - [ - 9, - 0.5 - ], - [ - 10, - 1 - ] - ] - } + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ] } }, { - "id": "road-trunk-case", + "id": "road-major-link-case", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 5, - "interactive": true, + "minzoom": 10, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "class", - "trunk" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -2949,77 +2545,90 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 7, - 0.5 - ], - [ - 10, - 1 - ], - [ - 16, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.5 - ], - [ - 9, - 1.4 - ], - [ - 18, - 32 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 6, - 0 - ], - [ - 6.1, - 1 - ] - ] - } + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 11, + 1 + ] } }, { - "id": "road-motorway-case", + "id": "road-motorway-trunk-case", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "interactive": true, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "class", - "motorway" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -3027,38 +2636,53 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 7, - 0.5 - ], - [ - 10, - 1 - ], - [ - 16, - 2 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 5, - 0.75 + "get", + "class" ], - [ - 18, - 32 - ] - ] - }, - "line-opacity": 1 + "motorway", + 1, + 0 + ], + 6, + 1 + ] } }, { @@ -3070,306 +2694,233 @@ "source": "composite", "source-layer": "road", "minzoom": 14, - "interactive": true, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "class" + ], + "construction" ], [ - "all", + "match", [ - "==", - "class", - "construction" + "get", + "structure" ], [ - "==", - "structure", - "none" - ] + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], - "layout": { - "line-join": "miter" - }, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 14, - 1 + 0.4, + 0.8 ] - ] - }, - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 0.4, - 0.8 - ] - ], + ], + 15, + [ + "literal", [ - 15, - [ - 0.3, - 0.6 - ] - ], + 0.3, + 0.6 + ] + ], + 16, + [ + "literal", [ - 16, - [ - 0.2, - 0.3 - ] - ], + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", [ - 17, - [ - 0.2, - 0.25 - ] - ], + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", [ - 18, - [ - 0.15, - 0.15 - ] + 0.15, + 0.15 ] ] - } + ] } }, { - "id": "road-sidewalks", + "id": "road-path", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 16, - "interactive": true, + "minzoom": 12, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "class" + ], + "path" ], [ - "all", + "step", [ - "!in", - "structure", - "bridge", - "tunnel" + "zoom" ], [ - "in", - "type", - "crossing", - "sidewalk" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 15, - 1 - ], + "!", [ - 18, - 4 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, + "match", [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.75, - 1 - ] - ], - [ - 16, + "get", + "type" + ], [ - 1, - 0.75 - ] - ], - [ - 17, - [ - 1, - 0.5 - ] + "steps", + "sidewalk", + "crossing" + ], + true, + false ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ + ], + 16, + [ + "!=", [ - 16, - 0 + "get", + "type" ], - [ - 16.25, - 1 - ] + "steps" ] - } - } - }, - { - "id": "road-path", - "type": "line", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "source": "composite", - "source-layer": "road", - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "LineString" ], [ - "all", + "match", [ - "!in", - "structure", - "bridge", - "tunnel" + "get", + "structure" ], [ - "!in", - "type", - "crossing", - "sidewalk", - "steps" + "none", + "ford" ], + true, + false + ], + [ + "==", [ - "==", - "class", - "path" - ] + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 15, - 1 - ], - [ - 18, - 4 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 13, + 0.5, + 14, + 1, + 15, + 1, + 18, + 4 + ], "line-color": "hsl(0, 0%, 27%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.75, - 1 - ] - ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 16, - [ - 1, - 0.75 - ] - ], + 1, + 0 + ] + ], + 15, + [ + "literal", [ - 17, - [ - 1, - 0.5 - ] + 1.75, + 1 ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ + ], + 16, + [ + "literal", [ - 14, - 0 - ], + 1, + 0.75 + ] + ], + 17, + [ + "literal", [ - 14.25, - 1 + 1, + 0.5 ] ] - } + ] } }, { @@ -3380,233 +2931,141 @@ }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 14, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "type" + ], + "steps" ], [ - "all", + "match", [ - "!in", - "structure", - "bridge", - "tunnel" + "get", + "structure" ], [ - "==", - "type", - "steps" - ] + "none", + "ford" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 15, - 1 - ], - [ - 18, - 4 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], "line-color": "hsl(0, 0%, 27%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.75, - 1 - ] - ], - [ - 16, - [ - 1, - 0.75 - ] - ], - [ - 17, - [ - 0.3, - 0.3 - ] - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 14, + 1, 0 - ], - [ - 14.25, - 1 - ] - ] - } - } - }, - { - "id": "road-trunk_link", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-trunk_link-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1 - } - }, - { - "id": "road-motorway_link", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-motorway_link-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], + ], + 15, + [ + "literal", [ - 18, - 18 + 1.75, + 1 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1 - } - }, - { - "id": "road-pedestrian", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-pedestrian-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], + ], + 16, + [ + "literal", [ - 18, - 12 + 1, + 0.75 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.5, - 0.4 - ] - ], + ], + 17, + [ + "literal", [ - 16, - [ - 1, - 0.2 - ] + 0.3, + 0.3 ] ] - } + ] } }, { - "id": "road-service-link-track", + "id": "road-major-link", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, + "minzoom": 10, "filter": [ "all", [ - "!=", - "type", - "trunk_link" + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false ], [ - "!in", - "structure", - "bridge", - "tunnel" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ - "in", - "class", - "link", - "service", - "track" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -3614,367 +3073,175 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "road-street_limited", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-street_limited-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "road-street", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-street-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - } - } - }, - { - "id": "road-secondary-tertiary", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-main-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 8.5, - 0.5 - ], - [ - 10, - 0.75 - ], - [ - 18, - 26 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1.2, - "stops": [ - [ - 5, - 0 - ], - [ - 5.5, - 1 - ] - ] - } - } - }, - { - "id": "road-primary", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-primary-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1.2, - "stops": [ - [ - 5, - 0 - ], - [ - 5.5, - 1 - ] - ] - } - } - }, - { - "id": "road-trunk", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-trunk-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.5 - ], - [ - 9, - 1.4 - ], - [ - 18, - 32 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1 - } - }, - { - "id": "road-motorway", - "metadata": { - "mapbox:group": "1444855786460.0557" - }, - "ref": "road-motorway-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1 - } - }, - { - "id": "road-rail", + "id": "road-pedestrian", "type": "line", "metadata": { "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 13, - "interactive": true, + "minzoom": 12, "filter": [ "all", [ - "!in", - "structure", - "bridge", - "tunnel" + "==", + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ - "in", - "class", - "major_rail", - "minor_rail" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-color": "hsl(0, 0%, 17%)", - "line-width": { - "base": 1, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(0, 0%, 27%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 14, - 0.75 - ], + 1, + 0 + ] + ], + 15, + [ + "literal", [ - 20, - 1 + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 ] ] - } + ] } }, { - "id": "bridge-pedestrian-case", + "id": "road-minor", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ - "==", - "$type", - "LineString" - ], - [ - "all", + "step", [ - "==", - "class", - "pedestrian" + "zoom" ], [ "==", - "structure", - "bridge" - ] - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ [ - 14, - 2 + "get", + "class" ], + "track" + ], + 14, + [ + "match", [ - 18, - 14.5 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": 0, - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 + "get", + "class" ], [ - 14, - 1 - ] + "track", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false ] - } - } - }, - { - "id": "bridge-street-low", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 11, - "interactive": true, - "filter": [ - "all", + ], [ - "==", - "class", - "street" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -3982,67 +3249,85 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + [ + "match", [ - 14, - 2 + "get", + "class" ], - [ - 18, - 18 - ] - ] - }, + "track", + 1, + 0.5 + ], + 18, + 12 + ], "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "stops": [ - [ - 11.5, - 0 - ], - [ - 12, - 1 - ], - [ - 14, - 1 - ], - [ - 14.01, - 0 - ] - ] - } + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-street_limited-low", + "id": "road-street", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", "minzoom": 11, - "interactive": true, "filter": [ "all", [ - "==", - "class", - "street_limited" + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "primary_link" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -4050,367 +3335,353 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "stops": [ - [ - 11.5, - 0 - ], - [ - 12, - 1 - ], - [ - 14, - 1 - ], - [ - 14.01, - 0 - ] - ] - } + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-service-link-track-case", + "id": "road-secondary-tertiary", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, "filter": [ "all", [ - "!=", - "type", - "trunk_link" + "match", + [ + "get", + "class" + ], + [ + "secondary", + "tertiary" + ], + true, + false ], [ - "==", - "structure", - "bridge" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ - "in", - "class", - "link", - "service", - "track" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.1, + 18, + 26 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-street_limited-case", + "id": "road-primary", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 11, - "interactive": true, "filter": [ "all", [ "==", - "class", - "street_limited" + [ + "get", + "class" + ], + "primary" + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 13, - 0 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-street-case", + "id": "road-motorway-trunk", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "minzoom": 11, - "interactive": true, "filter": [ "all", [ - "==", - "class", - "street" + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.75 - ], - [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - }, - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 13, - 0 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-secondary-tertiary-case", + "id": "road-rail", "type": "line", "metadata": { - "mapbox:group": "1444855799204.86" + "mapbox:group": "1444855786460.0557" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "==", - "structure", - "bridge" + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false ], [ - "in", - "class", - "secondary", - "tertiary" + "match", + [ + "get", + "structure" + ], + [ + "none", + "ford" + ], + true, + false ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.2, - "stops": [ - [ - 10, - 0.75 - ], - [ - 18, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 8.5, - 0.5 - ], - [ - 10, - 0.75 - ], - [ - 18, - 26 - ] - ] - }, - "line-translate": [ - 0, - 0 - ] + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-primary-case", + "id": "bridge-pedestrian-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "primary" + [ + "get", + "structure" + ], + "bridge" ], [ "==", - "structure", - "bridge" + [ + "get", + "class" + ], + "pedestrian" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 16, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, - "line-translate": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 14.5 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], 0, - 0 - ] + 14, + 1 + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-trunk_link-case", + "id": "bridge-street-minor-low", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -4418,541 +3689,480 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ - "==", - "type", - "trunk_link" - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 12, - 0.75 + "get", + "class" ], [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 + "street", + "street_limited", + "track", + "primary_link" ], + true, + false + ], + 14, + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 10.99, - 0 + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" ], - [ - 11, - 1 - ] + true, + false ] - } - } - }, - { - "id": "bridge-motorway_link-case", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 13, - "interactive": true, - "filter": [ - "all", - [ - "<=", - "layer", - 1 ], [ "==", - "class", - "motorway_link" - ], - [ - "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 12, - 0.75 + "get", + "class" ], [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] + "street", + "street_limited", + "primary_link" + ], + 18, + 12 ] - }, - "line-opacity": 1 - } - }, - { - "id": "bridge-trunk-case", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "interactive": true, - "filter": [ - "all", - [ - "==", - "class", - "trunk" ], - [ - "==", - "structure", - "bridge" + "line-color": "hsl(0, 0%, 27%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 1, + 14, + 0 ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 10, - 1 - ], - [ - 16, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - } } }, { - "id": "bridge-motorway-case", + "id": "bridge-street-minor-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "motorway" + [ + "get", + "structure" + ], + "bridge" ], [ - "==", - "structure", - "bridge" - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 7, - 0.5 + "get", + "class" ], [ - 10, - 1 + "street", + "street_limited", + "track", + "primary_link" ], + true, + false + ], + 14, + [ + "match", [ - 16, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 + "get", + "class" ], [ - 18, - 32 - ] + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false ] - } - } - }, - { - "id": "bridge-construction", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "==", - "class", - "construction" ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-join": "miter" + "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], - [ - 14, - 1 - ] - ] - }, - "line-dasharray": { - "base": 1, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 14, - [ - 0.4, - 0.8 - ] + "get", + "class" ], [ - 15, - [ - 0.3, - 0.6 - ] + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 16, - [ - 0.2, - 0.3 - ] + "get", + "class" ], [ - 17, - [ - 0.2, - 0.25 - ] + "street", + "street_limited", + "primary_link" ], - [ - 18, - [ - 0.15, - 0.15 - ] - ] + 18, + 12 ] - } + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-path", + "id": "bridge-primary-secondary-tertiary-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!=", - "type", - "steps" + "==", + [ + "get", + "structure" + ], + "bridge" ], [ - "==", - "class", - "path" + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + [ + "match", [ - 15, - 1 + "get", + "class" ], + "primary", + 1, [ - 18, - 4 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] + "secondary", + "tertiary" ], + 0.75, + 0.75 + ], + 18, + 2 + ], + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 10, + 1 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", [ - 15, - [ - 1.75, - 1 - ] + "get", + "class" ], + "primary", + 0.75, [ - 16, - [ - 1, - 0.75 - ] + "secondary", + "tertiary" ], + 0.1, + 0.1 + ], + 18, + [ + "match", [ - 17, - [ - 1, - 0.5 - ] - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 14, - 0 + "get", + "class" ], + "primary", + 32, [ - 14.25, - 1 - ] + "secondary", + "tertiary" + ], + 26, + 26 ] - } + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-steps", + "id": "bridge-major-link-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "$type", - "LineString" + [ + "get", + "structure" + ], + "bridge" ], [ - "all", + "match", [ - "==", - "structure", - "bridge" + "get", + "class" ], [ - "==", - "type", - "steps" - ] + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 15, - 1 - ], - [ - 18, - 4 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-dasharray": { - "base": 1, - "stops": [ - [ - 14, - [ - 1, - 0 - ] - ], - [ - 15, - [ - 1.75, - 1 - ] - ], - [ - 16, - [ - 1, - 0.75 - ] - ], - [ - 17, - [ - 0.3, - 0.3 - ] - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 14, - 0 - ], - [ - 14.25, - 1 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-trunk_link", + "id": "bridge-motorway-trunk-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -4960,438 +4170,421 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ - "!in", - "layer", - 2, - 3, - 4, - 5 - ], - [ "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ "==", - "type", - "trunk_link" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-motorway_link", + "id": "bridge-construction", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "minzoom": 13, - "interactive": true, + "minzoom": 14, "filter": [ "all", [ - "!in", - "layer", - 2, - 3, - 4, - 5 + "==", + [ + "get", + "structure" + ], + "bridge" ], [ "==", - "class", - "motorway_link" + [ + "get", + "class" + ], + "construction" ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, + "layout": {}, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 2, + 18, + 18 + ], + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 18, - 18 + 0.4, + 0.8 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)" - } - }, - { - "id": "bridge-pedestrian", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "ref": "bridge-pedestrian-case", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], + ], + 15, + [ + "literal", [ - 18, - 12 + 0.3, + 0.6 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": 1, - "line-dasharray": { - "base": 1, - "stops": [ + ], + 16, + [ + "literal", [ - 14, - [ - 1, - 0 - ] - ], + 0.2, + 0.3 + ] + ], + 17, + [ + "literal", [ - 15, - [ - 1.5, - 0.4 - ] - ], + 0.2, + 0.25 + ] + ], + 18, + [ + "literal", [ - 16, - [ - 1, - 0.2 - ] + 0.15, + 0.15 ] ] - } + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-service-link-track", + "id": "bridge-path", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "minzoom": 14, - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!=", - "type", - "trunk_link" + "==", + [ + "get", + "structure" + ], + "bridge" ], [ "==", - "structure", - "bridge" + [ + "get", + "class" + ], + "path" ], [ - "in", - "class", - "link", - "service", - "track" + "!=", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 14, - 0.5 - ], - [ - 18, - 12 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)" - } - }, - { - "id": "bridge-street_limited", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "ref": "bridge-street_limited-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 18, + 4 + ], "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 13.99, + 1, 0 - ], + ] + ], + 15, + [ + "literal", [ - 14, + 1.75, 1 ] - ] - } - } - }, - { - "id": "bridge-street", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "ref": "bridge-street-low", - "interactive": true, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12.5, - 0.5 - ], - [ - 14, - 2 - ], + ], + 16, + [ + "literal", [ - 18, - 18 + 1, + 0.75 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 13.99, - 0 - ], + ], + 17, + [ + "literal", [ - 14, - 1 + 1, + 0.5 ] ] - } + ] } }, { - "id": "bridge-secondary-tertiary", + "id": "bridge-steps", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 14, "filter": [ "all", [ "==", - "structure", + [ + "get", + "type" + ], + "steps" + ], + [ + "==", + [ + "get", + "structure" + ], "bridge" ], [ - "in", - "type", - "secondary", - "tertiary" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 8.5, - 0.5 - ], - [ - 10, - 0.75 - ], - [ - 18, - 26 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 15, + 1, + 16, + 1.6, + 18, + 6 + ], "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1.2, - "stops": [ + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 5, + 1, 0 - ], + ] + ], + 15, + [ + "literal", [ - 5.5, + 1.75, 1 ] - ] - } - } - }, - { - "id": "bridge-primary", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "interactive": true, - "filter": [ - "all", - [ - "==", - "structure", - "bridge" - ], - [ - "==", - "type", - "primary" - ] - ], - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-width": { - "base": 1.5, - "stops": [ + ], + 16, + [ + "literal", [ - 5, + 1, 0.75 - ], - [ - 18, - 32 ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-opacity": { - "base": 1.2, - "stops": [ - [ - 5, - 0 - ], + ], + 17, + [ + "literal", [ - 5.5, - 1 + 0.3, + 0.3 ] ] - } + ] } }, { - "id": "bridge-trunk", + "id": "bridge-major-link", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!in", - "layer", - 2, - 3, - 4, - 5 + "==", + [ + "get", + "structure" + ], + "bridge" ], [ - "==", - "class", - "trunk" + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "<=", + [ + "get", + "layer" + ], + 1 ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -5399,75 +4592,112 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-motorway", + "id": "bridge-pedestrian", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ - "!in", - "layer", - 2, - 3, - 4, - 5 + "==", + [ + "get", + "structure" + ], + "bridge" ], [ "==", - "class", - "motorway" + [ + "get", + "class" + ], + "pedestrian" ], [ "==", - "structure", - "bridge" + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 18, + 12 + ], + "line-color": "hsl(0, 0%, 27%)", + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ - 5, - 0.75 - ], + 1, + 0 + ] + ], + 15, + [ + "literal", [ - 18, - 32 + 1.5, + 0.4 + ] + ], + 16, + [ + "literal", + [ + 1, + 0.2 ] ] - }, - "line-color": "hsl(0, 0%, 27%)" + ] } }, { - "id": "bridge-rail", + "id": "bridge-street-minor", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -5475,121 +4705,127 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ - "in", - "class", - "major_rail", - "minor_rail" - ] - ], - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "hsl(0, 0%, 17%)", - "line-width": { - "base": 1, - "stops": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 14, - 0.75 + "get", + "class" ], [ - 20, - 1 - ] + "street", + "street_limited", + "track", + "primary_link" + ], + true, + false + ], + 14, + [ + "match", + [ + "get", + "class" + ], + [ + "street", + "street_limited", + "track", + "primary_link", + "secondary_link", + "tertiary_link", + "service" + ], + true, + false ] - } - } - }, - { - "id": "bridge-trunk_link-2-case", - "type": "line", - "metadata": { - "mapbox:group": "1444855799204.86" - }, - "source": "composite", - "source-layer": "road", - "minzoom": 13, - "interactive": true, - "filter": [ - "all", - [ - "==", - "structure", - "bridge" ], [ "==", - "type", - "trunk_link" - ], - [ - ">=", - "layer", - 2 + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + [ + "match", [ - 12, - 0.75 + "get", + "class" ], [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 + "street", + "street_limited", + "primary_link" ], + 2, + "track", + 1, + 0.5 + ], + 18, + [ + "match", [ - 14, - 2 + "get", + "class" ], [ - 18, - 18 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 10.99, - 0 + "street", + "street_limited", + "primary_link" ], - [ - 11, - 1 - ] + 18, + 12 ] - } + ], + "line-color": "hsl(0, 0%, 27%)", + "line-opacity": [ + "step", + [ + "zoom" + ], + 0, + 14, + 1 + ] } }, { - "id": "bridge-motorway_link-2-case", + "id": "bridge-primary-secondary-tertiary", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -5597,189 +4833,214 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "class", - "motorway_link" + [ + "get", + "structure" + ], + "bridge" ], [ - "==", - "structure", - "bridge" + "match", + [ + "get", + "class" + ], + [ + "primary", + "secondary", + "tertiary" + ], + true, + false ], [ - ">=", - "layer", - 2 + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + [ + "match", [ - 12, - 0.75 + "get", + "class" ], + "primary", + 0.75, [ - 20, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 + "secondary", + "tertiary" ], + 0.1, + 0.1 + ], + 18, + [ + "match", [ - 14, - 2 + "get", + "class" ], + "primary", + 32, [ - 18, - 18 - ] + "secondary", + "tertiary" + ], + 26, + 26 ] - }, - "line-opacity": 1 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-trunk-2-case", + "id": "bridge-motorway-trunk", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "trunk" + [ + "get", + "structure" + ], + "bridge" ], [ - "==", - "structure", - "bridge" + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false ], [ - ">=", - "layer", - 2 + "<=", + [ + "get", + "layer" + ], + 1 + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { + "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 10, - 1 - ], - [ - 16, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], + "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-motorway-2-case", + "id": "bridge-rail", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "motorway" - ], - [ - "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ - ">=", - "layer", - 2 + "match", + [ + "get", + "class" + ], + [ + "major_rail", + "minor_rail" + ], + true, + false ] ], "layout": { "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 7, - 0.5 - ], - [ - 10, - 1 - ], - [ - 16, - 2 - ] - ] - }, - "line-color": "hsl(0, 0%, 17%)", - "line-gap-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - } + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 14, + 0.5, + 20, + 1 + ], + "line-color": "hsl(0, 0%, 17%)" } }, { - "id": "bridge-trunk_link-2", + "id": "bridge-major-link-2-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -5787,52 +5048,84 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ - "==", - "type", - "trunk_link" - ], - [ ">=", - "layer", + [ + "get", + "layer" + ], 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.75, + 20, + 2 + ], + "line-color": "hsl(0, 0%, 17%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ] } }, { - "id": "bridge-motorway_link-2", + "id": "bridge-motorway-trunk-2-case", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" @@ -5840,75 +5133,126 @@ "source": "composite", "source-layer": "road", "minzoom": 13, - "interactive": true, "filter": [ "all", [ "==", - "class", - "motorway_link" - ], - [ - "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ ">=", - "layer", + [ + "get", + "layer" + ], 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "line-cap": "round", "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 12, - 0.5 - ], - [ - 14, - 2 - ], - [ - 18, - 18 - ] - ] - }, - "line-color": "hsl(0, 0%, 27%)" + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 10, + 1, + 18, + 2 + ], + "line-color": "hsl(0, 0%, 17%)", + "line-gap-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ] } }, { - "id": "bridge-trunk-2", + "id": "bridge-major-link-2", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "trunk" - ], - [ - "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ ">=", - "layer", + [ + "get", + "layer" + ], 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway_link", + "trunk_link" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -5916,47 +5260,71 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 12, + 0.5, + 14, + 2, + 18, + 18 + ], "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "bridge-motorway-2", + "id": "bridge-motorway-trunk-2", "type": "line", "metadata": { "mapbox:group": "1444855799204.86" }, "source": "composite", "source-layer": "road", - "interactive": true, + "minzoom": 13, "filter": [ "all", [ "==", - "class", - "motorway" - ], - [ - "==", - "structure", + [ + "get", + "structure" + ], "bridge" ], [ ">=", - "layer", + [ + "get", + "layer" + ], 2 + ], + [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { @@ -5964,75 +5332,106 @@ "line-join": "round" }, "paint": { - "line-width": { - "base": 1.5, - "stops": [ - [ - 5, - 0.75 - ], - [ - 18, - 32 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "exponential", + 1.5 + ], + [ + "zoom" + ], + 5, + 0.75, + 18, + 32 + ], "line-color": "hsl(0, 0%, 27%)" } }, { - "id": "admin-3-4-boundaries-bg", + "id": "admin-1-boundary-bg", "type": "line", "metadata": { "mapbox:group": "1444934295202.7542" }, "source": "composite", "source-layer": "admin", - "interactive": true, "filter": [ "all", [ "==", - "maritime", - 0 + [ + "get", + "admin_level" + ], + 1 ], [ - ">=", - "admin_level", - 3 + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false ] ], "layout": { "line-join": "bevel" }, "paint": { - "line-color": "hsl(0, 0%, 10%)", - "line-width": { - "base": 1, - "stops": [ - [ - 3, - 3.5 - ], - [ - 10, - 8 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ - [ - 4, - 0 - ], - [ - 6, - 0.75 - ] - ] - }, + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 8, + 3 + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 3.75, + 12, + 5.5 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0, + 8, + 0.75 + ], "line-dasharray": [ 1, 0 @@ -6041,23 +5440,11 @@ 0, 0 ], - "line-blur": { - "base": 1, - "stops": [ - [ - 3, - 0 - ], - [ - 8, - 3 - ] - ] - } + "line-color": "hsl(0, 0%, 10%)" } }, { - "id": "admin-2-boundaries-bg", + "id": "admin-0-boundary-bg", "type": "line", "metadata": { "mapbox:group": "1444934295202.7542" @@ -6065,90 +5452,124 @@ "source": "composite", "source-layer": "admin", "minzoom": 1, - "interactive": true, "filter": [ "all", [ "==", - "admin_level", - 2 + [ + "get", + "admin_level" + ], + 0 ], [ "==", - "maritime", - 0 + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false ] ], - "layout": { - "line-join": "miter" - }, + "layout": {}, "paint": { - "line-width": { - "base": 1, - "stops": [ - [ - 3, - 3.5 - ], - [ - 10, - 10 - ] - ] - }, + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 3.5, + 10, + 8 + ], "line-color": "hsl(0, 0%, 10%)", - "line-opacity": { - "base": 1, - "stops": [ - [ - 3, - 0 - ], - [ - 4, - 0.5 - ] - ] - }, + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 4, + 0.5 + ], "line-translate": [ 0, 0 ], - "line-blur": { - "base": 1, - "stops": [ - [ - 3, - 0 - ], - [ - 10, - 2 - ] - ] - } + "line-blur": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0, + 10, + 2 + ] } }, { - "id": "admin-3-4-boundaries", + "id": "admin-1-boundary", "type": "line", "metadata": { "mapbox:group": "1444934295202.7542" }, "source": "composite", "source-layer": "admin", - "interactive": true, "filter": [ "all", [ "==", - "maritime", - 0 + [ + "get", + "admin_level" + ], + 1 ], [ - ">=", - "admin_level", - 3 + "==", + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false ] ], "layout": { @@ -6156,70 +5577,72 @@ "line-cap": "round" }, "paint": { - "line-dasharray": { - "base": 1, - "stops": [ - [ - 6, - [ - 2, - 0 - ] - ], - [ - 7, - [ - 2, - 2, - 6, - 2 - ] - ] - ] - }, - "line-width": { - "base": 1, - "stops": [ - [ - 7, - 0.75 - ], - [ - 12, - 1.5 - ] - ] - }, - "line-opacity": { - "base": 1, - "stops": [ + "line-dasharray": [ + "step", + [ + "zoom" + ], + [ + "literal", [ 2, 0 - ], - [ - 3, - 1 ] - ] - }, - "line-color": { - "base": 1, - "stops": [ - [ - 4, - "hsl(0, 0%, 27%)" - ], + ], + 7, + [ + "literal", [ - 5, - "hsl(0, 0%, 35%)" + 2, + 2, + 6, + 2 ] ] - } + ], + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + 0.75, + 12, + 1.5 + ], + "line-opacity": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + 0, + 3, + 1 + ], + "line-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + "hsl(0, 0%, 27%)", + 7, + "hsl(0, 0%, 35%)" + ] } }, { - "id": "admin-2-boundaries", + "id": "admin-0-boundary", "type": "line", "metadata": { "mapbox:group": "1444934295202.7542" @@ -6227,23 +5650,44 @@ "source": "composite", "source-layer": "admin", "minzoom": 1, - "interactive": true, "filter": [ "all", [ "==", - "admin_level", - 2 + [ + "get", + "admin_level" + ], + 0 ], [ "==", - "disputed", - 0 + [ + "get", + "disputed" + ], + "false" ], [ "==", - "maritime", - 0 + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false ] ], "layout": { @@ -6252,23 +5696,23 @@ }, "paint": { "line-color": "hsl(0, 0%, 43%)", - "line-width": { - "base": 1, - "stops": [ - [ - 3, - 0.5 - ], - [ - 10, - 2 - ] - ] - } + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 10, + 2 + ] } }, { - "id": "admin-2-boundaries-dispute", + "id": "admin-0-boundary-disputed", "type": "line", "metadata": { "mapbox:group": "1444934295202.7542" @@ -6276,23 +5720,44 @@ "source": "composite", "source-layer": "admin", "minzoom": 1, - "interactive": true, "filter": [ "all", [ "==", - "admin_level", - 2 + [ + "get", + "disputed" + ], + "true" ], [ "==", - "disputed", - 1 + [ + "get", + "admin_level" + ], + 0 ], [ "==", - "maritime", - 0 + [ + "get", + "maritime" + ], + "false" + ], + [ + "match", + [ + "get", + "worldview" + ], + [ + "all", + "US" + ], + true, + false ] ], "layout": { @@ -6304,259 +5769,151 @@ 1.5 ], "line-color": "hsl(0, 0%, 14%)", - "line-width": { - "base": 1, - "stops": [ - [ - 3, - 0.5 - ], - [ - 10, - 2 - ] - ] - } - } - }, - { - "id": "waterway-label", - "type": "symbol", - "source": "composite", - "source-layer": "waterway_label", - "minzoom": 12, - "interactive": true, - "filter": [ - "in", - "class", - "canal", - "river" - ], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "symbol-placement": "line", - "text-max-angle": 30, - "text-size": { - "base": 1, - "stops": [ - [ - 13, - 12 - ], - [ - 18, - 16 - ] - ] - } - }, - "paint": { - "text-halo-width": 0, - "text-halo-blur": 0, - "text-color": "hsl(0, 0%, 32%)" + "line-width": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 3, + 0.5, + 10, + 2 + ] } }, { - "id": "poi-scalerank3", + "id": "road-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933372896.5967" - }, "source": "composite", - "source-layer": "poi_label", - "interactive": true, + "source-layer": "road", + "minzoom": 10, "filter": [ - "all", + "step", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "zoom" ], [ - "==", - "scalerank", - 3 - ] - ], - "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ - [ - 16, - 11 - ], - [ - 20, - 13 - ] - ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ], - "text-padding": 1, - "text-offset": [ - 0, - 0 + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + true, + false ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-color": "hsl(0, 0%, 60%)", - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "poi-parks-scalerank3", - "type": "symbol", - "metadata": { - "mapbox:group": "1444933372896.5967" - }, - "source": "composite", - "source-layer": "poi_label", - "interactive": true, - "filter": [ - "all", + 12, [ - "==", - "scalerank", - 3 + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "pedestrian", + "street", + "street_limited" + ], + true, + false ], + 15, [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "match", + [ + "get", + "class" + ], + [ + "ferry", + "golf", + "path" + ], + false, + true ] ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + [ + "match", [ - 16, - 11 + "get", + "class" ], [ - 20, - 12 - ] - ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ], - "text-padding": 2, - "text-offset": [ - 0, - 0 - ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 0, - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-color": { - "base": 1, - "stops": [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" + ], + 10, [ - 7, - "hsl(0, 0%, 47%)" + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "pedestrian", + "street", + "street_limited" ], + 9, + 6.5 + ], + 18, + [ + "match", [ - 9, - "hsl(0, 0%, 73%)" - ] - ] - } - } - }, - { - "id": "road-label-small", - "type": "symbol", - "metadata": { - "mapbox:group": "1444933721429.3076" - }, - "source": "composite", - "source-layer": "road_label", - "minzoom": 15, - "interactive": true, - "filter": [ - "all", - [ - "!in", - "class", - "", - "ferry", - "link", - "motorway", - "path", - "pedestrian", - "primary", - "secondary", - "street", - "street_limited", - "tertiary", - "track", - "trunk" - ], - [ - "==", - "$type", - "LineString" - ] - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ + "get", + "class" + ], [ - 15, - 10 + "motorway", + "trunk", + "primary", + "secondary", + "tertiary" ], + 16, [ - 20, - 13 - ] + "motorway_link", + "trunk_link", + "primary_link", + "secondary_link", + "tertiary_link", + "pedestrian", + "street", + "street_limited" + ], + 14, + 13 ] - }, + ], "text-max-angle": 30, - "symbol-spacing": 500, "text-font": [ "DIN Offc Pro Regular", "Arial Unicode MS Regular" @@ -6564,459 +5921,658 @@ "symbol-placement": "line", "text-padding": 1, "text-rotation-alignment": "map", - "text-field": "{name_en}", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ], "text-letter-spacing": 0.01 }, "paint": { "text-color": "hsl(0, 0%, 78%)", - "text-halo-color": "#212121", - "text-halo-width": 1.25, - "text-halo-blur": 0 + "text-halo-color": [ + "match", + [ + "get", + "class" + ], + [ + "motorway", + "trunk" + ], + "hsla(0, 0%, 13%, 0.75)", + "hsl(0, 0%, 13%)" + ], + "text-halo-width": 1, + "text-halo-blur": 1 } }, { - "id": "road-label-medium", + "id": "waterway-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933721429.3076" - }, "source": "composite", - "source-layer": "road_label", + "source-layer": "natural_label", "minzoom": 13, - "interactive": true, "filter": [ "all", [ - "==", - "$type", - "LineString" + "match", + [ + "get", + "class" + ], + [ + "canal", + "river", + "stream" + ], + true, + false ], [ - "in", - "class", - "", - "link", - "pedestrian", - "street", - "street_limited" + "==", + [ + "geometry-type" + ], + "LineString" ] ], "layout": { - "text-size": { - "base": 1, - "stops": [ - [ - 11, - 10 - ], - [ - 20, - 14 - ] - ] - }, - "text-max-angle": 30, - "symbol-spacing": 500, "text-font": [ - "DIN Offc Pro Regular", + "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], - "symbol-placement": "line", - "text-padding": 1, - "text-rotation-alignment": "map", - "text-field": "{name_en}", - "text-letter-spacing": 0.01 - }, - "paint": { - "text-color": "hsl(0, 0%, 78%)", - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "road-label-large", - "type": "symbol", - "metadata": { - "mapbox:group": "1444933721429.3076" - }, - "source": "composite", - "source-layer": "road_label", - "minzoom": 12, - "interactive": true, - "filter": [ - "in", - "class", - "motorway", - "primary", - "secondary", - "tertiary", - "trunk" - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ - [ - 9, - 10 - ], - [ - 20, - 16 - ] - ] - }, "text-max-angle": 30, - "symbol-spacing": 400, - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "symbol-spacing": [ + "interpolate", + [ + "linear", + 1 + ], + [ + "zoom" + ], + 15, + 250, + 17, + 400 + ], + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 12, + 18, + 16 ], "symbol-placement": "line", - "text-padding": 1, - "text-rotation-alignment": "map", - "text-field": "{name_en}", - "text-letter-spacing": 0.01 + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": "hsl(0, 0%, 78%)", - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 + "text-color": "hsl(0, 0%, 45%)" } }, { - "id": "poi-scalerank2", + "id": "natural-line-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933358918.2366" - }, "source": "composite", - "source-layer": "poi_label", - "interactive": true, + "source-layer": "natural_label", + "minzoom": 4, "filter": [ "all", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "match", + [ + "get", + "class" + ], + [ + "glacier", + "landform" + ], + true, + false ], [ "==", - "scalerank", - 2 + [ + "geometry-type" + ], + "LineString" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 1 ] ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", [ - 14, - 11 + "get", + "sizerank" ], + 18, + 5, + 12 + ], + 17, + [ + "step", [ - 20, - 12 - ] + "get", + "sizerank" + ], + 18, + 13, + 12 + ] + ], + "text-max-angle": 30, + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [ - 0, - 0.65 - ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport" }, "paint": { - "text-color": "hsl(0, 0%, 60%)", - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 + "text-halo-width": 0.5, + "text-halo-color": "hsla(0, 0%, 10%, 0.75)", + "text-halo-blur": 0.5, + "text-color": "hsl(0, 0%, 85%)" } }, { - "id": "poi-parks-scalerank2", + "id": "natural-point-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933358918.2366" - }, "source": "composite", - "source-layer": "poi_label", - "interactive": true, + "source-layer": "natural_label", + "minzoom": 4, "filter": [ "all", [ + "match", + [ + "get", + "class" + ], + [ + "dock", + "glacier", + "landform", + "water_feature", + "wetland" + ], + true, + false + ], + [ "==", - "scalerank", - 2 + [ + "geometry-type" + ], + "Point" ], [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "<=", + [ + "get", + "filterrank" + ], + 1 ] ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", [ - 14, - 11 + "get", + "sizerank" ], + 18, + 5, + 12 + ], + 17, + [ + "step", [ - 20, - 12 - ] + "get", + "sizerank" + ], + 18, + 13, + 12 ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, + ], + "icon-image": "", "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, "text-offset": [ - 0, - 0 + "literal", + [ + 0, + 0 + ] ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": { - "base": 1, - "stops": [ + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "step", [ - 7, - "hsl(0, 0%, 47%)" + "get", + "sizerank" ], + 0, + 5, + 1 + ], + 17, + [ + "step", [ - 9, - "hsl(0, 0%, 73%)" - ] + "get", + "sizerank" + ], + 0, + 13, + 1 ] - }, - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 + ], + "text-halo-color": "hsla(0, 0%, 10%, 0.75)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5, + "text-color": "hsl(0, 0%, 85%)" } }, { - "id": "water-label", + "id": "water-line-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933808272.805" - }, "source": "composite", - "source-layer": "water_label", - "minzoom": 5, - "interactive": true, + "source-layer": "natural_label", "filter": [ - ">", - "area", - 10000 + "all", + [ + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water" + ], + true, + false + ], + [ + "==", + [ + "geometry-type" + ], + "LineString" + ] ], "layout": { - "text-field": "{name_en}", + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + [ + "step", + [ + "get", + "sizerank" + ], + 24, + 6, + 18, + 12, + 12 + ], + 10, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ], + 18, + [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 16 + ] + ], + "text-max-angle": 30, + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "sea", + "bay" + ], + 0.15, + 0 + ], "text-font": [ "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], - "text-max-width": 7, - "text-size": { - "base": 1, - "stops": [ - [ - 13, - 13 - ], - [ - 18, - 18 - ] + "symbol-placement": "line-center", + "text-pitch-alignment": "viewport", + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - } + ] }, "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0 + "text-color": "hsl(0, 0%, 45%)" } }, { - "id": "poi-parks-scalerank1", + "id": "water-point-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933322393.2852" - }, "source": "composite", - "source-layer": "poi_label", - "interactive": true, + "source-layer": "natural_label", "filter": [ "all", [ - "<=", - "scalerank", - 1 + "match", + [ + "get", + "class" + ], + [ + "bay", + "ocean", + "reservoir", + "sea", + "water" + ], + true, + false ], [ - "in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "==", + [ + "geometry-type" + ], + "Point" ] ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-line-height": 1.3, + "text-size": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 7, + [ + "step", [ - 10, - 11 + "get", + "sizerank" ], + 24, + 6, + 18, + 12, + 12 + ], + 10, + [ + "step", [ - 18, - 12 - ] + "get", + "sizerank" + ], + 18, + 9, + 12 ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, + ], "text-font": [ - "DIN Offc Pro Medium", + "DIN Offc Pro Italic", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [ - 0, - 0 + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-letter-spacing": [ + "match", + [ + "get", + "class" + ], + "ocean", + 0.25, + [ + "bay", + "sea" + ], + 0.15, + 0.01 + ], + "text-max-width": [ + "match", + [ + "get", + "class" + ], + "ocean", + 4, + "sea", + 5, + [ + "bay", + "water" + ], + 7, + 10 + ] }, "paint": { - "text-color": { - "base": 1, - "stops": [ - [ - 7, - "hsl(0, 0%, 47%)" - ], - [ - 9, - "hsl(0, 0%, 73%)" - ] - ] - }, - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 + "text-color": "hsl(0, 0%, 45%)" } }, { - "id": "poi-scalerank1", + "id": "poi-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444933322393.2852" - }, "source": "composite", "source-layer": "poi_label", - "interactive": true, + "minzoom": 6, "filter": [ - "all", + "<=", [ - "!in", - "maki", - "campsite", - "cemetery", - "dog-park", - "garden", - "golf", - "park", - "picnic-site", - "playground", - "zoo" + "get", + "filterrank" ], - [ - "<=", - "scalerank", - 1 - ] + 1 ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "step", + [ + "zoom" + ], + [ + "step", [ - 10, - 11 + "get", + "sizerank" ], + 18, + 5, + 12 + ], + 17, + [ + "step", [ - 18, - 12 - ] + "get", + "sizerank" + ], + 18, + 13, + 12 ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, - "text-offset": [ - 0, - 0 - ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] + ] }, "paint": { - "text-color": "hsl(0, 0%, 60%)", - "text-halo-color": "#212121", - "text-halo-width": 1, - "text-halo-blur": 0 + "text-halo-color": "hsl(0, 0%, 13%)", + "text-halo-width": 0.5, + "text-halo-blur": 0.5, + "text-color": [ + "step", + [ + "zoom" + ], + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(0, 0%, 50%)", + 5, + "hsl(0, 0%, 60%)" + ], + 17, + [ + "step", + [ + "get", + "sizerank" + ], + "hsl(0, 0%, 50%)", + 13, + "hsl(0, 0%, 60%)" + ] + ] } }, { @@ -7024,1699 +6580,1081 @@ "type": "symbol", "source": "composite", "source-layer": "airport_label", - "minzoom": 10, - "interactive": true, - "filter": [ - "<=", - "scalerank", - 2 - ], + "minzoom": 8, "layout": { "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "step", + [ + "get", + "sizerank" + ], + 18, + 9, + 12 + ], + "icon-image": [ + "step", + [ + "get", + "sizerank" + ], + [ + "concat", [ - 10, - 12 + "get", + "maki" ], + "-15" + ], + 9, + [ + "concat", [ - 18, - 18 - ] - ] - }, - "icon-image": { - "stops": [ - [ - 12, - "{maki}-11" + "get", + "maki" ], - [ - 13, - "{maki}-15" - ] + "-11" ] - }, - "symbol-spacing": 250, + ], "text-font": [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-padding": 2, "text-offset": [ 0, 0.75 ], + "text-rotation-alignment": "viewport", "text-anchor": "top", - "text-field": { - "stops": [ + "text-field": [ + "step", + [ + "get", + "sizerank" + ], + [ + "coalesce", [ - 11, - "{ref}" + "get", + "name_en" ], [ - 14, - "{name_en}" + "get", + "name" ] + ], + 15, + [ + "get", + "ref" ] - }, + ], "text-letter-spacing": 0.01, "text-max-width": 9 }, "paint": { "text-color": "hsl(0, 0%, 85%)", "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 0.5, - "text-halo-blur": 0 + "text-halo-width": 1 } }, { - "id": "place-islets-archipelago-aboriginal", + "id": "settlement-subdivision-label", "type": "symbol", "source": "composite", "source-layer": "place_label", - "maxzoom": 16, - "interactive": true, + "minzoom": 10, + "maxzoom": 15, "filter": [ - "in", - "type", - "aboriginal_lands", - "archipelago", - "islet" + "all", + [ + "==", + [ + "get", + "class" + ], + "settlement_subdivision" + ], + [ + "<=", + [ + "get", + "filterrank" + ], + 4 + ] ], "layout": { - "text-line-height": 1.2, - "text-size": { - "base": 1, - "stops": [ - [ - 10, - 11 - ], - [ - 18, - 16 - ] + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ], - "text-padding": 2, - "text-offset": [ - 0, - 0 ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 8 - }, - "paint": { - "text-color": "hsl(0, 0%, 85%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "place-neighbourhood", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 12, - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "type", - "neighbourhood" - ], - "layout": { - "text-field": "{name_en}", "text-transform": "uppercase", - "text-letter-spacing": 0.1, - "text-max-width": 7, "text-font": [ "DIN Offc Pro Regular", "Arial Unicode MS Regular" ], - "text-padding": 3, - "text-size": { - "base": 1, - "stops": [ - [ - 12, - 11 - ], - [ - 16, - 16 - ] - ] - } - }, - "paint": { - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-color": "hsl(0, 0%, 70%)", - "text-halo-blur": 0 - } - }, - { - "id": "place-suburb", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 11, - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "type", - "suburb" - ], - "layout": { - "text-field": "{name_en}", - "text-transform": "uppercase", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "text-letter-spacing": [ + "match", + [ + "get", + "type" + ], + "suburb", + 0.15, + [ + "quarter", + "neighborhood" + ], + 0.1, + 0.1 ], - "text-letter-spacing": 0.15, "text-max-width": 7, "text-padding": 3, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.5, + 0, + 1, + 1 + ], + [ + "zoom" + ], + 11, + [ + "match", [ - 11, - 11 + "get", + "type" ], + "suburb", + 11, [ - 15, - 18 - ] - ] - } - }, - "paint": { - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-color": "hsl(0, 0%, 70%)", - "text-halo-blur": 0 - } - }, - { - "id": "place-hamlet", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 10, - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "type", - "hamlet" - ], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ], - "text-size": { - "base": 1, - "stops": [ + "quarter", + "neighborhood" + ], + 10.5, + 10.5 + ], + 15, + [ + "match", [ - 12, - 11.5 + "get", + "type" ], + "suburb", + 17, [ - 15, - 16 - ] + "quarter", + "neighborhood" + ], + 16, + 16 ] - } + ] }, "paint": { "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1.25, - "text-color": "hsl(0, 0%, 85%)", - "text-halo-blur": 0 + "text-halo-width": 1, + "text-color": "hsl(0, 0%, 70%)", + "text-halo-blur": 0.5 } }, { - "id": "place-village", + "id": "settlement-label", "type": "symbol", "source": "composite", "source-layer": "place_label", - "minzoom": 11, "maxzoom": 15, - "interactive": true, "filter": [ - "==", - "type", - "village" - ], - "layout": { - "text-field": "{name_en}", - "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" + "all", + [ + "<=", + [ + "get", + "filterrank" + ], + 3 ], - "text-max-width": 7, - "text-size": { - "base": 1, - "stops": [ + [ + "==", + [ + "get", + "class" + ], + "settlement" + ], + [ + "step", + [ + "zoom" + ], + true, + 13, + [ + ">=", [ - 10, - 11.5 + "get", + "symbolrank" ], + 11 + ], + 14, + [ + ">=", [ - 16, - 18 - ] - ] - } - }, - "paint": { - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1.25, - "text-color": { - "base": 1, - "stops": [ - [ - 10, - "hsl(0, 0%, 75%)" + "get", + "symbolrank" ], - [ - 11, - "hsl(0, 0%, 85%)" - ] + 13 ] - }, - "text-halo-blur": 0 - } - }, - { - "id": "place-town", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "minzoom": 7, - "maxzoom": 15, - "interactive": true, - "filter": [ - "==", - "type", - "town" + ] ], "layout": { - "text-size": { - "base": 1, - "stops": [ + "text-line-height": 1.1, + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.9, + 1 + ], + [ + "zoom" + ], + 3, + [ + "step", + [ + "get", + "symbolrank" + ], + 12, + 9, + 11, + 10, + 10.5, + 12, + 9.5, + 14, + 8.5, + 16, + 6.5, + 17, + 4 + ], + 15, + [ + "step", + [ + "get", + "symbolrank" + ], + 28, + 9, + 26, + 10, + 23, + 11, + 21, + 12, + 20, + 13, + 19, + 15, + 17 + ] + ], + "icon-image": [ + "case", + [ + "==", [ - 7, - 11.5 + "get", + "capital" ], + 2 + ], + "border-dot-13", + [ + "step", [ - 15, - 20 - ] - ] - }, - "text-font": { - "base": 1, - "stops": [ - [ - 11, - [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ] + "get", + "symbolrank" ], - [ - 12, - [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ] - ] + "dot-11", + 9, + "dot-10", + 11, + "dot-9" ] - }, - "text-padding": 2, - "text-offset": [ - 0, - 0 ], - "text-field": "{name_en}", - "text-max-width": 7 - }, - "paint": { - "text-color": { - "base": 1, - "stops": [ - [ - 10, - "hsl(0, 0%, 75%)" - ], - [ - 11, - "hsl(0, 0%, 85%)" - ] - ] - }, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1.25, - "icon-opacity": { - "base": 1, - "stops": [ - [ - 7.99, - 1 - ], - [ - 8, - 0 - ] - ] - }, - "text-halo-blur": 0 - } - }, - { - "id": "place-islands", - "type": "symbol", - "source": "composite", - "source-layer": "place_label", - "maxzoom": 16, - "interactive": true, - "filter": [ - "==", - "type", - "island" - ], - "layout": { - "text-line-height": 1.2, - "text-size": { - "base": 1, - "stops": [ - [ - 10, - 11 - ], - [ - 18, - 16 - ] - ] - }, - "text-max-angle": 38, - "symbol-spacing": 250, "text-font": [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ], - "text-padding": 2, - "text-offset": [ - 0, - 0 - ], - "text-field": "{name_en}", - "text-letter-spacing": 0.01, - "text-max-width": 7 - }, - "paint": { - "text-color": "hsl(0, 0%, 85%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "place-city-sm", - "type": "symbol", - "metadata": { - "mapbox:group": "1444862510685.128" - }, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "!in", - "scalerank", - 0, - 1, - 2, - 3, - 4, - 5 - ], - [ - "==", - "type", - "city" - ] - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ - [ - 6, - 12 - ], + "step", + [ + "zoom" + ], + [ + "literal", [ - 14, - 22 + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" ] - ] - }, - "text-font": { - "base": 1, - "stops": [ + ], + 8, + [ + "step", [ - 7, - [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ] + "get", + "symbolrank" ], [ - 8, + "literal", [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ] - ] - ] - }, - "text-offset": [ - 0, - 0 - ], - "text-field": "{name_en}", - "text-max-width": 7 - }, - "paint": { - "text-color": "hsl(0, 0%, 90%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1.25, - "icon-opacity": { - "base": 1, - "stops": [ - [ - 7.99, - 1 ], + 11, [ - 8, - 0 - ] - ] - }, - "text-halo-blur": 0 - } - }, - { - "id": "place-city-md-s", - "type": "symbol", - "metadata": { - "mapbox:group": "1444862510685.128" - }, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "==", - "type", - "city" - ], - [ - "in", - "ldir", - "E", - "S", - "SE", - "SW" - ], - [ - "in", - "scalerank", - 3, - 4, - 5 - ] - ], - "layout": { - "text-field": "{name_en}", - "text-size": { - "base": 0.9, - "stops": [ - [ - 5, - 12 - ], - [ - 12, - 22 - ] - ] - }, - "text-anchor": "top", - "text-offset": { - "base": 1, - "stops": [ - [ - 7.99, - [ - 0, - 0.1 - ] - ], - [ - 8, - [ - 0, - 0 - ] - ] - ] - }, - "text-font": { - "base": 1, - "stops": [ - [ - 7, + "literal", [ "DIN Offc Pro Regular", "Arial Unicode MS Regular" ] + ] + ], + 10, + [ + "step", + [ + "get", + "symbolrank" ], [ - 8, + "literal", [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ] - ] - ] - }, - "icon-image": "dot-10" - }, - "paint": { - "text-halo-width": 1, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-color": "hsl(0, 0%, 90%)", - "text-halo-blur": 0, - "icon-opacity": { - "base": 1, - "stops": [ - [ - 7.99, - 1 ], + 12, [ - 8, - 0 - ] - ] - } - } - }, - { - "id": "place-city-md-n", - "type": "symbol", - "metadata": { - "mapbox:group": "1444862510685.128" - }, - "source": "composite", - "source-layer": "place_label", - "maxzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "==", - "type", - "city" - ], - [ - "in", - "ldir", - "N", - "NE", - "NW", - "W" - ], - [ - "in", - "scalerank", - 3, - 4, - 5 - ] - ], - "layout": { - "text-size": { - "base": 0.9, - "stops": [ - [ - 5, - 12 - ], - [ - 12, - 22 - ] - ] - }, - "text-font": { - "base": 1, - "stops": [ - [ - 7, + "literal", [ "DIN Offc Pro Regular", "Arial Unicode MS Regular" ] + ] + ], + 11, + [ + "step", + [ + "get", + "symbolrank" ], [ - 8, + "literal", [ "DIN Offc Pro Medium", "Arial Unicode MS Regular" ] - ] - ] - }, - "text-offset": { - "base": 1, - "stops": [ - [ - 7.99, - [ - 0, - -0.25 - ] ], + 13, [ - 8, + "literal", [ - 0, - 0 + "DIN Offc Pro Regular", + "Arial Unicode MS Regular" ] ] - ] - }, - "text-anchor": "bottom", - "text-field": "{name_en}", - "text-max-width": 7, - "icon-image": "dot-10" - }, - "paint": { - "text-color": "hsl(0, 0%, 90%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "icon-opacity": { - "base": 1, - "stops": [ + ], + 12, + [ + "step", [ - 7.99, - 1 + "get", + "symbolrank" ], [ - 8, - 0 - ] - ] - }, - "text-halo-blur": 0 - } - }, - { - "id": "place-city-lg-s", - "type": "symbol", - "metadata": { - "mapbox:group": "1444862510685.128" - }, - "source": "composite", - "source-layer": "place_label", - "minzoom": 1, - "maxzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "<=", - "scalerank", - 2 - ], - [ - "==", - "type", - "city" - ], - [ - "in", - "ldir", - "E", - "S", - "SE", - "SW" - ] - ], - "layout": { - "icon-image": "dot-11", - "text-font": { - "base": 1, - "stops": [ - [ - 7, + "literal", [ - "DIN Offc Pro Regular", + "DIN Offc Pro Medium", "Arial Unicode MS Regular" ] ], + 15, [ - 8, + "literal", [ - "DIN Offc Pro Medium", + "DIN Offc Pro Regular", "Arial Unicode MS Regular" ] ] - ] - }, - "text-offset": { - "base": 1, - "stops": [ - [ - 7.99, - [ - 0, - 0.15 - ] - ], + ], + 13, + [ + "literal", [ - 8, - [ - 0, - 0 - ] + "DIN Offc Pro Medium", + "Arial Unicode MS Regular" ] ] - }, - "text-anchor": { - "base": 1, - "stops": [ + ], + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 7, - "top" + "get", + "text_anchor" ], [ - 8, - "center" - ] - ] - }, - "text-field": "{name_en}", - "text-max-width": 7, - "text-size": { - "base": 0.9, - "stops": [ - [ - 4, - 12 + "bottom", + "top" ], + "center", [ - 10, - 22 - ] - ] - } - }, - "paint": { - "text-color": { - "base": 1, - "stops": [ - [ - 7, - "hsl(0, 0%, 95%)" + "left", + "bottom-left", + "top-left" ], + "left", [ - 9, - "hsl(0, 0%, 90%)" - ] - ] - }, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "icon-opacity": { - "base": 1, - "stops": [ - [ - 7.99, - 1 + "right", + "bottom-right", + "top-right" ], - [ - 8, - 0 - ] - ] - }, - "text-halo-blur": 0 - } - }, - { - "id": "place-city-lg-n", - "type": "symbol", - "metadata": { - "mapbox:group": "1444862510685.128" - }, - "source": "composite", - "source-layer": "place_label", - "minzoom": 1, - "maxzoom": 14, - "interactive": true, - "filter": [ - "all", - [ - "<=", - "scalerank", - 2 - ], - [ - "==", - "type", - "city" + "right", + "center" + ], + 8, + "center" ], - [ - "in", - "ldir", - "N", - "NE", - "NW", - "W" - ] - ], - "layout": { - "icon-image": "dot-11", - "text-font": { - "base": 1, - "stops": [ + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 7, - [ - "DIN Offc Pro Regular", - "Arial Unicode MS Regular" - ] + "get", + "capital" ], + 2, [ - 8, + "match", [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ] - ] - ] - }, - "text-offset": { - "base": 1, - "stops": [ - [ - 7.99, + "get", + "text_anchor" + ], + "bottom", [ - 0, - -0.25 + "literal", + [ + 0, + -0.3 + ] + ], + "bottom-left", + [ + "literal", + [ + 0.3, + -0.1 + ] + ], + "left", + [ + "literal", + [ + 0.45, + 0.1 + ] + ], + "top-left", + [ + "literal", + [ + 0.3, + 0.1 + ] + ], + "top", + [ + "literal", + [ + 0, + 0.3 + ] + ], + "top-right", + [ + "literal", + [ + -0.3, + 0.1 + ] + ], + "right", + [ + "literal", + [ + -0.45, + 0 + ] + ], + "bottom-right", + [ + "literal", + [ + -0.3, + -0.1 + ] + ], + [ + "literal", + [ + 0, + -0.3 + ] ] ], [ - 8, + "match", [ - 0, - 0 + "get", + "text_anchor" + ], + "bottom", + [ + "literal", + [ + 0, + -0.25 + ] + ], + "bottom-left", + [ + "literal", + [ + 0.2, + -0.05 + ] + ], + "left", + [ + "literal", + [ + 0.4, + 0.05 + ] + ], + "top-left", + [ + "literal", + [ + 0.2, + 0.05 + ] + ], + "top", + [ + "literal", + [ + 0, + 0.25 + ] + ], + "top-right", + [ + "literal", + [ + -0.2, + 0.05 + ] + ], + "right", + [ + "literal", + [ + -0.4, + 0.05 + ] + ], + "bottom-right", + [ + "literal", + [ + -0.2, + -0.05 + ] + ], + [ + "literal", + [ + 0, + -0.25 + ] ] ] - ] - }, - "text-anchor": { - "base": 1, - "stops": [ - [ - 7, - "bottom" - ], + ], + 8, + [ + "literal", [ - 8, - "center" + 0, + 0 ] ] - }, - "text-field": "{name_en}", - "text-max-width": 7, - "text-size": { - "base": 0.9, - "stops": [ - [ - 4, - 12 - ], - [ - 10, - 22 - ] + ], + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "get", + "text_anchor" + ], + 8, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - } + ], + "text-max-width": 7 }, "paint": { - "text-color": { - "base": 1, - "stops": [ - [ - 7, - "hsl(0, 0%, 95%)" - ], - [ - 9, - "hsl(0, 0%, 90%)" - ] - ] - }, - "text-opacity": 1, + "text-color": [ + "step", + [ + "get", + "symbolrank" + ], + "hsl(0, 0%, 90%)", + 11, + "hsl(0, 0%, 85%)", + 16, + "hsl(0, 0%, 70%)" + ], "text-halo-color": "hsla(0, 0%, 10%, 0.75)", "text-halo-width": 1, - "icon-opacity": { - "base": 1, - "stops": [ - [ - 7.99, - 1 - ], - [ - 8, - 0 - ] - ] - }, - "text-halo-blur": 0 + "icon-opacity": [ + "step", + [ + "zoom" + ], + 1, + 8, + 0 + ], + "text-halo-blur": 1 } }, { - "id": "marine-label-sm-ln", + "id": "state-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, "source": "composite", - "source-layer": "marine_label", + "source-layer": "place_label", "minzoom": 3, - "maxzoom": 10, - "interactive": true, + "maxzoom": 9, "filter": [ - "all", + "==", [ - "==", - "$type", - "LineString" + "get", + "class" ], - [ - ">=", - "labelrank", - 4 - ] + "state" ], "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.85, + 0.7, + 0.65, + 1 + ], + [ + "zoom" + ], + 4, + [ + "step", [ - 3, - 12 + "get", + "symbolrank" ], + 10, + 6, + 9.5, + 7, + 9 + ], + 9, + [ + "step", [ - 6, - 16 - ] - ] - }, - "symbol-spacing": { - "base": 1, - "stops": [ - [ - 4, - 100 + "get", + "symbolrank" ], - [ - 6, - 400 - ] + 24, + 6, + 18, + 7, + 14 ] - }, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "symbol-placement": "line", - "text-field": "{name_en}", - "text-letter-spacing": 0.1, - "text-max-width": 5 - }, - "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" - } - }, - { - "id": "marine-label-sm-pt", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 3, - "maxzoom": 10, - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "Point" ], - [ - ">=", - "labelrank", - 4 - ] - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": 5, - "text-letter-spacing": 0.1, - "text-line-height": 1.5, + "text-transform": "uppercase", "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" + "DIN Offc Pro Bold", + "Arial Unicode MS Bold" ], - "text-size": { - "base": 1, - "stops": [ + "text-field": [ + "step", + [ + "zoom" + ], + [ + "step", [ - 3, - 12 + "get", + "symbolrank" ], [ - 6, - 16 - ] - ] - } - }, - "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" - } - }, - { - "id": "marine-label-md-ln", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 2, - "maxzoom": 8, - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "LineString" - ], - [ - "in", - "labelrank", - 2, - 3 - ] - ], - "layout": { - "text-line-height": 1.1, - "text-size": { - "base": 1.1, - "stops": [ - [ - 2, - 12 + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] ], + 5, [ - 5, - 20 + "coalesce", + [ + "get", + "abbr" + ], + [ + "get", + "name_en" + ], + [ + "get", + "name" + ] ] - ] - }, - "symbol-spacing": 250, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "symbol-placement": "line", - "text-field": "{name_en}", - "text-letter-spacing": 0.15, - "text-max-width": 5 - }, - "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" - } - }, - { - "id": "marine-label-md-pt", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 2, - "maxzoom": 8, - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "Point" - ], - [ - "in", - "labelrank", - 2, - 3 - ] - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": 5, - "text-letter-spacing": 0.15, - "text-line-height": 1.5, - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "text-size": { - "base": 1.1, - "stops": [ + ], + 5, + [ + "coalesce", [ - 2, - 14 + "get", + "name_en" ], [ - 5, - 20 + "get", + "name" ] ] - } + ], + "text-letter-spacing": 0.15, + "text-max-width": 6 }, "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" + "text-halo-width": 1, + "text-halo-color": "hsla(0, 0%, 10%, 0.75)", + "text-color": "hsl(0, 0%, 50%)" } }, { - "id": "marine-label-lg-ln", + "id": "country-label", "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, "source": "composite", - "source-layer": "marine_label", + "source-layer": "place_label", "minzoom": 1, - "maxzoom": 4, - "interactive": true, + "maxzoom": 10, "filter": [ - "all", + "==", [ - "==", - "$type", - "LineString" + "get", + "class" ], - [ - "==", - "labelrank", - 1 - ] + "country" ], "layout": { - "text-field": "{name_en}", - "text-max-width": 4, - "text-letter-spacing": 0.25, "text-line-height": 1.1, - "symbol-placement": "line", - "text-font": [ - "DIN Offc Pro Italic", - "Arial Unicode MS Regular" - ], - "text-size": { - "base": 1, - "stops": [ + "text-size": [ + "interpolate", + [ + "cubic-bezier", + 0.2, + 0, + 0.7, + 1 + ], + [ + "zoom" + ], + 1, + [ + "step", [ - 1, - 14 + "get", + "symbolrank" ], + 11, + 4, + 9, + 5, + 8 + ], + 9, + [ + "step", [ - 4, - 30 - ] + "get", + "symbolrank" + ], + 28, + 4, + 22, + 5, + 21 ] - } - }, - "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" - } - }, - { - "id": "marine-label-lg-pt", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856087950.3635" - }, - "source": "composite", - "source-layer": "marine_label", - "minzoom": 1, - "maxzoom": 4, - "interactive": true, - "filter": [ - "all", - [ - "==", - "$type", - "Point" ], - [ - "==", - "labelrank", - 1 - ] - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": 4, - "text-letter-spacing": 0.25, - "text-line-height": 1.5, + "icon-image": "dot-11", "text-font": [ - "DIN Offc Pro Italic", + "DIN Offc Pro Medium", "Arial Unicode MS Regular" ], - "text-size": { - "base": 1, - "stops": [ + "text-justify": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 1, - 14 + "get", + "text_anchor" ], [ - 4, - 30 - ] - ] - } - }, - "paint": { - "text-color": "hsl(0, 0%, 32%)", - "text-halo-blur": 0, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)" - } - }, - { - "id": "state-label-sm", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856151690.9143" - }, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 9, - "interactive": true, - "filter": [ - "<", - "area", - 20000 - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ - [ - 6, - 10 + "bottom", + "top" ], + "center", [ - 9, - 14 - ] - ] - }, - "text-transform": "uppercase", - "text-font": [ - "DIN Offc Pro Bold", - "Arial Unicode MS Bold" - ], - "text-field": { - "base": 1, - "stops": [ - [ - 0, - "{abbr}" + "left", + "bottom-left", + "top-left" ], + "left", [ - 6, - "{name_en}" - ] - ] - }, - "text-letter-spacing": 0.15, - "text-max-width": 5 - }, - "paint": { - "text-opacity": 1, - "text-color": "hsl(0, 0%, 50%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "state-label-md", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856151690.9143" - }, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 8, - "interactive": true, - "filter": [ - "all", - [ - "<", - "area", - 80000 + "right", + "bottom-right", + "top-right" + ], + "right", + "center" + ], + 7, + "center" ], - [ - ">=", - "area", - 20000 - ] - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ + "text-offset": [ + "step", + [ + "zoom" + ], + [ + "match", [ - 5, - 10 + "get", + "text_anchor" ], + "bottom", [ - 8, - 16 - ] - ] - }, - "text-transform": "uppercase", - "text-font": [ - "DIN Offc Pro Bold", - "Arial Unicode MS Bold" - ], - "text-field": { - "base": 1, - "stops": [ + "literal", + [ + 0, + -0.25 + ] + ], + "bottom-left", [ - 0, - "{abbr}" + "literal", + [ + 0.2, + -0.05 + ] ], + "left", [ - 5, - "{name_en}" - ] - ] - }, - "text-letter-spacing": 0.15, - "text-max-width": 6 - }, - "paint": { - "text-opacity": 1, - "text-color": "hsl(0, 0%, 50%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "state-label-lg", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856151690.9143" - }, - "source": "composite", - "source-layer": "state_label", - "minzoom": 3, - "maxzoom": 7, - "interactive": true, - "filter": [ - ">=", - "area", - 80000 - ], - "layout": { - "text-size": { - "base": 1, - "stops": [ + "literal", + [ + 0.4, + 0.05 + ] + ], + "top-left", [ - 4, - 10 + "literal", + [ + 0.2, + 0.05 + ] ], + "top", [ - 7, - 18 - ] - ] - }, - "text-transform": "uppercase", - "text-font": [ - "DIN Offc Pro Bold", - "Arial Unicode MS Bold" - ], - "text-padding": 1, - "text-field": { - "base": 1, - "stops": [ + "literal", + [ + 0, + 0.25 + ] + ], + "top-right", [ - 0, - "{abbr}" + "literal", + [ + -0.2, + 0.05 + ] ], + "right", [ - 4, - "{name_en}" - ] - ] - }, - "text-letter-spacing": 0.15, - "text-max-width": 6 - }, - "paint": { - "text-opacity": 1, - "text-color": "hsl(0, 0%, 50%)", - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-halo-width": 1, - "text-halo-blur": 0 - } - }, - { - "id": "country-label-sm", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856144497.7825" - }, - "source": "composite", - "source-layer": "country_label", - "minzoom": 1, - "maxzoom": 10, - "interactive": true, - "filter": [ - ">=", - "scalerank", - 5 - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": 6, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" - ], - "text-size": { - "base": 0.9, - "stops": [ + "literal", + [ + -0.4, + 0.05 + ] + ], + "bottom-right", [ - 5, - 14 + "literal", + [ + -0.2, + -0.05 + ] ], [ - 9, - 22 + "literal", + [ + 0, + -0.25 + ] ] - ] - } - }, - "paint": { - "text-halo-width": 1.25, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-color": "hsl(0, 0%, 45%)", - "text-halo-blur": 0 - } - }, - { - "id": "country-label-md", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856144497.7825" - }, - "source": "composite", - "source-layer": "country_label", - "minzoom": 1, - "maxzoom": 8, - "interactive": true, - "filter": [ - "in", - "scalerank", - 3, - 4 - ], - "layout": { - "text-field": { - "base": 1, - "stops": [ + ], + 7, + [ + "literal", [ 0, - "{code}" - ], - [ - 2, - "{name_en}" + 0 ] ] - }, - "text-max-width": 6, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" ], - "text-size": { - "base": 1, - "stops": [ + "text-anchor": [ + "step", + [ + "zoom" + ], + [ + "coalesce", [ - 3, - 10 + "get", + "text_anchor" ], - [ - 8, - 24 - ] + "center" + ], + 7, + "center" + ], + "text-field": [ + "coalesce", + [ + "get", + "name_en" + ], + [ + "get", + "name" ] - } + ], + "text-max-width": 6 }, "paint": { - "text-halo-width": 1.25, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", - "text-color": "hsl(0, 0%, 45%)", - "text-halo-blur": 0 - } - }, - { - "id": "country-label-lg", - "type": "symbol", - "metadata": { - "mapbox:group": "1444856144497.7825" - }, - "source": "composite", - "source-layer": "country_label", - "minzoom": 1, - "maxzoom": 7, - "interactive": true, - "filter": [ - "in", - "scalerank", - 1, - 2 - ], - "layout": { - "text-field": "{name_en}", - "text-max-width": { - "base": 1, - "stops": [ + "icon-opacity": [ + "step", + [ + "zoom" + ], + [ + "case", [ - 0, - 5 + "has", + "text_anchor" ], - [ - 3, - 6 - ] - ] - }, - "text-font": [ - "DIN Offc Pro Medium", - "Arial Unicode MS Regular" + 1, + 0 + ], + 7, + 0 ], - "text-size": { - "base": 1, - "stops": [ - [ - 1, - 10 - ], - [ - 6, - 24 - ] - ] - } - }, - "paint": { - "text-halo-width": 1.25, - "text-halo-color": "hsla(0, 0%, 10%, 0.75)", "text-color": "hsl(0, 0%, 45%)", - "text-halo-blur": 0 + "text-halo-color": [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 2, + "hsla(0, 0%, 10%, 0.75)", + 3, + "hsl(0, 0%, 10%)" + ], + "text-halo-width": 1.25 } } ], - "created": "2016-08-05T21:36:34.102Z", - "id": "ciri9u6sk0005gjng30fkpx2o", - "modified": "2016-08-05T21:36:34.102Z", - "owner": "ivovandongen", + "visibility": "public", + "created": "1970-01-01T00:00:00.000Z", + "modified": "1970-01-01T00:00:00.000Z", + "owner": "mapbox", + "id": "dark-v10", "draft": false }
\ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sat_style.json b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sat_style.json index f2cd969be4..93506395ef 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sat_style.json +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/sat_style.json @@ -2,7 +2,8 @@ "version": 8, "name": "Satellite", "metadata": { - "mapbox:autocomposite": true + "mapbox:autocomposite": true, + "mapbox:type": "default" }, "sources": { "mapbox": { @@ -11,7 +12,7 @@ "tileSize": 256 } }, - "sprite": "mapbox://sprites/mapbox/satellite-v8", + "sprite": "mapbox://sprites/mapbox/satellite-v9", "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "layers": [ { @@ -27,5 +28,11 @@ "source": "mapbox", "source-layer": "mapbox_satellite_full" } - ] + ], + "created": "1970-01-01T00:00:00.000Z", + "modified": "1970-01-01T00:00:00.000Z", + "owner": "mapbox", + "id": "satellite-v9", + "draft": false, + "visibility": "public" }
\ No newline at end of file diff --git a/platform/android/build.gradle b/platform/android/build.gradle index ed6c8d1208..46666e2ef1 100644 --- a/platform/android/build.gradle +++ b/platform/android/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:3.4.2' classpath dependenciesList.licensesPlugin classpath dependenciesList.kotlinPlugin classpath dependenciesList.bintrayPlugin diff --git a/platform/android/gradle/dependencies.gradle b/platform/android/gradle/dependencies.gradle index d0036ebc8b..0bd5a67c9c 100644 --- a/platform/android/gradle/dependencies.gradle +++ b/platform/android/gradle/dependencies.gradle @@ -2,8 +2,8 @@ ext { androidVersions = [ minSdkVersion : 14, - targetSdkVersion : 27, - compileSdkVersion: 27, + targetSdkVersion : 28, + compileSdkVersion: 28, ] versions = [ @@ -12,29 +12,30 @@ ext { mapboxCore : '1.3.0', mapboxGestures : '0.4.2', mapboxAccounts : '0.2.0', - supportLib : '27.1.1', + supportLib : '28.0.0', constraintLayout: '1.1.2', uiAutomator : '2.1.3', espresso : '3.0.2', testRunner : '1.0.2', - leakCanary : '1.6.2', + leakCanary : '1.6.3', junit : '4.12', - mockito : '2.23.4', - mockk : '1.9', - robolectric : '4.1', + mockito : '3.0.0', + mockk : '1.9.3', + robolectric : '4.3', timber : '4.7.1', okhttp : '3.12.3', - kotlin : '1.3.11', - licenses : '0.8.42', + kotlin : '1.3.41', + licenses : '0.8.5', bintray : '1.8.4', artifactory : '4.9.3', androidPublish : '3.6.2', - lint : '26.1.4', + lint : '26.4.2', gms : '16.0.0', - soLoader : '0.6.0', - jacoco : '0.8.3', + soLoader : '0.6.1', + jacoco : '0.8.4', appcenter : '1.4', - ktlint : '0.33.0' + ktlint : '0.34.0', + commonsIO : '2.6' ] dependenciesList = [ @@ -56,7 +57,7 @@ ext { testEspressoContrib : "com.android.support.test.espresso:espresso-contrib:${versions.espresso}", testUiAutomator : "com.android.support.test.uiautomator:uiautomator-v18:${versions.uiAutomator}", appCenter : "com.microsoft.appcenter:espresso-test-extension:${versions.appcenter}", - commonsIO : 'commons-io:commons-io:2.5', + commonsIO : "commons-io:commons-io:${versions.commonsIO}", supportAnnotations : "com.android.support:support-annotations:${versions.supportLib}", supportAppcompatV7 : "com.android.support:appcompat-v7:${versions.supportLib}", supportFragmentV4 : "com.android.support:support-fragment:${versions.supportLib}", diff --git a/platform/android/gradle/gradle-javadoc.gradle b/platform/android/gradle/gradle-javadoc.gradle index 3a634433b5..ba530a9b62 100644 --- a/platform/android/gradle/gradle-javadoc.gradle +++ b/platform/android/gradle/gradle-javadoc.gradle @@ -4,7 +4,6 @@ android.libraryVariants.all { variant -> description = "Generates javadoc for build $name" destinationDir = new File(destinationDir, variant.baseName) source = variant.sourceSets.collect { it.java.sourceFiles }.inject { m, i -> m + i } - classpath += variant.javaCompile.classpath classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) options.windowTitle("Mapbox Maps SDK for Android $VERSION_NAME Reference") options.docTitle("Mapbox Maps SDK for Android $VERSION_NAME") diff --git a/platform/android/gradle/jacoco-report.gradle b/platform/android/gradle/jacoco-report.gradle index e50facb683..c4e0bb9131 100644 --- a/platform/android/gradle/jacoco-report.gradle +++ b/platform/android/gradle/jacoco-report.gradle @@ -27,7 +27,7 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) { files.each { file -> println file } } - sourceDirectories = files([mainSrc]) - classDirectories = files([debugTree]) - executionData = files([ecSrc, execSrc]) + sourceDirectories.from = files([mainSrc]) + classDirectories.from = files([debugTree]) + executionData.from = files([ecSrc, execSrc]) }
\ No newline at end of file diff --git a/platform/android/gradle/wrapper/gradle-wrapper.properties b/platform/android/gradle/wrapper/gradle-wrapper.properties index 588169cdf4..a60d82ac08 100644 --- a/platform/android/gradle/wrapper/gradle-wrapper.properties +++ b/platform/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js index d7ab7e8827..8c34113de1 100755 --- a/platform/android/scripts/generate-style-code.js +++ b/platform/android/scripts/generate-style-code.js @@ -6,6 +6,11 @@ const ejs = require('ejs'); const spec = require('../../../scripts/style-spec'); const _ = require('lodash'); +// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 +delete spec.layout_circle["circle-sort-key"] +delete spec.layout_line["line-sort-key"] +delete spec.layout_fill["fill-sort-key"] + require('../../../scripts/style-code'); // Specification parsing // diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index 20ad86382c..37454cba54 100755 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -14,6 +14,11 @@ const suffix = 'StyleLayer'; let spec = _.merge(require('../../../scripts/style-spec'), require('./style-spec-overrides-v8.json')); +// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 +delete spec.layout_circle["circle-sort-key"] +delete spec.layout_line["line-sort-key"] +delete spec.layout_fill["fill-sort-key"] + // Rename properties and keep `original` for use with setters and getters _.forOwn(cocoaConventions, function (properties, kind) { _.forOwn(properties, function (newName, oldName) { diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h index 622333d1c3..1ed364ddf3 100644 --- a/platform/darwin/src/MGLOfflineStorage.h +++ b/platform/darwin/src/MGLOfflineStorage.h @@ -58,7 +58,6 @@ FOUNDATION_EXTERN MGL_EXPORT const NSNotificationName MGLOfflinePackErrorNotific Once this limit is reached, no instance of `MGLOfflinePack` can download additional tiles from Mapbox APIs until already downloaded tiles are removed by calling the `-[MGLOfflineStorage removePack:withCompletionHandler:]` method. - Contact your Mapbox sales representative to have the limit raised. */ FOUNDATION_EXTERN MGL_EXPORT const NSNotificationName MGLOfflinePackMaximumMapboxTilesReachedNotification; @@ -344,7 +343,6 @@ MGL_EXPORT @note The <a href="https://www.mapbox.com/tos/">Mapbox Terms of Service</a> prohibits changing or bypassing this limit without permission from Mapbox. - Contact your Mapbox sales representative to have the limit raised. */ - (void)setMaximumAllowedMapboxTiles:(uint64_t)maximumCount; diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index e9b4ac575b..a0c8188372 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -4,6 +4,10 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT ## master +### Styles and rendering + +* Fixed flickering on style change for the same tile set ([#15127](https://github.com/mapbox/mapbox-gl-native/pull/15127)) + ### Other changes * `MGLLoggingLevel` has been updated for better matching core log levels. Now can use `[MGLLoggingConfiguration sharedConfiguration].loggingLevel` to filter logs from core . [#15120](https://github.com/mapbox/mapbox-gl-native/pull/15120) @@ -28,7 +32,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed style change transition regression caused by delayed setting of the updated layer properties. ([#15016](https://github.com/mapbox/mapbox-gl-native/pull/15016)) * Fixed an issue where layers with fill extrusions would be incorrectly rendered above other layers. ([#15065](https://github.com/mapbox/mapbox-gl-native/pull/15065)) * Improved feature querying performance. ([#14930](https://github.com/mapbox/mapbox-gl-native/pull/14930)) -* Fixed a custom geometry source bug caused by using the outdated tiles after style update [#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112) +* Fixed a custom geometry source bug caused by using the outdated tiles after style update ([#15112](https://github.com/mapbox/mapbox-gl-native/pull/15112)) ### User interaction diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index a97ee70325..4e4f537a23 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -98,6 +98,9 @@ "render-tests/remove-feature-state/vector-source": "https://github.com/mapbox/mapbox-gl-native/issues/12413", "render-tests/regressions/mapbox-gl-js#8026": "skip - js specific", "render-tests/fill-extrusion-geometry/linestring": "https://github.com/mapbox/mapbox-gl-native/pull/14240", + "render-tests/circle-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", + "render-tests/fill-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", + "render-tests/line-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", "query-tests/remove-feature-state/default": "https://github.com/mapbox/mapbox-gl-native/issues/12413", "query-tests/fill-extrusion/base-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139", "query-tests/fill-extrusion/box-in": "https://github.com/mapbox/mapbox-gl-native/issues/13139", diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js index aed676c990..1f26e6fd86 100755 --- a/scripts/generate-style-code.js +++ b/scripts/generate-style-code.js @@ -6,6 +6,11 @@ const ejs = require('ejs'); const spec = require('./style-spec'); const colorParser = require('csscolorparser'); +// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 +delete spec.layout_circle["circle-sort-key"] +delete spec.layout_line["line-sort-key"] +delete spec.layout_fill["fill-sort-key"] + require('./style-code'); function parseCSSColor(str) { diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index d8d143632c..21642b01e3 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -46,7 +46,38 @@ inline const SymbolLayerProperties& toSymbolLayerProperties(const Immutable<Laye return static_cast<const SymbolLayerProperties&>(*layer); } +inline Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> createLayout(const SymbolLayoutProperties::Unevaluated& unevaluated, float zoom) { + auto layout = makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(unevaluated.evaluate(PropertyEvaluationParameters(zoom))); + + if (layout->get<IconRotationAlignment>() == AlignmentType::Auto) { + if (layout->get<SymbolPlacement>() != SymbolPlacementType::Point) { + layout->get<IconRotationAlignment>() = AlignmentType::Map; + } else { + layout->get<IconRotationAlignment>() = AlignmentType::Viewport; + } + } + + if (layout->get<TextRotationAlignment>() == AlignmentType::Auto) { + if (layout->get<SymbolPlacement>() != SymbolPlacementType::Point) { + layout->get<TextRotationAlignment>() = AlignmentType::Map; + } else { + layout->get<TextRotationAlignment>() = AlignmentType::Viewport; + } + } + + // If unspecified `*-pitch-alignment` inherits `*-rotation-alignment` + if (layout->get<TextPitchAlignment>() == AlignmentType::Auto) { + layout->get<TextPitchAlignment>() = layout->get<TextRotationAlignment>(); + } + if (layout->get<IconPitchAlignment>() == AlignmentType::Auto) { + layout->get<IconPitchAlignment>() = layout->get<IconRotationAlignment>(); + } + + return std::move(layout); +} + } // namespace + SymbolLayout::SymbolLayout(const BucketParameters& parameters, const std::vector<Immutable<style::LayerProperties>>& layers, std::unique_ptr<GeometryTileLayer> sourceLayer_, @@ -61,50 +92,23 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, tileSize(util::tileSize * overscaling), tilePixelRatio(float(util::EXTENT) / tileSize), textSize(toSymbolLayerProperties(layers.at(0)).layerImpl().layout.get<TextSize>()), - iconSize(toSymbolLayerProperties(layers.at(0)).layerImpl().layout.get<IconSize>()) - { - + iconSize(toSymbolLayerProperties(layers.at(0)).layerImpl().layout.get<IconSize>()), + layout(createLayout(toSymbolLayerProperties(layers.at(0)).layerImpl().layout, zoom)) { const SymbolLayer::Impl& leader = toSymbolLayerProperties(layers.at(0)).layerImpl(); - layout = leader.layout.evaluate(PropertyEvaluationParameters(zoom)); - - if (layout.get<IconRotationAlignment>() == AlignmentType::Auto) { - if (layout.get<SymbolPlacement>() != SymbolPlacementType::Point) { - layout.get<IconRotationAlignment>() = AlignmentType::Map; - } else { - layout.get<IconRotationAlignment>() = AlignmentType::Viewport; - } - } - - if (layout.get<TextRotationAlignment>() == AlignmentType::Auto) { - if (layout.get<SymbolPlacement>() != SymbolPlacementType::Point) { - layout.get<TextRotationAlignment>() = AlignmentType::Map; - } else { - layout.get<TextRotationAlignment>() = AlignmentType::Viewport; - } - } - - // If unspecified `*-pitch-alignment` inherits `*-rotation-alignment` - if (layout.get<TextPitchAlignment>() == AlignmentType::Auto) { - layout.get<TextPitchAlignment>() = layout.get<TextRotationAlignment>(); - } - if (layout.get<IconPitchAlignment>() == AlignmentType::Auto) { - layout.get<IconPitchAlignment>() = layout.get<IconRotationAlignment>(); - } - - const bool hasText = has<TextField>(layout) && has<TextFont>(layout); - const bool hasIcon = has<IconImage>(layout); + const bool hasText = has<TextField>(*layout) && has<TextFont>(*layout); + const bool hasIcon = has<IconImage>(*layout); if (!hasText && !hasIcon) { return; } const bool hasSymbolSortKey = !leader.layout.get<SymbolSortKey>().isUndefined(); - const auto symbolZOrder = layout.get<SymbolZOrder>(); + const auto symbolZOrder = layout->get<SymbolZOrder>(); const bool sortFeaturesByKey = symbolZOrder != SymbolZOrderType::ViewportY && hasSymbolSortKey; const bool zOrderByViewportY = symbolZOrder == SymbolZOrderType::ViewportY || (symbolZOrder == SymbolZOrderType::Auto && !sortFeaturesByKey); - sortFeaturesByY = zOrderByViewportY && (layout.get<TextAllowOverlap>() || layout.get<IconAllowOverlap>() || - layout.get<TextIgnorePlacement>() || layout.get<IconIgnorePlacement>()); + sortFeaturesByY = zOrderByViewportY && (layout->get<TextAllowOverlap>() || layout->get<IconAllowOverlap>() || + layout->get<TextIgnorePlacement>() || layout->get<IconIgnorePlacement>()); for (const auto& layer : layers) { layerPaintProperties.emplace(layer->baseImpl->id, layer); @@ -122,9 +126,9 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, ft.index = i; if (hasText) { - auto formatted = layout.evaluate<TextField>(zoom, ft); - auto textTransform = layout.evaluate<TextTransform>(zoom, ft); - FontStack baseFontStack = layout.evaluate<TextFont>(zoom, ft); + auto formatted = layout->evaluate<TextField>(zoom, ft); + auto textTransform = layout->evaluate<TextTransform>(zoom, ft); + FontStack baseFontStack = layout->evaluate<TextFont>(zoom, ft); ft.formattedText = TaggedString(); for (const auto & section : formatted.sections) { @@ -142,8 +146,8 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, } - const bool canVerticalizeText = layout.get<TextRotationAlignment>() == AlignmentType::Map - && layout.get<SymbolPlacement>() != SymbolPlacementType::Point + const bool canVerticalizeText = layout->get<TextRotationAlignment>() == AlignmentType::Map + && layout->get<SymbolPlacement>() != SymbolPlacementType::Point && util::i18n::allowsVerticalWritingMode(ft.formattedText->rawText()); // Loop through all characters of this text and collect unique codepoints. @@ -161,13 +165,13 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, } if (hasIcon) { - ft.icon = layout.evaluate<IconImage>(zoom, ft); + ft.icon = layout->evaluate<IconImage>(zoom, ft); imageDependencies.emplace(*ft.icon, ImageType::Icon); } if (ft.formattedText || ft.icon) { if (sortFeaturesByKey) { - ft.sortKey = layout.evaluate<SymbolSortKey>(zoom, ft); + ft.sortKey = layout->evaluate<SymbolSortKey>(zoom, ft); const auto lowerBound = std::lower_bound(features.begin(), features.end(), ft); features.insert(lowerBound, std::move(ft)); } else { @@ -176,7 +180,7 @@ SymbolLayout::SymbolLayout(const BucketParameters& parameters, } } - if (layout.get<SymbolPlacement>() == SymbolPlacementType::Line) { + if (layout->get<SymbolPlacement>() == SymbolPlacementType::Line) { util::mergeLines(features); } } @@ -270,8 +274,8 @@ Point<float> SymbolLayout::evaluateRadialOffset(SymbolAnchorType anchor, float r void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions& glyphPositions, const ImageMap& imageMap, const ImagePositions& imagePositions) { - const bool isPointPlacement = layout.get<SymbolPlacement>() == SymbolPlacementType::Point; - const bool textAlongLine = layout.get<TextRotationAlignment>() == AlignmentType::Map && !isPointPlacement; + const bool isPointPlacement = layout->get<SymbolPlacement>() == SymbolPlacementType::Point; + const bool textAlongLine = layout->get<TextRotationAlignment>() == AlignmentType::Map && !isPointPlacement; for (auto it = features.begin(); it != features.end(); ++it) { auto& feature = *it; @@ -283,13 +287,13 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions // if feature has text, shape the text if (feature.formattedText) { - const float lineHeight = layout.get<TextLineHeight>() * util::ONE_EM; - const float spacing = util::i18n::allowsLetterSpacing(feature.formattedText->rawText()) ? layout.evaluate<TextLetterSpacing>(zoom, feature) * util::ONE_EM : 0.0f; + const float lineHeight = layout->get<TextLineHeight>() * util::ONE_EM; + const float spacing = util::i18n::allowsLetterSpacing(feature.formattedText->rawText()) ? layout->evaluate<TextLetterSpacing>(zoom, feature) * util::ONE_EM : 0.0f; auto applyShaping = [&] (const TaggedString& formattedText, WritingModeType writingMode, SymbolAnchorType textAnchor, TextJustifyType textJustify) { const Shaping result = getShaping( /* string */ formattedText, - /* maxWidth: ems */ isPointPlacement ? layout.evaluate<TextMaxWidth>(zoom, feature) * util::ONE_EM : 0.0f, + /* maxWidth: ems */ isPointPlacement ? layout->evaluate<TextMaxWidth>(zoom, feature) * util::ONE_EM : 0.0f, /* ems */ lineHeight, textAnchor, textJustify, @@ -301,9 +305,9 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions return result; }; - const std::vector<style::TextVariableAnchorType> variableTextAnchor = layout.evaluate<TextVariableAnchor>(zoom, feature); - const float radialOffset = layout.evaluate<TextRadialOffset>(zoom, feature); - const SymbolAnchorType textAnchor = layout.evaluate<TextAnchor>(zoom, feature); + const std::vector<style::TextVariableAnchorType> variableTextAnchor = layout->evaluate<TextVariableAnchor>(zoom, feature); + const float radialOffset = layout->evaluate<TextRadialOffset>(zoom, feature); + const SymbolAnchorType textAnchor = layout->evaluate<TextAnchor>(zoom, feature); if (variableTextAnchor.empty()) { // Layers with variable anchors use the `text-radial-offset` property and the [x, y] offset vector // is calculated at placement time instead of layout time @@ -312,11 +316,11 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions // but doesn't actually specify what happens if you use both. We go with the radial offset. textOffset = evaluateRadialOffset(textAnchor, radialOffset * util::ONE_EM); } else { - textOffset = { layout.evaluate<TextOffset>(zoom, feature)[0] * util::ONE_EM, - layout.evaluate<TextOffset>(zoom, feature)[1] * util::ONE_EM}; + textOffset = { layout->evaluate<TextOffset>(zoom, feature)[0] * util::ONE_EM, + layout->evaluate<TextOffset>(zoom, feature)[1] * util::ONE_EM}; } } - TextJustifyType textJustify = textAlongLine ? TextJustifyType::Center : layout.evaluate<TextJustify>(zoom, feature); + TextJustifyType textJustify = textAlongLine ? TextJustifyType::Center : layout->evaluate<TextJustify>(zoom, feature); // If this layer uses text-variable-anchor, generate shapings for all justification possibilities. if (!textAlongLine && !variableTextAnchor.empty()) { std::vector<TextJustifyType> justifications; @@ -365,15 +369,15 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions if (image != imageMap.end()) { shapedIcon = PositionedIcon::shapeIcon( imagePositions.at(*feature.icon), - layout.evaluate<IconOffset>(zoom, feature), - layout.evaluate<IconAnchor>(zoom, feature), - layout.evaluate<IconRotate>(zoom, feature) * util::DEG2RAD); + layout->evaluate<IconOffset>(zoom, feature), + layout->evaluate<IconAnchor>(zoom, feature), + layout->evaluate<IconRotate>(zoom, feature) * util::DEG2RAD); if (image->second->sdf) { sdfIcons = true; } if (image->second->pixelRatio != pixelRatio) { iconsNeedLinear = true; - } else if (layout.get<IconRotate>().constantOr(1) != 0) { + } else if (layout->get<IconRotate>().constantOr(1) != 0) { iconsNeedLinear = true; } } @@ -399,34 +403,34 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex, const float minScale = 0.5f; const float glyphSize = 24.0f; - const float layoutTextSize = layout.evaluate<TextSize>(zoom + 1, feature); - const float layoutIconSize = layout.evaluate<IconSize>(zoom + 1, feature); + const float layoutTextSize = layout->evaluate<TextSize>(zoom + 1, feature); + const float layoutIconSize = layout->evaluate<IconSize>(zoom + 1, feature); const std::array<float, 2> textOffset = {{ offset.x, offset.y }}; - const std::array<float, 2> iconOffset = layout.evaluate<IconOffset>(zoom, feature); + const std::array<float, 2> iconOffset = layout->evaluate<IconOffset>(zoom, feature); // To reduce the number of labels that jump around when zooming we need // to use a text-size value that is the same for all zoom levels. // This calculates text-size at a high zoom level so that all tiles can // use the same value when calculating anchor positions. - const float textMaxSize = layout.evaluate<TextSize>(18, feature); + const float textMaxSize = layout->evaluate<TextSize>(18, feature); const float fontScale = layoutTextSize / glyphSize; const float textBoxScale = tilePixelRatio * fontScale; const float textMaxBoxScale = tilePixelRatio * textMaxSize / glyphSize; const float iconBoxScale = tilePixelRatio * layoutIconSize; - const float symbolSpacing = tilePixelRatio * layout.get<SymbolSpacing>(); - const float textPadding = layout.get<TextPadding>() * tilePixelRatio; - const float iconPadding = layout.get<IconPadding>() * tilePixelRatio; - const float textMaxAngle = layout.get<TextMaxAngle>() * util::DEG2RAD; - const float rotation = layout.evaluate<IconRotate>(zoom, feature); - const float radialTextOffset = layout.evaluate<TextRadialOffset>(zoom, feature) * util::ONE_EM; - const SymbolPlacementType textPlacement = layout.get<TextRotationAlignment>() != AlignmentType::Map + const float symbolSpacing = tilePixelRatio * layout->get<SymbolSpacing>(); + const float textPadding = layout->get<TextPadding>() * tilePixelRatio; + const float iconPadding = layout->get<IconPadding>() * tilePixelRatio; + const float textMaxAngle = layout->get<TextMaxAngle>() * util::DEG2RAD; + const float rotation = layout->evaluate<IconRotate>(zoom, feature); + const float radialTextOffset = layout->evaluate<TextRadialOffset>(zoom, feature) * util::ONE_EM; + const SymbolPlacementType textPlacement = layout->get<TextRotationAlignment>() != AlignmentType::Map ? SymbolPlacementType::Point - : layout.get<SymbolPlacement>(); + : layout->get<SymbolPlacement>(); const float textRepeatDistance = symbolSpacing / 2; - const auto evaluatedLayoutProperties = layout.evaluate(zoom, feature); + const auto evaluatedLayoutProperties = layout->evaluate(zoom, feature); IndexedSubfeature indexedFeature(feature.index, sourceLayer->getName(), bucketLeaderID, symbolInstances.size()); auto addSymbolInstance = [&] (const GeometryCoordinates& line, Anchor& anchor) { @@ -449,7 +453,7 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex, const auto& type = feature.getType(); - if (layout.get<SymbolPlacement>() == SymbolPlacementType::Line) { + if (layout->get<SymbolPlacement>() == SymbolPlacementType::Line) { auto clippedLines = util::clipLines(feature.geometry, 0, 0, util::EXTENT, util::EXTENT); for (const auto& line : clippedLines) { Anchors anchors = getAnchors(line, @@ -469,7 +473,7 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex, } } } - } else if (layout.get<SymbolPlacement>() == SymbolPlacementType::LineCenter) { + } else if (layout->get<SymbolPlacement>() == SymbolPlacementType::LineCenter) { // No clipping, multiple lines per feature are allowed // "lines" with only one point are ignored as in clipLines for (const auto& line : feature.geometry) { @@ -734,8 +738,8 @@ void SymbolLayout::addToDebugBuffers(SymbolBucket& bucket) { for (const SymbolInstance &symbolInstance : symbolInstances) { auto populateCollisionBox = [&](const auto& feature) { SymbolBucket::CollisionBuffer& collisionBuffer = feature.alongLine ? - static_cast<SymbolBucket::CollisionBuffer&>(bucket.collisionCircle) : - static_cast<SymbolBucket::CollisionBuffer&>(bucket.collisionBox); + static_cast<SymbolBucket::CollisionBuffer&>(bucket.getOrCreateCollisionCircleBuffer()) : + static_cast<SymbolBucket::CollisionBuffer&>(bucket.getOrCreateCollisionBox()); for (const CollisionBox &box : feature.boxes) { auto& anchor = box.anchor; @@ -749,7 +753,7 @@ void SymbolLayout::addToDebugBuffers(SymbolBucket& bucket) { if (collisionBuffer.segments.empty() || collisionBuffer.segments.back().vertexLength + vertexLength > std::numeric_limits<uint16_t>::max()) { collisionBuffer.segments.emplace_back(collisionBuffer.vertices.elements(), - feature.alongLine? bucket.collisionCircle.triangles.elements() : bucket.collisionBox.lines.elements()); + feature.alongLine ? bucket.collisionCircle->triangles.elements() : bucket.collisionBox->lines.elements()); } auto& segment = collisionBuffer.segments.back(); @@ -769,13 +773,13 @@ void SymbolLayout::addToDebugBuffers(SymbolBucket& bucket) { collisionBuffer.dynamicVertices.emplace_back(dynamicVertex); if (feature.alongLine) { - bucket.collisionCircle.triangles.emplace_back(index, index + 1, index + 2); - bucket.collisionCircle.triangles.emplace_back(index, index + 2, index + 3); + bucket.collisionCircle->triangles.emplace_back(index, index + 1, index + 2); + bucket.collisionCircle->triangles.emplace_back(index, index + 2, index + 3); } else { - bucket.collisionBox.lines.emplace_back(index + 0, index + 1); - bucket.collisionBox.lines.emplace_back(index + 1, index + 2); - bucket.collisionBox.lines.emplace_back(index + 2, index + 3); - bucket.collisionBox.lines.emplace_back(index + 3, index + 0); + bucket.collisionBox->lines.emplace_back(index + 0, index + 1); + bucket.collisionBox->lines.emplace_back(index + 1, index + 2); + bucket.collisionBox->lines.emplace_back(index + 2, index + 3); + bucket.collisionBox->lines.emplace_back(index + 3, index + 0); } segment.vertexLength += vertexLength; diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp index 4397c5543e..23f883f56c 100644 --- a/src/mbgl/layout/symbol_layout.hpp +++ b/src/mbgl/layout/symbol_layout.hpp @@ -90,8 +90,6 @@ private: const MapMode mode; const float pixelRatio; - style::SymbolLayoutProperties::PossiblyEvaluated layout; - const uint32_t tileSize; const float tilePixelRatio; @@ -101,7 +99,7 @@ private: style::TextSize::UnevaluatedType textSize; style::IconSize::UnevaluatedType iconSize; - + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout; std::vector<SymbolFeature> features; BiDi bidi; // Consider moving this up to geometry tile worker to reduce reinstantiation costs; use of BiDi/ubiditransform object must be constrained to one thread diff --git a/src/mbgl/renderer/buckets/symbol_bucket.cpp b/src/mbgl/renderer/buckets/symbol_bucket.cpp index 2ad5318d19..83efb232c2 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.cpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.cpp @@ -13,7 +13,7 @@ namespace { std::atomic<uint32_t> maxBucketInstanceId; } // namespace -SymbolBucket::SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated layout_, +SymbolBucket::SymbolBucket(Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout_, const std::map<std::string, Immutable<style::LayerProperties>>& paintProperties_, const style::PropertyValue<float>& textSize, const style::PropertyValue<float>& iconSize, @@ -25,10 +25,16 @@ SymbolBucket::SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated layo const std::vector<SymbolInstance>&& symbolInstances_, float tilePixelRatio_) : layout(std::move(layout_)), + bucketLeaderID(std::move(bucketName_)), sdfIcons(sdfIcons_), iconsNeedLinear(iconsNeedLinear_ || iconSize.isDataDriven() || !iconSize.isZoomConstant()), sortFeaturesByY(sortFeaturesByY_), - bucketLeaderID(std::move(bucketName_)), + staticUploaded(false), + placementChangesUploaded(false), + dynamicUploaded(false), + sortUploaded(false), + justReloaded(false), + hasVariablePlacement(false), symbolInstances(std::move(symbolInstances_)), textSizeBinder(SymbolSizeBinder::create(zoom, textSize, TextSize::defaultValue())), iconSizeBinder(SymbolSizeBinder::create(zoom, iconSize, IconSize::defaultValue())), @@ -105,28 +111,28 @@ void SymbolBucket::upload(gfx::UploadPass& uploadPass) { if (hasCollisionBoxData()) { if (!staticUploaded) { - collisionBox.indexBuffer = uploadPass.createIndexBuffer(std::move(collisionBox.lines)); - collisionBox.vertexBuffer = uploadPass.createVertexBuffer(std::move(collisionBox.vertices)); + collisionBox->indexBuffer = uploadPass.createIndexBuffer(std::move(collisionBox->lines)); + collisionBox->vertexBuffer = uploadPass.createVertexBuffer(std::move(collisionBox->vertices)); } if (!placementChangesUploaded) { - if (!collisionBox.dynamicVertexBuffer) { - collisionBox.dynamicVertexBuffer = uploadPass.createVertexBuffer(std::move(collisionBox.dynamicVertices), gfx::BufferUsageType::StreamDraw); + if (!collisionBox->dynamicVertexBuffer) { + collisionBox->dynamicVertexBuffer = uploadPass.createVertexBuffer(std::move(collisionBox->dynamicVertices), gfx::BufferUsageType::StreamDraw); } else { - uploadPass.updateVertexBuffer(*collisionBox.dynamicVertexBuffer, std::move(collisionBox.dynamicVertices)); + uploadPass.updateVertexBuffer(*collisionBox->dynamicVertexBuffer, std::move(collisionBox->dynamicVertices)); } } } if (hasCollisionCircleData()) { if (!staticUploaded) { - collisionCircle.indexBuffer = uploadPass.createIndexBuffer(std::move(collisionCircle.triangles)); - collisionCircle.vertexBuffer = uploadPass.createVertexBuffer(std::move(collisionCircle.vertices)); + collisionCircle->indexBuffer = uploadPass.createIndexBuffer(std::move(collisionCircle->triangles)); + collisionCircle->vertexBuffer = uploadPass.createVertexBuffer(std::move(collisionCircle->vertices)); } if (!placementChangesUploaded) { - if (!collisionCircle.dynamicVertexBuffer) { - collisionCircle.dynamicVertexBuffer = uploadPass.createVertexBuffer(std::move(collisionCircle.dynamicVertices), gfx::BufferUsageType::StreamDraw); + if (!collisionCircle->dynamicVertexBuffer) { + collisionCircle->dynamicVertexBuffer = uploadPass.createVertexBuffer(std::move(collisionCircle->dynamicVertices), gfx::BufferUsageType::StreamDraw); } else { - uploadPass.updateVertexBuffer(*collisionCircle.dynamicVertexBuffer, std::move(collisionCircle.dynamicVertices)); + uploadPass.updateVertexBuffer(*collisionCircle->dynamicVertexBuffer, std::move(collisionCircle->dynamicVertices)); } } } @@ -151,11 +157,11 @@ bool SymbolBucket::hasIconData() const { } bool SymbolBucket::hasCollisionBoxData() const { - return !collisionBox.segments.empty(); + return collisionBox && !collisionBox->segments.empty(); } bool SymbolBucket::hasCollisionCircleData() const { - return !collisionCircle.segments.empty(); + return collisionCircle && !collisionCircle->segments.empty(); } void addPlacedSymbol(gfx::IndexVector<gfx::Triangles>& triangles, const PlacedSymbol& placedSymbol) { @@ -170,8 +176,9 @@ void SymbolBucket::sortFeatures(const float angle) { if (!sortFeaturesByY) { return; } + assert(angle != std::numeric_limits<float>::max()); - if (sortedAngle && *sortedAngle == angle) { + if (sortedAngle == angle) { return; } @@ -239,7 +246,7 @@ std::vector<std::reference_wrapper<SymbolInstance>> SymbolBucket::getSortedSymbo bool SymbolBucket::hasFormatSectionOverrides() const { if (!hasFormatSectionOverrides_) { - hasFormatSectionOverrides_= SymbolLayerPaintPropertyOverrides::hasOverrides(layout.get<TextField>()); + hasFormatSectionOverrides_= SymbolLayerPaintPropertyOverrides::hasOverrides(layout->get<TextField>()); } return *hasFormatSectionOverrides_; } diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index f72e832169..7876937b1e 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -43,7 +43,7 @@ public: class SymbolBucket final : public Bucket { public: - SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated, + SymbolBucket(Immutable<style::SymbolLayoutProperties::PossiblyEvaluated>, const std::map<std::string, Immutable<style::LayerProperties>>&, const style::PropertyValue<float>& textSize, const style::PropertyValue<float>& iconSize, @@ -72,19 +72,20 @@ public: // The result contains references to the `symbolInstances` items, sorted by viewport Y. std::vector<std::reference_wrapper<SymbolInstance>> getSortedSymbols(const float angle); - const style::SymbolLayoutProperties::PossiblyEvaluated layout; - const bool sdfIcons; - const bool iconsNeedLinear; - const bool sortFeaturesByY; - + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout; const std::string bucketLeaderID; - - optional<float> sortedAngle; - - bool staticUploaded = false; - bool placementChangesUploaded = false; - bool dynamicUploaded = false; - bool sortUploaded = false; + float sortedAngle = std::numeric_limits<float>::max(); + + // Flags + const bool sdfIcons : 1; + const bool iconsNeedLinear : 1; + const bool sortFeaturesByY : 1; + bool staticUploaded : 1; + bool placementChangesUploaded : 1; + bool dynamicUploaded : 1; + bool sortUploaded : 1; + bool justReloaded : 1; + bool hasVariablePlacement : 1; std::vector<SymbolInstance> symbolInstances; @@ -128,17 +129,28 @@ public: struct CollisionBoxBuffer : public CollisionBuffer { gfx::IndexVector<gfx::Lines> lines; optional<gfx::IndexBuffer> indexBuffer; - } collisionBox; + }; + std::unique_ptr<CollisionBoxBuffer> collisionBox; + + CollisionBoxBuffer& getOrCreateCollisionBox() { + if (!collisionBox) collisionBox = std::make_unique<CollisionBoxBuffer>(); + return *collisionBox; + } struct CollisionCircleBuffer : public CollisionBuffer { gfx::IndexVector<gfx::Triangles> triangles; optional<gfx::IndexBuffer> indexBuffer; - } collisionCircle; + }; + std::unique_ptr<CollisionCircleBuffer> collisionCircle; + + CollisionCircleBuffer& getOrCreateCollisionCircleBuffer() { + if (!collisionCircle) collisionCircle = std::make_unique<CollisionCircleBuffer>(); + return *collisionCircle; + } const float tilePixelRatio; uint32_t bucketInstanceId; - bool justReloaded = false; - bool hasVariablePlacement = false; + mutable optional<bool> hasFormatSectionOverrides_; std::shared_ptr<std::vector<size_t>> featureSortOrder; diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp index c79008d08b..4dddd57009 100644 --- a/src/mbgl/renderer/layers/render_symbol_layer.cpp +++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp @@ -113,7 +113,7 @@ void drawIcon(const DrawFn& draw, const PaintParameters& parameters) { auto& bucket = static_cast<SymbolBucket&>(*renderData.bucket); const auto& evaluated = getEvaluated<SymbolLayerProperties>(renderData.layerProperties); - const auto& layout = bucket.layout; + const auto& layout = *bucket.layout; auto values = iconPropertyValues(evaluated, layout); const auto& paintPropertyValues = RenderSymbolLayer::iconPaintProperties(evaluated); @@ -184,7 +184,7 @@ void drawText(const DrawFn& draw, const PaintParameters& parameters) { auto& bucket = static_cast<SymbolBucket&>(*renderData.bucket); const auto& evaluated = getEvaluated<SymbolLayerProperties>(renderData.layerProperties); - const auto& layout = bucket.layout; + const auto& layout = *bucket.layout; const gfx::TextureBinding textureBinding{ tile.getGlyphAtlasTexture().getResource(), gfx::TextureFilterType::Linear }; @@ -405,10 +405,10 @@ void RenderSymbolLayer::render(PaintParameters& parameters) { uniforms::extrude_scale::Value( extrudeScale ), uniforms::camera_to_center_distance::Value( parameters.state.getCameraToCenterDistance() ) }, - *bucket.collisionBox.vertexBuffer, - *bucket.collisionBox.dynamicVertexBuffer, - *bucket.collisionBox.indexBuffer, - bucket.collisionBox.segments, + *bucket.collisionBox->vertexBuffer, + *bucket.collisionBox->dynamicVertexBuffer, + *bucket.collisionBox->indexBuffer, + bucket.collisionBox->segments, paintAttributeData, properties, CollisionBoxProgram::TextureBindings{}, @@ -443,10 +443,10 @@ void RenderSymbolLayer::render(PaintParameters& parameters) { uniforms::overscale_factor::Value( float(tile.getOverscaledTileID().overscaleFactor()) ), uniforms::camera_to_center_distance::Value( parameters.state.getCameraToCenterDistance() ) }, - *bucket.collisionCircle.vertexBuffer, - *bucket.collisionCircle.dynamicVertexBuffer, - *bucket.collisionCircle.indexBuffer, - bucket.collisionCircle.segments, + *bucket.collisionCircle->vertexBuffer, + *bucket.collisionCircle->dynamicVertexBuffer, + *bucket.collisionCircle->indexBuffer, + bucket.collisionCircle->segments, paintAttributeData, properties, CollisionCircleProgram::TextureBindings{}, diff --git a/src/mbgl/renderer/render_orchestrator.cpp b/src/mbgl/renderer/render_orchestrator.cpp index 303b778aac..4ce36434d2 100644 --- a/src/mbgl/renderer/render_orchestrator.cpp +++ b/src/mbgl/renderer/render_orchestrator.cpp @@ -349,9 +349,11 @@ std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(const UpdatePar if (renderLayer.needsPlacement()) { layersNeedPlacement.emplace_back(renderLayer); } - if (renderLayer.is3D() && renderTreeParameters->opaquePassCutOff == 0) { + if (renderTreeParameters->opaquePassCutOff == 0) { --opaquePassCutOffEstimation; - renderTreeParameters->opaquePassCutOff = uint32_t(opaquePassCutOffEstimation); + if (renderLayer.is3D()) { + renderTreeParameters->opaquePassCutOff = uint32_t(opaquePassCutOffEstimation); + } } } // Symbol placement. diff --git a/src/mbgl/renderer/sources/render_raster_dem_source.cpp b/src/mbgl/renderer/sources/render_raster_dem_source.cpp index 841124fa4a..fb6e343670 100644 --- a/src/mbgl/renderer/sources/render_raster_dem_source.cpp +++ b/src/mbgl/renderer/sources/render_raster_dem_source.cpp @@ -4,53 +4,39 @@ #include <mbgl/algorithm/update_tile_masks.hpp> #include <mbgl/geometry/dem_data.hpp> #include <mbgl/renderer/buckets/hillshade_bucket.hpp> +#include <mbgl/renderer/tile_parameters.hpp> namespace mbgl { using namespace style; RenderRasterDEMSource::RenderRasterDEMSource(Immutable<style::RasterSource::Impl> impl_) - : RenderTileSource(std::move(impl_)) { + : RenderTileSetSource(std::move(impl_)) { } const style::RasterSource::Impl& RenderRasterDEMSource::impl() const { return static_cast<const style::RasterSource::Impl&>(*baseImpl); } -void RenderRasterDEMSource::update(Immutable<style::Source::Impl> baseImpl_, - const std::vector<Immutable<LayerProperties>>& layers, - const bool needsRendering, - const bool needsRelayout, - const TileParameters& parameters) { - std::swap(baseImpl, baseImpl_); - - enabled = needsRendering; - - optional<Tileset> _tileset = impl().getTileset(); - - if (tileset != _tileset) { - tileset = _tileset; - maxzoom = tileset->zoomRange.max; - // TODO: this removes existing buckets, and will cause flickering. - // Should instead refresh tile data in place. - tilePyramid.clearAll(); - } - // Allow clearing the tile pyramid first, before the early return in case - // the new tileset is not yet available or has an error in loading - if (!_tileset) { - return; - } +const optional<Tileset>& RenderRasterDEMSource::getTileset() const { + return impl().tileset; +} +void RenderRasterDEMSource::updateInternal(const Tileset& tileset, + const std::vector<Immutable<LayerProperties>>& layers, + const bool needsRendering, + const bool needsRelayout, + const TileParameters& parameters) { tilePyramid.update(layers, needsRendering, needsRelayout, parameters, SourceType::RasterDEM, impl().getTileSize(), - tileset->zoomRange, - tileset->bounds, + tileset.zoomRange, + tileset.bounds, [&] (const OverscaledTileID& tileID) { - return std::make_unique<RasterDEMTile>(tileID, parameters, *tileset); + return std::make_unique<RasterDEMTile>(tileID, parameters, tileset); }); algorithm::updateTileMasks(tilePyramid.getRenderedTiles()); } diff --git a/src/mbgl/renderer/sources/render_raster_dem_source.hpp b/src/mbgl/renderer/sources/render_raster_dem_source.hpp index dd74f4d7e7..72a3779e99 100644 --- a/src/mbgl/renderer/sources/render_raster_dem_source.hpp +++ b/src/mbgl/renderer/sources/render_raster_dem_source.hpp @@ -2,20 +2,13 @@ #include <mbgl/renderer/sources/render_tile_source.hpp> #include <mbgl/style/sources/raster_source_impl.hpp> -#include <mbgl/util/constants.hpp> namespace mbgl { -class RenderRasterDEMSource final : public RenderTileSource { +class RenderRasterDEMSource final : public RenderTileSetSource { public: explicit RenderRasterDEMSource(Immutable<style::RasterSource::Impl>); - void update(Immutable<style::Source::Impl>, - const std::vector<Immutable<style::LayerProperties>>&, - bool needsRendering, - bool needsRelayout, - const TileParameters&) final; - std::unordered_map<std::string, std::vector<Feature>> queryRenderedFeatures(const ScreenLineString& geometry, const TransformState& transformState, @@ -26,13 +19,16 @@ public: std::vector<Feature> querySourceFeatures(const SourceQueryOptions&) const override; - uint8_t getMaxZoom() const override { return maxzoom; } - private: - const style::RasterSource::Impl& impl() const; + // RenderTileSetSource overrides + void updateInternal(const Tileset&, + const std::vector<Immutable<style::LayerProperties>>&, + bool needsRendering, + bool needsRelayout, + const TileParameters&) override; + const optional<Tileset>& getTileset() const override; - optional<Tileset> tileset; - uint8_t maxzoom = util::TERRAIN_RGB_MAXZOOM; + const style::RasterSource::Impl& impl() const; void onTileChanged(Tile&) override; }; diff --git a/src/mbgl/renderer/sources/render_raster_source.cpp b/src/mbgl/renderer/sources/render_raster_source.cpp index 06eb36795b..408f8a4e11 100644 --- a/src/mbgl/renderer/sources/render_raster_source.cpp +++ b/src/mbgl/renderer/sources/render_raster_source.cpp @@ -2,53 +2,39 @@ #include <mbgl/renderer/render_tile.hpp> #include <mbgl/tile/raster_tile.hpp> #include <mbgl/algorithm/update_tile_masks.hpp> +#include <mbgl/renderer/tile_parameters.hpp> namespace mbgl { using namespace style; RenderRasterSource::RenderRasterSource(Immutable<style::RasterSource::Impl> impl_) - : RenderTileSource(std::move(impl_)) { + : RenderTileSetSource(std::move(impl_)) { } -const style::RasterSource::Impl& RenderRasterSource::impl() const { +inline const style::RasterSource::Impl& RenderRasterSource::impl() const { return static_cast<const style::RasterSource::Impl&>(*baseImpl); } -void RenderRasterSource::update(Immutable<style::Source::Impl> baseImpl_, - const std::vector<Immutable<LayerProperties>>& layers, - const bool needsRendering, - const bool needsRelayout, - const TileParameters& parameters) { - std::swap(baseImpl, baseImpl_); - - enabled = needsRendering; - - optional<Tileset> _tileset = impl().getTileset(); - - if (tileset != _tileset) { - tileset = _tileset; - - // TODO: this removes existing buckets, and will cause flickering. - // Should instead refresh tile data in place. - tilePyramid.clearAll(); - } - // Allow clearing the tile pyramid first, before the early return in case - // the new tileset is not yet available or has an error in loading - if (!_tileset) { - return; - } +const optional<Tileset>& RenderRasterSource::getTileset() const { + return impl().tileset; +} +void RenderRasterSource::updateInternal(const Tileset& tileset, + const std::vector<Immutable<LayerProperties>>& layers, + const bool needsRendering, + const bool needsRelayout, + const TileParameters& parameters) { tilePyramid.update(layers, needsRendering, needsRelayout, parameters, SourceType::Raster, impl().getTileSize(), - tileset->zoomRange, - tileset->bounds, + tileset.zoomRange, + tileset.bounds, [&] (const OverscaledTileID& tileID) { - return std::make_unique<RasterTile>(tileID, parameters, *tileset); + return std::make_unique<RasterTile>(tileID, parameters, tileset); }); algorithm::updateTileMasks(tilePyramid.getRenderedTiles()); } diff --git a/src/mbgl/renderer/sources/render_raster_source.hpp b/src/mbgl/renderer/sources/render_raster_source.hpp index 0071dddec9..0760b7fa2b 100644 --- a/src/mbgl/renderer/sources/render_raster_source.hpp +++ b/src/mbgl/renderer/sources/render_raster_source.hpp @@ -5,15 +5,11 @@ namespace mbgl { -class RenderRasterSource final : public RenderTileSource { +class RenderRasterSource final : public RenderTileSetSource { public: explicit RenderRasterSource(Immutable<style::RasterSource::Impl>); - void update(Immutable<style::Source::Impl>, - const std::vector<Immutable<style::LayerProperties>>&, - bool needsRendering, - bool needsRelayout, - const TileParameters&) final; +private: void prepare(const SourcePrepareParameters&) final; std::unordered_map<std::string, std::vector<Feature>> @@ -26,9 +22,15 @@ public: std::vector<Feature> querySourceFeatures(const SourceQueryOptions&) const override; -private: + // RenderTileSetSource overrides + void updateInternal(const Tileset&, + const std::vector<Immutable<style::LayerProperties>>&, + bool needsRendering, + bool needsRelayout, + const TileParameters&) override; + const optional<Tileset>& getTileset() const override; + const style::RasterSource::Impl& impl() const; - optional<Tileset> tileset; }; } // namespace mbgl diff --git a/src/mbgl/renderer/sources/render_tile_source.cpp b/src/mbgl/renderer/sources/render_tile_source.cpp index 6ee2eca1b1..ef3f34f595 100644 --- a/src/mbgl/renderer/sources/render_tile_source.cpp +++ b/src/mbgl/renderer/sources/render_tile_source.cpp @@ -4,8 +4,10 @@ #include <mbgl/renderer/render_tile.hpp> #include <mbgl/renderer/render_tree.hpp> #include <mbgl/renderer/paint_parameters.hpp> +#include <mbgl/renderer/tile_parameters.hpp> #include <mbgl/renderer/tile_render_data.hpp> #include <mbgl/tile/vector_tile.hpp> +#include <mbgl/util/constants.hpp> #include <mbgl/util/math.hpp> namespace mbgl { @@ -139,4 +141,44 @@ void RenderTileSource::dumpDebugLogs() const { tilePyramid.dumpDebugLogs(); } +// RenderTileSetSource implementation + +RenderTileSetSource::RenderTileSetSource(Immutable<style::Source::Impl> impl_) + : RenderTileSource(std::move(impl_)) { +} + +RenderTileSetSource::~RenderTileSetSource() = default; + +uint8_t RenderTileSetSource::getMaxZoom() const { + return cachedTileset ? cachedTileset->zoomRange.max : util::TERRAIN_RGB_MAXZOOM; +} + +void RenderTileSetSource::update(Immutable<style::Source::Impl> baseImpl_, + const std::vector<Immutable<style::LayerProperties>>& layers, + const bool needsRendering, + const bool needsRelayout, + const TileParameters& parameters) { + std::swap(baseImpl, baseImpl_); + + enabled = needsRendering; + + const optional<Tileset>& implTileset = getTileset(); + // In Continuous mode, keep the existing tiles if the new cachedTileset is not + // yet available, thus providing smart style transitions without flickering. + // In other modes, allow clearing the tile pyramid first, before the early + // return in order to avoid render tests being flaky. + bool canUpdateTileset = implTileset || parameters.mode != MapMode::Continuous; + if (canUpdateTileset && cachedTileset != implTileset) { + cachedTileset = implTileset; + + // TODO: this removes existing buckets, and will cause flickering. + // Should instead refresh tile data in place. + tilePyramid.clearAll(); + } + + if (!implTileset) return; + + updateInternal(*cachedTileset, layers, needsRendering, needsRelayout, parameters); +} + } // namespace mbgl diff --git a/src/mbgl/renderer/sources/render_tile_source.hpp b/src/mbgl/renderer/sources/render_tile_source.hpp index f961c20561..7edff726d5 100644 --- a/src/mbgl/renderer/sources/render_tile_source.hpp +++ b/src/mbgl/renderer/sources/render_tile_source.hpp @@ -11,7 +11,6 @@ namespace mbgl { */ class RenderTileSource : public RenderSource { public: - RenderTileSource(Immutable<style::Source::Impl>); ~RenderTileSource() override; bool isLoaded() const override; @@ -39,6 +38,7 @@ public: void dumpDebugLogs() const override; protected: + RenderTileSource(Immutable<style::Source::Impl>); TilePyramid tilePyramid; Immutable<std::vector<RenderTile>> renderTiles; mutable RenderTiles filteredRenderTiles; @@ -46,4 +46,31 @@ protected: float bearing = 0.0f; }; +/** + * @brief Base class for render sources that use tile sets. + */ +class RenderTileSetSource : public RenderTileSource { +protected: + RenderTileSetSource(Immutable<style::Source::Impl>); + ~RenderTileSetSource() override; + + virtual void updateInternal(const Tileset&, + const std::vector<Immutable<style::LayerProperties>>&, + bool needsRendering, + bool needsRelayout, + const TileParameters&) = 0; + // Returns tileset from the current impl. + virtual const optional<Tileset>& getTileset() const = 0; + +private: + uint8_t getMaxZoom() const final; + void update(Immutable<style::Source::Impl>, + const std::vector<Immutable<style::LayerProperties>>&, + bool needsRendering, + bool needsRelayout, + const TileParameters&) final; + + optional<Tileset> cachedTileset; +}; + } // namespace mbgl diff --git a/src/mbgl/renderer/sources/render_vector_source.cpp b/src/mbgl/renderer/sources/render_vector_source.cpp index 53fc4c8299..6e4fdede10 100644 --- a/src/mbgl/renderer/sources/render_vector_source.cpp +++ b/src/mbgl/renderer/sources/render_vector_source.cpp @@ -2,53 +2,35 @@ #include <mbgl/renderer/render_tile.hpp> #include <mbgl/renderer/paint_parameters.hpp> #include <mbgl/tile/vector_tile.hpp> +#include <mbgl/renderer/tile_parameters.hpp> namespace mbgl { using namespace style; RenderVectorSource::RenderVectorSource(Immutable<style::VectorSource::Impl> impl_) - : RenderTileSource(impl_) { + : RenderTileSetSource(std::move(impl_)) { } -const style::VectorSource::Impl& RenderVectorSource::impl() const { - return static_cast<const style::VectorSource::Impl&>(*baseImpl); +const optional<Tileset>& RenderVectorSource::getTileset() const { + return static_cast<const style::VectorSource::Impl&>(*baseImpl).tileset; } -void RenderVectorSource::update(Immutable<style::Source::Impl> baseImpl_, - const std::vector<Immutable<style::LayerProperties>>& layers, - const bool needsRendering, - const bool needsRelayout, - const TileParameters& parameters) { - std::swap(baseImpl, baseImpl_); - - enabled = needsRendering; - - optional<Tileset> _tileset = impl().getTileset(); - - if (tileset != _tileset) { - tileset = _tileset; - - // TODO: this removes existing buckets, and will cause flickering. - // Should instead refresh tile data in place. - tilePyramid.clearAll(); - } - // Allow clearing the tile pyramid first, before the early return in case - // the new tileset is not yet available or has an error in loading - if (!_tileset) { - return; - } - +void RenderVectorSource::updateInternal(const Tileset& tileset, + const std::vector<Immutable<style::LayerProperties>>& layers, + const bool needsRendering, + const bool needsRelayout, + const TileParameters& parameters) { tilePyramid.update(layers, needsRendering, needsRelayout, parameters, SourceType::Vector, util::tileSize, - tileset->zoomRange, - tileset->bounds, + tileset.zoomRange, + tileset.bounds, [&] (const OverscaledTileID& tileID) { - return std::make_unique<VectorTile>(tileID, impl().id, parameters, *tileset); + return std::make_unique<VectorTile>(tileID, baseImpl->id, parameters, tileset); }); } diff --git a/src/mbgl/renderer/sources/render_vector_source.hpp b/src/mbgl/renderer/sources/render_vector_source.hpp index d5ac443e1c..b83402ddb4 100644 --- a/src/mbgl/renderer/sources/render_vector_source.hpp +++ b/src/mbgl/renderer/sources/render_vector_source.hpp @@ -6,18 +6,16 @@ namespace mbgl { -class RenderVectorSource final : public RenderTileSource { +class RenderVectorSource final : public RenderTileSetSource { public: explicit RenderVectorSource(Immutable<style::VectorSource::Impl>); - - void update(Immutable<style::Source::Impl>, - const std::vector<Immutable<style::LayerProperties>>&, - bool needsRendering, - bool needsRelayout, - const TileParameters&) final; private: - const style::VectorSource::Impl& impl() const; - optional<Tileset> tileset; + void updateInternal(const Tileset&, + const std::vector<Immutable<style::LayerProperties>>&, + bool needsRendering, + bool needsRelayout, + const TileParameters&) override; + const optional<Tileset>& getTileset() const override; }; } // namespace mbgl diff --git a/src/mbgl/style/sources/raster_source.cpp b/src/mbgl/style/sources/raster_source.cpp index 2d08e4be80..b4fbe22ae1 100644 --- a/src/mbgl/style/sources/raster_source.cpp +++ b/src/mbgl/style/sources/raster_source.cpp @@ -65,7 +65,7 @@ void RasterSource::loadDescription(FileSource& fileSource) { } util::mapbox::canonicalizeTileset(*tileset, url, getType(), getTileSize()); - bool changed = impl().getTileset() != *tileset; + bool changed = impl().tileset != *tileset; baseImpl = makeMutable<Impl>(impl(), *tileset); loaded = true; diff --git a/src/mbgl/style/sources/raster_source_impl.cpp b/src/mbgl/style/sources/raster_source_impl.cpp index 4db25aafd1..4201fd0578 100644 --- a/src/mbgl/style/sources/raster_source_impl.cpp +++ b/src/mbgl/style/sources/raster_source_impl.cpp @@ -10,18 +10,14 @@ RasterSource::Impl::Impl(SourceType sourceType, std::string id_, uint16_t tileSi RasterSource::Impl::Impl(const Impl& other, Tileset tileset_) : Source::Impl(other), - tileSize(other.tileSize), - tileset(std::move(tileset_)) { + tileset(std::move(tileset_)), + tileSize(other.tileSize) { } uint16_t RasterSource::Impl::getTileSize() const { return tileSize; } -optional<Tileset> RasterSource::Impl::getTileset() const { - return tileset; -} - optional<std::string> RasterSource::Impl::getAttribution() const { if (!tileset) { return {}; diff --git a/src/mbgl/style/sources/raster_source_impl.hpp b/src/mbgl/style/sources/raster_source_impl.hpp index 96f59a2159..bb58455140 100644 --- a/src/mbgl/style/sources/raster_source_impl.hpp +++ b/src/mbgl/style/sources/raster_source_impl.hpp @@ -11,14 +11,14 @@ public: Impl(SourceType sourceType, std::string id, uint16_t tileSize); Impl(const Impl&, Tileset); - optional<Tileset> getTileset() const; uint16_t getTileSize() const; optional<std::string> getAttribution() const final; + const optional<Tileset> tileset; + private: uint16_t tileSize; - optional<Tileset> tileset; }; } // namespace style diff --git a/src/mbgl/style/sources/vector_source.cpp b/src/mbgl/style/sources/vector_source.cpp index d141d291e1..8fa694e4d0 100644 --- a/src/mbgl/style/sources/vector_source.cpp +++ b/src/mbgl/style/sources/vector_source.cpp @@ -62,7 +62,7 @@ void VectorSource::loadDescription(FileSource& fileSource) { } util::mapbox::canonicalizeTileset(*tileset, url, getType(), util::tileSize); - bool changed = impl().getTileset() != *tileset; + bool changed = impl().tileset != *tileset; baseImpl = makeMutable<Impl>(impl(), *tileset); loaded = true; diff --git a/src/mbgl/style/sources/vector_source_impl.cpp b/src/mbgl/style/sources/vector_source_impl.cpp index b06f0557bf..8f85a41ddb 100644 --- a/src/mbgl/style/sources/vector_source_impl.cpp +++ b/src/mbgl/style/sources/vector_source_impl.cpp @@ -12,10 +12,6 @@ VectorSource::Impl::Impl(const Impl& other, Tileset tileset_) tileset(std::move(tileset_)) { } -optional<Tileset> VectorSource::Impl::getTileset() const { - return tileset; -} - optional<std::string> VectorSource::Impl::getAttribution() const { if (!tileset) { return {}; diff --git a/src/mbgl/style/sources/vector_source_impl.hpp b/src/mbgl/style/sources/vector_source_impl.hpp index 5e559b9266..4526fbe356 100644 --- a/src/mbgl/style/sources/vector_source_impl.hpp +++ b/src/mbgl/style/sources/vector_source_impl.hpp @@ -11,12 +11,9 @@ public: Impl(std::string id); Impl(const Impl&, Tileset); - optional<Tileset> getTileset() const; - optional<std::string> getAttribution() const final; -private: - optional<Tileset> tileset; + const optional<Tileset> tileset; }; } // namespace style diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp index 160ee21edf..c38e181181 100644 --- a/src/mbgl/text/get_anchors.cpp +++ b/src/mbgl/text/get_anchors.cpp @@ -166,6 +166,8 @@ optional<Anchor> getCenterAnchor(const GeometryCoordinates& line, if (!angleWindowSize || checkMaxAngle(line, anchor, labelLength, angleWindowSize, maxAngle)) { return anchor; } + + return nullopt; } prevDistance += segmentDistance; diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp index 130c2d050c..1795b0dcb7 100644 --- a/src/mbgl/text/placement.cpp +++ b/src/mbgl/text/placement.cpp @@ -101,7 +101,7 @@ void Placement::placeBucket( SymbolBucket& bucket, const BucketPlacementParameters& params, std::set<uint32_t>& seenCrossTileIDs) { - const auto& layout = bucket.layout; + const auto& layout = *bucket.layout; const auto& renderTile = params.tile; const auto& state = collisionIndex.getTransformState(); const float pixelsToTileUnits = renderTile.id.pixelsToTileUnits(1, state.getZoom()); @@ -409,7 +409,7 @@ Point<float> calculateVariableRenderShift(style::SymbolAnchorType anchor, float bool Placement::updateBucketDynamicVertices(SymbolBucket& bucket, const TransformState& state, const RenderTile& tile) { using namespace style; - const auto& layout = bucket.layout; + const auto& layout = *bucket.layout; const bool alongLine = layout.get<SymbolPlacement>() != SymbolPlacementType::Point; bool result = false; @@ -507,24 +507,24 @@ bool Placement::updateBucketDynamicVertices(SymbolBucket& bucket, const Transfor void Placement::updateBucketOpacities(SymbolBucket& bucket, const TransformState& state, std::set<uint32_t>& seenCrossTileIDs) { if (bucket.hasTextData()) bucket.text.opacityVertices.clear(); if (bucket.hasIconData()) bucket.icon.opacityVertices.clear(); - if (bucket.hasCollisionBoxData()) bucket.collisionBox.dynamicVertices.clear(); - if (bucket.hasCollisionCircleData()) bucket.collisionCircle.dynamicVertices.clear(); + if (bucket.hasCollisionBoxData()) bucket.collisionBox->dynamicVertices.clear(); + if (bucket.hasCollisionCircleData()) bucket.collisionCircle->dynamicVertices.clear(); JointOpacityState duplicateOpacityState(false, false, true); - const bool textAllowOverlap = bucket.layout.get<style::TextAllowOverlap>(); - const bool iconAllowOverlap = bucket.layout.get<style::IconAllowOverlap>(); - const bool variablePlacement = !bucket.layout.get<style::TextVariableAnchor>().empty(); - const bool rotateWithMap = bucket.layout.get<style::TextRotationAlignment>() == style::AlignmentType::Map; - const bool pitchWithMap = bucket.layout.get<style::TextPitchAlignment>() == style::AlignmentType::Map; + const bool textAllowOverlap = bucket.layout->get<style::TextAllowOverlap>(); + const bool iconAllowOverlap = bucket.layout->get<style::IconAllowOverlap>(); + const bool variablePlacement = !bucket.layout->get<style::TextVariableAnchor>().empty(); + const bool rotateWithMap = bucket.layout->get<style::TextRotationAlignment>() == style::AlignmentType::Map; + const bool pitchWithMap = bucket.layout->get<style::TextPitchAlignment>() == style::AlignmentType::Map; // If allow-overlap is true, we can show symbols before placement runs on them // But we have to wait for placement if we potentially depend on a paired icon/text // with allow-overlap: false. // See https://github.com/mapbox/mapbox-gl-native/issues/12483 JointOpacityState defaultOpacityState( - textAllowOverlap && (iconAllowOverlap || !bucket.hasIconData() || bucket.layout.get<style::IconOptional>()), - iconAllowOverlap && (textAllowOverlap || !bucket.hasTextData() || bucket.layout.get<style::TextOptional>()), + textAllowOverlap && (iconAllowOverlap || !bucket.hasIconData() || bucket.layout->get<style::IconOptional>()), + iconAllowOverlap && (textAllowOverlap || !bucket.hasTextData() || bucket.layout->get<style::TextOptional>()), true); for (SymbolInstance& symbolInstance : bucket.symbolInstances) { @@ -598,7 +598,7 @@ void Placement::updateBucketOpacities(SymbolBucket& bucket, const TransformState } auto dynamicVertex = CollisionBoxProgram::dynamicVertex(placed, false, {}); for (size_t i = 0; i < feature.boxes.size() * 4; i++) { - bucket.collisionBox.dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionBox->dynamicVertices.emplace_back(dynamicVertex); } }; @@ -633,7 +633,7 @@ void Placement::updateBucketOpacities(SymbolBucket& bucket, const TransformState } auto dynamicVertex = CollisionBoxProgram::dynamicVertex(placed, !used, shift); for (size_t i = 0; i < feature.boxes.size() * 4; i++) { - bucket.collisionBox.dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionBox->dynamicVertices.emplace_back(dynamicVertex); } }; @@ -643,10 +643,10 @@ void Placement::updateBucketOpacities(SymbolBucket& bucket, const TransformState } for (const CollisionBox& box : feature.boxes) { auto dynamicVertex = CollisionBoxProgram::dynamicVertex(placed, !box.used, {}); - bucket.collisionCircle.dynamicVertices.emplace_back(dynamicVertex); - bucket.collisionCircle.dynamicVertices.emplace_back(dynamicVertex); - bucket.collisionCircle.dynamicVertices.emplace_back(dynamicVertex); - bucket.collisionCircle.dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionCircle->dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionCircle->dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionCircle->dynamicVertices.emplace_back(dynamicVertex); + bucket.collisionCircle->dynamicVertices.emplace_back(dynamicVertex); } }; diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp index ff01b590fc..9c9847cf4d 100644 --- a/test/gl/bucket.test.cpp +++ b/test/gl/bucket.test.cpp @@ -114,7 +114,7 @@ TEST(Buckets, SymbolBucket) { gl::HeadlessBackend backend({ 512, 256 }); gfx::BackendScope scope { backend }; - style::SymbolLayoutProperties::PossiblyEvaluated layout; + auto layout = makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(); bool sdfIcons = false; bool iconsNeedLinear = false; bool sortFeaturesByY = false; @@ -122,7 +122,7 @@ TEST(Buckets, SymbolBucket) { std::vector<SymbolInstance> symbolInstances; gl::Context context{ backend }; - SymbolBucket bucket { layout, {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear, sortFeaturesByY, bucketLeaderID, std::move(symbolInstances), 1.0f }; + SymbolBucket bucket { std::move(layout), {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear, sortFeaturesByY, bucketLeaderID, std::move(symbolInstances), 1.0f }; ASSERT_FALSE(bucket.hasIconData()); ASSERT_FALSE(bucket.hasTextData()); ASSERT_FALSE(bucket.hasCollisionBoxData()); diff --git a/test/text/cross_tile_symbol_index.test.cpp b/test/text/cross_tile_symbol_index.test.cpp index f121781766..841f73c699 100644 --- a/test/text/cross_tile_symbol_index.test.cpp +++ b/test/text/cross_tile_symbol_index.test.cpp @@ -21,7 +21,8 @@ TEST(CrossTileSymbolLayerIndex, addBucket) { uint32_t maxBucketInstanceId = 0; CrossTileSymbolLayerIndex index; - style::SymbolLayoutProperties::PossiblyEvaluated layout; + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout = + makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(); bool sdfIcons = false; bool iconsNeedLinear = false; bool sortFeaturesByY = false; @@ -95,7 +96,8 @@ TEST(CrossTileSymbolLayerIndex, resetIDs) { uint32_t maxBucketInstanceId = 0; CrossTileSymbolLayerIndex index; - style::SymbolLayoutProperties::PossiblyEvaluated layout; + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout = + makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(); bool sdfIcons = false; bool iconsNeedLinear = false; bool sortFeaturesByY = false; @@ -135,7 +137,8 @@ TEST(CrossTileSymbolLayerIndex, noDuplicatesWithinZoomLevel) { uint32_t maxBucketInstanceId = 0; CrossTileSymbolLayerIndex index; - style::SymbolLayoutProperties::PossiblyEvaluated layout; + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout = + makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(); bool sdfIcons = false; bool iconsNeedLinear = false; bool sortFeaturesByY = false; @@ -173,7 +176,8 @@ TEST(CrossTileSymbolLayerIndex, bucketReplacement) { uint32_t maxBucketInstanceId = 0; CrossTileSymbolLayerIndex index; - style::SymbolLayoutProperties::PossiblyEvaluated layout; + Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout = + makeMutable<style::SymbolLayoutProperties::PossiblyEvaluated>(); bool sdfIcons = false; bool iconsNeedLinear = false; bool sortFeaturesByY = false; |