diff --git a/config/jsdoc/api/plugins/api.js b/config/jsdoc/api/plugins/api.js index fcc6434864..10184ea7bd 100644 --- a/config/jsdoc/api/plugins/api.js +++ b/config/jsdoc/api/plugins/api.js @@ -200,6 +200,11 @@ exports.handlers = { processingComplete(e) { const byLongname = e.doclets.index.longname; for (const name in defaultExports) { + if (!(name in byLongname)) { + throw new Error( + `missing ${name} in doclet index, did you forget a @module tag?` + ); + } byLongname[name].forEach(function (doclet) { doclet.isDefaultExport = true; }); diff --git a/examples/mapbox-vector-layer.css b/examples/mapbox-vector-layer.css new file mode 100644 index 0000000000..33e90f7301 --- /dev/null +++ b/examples/mapbox-vector-layer.css @@ -0,0 +1,3 @@ +.map { + background: #f8f4f0; +} diff --git a/examples/mapbox-vector-layer.html b/examples/mapbox-vector-layer.html new file mode 100644 index 0000000000..92cdc9a857 --- /dev/null +++ b/examples/mapbox-vector-layer.html @@ -0,0 +1,15 @@ +--- +layout: example.html +title: Mapbox Vector Layer +shortdesc: Rendering a layer with a Mapbox-hosted style. +docs: > + The MapboxVector layer allows you to create a layer based on a Mapbox-hosted style using a single + vector source. If your style uses more than one source, use the `source` property to choose a + single vector source. Use the `layers` property if you only want to render a subset of the style's + layers (provided they all share the same source). +tags: "mapbox, studio, vector, tiles" +cloak: + - key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q + value: Your Mapbox access token from https://mapbox.com/ here +--- +
diff --git a/examples/mapbox-vector-layer.js b/examples/mapbox-vector-layer.js new file mode 100644 index 0000000000..3fdc9d7f8b --- /dev/null +++ b/examples/mapbox-vector-layer.js @@ -0,0 +1,18 @@ +import Map from '../src/ol/Map.js'; +import MapboxVector from '../src/ol/layer/MapboxVector.js'; +import View from '../src/ol/View.js'; + +const map = new Map({ + target: 'map', + layers: [ + new MapboxVector({ + styleUrl: 'mapbox://styles/mapbox/bright-v9', + accessToken: + 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q', + }), + ], + view: new View({ + center: [0, 0], + zoom: 2, + }), +}); diff --git a/package-lock.json b/package-lock.json index 4fe4c925d0..0f84e88d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1604,14 +1604,12 @@ "@mapbox/jsonlint-lines-primitives": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=", - "dev": true + "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=" }, "@mapbox/mapbox-gl-style-spec": { "version": "13.13.0", "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.13.0.tgz", "integrity": "sha512-PBXa/Bw2G87NZckBZqY3omI3THF5MYQQY5B1IZWVLI7Ujsy149cjC8Sm1Ub1BgAnyslepdjtwWVS43IOjVYmUw==", - "dev": true, "requires": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/point-geometry": "^0.1.0", @@ -1626,22 +1624,19 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, "@mapbox/point-geometry": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=", - "dev": true + "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=" }, "@mapbox/unitbezier": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", - "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=", - "dev": true + "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=" }, "@nodelib/fs.scandir": { "version": "2.1.3", @@ -3788,8 +3783,7 @@ "csscolorparser": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", - "integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs=", - "dev": true + "integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs=" }, "custom-event": { "version": "1.0.1", @@ -7579,8 +7573,7 @@ "json-stringify-pretty-compact": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz", - "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==", - "dev": true + "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==" }, "json-stringify-safe": { "version": "5.0.1", @@ -8122,8 +8115,7 @@ "mapbox-to-css-font": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/mapbox-to-css-font/-/mapbox-to-css-font-2.4.0.tgz", - "integrity": "sha512-v674D0WtpxCXlA6E+sBlG1QJWdUkz/s9qAD91bJSXBGuBL5lL4tJXpoJEftecphCh2SVQCjWMS2vhylc3AIQTg==", - "dev": true + "integrity": "sha512-v674D0WtpxCXlA6E+sBlG1QJWdUkz/s9qAD91bJSXBGuBL5lL4tJXpoJEftecphCh2SVQCjWMS2vhylc3AIQTg==" }, "markdown-it": { "version": "10.0.0", @@ -9034,7 +9026,6 @@ "version": "6.1.1", "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.1.1.tgz", "integrity": "sha512-0Hgz2BX2tWe1ZNPMLpJkLdm3XI6ILrFbgmJIvdrlDYRce2ul1mXLmkJmbyLFs2tozsBJDcPJmI55UsKbiKg6ow==", - "dev": true, "requires": { "@mapbox/mapbox-gl-style-spec": "13.13.0", "mapbox-to-css-font": "^2.4.0", @@ -10386,8 +10377,7 @@ "rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=", - "dev": true + "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" }, "rxjs": { "version": "6.5.5", @@ -11078,20 +11068,17 @@ "sort-asc": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.1.0.tgz", - "integrity": "sha1-q3md9h/HPqCVbHnEtTHtHp53J+k=", - "dev": true + "integrity": "sha1-q3md9h/HPqCVbHnEtTHtHp53J+k=" }, "sort-desc": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/sort-desc/-/sort-desc-0.1.1.tgz", - "integrity": "sha1-GYuMDN6wlcRjNBhh45JdTuNZqe4=", - "dev": true + "integrity": "sha1-GYuMDN6wlcRjNBhh45JdTuNZqe4=" }, "sort-object": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/sort-object/-/sort-object-0.3.2.tgz", "integrity": "sha1-mODRme3kDgfGGoRAPGHWw7KQ+eI=", - "dev": true, "requires": { "sort-asc": "^0.1.0", "sort-desc": "^0.1.1" @@ -12430,8 +12417,7 @@ "webfont-matcher": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/webfont-matcher/-/webfont-matcher-1.1.0.tgz", - "integrity": "sha1-mM6VCXsp4x++czBT4Q5XFkLRxsc=", - "dev": true + "integrity": "sha1-mM6VCXsp4x++czBT4Q5XFkLRxsc=" }, "webpack": { "version": "4.43.0", diff --git a/package.json b/package.json index e9977fd5b4..e03035b911 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ }, "dependencies": { "elm-pep": "^1.0.4", + "ol-mapbox-style": "^6.1.1", "pbf": "3.2.1", "pixelworks": "1.1.0", "rbush": "^3.0.1" @@ -85,7 +86,6 @@ "loglevelnext": "^4.0.1", "marked": "1.0.0", "mocha": "7.1.2", - "ol-mapbox-style": "^6.1.1", "pixelmatch": "^5.1.0", "pngjs": "^5.0.0", "proj4": "2.6.1", diff --git a/rendering/cases/layer-mapbox-vector/expected.png b/rendering/cases/layer-mapbox-vector/expected.png new file mode 100644 index 0000000000..a4c2011370 Binary files /dev/null and b/rendering/cases/layer-mapbox-vector/expected.png differ diff --git a/rendering/cases/layer-mapbox-vector/main.js b/rendering/cases/layer-mapbox-vector/main.js new file mode 100644 index 0000000000..0ba5e04242 --- /dev/null +++ b/rendering/cases/layer-mapbox-vector/main.js @@ -0,0 +1,22 @@ +import Map from '../../../src/ol/Map.js'; +import MapboxVector from '../../../src/ol/layer/MapboxVector.js'; +import View from '../../../src/ol/View.js'; + +new Map({ + layers: [ + new MapboxVector({ + styleUrl: '/data/styles/bright-v9.json', + accessToken: 'test-token', + }), + ], + target: 'map', + view: new View({ + center: [1825927.7316762917, 6143091.089223046], + zoom: 15, + }), +}); + +render({ + message: 'Mapbox vector layer renders', + tolerance: 0.025, +}); diff --git a/rendering/data/sprites/bright-v9/sprite.json b/rendering/data/sprites/bright-v9/sprite.json new file mode 100644 index 0000000000..aee4b3990d --- /dev/null +++ b/rendering/data/sprites/bright-v9/sprite.json @@ -0,0 +1 @@ +{"airfield-15":{"width":21,"height":21,"x":0,"y":0,"pixelRatio":1,"visible":true},"airport-15":{"width":21,"height":21,"x":21,"y":0,"pixelRatio":1,"visible":true},"alcohol-shop-15":{"width":21,"height":21,"x":0,"y":21,"pixelRatio":1,"visible":true},"amusement-park-15":{"width":21,"height":21,"x":21,"y":21,"pixelRatio":1,"visible":true},"aquarium-15":{"width":21,"height":21,"x":42,"y":0,"pixelRatio":1,"visible":true},"art-gallery-15":{"width":21,"height":21,"x":63,"y":0,"pixelRatio":1,"visible":true},"attraction-15":{"width":21,"height":21,"x":42,"y":21,"pixelRatio":1,"visible":true},"bakery-15":{"width":21,"height":21,"x":63,"y":21,"pixelRatio":1,"visible":true},"bank-15":{"width":21,"height":21,"x":0,"y":42,"pixelRatio":1,"visible":true},"bar-15":{"width":21,"height":21,"x":21,"y":42,"pixelRatio":1,"visible":true},"beer-15":{"width":21,"height":21,"x":42,"y":42,"pixelRatio":1,"visible":true},"bicycle-15":{"width":21,"height":21,"x":63,"y":42,"pixelRatio":1,"visible":true},"bicycle-share-15":{"width":21,"height":21,"x":0,"y":63,"pixelRatio":1,"visible":true},"bus-15":{"width":21,"height":21,"x":21,"y":63,"pixelRatio":1,"visible":true},"cafe-15":{"width":21,"height":21,"x":42,"y":63,"pixelRatio":1,"visible":true},"campsite-15":{"width":21,"height":21,"x":63,"y":63,"pixelRatio":1,"visible":true},"car-15":{"width":21,"height":21,"x":84,"y":0,"pixelRatio":1,"visible":true},"castle-15":{"width":21,"height":21,"x":105,"y":0,"pixelRatio":1,"visible":true},"cemetery-15":{"width":21,"height":21,"x":126,"y":0,"pixelRatio":1,"visible":true},"cinema-15":{"width":21,"height":21,"x":147,"y":0,"pixelRatio":1,"visible":true},"circle-15":{"width":21,"height":21,"x":84,"y":21,"pixelRatio":1,"visible":true},"circle-stroked-15":{"width":21,"height":21,"x":105,"y":21,"pixelRatio":1,"visible":true},"clothing-store-15":{"width":21,"height":21,"x":126,"y":21,"pixelRatio":1,"visible":true},"college-15":{"width":21,"height":21,"x":147,"y":21,"pixelRatio":1,"visible":true},"dentist-15":{"width":21,"height":21,"x":84,"y":42,"pixelRatio":1,"visible":true},"doctor-15":{"width":21,"height":21,"x":105,"y":42,"pixelRatio":1,"visible":true},"dog-park-15":{"width":21,"height":21,"x":126,"y":42,"pixelRatio":1,"visible":true},"drinking-water-15":{"width":21,"height":21,"x":147,"y":42,"pixelRatio":1,"visible":true},"embassy-15":{"width":21,"height":21,"x":84,"y":63,"pixelRatio":1,"visible":true},"entrance-15":{"width":21,"height":21,"x":105,"y":63,"pixelRatio":1,"visible":true},"fast-food-15":{"width":21,"height":21,"x":126,"y":63,"pixelRatio":1,"visible":true},"ferry-15":{"width":21,"height":21,"x":147,"y":63,"pixelRatio":1,"visible":true},"fire-station-15":{"width":21,"height":21,"x":0,"y":84,"pixelRatio":1,"visible":true},"fuel-15":{"width":21,"height":21,"x":21,"y":84,"pixelRatio":1,"visible":true},"garden-15":{"width":21,"height":21,"x":42,"y":84,"pixelRatio":1,"visible":true},"golf-15":{"width":21,"height":21,"x":63,"y":84,"pixelRatio":1,"visible":true},"grocery-15":{"width":21,"height":21,"x":84,"y":84,"pixelRatio":1,"visible":true},"harbor-15":{"width":21,"height":21,"x":105,"y":84,"pixelRatio":1,"visible":true},"heliport-15":{"width":21,"height":21,"x":126,"y":84,"pixelRatio":1,"visible":true},"hospital-15":{"width":21,"height":21,"x":147,"y":84,"pixelRatio":1,"visible":true},"ice-cream-15":{"width":21,"height":21,"x":0,"y":105,"pixelRatio":1,"visible":true},"information-15":{"width":21,"height":21,"x":21,"y":105,"pixelRatio":1,"visible":true},"laundry-15":{"width":21,"height":21,"x":42,"y":105,"pixelRatio":1,"visible":true},"library-15":{"width":21,"height":21,"x":63,"y":105,"pixelRatio":1,"visible":true},"lodging-15":{"width":21,"height":21,"x":84,"y":105,"pixelRatio":1,"visible":true},"marker-15":{"width":21,"height":21,"x":105,"y":105,"pixelRatio":1,"visible":true},"monument-15":{"width":21,"height":21,"x":126,"y":105,"pixelRatio":1,"visible":true},"mountain-15":{"width":21,"height":21,"x":147,"y":105,"pixelRatio":1,"visible":true},"museum-15":{"width":21,"height":21,"x":0,"y":126,"pixelRatio":1,"visible":true},"music-15":{"width":21,"height":21,"x":21,"y":126,"pixelRatio":1,"visible":true},"park-15":{"width":21,"height":21,"x":42,"y":126,"pixelRatio":1,"visible":true},"pharmacy-15":{"width":21,"height":21,"x":63,"y":126,"pixelRatio":1,"visible":true},"picnic-site-15":{"width":21,"height":21,"x":84,"y":126,"pixelRatio":1,"visible":true},"place-of-worship-15":{"width":21,"height":21,"x":105,"y":126,"pixelRatio":1,"visible":true},"playground-15":{"width":21,"height":21,"x":126,"y":126,"pixelRatio":1,"visible":true},"police-15":{"width":21,"height":21,"x":147,"y":126,"pixelRatio":1,"visible":true},"post-15":{"width":21,"height":21,"x":0,"y":147,"pixelRatio":1,"visible":true},"prison-15":{"width":21,"height":21,"x":21,"y":147,"pixelRatio":1,"visible":true},"rail-15":{"width":21,"height":21,"x":42,"y":147,"pixelRatio":1,"visible":true},"rail-light-15":{"width":21,"height":21,"x":63,"y":147,"pixelRatio":1,"visible":true},"rail-metro-15":{"width":21,"height":21,"x":84,"y":147,"pixelRatio":1,"visible":true},"religious-christian-15":{"width":21,"height":21,"x":105,"y":147,"pixelRatio":1,"visible":true},"religious-jewish-15":{"width":21,"height":21,"x":126,"y":147,"pixelRatio":1,"visible":true},"religious-muslim-15":{"width":21,"height":21,"x":147,"y":147,"pixelRatio":1,"visible":true},"restaurant-15":{"width":21,"height":21,"x":168,"y":0,"pixelRatio":1,"visible":true},"rocket-15":{"width":21,"height":21,"x":189,"y":0,"pixelRatio":1,"visible":true},"school-15":{"width":21,"height":21,"x":210,"y":0,"pixelRatio":1,"visible":true},"shop-15":{"width":21,"height":21,"x":231,"y":0,"pixelRatio":1,"visible":true},"stadium-15":{"width":21,"height":21,"x":252,"y":0,"pixelRatio":1,"visible":true},"star-15":{"width":21,"height":21,"x":273,"y":0,"pixelRatio":1,"visible":true},"suitcase-15":{"width":21,"height":21,"x":294,"y":0,"pixelRatio":1,"visible":true},"swimming-15":{"width":21,"height":21,"x":315,"y":0,"pixelRatio":1,"visible":true},"theatre-15":{"width":21,"height":21,"x":168,"y":21,"pixelRatio":1,"visible":true},"toilet-15":{"width":21,"height":21,"x":189,"y":21,"pixelRatio":1,"visible":true},"town-hall-15":{"width":21,"height":21,"x":210,"y":21,"pixelRatio":1,"visible":true},"triangle-15":{"width":21,"height":21,"x":231,"y":21,"pixelRatio":1,"visible":true},"triangle-stroked-15":{"width":21,"height":21,"x":252,"y":21,"pixelRatio":1,"visible":true},"veterinary-15":{"width":21,"height":21,"x":273,"y":21,"pixelRatio":1,"visible":true},"volcano-15":{"width":21,"height":21,"x":294,"y":21,"pixelRatio":1,"visible":true},"zoo-15":{"width":21,"height":21,"x":315,"y":21,"pixelRatio":1,"visible":true},"motorway_1":{"width":18,"height":18,"x":168,"y":42,"pixelRatio":1,"visible":true},"motorway_2":{"width":25,"height":18,"x":186,"y":42,"pixelRatio":1,"visible":true},"motorway_3":{"width":32,"height":18,"x":211,"y":42,"pixelRatio":1,"visible":true},"motorway_4":{"width":39,"height":18,"x":243,"y":42,"pixelRatio":1,"visible":true},"motorway_5":{"width":45,"height":18,"x":282,"y":42,"pixelRatio":1,"visible":true},"motorway_6":{"width":50,"height":18,"x":168,"y":63,"pixelRatio":1,"visible":true},"airfield-11":{"width":17,"height":17,"x":218,"y":63,"pixelRatio":1,"visible":true},"airport-11":{"width":17,"height":17,"x":235,"y":63,"pixelRatio":1,"visible":true},"alcohol-shop-11":{"width":17,"height":17,"x":252,"y":63,"pixelRatio":1,"visible":true},"amusement-park-11":{"width":17,"height":17,"x":269,"y":63,"pixelRatio":1,"visible":true},"aquarium-11":{"width":17,"height":17,"x":286,"y":63,"pixelRatio":1,"visible":true},"art-gallery-11":{"width":17,"height":17,"x":303,"y":63,"pixelRatio":1,"visible":true},"attraction-11":{"width":17,"height":17,"x":168,"y":84,"pixelRatio":1,"visible":true},"bakery-11":{"width":17,"height":17,"x":185,"y":84,"pixelRatio":1,"visible":true},"bank-11":{"width":17,"height":17,"x":202,"y":84,"pixelRatio":1,"visible":true},"bar-11":{"width":17,"height":17,"x":219,"y":84,"pixelRatio":1,"visible":true},"beer-11":{"width":17,"height":17,"x":236,"y":84,"pixelRatio":1,"visible":true},"bicycle-11":{"width":17,"height":17,"x":253,"y":84,"pixelRatio":1,"visible":true},"bicycle-share-11":{"width":17,"height":17,"x":270,"y":84,"pixelRatio":1,"visible":true},"bus-11":{"width":17,"height":17,"x":287,"y":84,"pixelRatio":1,"visible":true},"cafe-11":{"width":17,"height":17,"x":304,"y":84,"pixelRatio":1,"visible":true},"campsite-11":{"width":17,"height":17,"x":168,"y":105,"pixelRatio":1,"visible":true},"car-11":{"width":17,"height":17,"x":185,"y":105,"pixelRatio":1,"visible":true},"castle-11":{"width":17,"height":17,"x":202,"y":105,"pixelRatio":1,"visible":true},"cemetery-11":{"width":17,"height":17,"x":219,"y":105,"pixelRatio":1,"visible":true},"cinema-11":{"width":17,"height":17,"x":236,"y":105,"pixelRatio":1,"visible":true},"circle-11":{"width":17,"height":17,"x":253,"y":105,"pixelRatio":1,"visible":true},"circle-stroked-11":{"width":17,"height":17,"x":270,"y":105,"pixelRatio":1,"visible":true},"clothing-store-11":{"width":17,"height":17,"x":287,"y":105,"pixelRatio":1,"visible":true},"college-11":{"width":17,"height":17,"x":304,"y":105,"pixelRatio":1,"visible":true},"dentist-11":{"width":17,"height":17,"x":168,"y":126,"pixelRatio":1,"visible":true},"doctor-11":{"width":17,"height":17,"x":185,"y":126,"pixelRatio":1,"visible":true},"dog-park-11":{"width":17,"height":17,"x":202,"y":126,"pixelRatio":1,"visible":true},"drinking-water-11":{"width":17,"height":17,"x":219,"y":126,"pixelRatio":1,"visible":true},"embassy-11":{"width":17,"height":17,"x":236,"y":126,"pixelRatio":1,"visible":true},"entrance-11":{"width":17,"height":17,"x":253,"y":126,"pixelRatio":1,"visible":true},"fast-food-11":{"width":17,"height":17,"x":270,"y":126,"pixelRatio":1,"visible":true},"ferry-11":{"width":17,"height":17,"x":287,"y":126,"pixelRatio":1,"visible":true},"fire-station-11":{"width":17,"height":17,"x":304,"y":126,"pixelRatio":1,"visible":true},"fuel-11":{"width":17,"height":17,"x":168,"y":147,"pixelRatio":1,"visible":true},"garden-11":{"width":17,"height":17,"x":185,"y":147,"pixelRatio":1,"visible":true},"golf-11":{"width":17,"height":17,"x":202,"y":147,"pixelRatio":1,"visible":true},"grocery-11":{"width":17,"height":17,"x":219,"y":147,"pixelRatio":1,"visible":true},"harbor-11":{"width":17,"height":17,"x":236,"y":147,"pixelRatio":1,"visible":true},"heliport-11":{"width":17,"height":17,"x":253,"y":147,"pixelRatio":1,"visible":true},"hospital-11":{"width":17,"height":17,"x":270,"y":147,"pixelRatio":1,"visible":true},"ice-cream-11":{"width":17,"height":17,"x":287,"y":147,"pixelRatio":1,"visible":true},"information-11":{"width":17,"height":17,"x":304,"y":147,"pixelRatio":1,"visible":true},"laundry-11":{"width":17,"height":17,"x":0,"y":168,"pixelRatio":1,"visible":true},"library-11":{"width":17,"height":17,"x":17,"y":168,"pixelRatio":1,"visible":true},"lodging-11":{"width":17,"height":17,"x":34,"y":168,"pixelRatio":1,"visible":true},"marker-11":{"width":17,"height":17,"x":51,"y":168,"pixelRatio":1,"visible":true},"monument-11":{"width":17,"height":17,"x":68,"y":168,"pixelRatio":1,"visible":true},"mountain-11":{"width":17,"height":17,"x":85,"y":168,"pixelRatio":1,"visible":true},"museum-11":{"width":17,"height":17,"x":102,"y":168,"pixelRatio":1,"visible":true},"music-11":{"width":17,"height":17,"x":119,"y":168,"pixelRatio":1,"visible":true},"park-11":{"width":17,"height":17,"x":136,"y":168,"pixelRatio":1,"visible":true},"pharmacy-11":{"width":17,"height":17,"x":153,"y":168,"pixelRatio":1,"visible":true},"picnic-site-11":{"width":17,"height":17,"x":170,"y":168,"pixelRatio":1,"visible":true},"place-of-worship-11":{"width":17,"height":17,"x":187,"y":168,"pixelRatio":1,"visible":true},"playground-11":{"width":17,"height":17,"x":204,"y":168,"pixelRatio":1,"visible":true},"police-11":{"width":17,"height":17,"x":221,"y":168,"pixelRatio":1,"visible":true},"post-11":{"width":17,"height":17,"x":238,"y":168,"pixelRatio":1,"visible":true},"prison-11":{"width":17,"height":17,"x":255,"y":168,"pixelRatio":1,"visible":true},"rail-11":{"width":17,"height":17,"x":272,"y":168,"pixelRatio":1,"visible":true},"rail-light-11":{"width":17,"height":17,"x":289,"y":168,"pixelRatio":1,"visible":true},"rail-metro-11":{"width":17,"height":17,"x":306,"y":168,"pixelRatio":1,"visible":true},"religious-christian-11":{"width":17,"height":17,"x":0,"y":185,"pixelRatio":1,"visible":true},"religious-jewish-11":{"width":17,"height":17,"x":17,"y":185,"pixelRatio":1,"visible":true},"religious-muslim-11":{"width":17,"height":17,"x":34,"y":185,"pixelRatio":1,"visible":true},"restaurant-11":{"width":17,"height":17,"x":51,"y":185,"pixelRatio":1,"visible":true},"rocket-11":{"width":17,"height":17,"x":68,"y":185,"pixelRatio":1,"visible":true},"school-11":{"width":17,"height":17,"x":85,"y":185,"pixelRatio":1,"visible":true},"shop-11":{"width":17,"height":17,"x":102,"y":185,"pixelRatio":1,"visible":true},"stadium-11":{"width":17,"height":17,"x":119,"y":185,"pixelRatio":1,"visible":true},"star-11":{"width":17,"height":17,"x":136,"y":185,"pixelRatio":1,"visible":true},"suitcase-11":{"width":17,"height":17,"x":153,"y":185,"pixelRatio":1,"visible":true},"swimming-11":{"width":17,"height":17,"x":170,"y":185,"pixelRatio":1,"visible":true},"theatre-11":{"width":17,"height":17,"x":187,"y":185,"pixelRatio":1,"visible":true},"toilet-11":{"width":17,"height":17,"x":204,"y":185,"pixelRatio":1,"visible":true},"town-hall-11":{"width":17,"height":17,"x":221,"y":185,"pixelRatio":1,"visible":true},"triangle-11":{"width":17,"height":17,"x":238,"y":185,"pixelRatio":1,"visible":true},"triangle-stroked-11":{"width":17,"height":17,"x":255,"y":185,"pixelRatio":1,"visible":true},"veterinary-11":{"width":17,"height":17,"x":272,"y":185,"pixelRatio":1,"visible":true},"volcano-11":{"width":17,"height":17,"x":289,"y":185,"pixelRatio":1,"visible":true},"zoo-11":{"width":17,"height":17,"x":306,"y":185,"pixelRatio":1,"visible":true},"wave":{"width":16,"height":8,"x":320,"y":63,"pixelRatio":1,"visible":true}} \ No newline at end of file diff --git a/rendering/data/sprites/bright-v9/sprite.png b/rendering/data/sprites/bright-v9/sprite.png new file mode 100644 index 0000000000..0466009667 Binary files /dev/null and b/rendering/data/sprites/bright-v9/sprite.png differ diff --git a/rendering/data/sprites/bright-v9/sprite@2x.json b/rendering/data/sprites/bright-v9/sprite@2x.json new file mode 100644 index 0000000000..24158e69f1 --- /dev/null +++ b/rendering/data/sprites/bright-v9/sprite@2x.json @@ -0,0 +1 @@ +{"airfield-15":{"width":42,"height":42,"x":0,"y":0,"pixelRatio":2,"visible":true},"airport-15":{"width":42,"height":42,"x":42,"y":0,"pixelRatio":2,"visible":true},"alcohol-shop-15":{"width":42,"height":42,"x":0,"y":42,"pixelRatio":2,"visible":true},"amusement-park-15":{"width":42,"height":42,"x":42,"y":42,"pixelRatio":2,"visible":true},"aquarium-15":{"width":42,"height":42,"x":84,"y":0,"pixelRatio":2,"visible":true},"art-gallery-15":{"width":42,"height":42,"x":126,"y":0,"pixelRatio":2,"visible":true},"attraction-15":{"width":42,"height":42,"x":84,"y":42,"pixelRatio":2,"visible":true},"bakery-15":{"width":42,"height":42,"x":126,"y":42,"pixelRatio":2,"visible":true},"bank-15":{"width":42,"height":42,"x":0,"y":84,"pixelRatio":2,"visible":true},"bar-15":{"width":42,"height":42,"x":42,"y":84,"pixelRatio":2,"visible":true},"beer-15":{"width":42,"height":42,"x":84,"y":84,"pixelRatio":2,"visible":true},"bicycle-15":{"width":42,"height":42,"x":126,"y":84,"pixelRatio":2,"visible":true},"bicycle-share-15":{"width":42,"height":42,"x":0,"y":126,"pixelRatio":2,"visible":true},"bus-15":{"width":42,"height":42,"x":42,"y":126,"pixelRatio":2,"visible":true},"cafe-15":{"width":42,"height":42,"x":84,"y":126,"pixelRatio":2,"visible":true},"campsite-15":{"width":42,"height":42,"x":126,"y":126,"pixelRatio":2,"visible":true},"car-15":{"width":42,"height":42,"x":168,"y":0,"pixelRatio":2,"visible":true},"castle-15":{"width":42,"height":42,"x":210,"y":0,"pixelRatio":2,"visible":true},"cemetery-15":{"width":42,"height":42,"x":252,"y":0,"pixelRatio":2,"visible":true},"cinema-15":{"width":42,"height":42,"x":294,"y":0,"pixelRatio":2,"visible":true},"circle-15":{"width":42,"height":42,"x":168,"y":42,"pixelRatio":2,"visible":true},"circle-stroked-15":{"width":42,"height":42,"x":210,"y":42,"pixelRatio":2,"visible":true},"clothing-store-15":{"width":42,"height":42,"x":252,"y":42,"pixelRatio":2,"visible":true},"college-15":{"width":42,"height":42,"x":294,"y":42,"pixelRatio":2,"visible":true},"dentist-15":{"width":42,"height":42,"x":168,"y":84,"pixelRatio":2,"visible":true},"doctor-15":{"width":42,"height":42,"x":210,"y":84,"pixelRatio":2,"visible":true},"dog-park-15":{"width":42,"height":42,"x":252,"y":84,"pixelRatio":2,"visible":true},"drinking-water-15":{"width":42,"height":42,"x":294,"y":84,"pixelRatio":2,"visible":true},"embassy-15":{"width":42,"height":42,"x":168,"y":126,"pixelRatio":2,"visible":true},"entrance-15":{"width":42,"height":42,"x":210,"y":126,"pixelRatio":2,"visible":true},"fast-food-15":{"width":42,"height":42,"x":252,"y":126,"pixelRatio":2,"visible":true},"ferry-15":{"width":42,"height":42,"x":294,"y":126,"pixelRatio":2,"visible":true},"fire-station-15":{"width":42,"height":42,"x":0,"y":168,"pixelRatio":2,"visible":true},"fuel-15":{"width":42,"height":42,"x":42,"y":168,"pixelRatio":2,"visible":true},"garden-15":{"width":42,"height":42,"x":84,"y":168,"pixelRatio":2,"visible":true},"golf-15":{"width":42,"height":42,"x":126,"y":168,"pixelRatio":2,"visible":true},"grocery-15":{"width":42,"height":42,"x":168,"y":168,"pixelRatio":2,"visible":true},"harbor-15":{"width":42,"height":42,"x":210,"y":168,"pixelRatio":2,"visible":true},"heliport-15":{"width":42,"height":42,"x":252,"y":168,"pixelRatio":2,"visible":true},"hospital-15":{"width":42,"height":42,"x":294,"y":168,"pixelRatio":2,"visible":true},"ice-cream-15":{"width":42,"height":42,"x":0,"y":210,"pixelRatio":2,"visible":true},"information-15":{"width":42,"height":42,"x":42,"y":210,"pixelRatio":2,"visible":true},"laundry-15":{"width":42,"height":42,"x":84,"y":210,"pixelRatio":2,"visible":true},"library-15":{"width":42,"height":42,"x":126,"y":210,"pixelRatio":2,"visible":true},"lodging-15":{"width":42,"height":42,"x":168,"y":210,"pixelRatio":2,"visible":true},"marker-15":{"width":42,"height":42,"x":210,"y":210,"pixelRatio":2,"visible":true},"monument-15":{"width":42,"height":42,"x":252,"y":210,"pixelRatio":2,"visible":true},"mountain-15":{"width":42,"height":42,"x":294,"y":210,"pixelRatio":2,"visible":true},"museum-15":{"width":42,"height":42,"x":0,"y":252,"pixelRatio":2,"visible":true},"music-15":{"width":42,"height":42,"x":42,"y":252,"pixelRatio":2,"visible":true},"park-15":{"width":42,"height":42,"x":84,"y":252,"pixelRatio":2,"visible":true},"pharmacy-15":{"width":42,"height":42,"x":126,"y":252,"pixelRatio":2,"visible":true},"picnic-site-15":{"width":42,"height":42,"x":168,"y":252,"pixelRatio":2,"visible":true},"place-of-worship-15":{"width":42,"height":42,"x":210,"y":252,"pixelRatio":2,"visible":true},"playground-15":{"width":42,"height":42,"x":252,"y":252,"pixelRatio":2,"visible":true},"police-15":{"width":42,"height":42,"x":294,"y":252,"pixelRatio":2,"visible":true},"post-15":{"width":42,"height":42,"x":0,"y":294,"pixelRatio":2,"visible":true},"prison-15":{"width":42,"height":42,"x":42,"y":294,"pixelRatio":2,"visible":true},"rail-15":{"width":42,"height":42,"x":84,"y":294,"pixelRatio":2,"visible":true},"rail-light-15":{"width":42,"height":42,"x":126,"y":294,"pixelRatio":2,"visible":true},"rail-metro-15":{"width":42,"height":42,"x":168,"y":294,"pixelRatio":2,"visible":true},"religious-christian-15":{"width":42,"height":42,"x":210,"y":294,"pixelRatio":2,"visible":true},"religious-jewish-15":{"width":42,"height":42,"x":252,"y":294,"pixelRatio":2,"visible":true},"religious-muslim-15":{"width":42,"height":42,"x":294,"y":294,"pixelRatio":2,"visible":true},"restaurant-15":{"width":42,"height":42,"x":336,"y":0,"pixelRatio":2,"visible":true},"rocket-15":{"width":42,"height":42,"x":378,"y":0,"pixelRatio":2,"visible":true},"school-15":{"width":42,"height":42,"x":420,"y":0,"pixelRatio":2,"visible":true},"shop-15":{"width":42,"height":42,"x":462,"y":0,"pixelRatio":2,"visible":true},"stadium-15":{"width":42,"height":42,"x":504,"y":0,"pixelRatio":2,"visible":true},"star-15":{"width":42,"height":42,"x":546,"y":0,"pixelRatio":2,"visible":true},"suitcase-15":{"width":42,"height":42,"x":588,"y":0,"pixelRatio":2,"visible":true},"swimming-15":{"width":42,"height":42,"x":630,"y":0,"pixelRatio":2,"visible":true},"theatre-15":{"width":42,"height":42,"x":336,"y":42,"pixelRatio":2,"visible":true},"toilet-15":{"width":42,"height":42,"x":378,"y":42,"pixelRatio":2,"visible":true},"town-hall-15":{"width":42,"height":42,"x":420,"y":42,"pixelRatio":2,"visible":true},"triangle-15":{"width":42,"height":42,"x":462,"y":42,"pixelRatio":2,"visible":true},"triangle-stroked-15":{"width":42,"height":42,"x":504,"y":42,"pixelRatio":2,"visible":true},"veterinary-15":{"width":42,"height":42,"x":546,"y":42,"pixelRatio":2,"visible":true},"volcano-15":{"width":42,"height":42,"x":588,"y":42,"pixelRatio":2,"visible":true},"zoo-15":{"width":42,"height":42,"x":630,"y":42,"pixelRatio":2,"visible":true},"motorway_1":{"width":36,"height":36,"x":336,"y":84,"pixelRatio":2,"visible":true},"motorway_2":{"width":50,"height":36,"x":372,"y":84,"pixelRatio":2,"visible":true},"motorway_3":{"width":64,"height":36,"x":422,"y":84,"pixelRatio":2,"visible":true},"motorway_4":{"width":78,"height":36,"x":486,"y":84,"pixelRatio":2,"visible":true},"motorway_5":{"width":90,"height":36,"x":564,"y":84,"pixelRatio":2,"visible":true},"motorway_6":{"width":100,"height":36,"x":336,"y":126,"pixelRatio":2,"visible":true},"airfield-11":{"width":34,"height":34,"x":436,"y":126,"pixelRatio":2,"visible":true},"airport-11":{"width":34,"height":34,"x":470,"y":126,"pixelRatio":2,"visible":true},"alcohol-shop-11":{"width":34,"height":34,"x":504,"y":126,"pixelRatio":2,"visible":true},"amusement-park-11":{"width":34,"height":34,"x":538,"y":126,"pixelRatio":2,"visible":true},"aquarium-11":{"width":34,"height":34,"x":572,"y":126,"pixelRatio":2,"visible":true},"art-gallery-11":{"width":34,"height":34,"x":606,"y":126,"pixelRatio":2,"visible":true},"attraction-11":{"width":34,"height":34,"x":336,"y":168,"pixelRatio":2,"visible":true},"bakery-11":{"width":34,"height":34,"x":370,"y":168,"pixelRatio":2,"visible":true},"bank-11":{"width":34,"height":34,"x":404,"y":168,"pixelRatio":2,"visible":true},"bar-11":{"width":34,"height":34,"x":438,"y":168,"pixelRatio":2,"visible":true},"beer-11":{"width":34,"height":34,"x":472,"y":168,"pixelRatio":2,"visible":true},"bicycle-11":{"width":34,"height":34,"x":506,"y":168,"pixelRatio":2,"visible":true},"bicycle-share-11":{"width":34,"height":34,"x":540,"y":168,"pixelRatio":2,"visible":true},"bus-11":{"width":34,"height":34,"x":574,"y":168,"pixelRatio":2,"visible":true},"cafe-11":{"width":34,"height":34,"x":608,"y":168,"pixelRatio":2,"visible":true},"campsite-11":{"width":34,"height":34,"x":336,"y":210,"pixelRatio":2,"visible":true},"car-11":{"width":34,"height":34,"x":370,"y":210,"pixelRatio":2,"visible":true},"castle-11":{"width":34,"height":34,"x":404,"y":210,"pixelRatio":2,"visible":true},"cemetery-11":{"width":34,"height":34,"x":438,"y":210,"pixelRatio":2,"visible":true},"cinema-11":{"width":34,"height":34,"x":472,"y":210,"pixelRatio":2,"visible":true},"circle-11":{"width":34,"height":34,"x":506,"y":210,"pixelRatio":2,"visible":true},"circle-stroked-11":{"width":34,"height":34,"x":540,"y":210,"pixelRatio":2,"visible":true},"clothing-store-11":{"width":34,"height":34,"x":574,"y":210,"pixelRatio":2,"visible":true},"college-11":{"width":34,"height":34,"x":608,"y":210,"pixelRatio":2,"visible":true},"dentist-11":{"width":34,"height":34,"x":336,"y":252,"pixelRatio":2,"visible":true},"doctor-11":{"width":34,"height":34,"x":370,"y":252,"pixelRatio":2,"visible":true},"dog-park-11":{"width":34,"height":34,"x":404,"y":252,"pixelRatio":2,"visible":true},"drinking-water-11":{"width":34,"height":34,"x":438,"y":252,"pixelRatio":2,"visible":true},"embassy-11":{"width":34,"height":34,"x":472,"y":252,"pixelRatio":2,"visible":true},"entrance-11":{"width":34,"height":34,"x":506,"y":252,"pixelRatio":2,"visible":true},"fast-food-11":{"width":34,"height":34,"x":540,"y":252,"pixelRatio":2,"visible":true},"ferry-11":{"width":34,"height":34,"x":574,"y":252,"pixelRatio":2,"visible":true},"fire-station-11":{"width":34,"height":34,"x":608,"y":252,"pixelRatio":2,"visible":true},"fuel-11":{"width":34,"height":34,"x":336,"y":294,"pixelRatio":2,"visible":true},"garden-11":{"width":34,"height":34,"x":370,"y":294,"pixelRatio":2,"visible":true},"golf-11":{"width":34,"height":34,"x":404,"y":294,"pixelRatio":2,"visible":true},"grocery-11":{"width":34,"height":34,"x":438,"y":294,"pixelRatio":2,"visible":true},"harbor-11":{"width":34,"height":34,"x":472,"y":294,"pixelRatio":2,"visible":true},"heliport-11":{"width":34,"height":34,"x":506,"y":294,"pixelRatio":2,"visible":true},"hospital-11":{"width":34,"height":34,"x":540,"y":294,"pixelRatio":2,"visible":true},"ice-cream-11":{"width":34,"height":34,"x":574,"y":294,"pixelRatio":2,"visible":true},"information-11":{"width":34,"height":34,"x":608,"y":294,"pixelRatio":2,"visible":true},"laundry-11":{"width":34,"height":34,"x":0,"y":336,"pixelRatio":2,"visible":true},"library-11":{"width":34,"height":34,"x":34,"y":336,"pixelRatio":2,"visible":true},"lodging-11":{"width":34,"height":34,"x":68,"y":336,"pixelRatio":2,"visible":true},"marker-11":{"width":34,"height":34,"x":102,"y":336,"pixelRatio":2,"visible":true},"monument-11":{"width":34,"height":34,"x":136,"y":336,"pixelRatio":2,"visible":true},"mountain-11":{"width":34,"height":34,"x":170,"y":336,"pixelRatio":2,"visible":true},"museum-11":{"width":34,"height":34,"x":204,"y":336,"pixelRatio":2,"visible":true},"music-11":{"width":34,"height":34,"x":238,"y":336,"pixelRatio":2,"visible":true},"park-11":{"width":34,"height":34,"x":272,"y":336,"pixelRatio":2,"visible":true},"pharmacy-11":{"width":34,"height":34,"x":306,"y":336,"pixelRatio":2,"visible":true},"picnic-site-11":{"width":34,"height":34,"x":340,"y":336,"pixelRatio":2,"visible":true},"place-of-worship-11":{"width":34,"height":34,"x":374,"y":336,"pixelRatio":2,"visible":true},"playground-11":{"width":34,"height":34,"x":408,"y":336,"pixelRatio":2,"visible":true},"police-11":{"width":34,"height":34,"x":442,"y":336,"pixelRatio":2,"visible":true},"post-11":{"width":34,"height":34,"x":476,"y":336,"pixelRatio":2,"visible":true},"prison-11":{"width":34,"height":34,"x":510,"y":336,"pixelRatio":2,"visible":true},"rail-11":{"width":34,"height":34,"x":544,"y":336,"pixelRatio":2,"visible":true},"rail-light-11":{"width":34,"height":34,"x":578,"y":336,"pixelRatio":2,"visible":true},"rail-metro-11":{"width":34,"height":34,"x":612,"y":336,"pixelRatio":2,"visible":true},"religious-christian-11":{"width":34,"height":34,"x":0,"y":370,"pixelRatio":2,"visible":true},"religious-jewish-11":{"width":34,"height":34,"x":34,"y":370,"pixelRatio":2,"visible":true},"religious-muslim-11":{"width":34,"height":34,"x":68,"y":370,"pixelRatio":2,"visible":true},"restaurant-11":{"width":34,"height":34,"x":102,"y":370,"pixelRatio":2,"visible":true},"rocket-11":{"width":34,"height":34,"x":136,"y":370,"pixelRatio":2,"visible":true},"school-11":{"width":34,"height":34,"x":170,"y":370,"pixelRatio":2,"visible":true},"shop-11":{"width":34,"height":34,"x":204,"y":370,"pixelRatio":2,"visible":true},"stadium-11":{"width":34,"height":34,"x":238,"y":370,"pixelRatio":2,"visible":true},"star-11":{"width":34,"height":34,"x":272,"y":370,"pixelRatio":2,"visible":true},"suitcase-11":{"width":34,"height":34,"x":306,"y":370,"pixelRatio":2,"visible":true},"swimming-11":{"width":34,"height":34,"x":340,"y":370,"pixelRatio":2,"visible":true},"theatre-11":{"width":34,"height":34,"x":374,"y":370,"pixelRatio":2,"visible":true},"toilet-11":{"width":34,"height":34,"x":408,"y":370,"pixelRatio":2,"visible":true},"town-hall-11":{"width":34,"height":34,"x":442,"y":370,"pixelRatio":2,"visible":true},"triangle-11":{"width":34,"height":34,"x":476,"y":370,"pixelRatio":2,"visible":true},"triangle-stroked-11":{"width":34,"height":34,"x":510,"y":370,"pixelRatio":2,"visible":true},"veterinary-11":{"width":34,"height":34,"x":544,"y":370,"pixelRatio":2,"visible":true},"volcano-11":{"width":34,"height":34,"x":578,"y":370,"pixelRatio":2,"visible":true},"zoo-11":{"width":34,"height":34,"x":612,"y":370,"pixelRatio":2,"visible":true},"wave":{"width":32,"height":16,"x":640,"y":126,"pixelRatio":2,"visible":true}} \ No newline at end of file diff --git a/rendering/data/sprites/bright-v9/sprite@2x.png b/rendering/data/sprites/bright-v9/sprite@2x.png new file mode 100644 index 0000000000..fd5219a6a5 Binary files /dev/null and b/rendering/data/sprites/bright-v9/sprite@2x.png differ diff --git a/rendering/data/styles/bright-v9.json b/rendering/data/styles/bright-v9.json new file mode 100644 index 0000000000..7e0eb3fcdf --- /dev/null +++ b/rendering/data/styles/bright-v9.json @@ -0,0 +1,4035 @@ +{ + "version": 8, + "name": "Bright", + "metadata": { + "mapbox:autocomposite": true, + "mapbox:type": "template", + "mapbox:groups": { + "1444849364238.8171": { + "name": "Buildings", + "collapsed": true + }, + "1444849354174.1904": { + "name": "Tunnels", + "collapsed": true + }, + "1444849320558.5054": { + "name": "Water labels", + "collapsed": true + }, + "1444849371739.5945": { + "name": "Aeroways", + "collapsed": true + }, + "1444849258897.3083": { + "name": "Marine labels", + "collapsed": true + }, + "1444849388993.3071": { + "name": "Landuse", + "collapsed": true + }, + "1444849242106.713": { + "name": "Country labels", + "collapsed": true + }, + "1444849382550.77": { + "name": "Water", + "collapsed": true + }, + "1444849345966.4436": { + "name": "Roads", + "collapsed": true + }, + "1444849307123.581": { + "name": "Admin lines", + "collapsed": true + }, + "1456163609504.0715": { + "name": "Road labels", + "collapsed": true + }, + "1444849272561.29": { + "name": "Place labels", + "collapsed": true + }, + "1444849290021.1838": { + "name": "Road labels", + "collapsed": true + }, + "1444849334699.1902": { + "name": "Bridges", + "collapsed": true + }, + "1444849297111.495": { + "name": "POI labels", + "collapsed": true + } + } + }, + "sources": { + "mapbox": { + "url": "/data/tiles/mapbox-streets-v6/{z}/{x}/{y}.vector.pbf", + "type": "vector" + } + }, + "center": [ + -118.2518, + 34.0442 + ], + "zoom": 15, + "sprite": "/data/sprites/bright-v9/sprite", + "glyphs": "/data/fonts/todo/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "#f8f4f0" + }, + "interactive": true + }, + { + "id": "landuse_overlay_national_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse_overlay", + "filter": [ + "==", + "class", + "national_park" + ], + "paint": { + "fill-color": "#d8e8c8", + "fill-opacity": 0.75 + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "id": "landuse_park", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "park" + ], + "paint": { + "fill-color": "#d8e8c8" + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "id": "landuse_cemetery", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "cemetery" + ], + "paint": { + "fill-color": "#e0e4dd" + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "hospital" + ], + "paint": { + "fill-color": "#fde" + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "id": "landuse_school", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "school" + ], + "paint": { + "fill-color": "#f0e8f8" + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "id": "landuse_wood", + "type": "fill", + "source": "mapbox", + "source-layer": "landuse", + "filter": [ + "==", + "class", + "wood" + ], + "paint": { + "fill-color": "#6a4", + "fill-opacity": 0.1 + }, + "metadata": { + "mapbox:group": "1444849388993.3071" + }, + "interactive": true + }, + { + "interactive": true, + "layout": { + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "filter": [ + "all", + [ + "!=", + "class", + "river" + ], + [ + "!=", + "class", + "stream" + ], + [ + "!=", + "class", + "canal" + ] + ], + "type": "line", + "source": "mapbox", + "id": "waterway", + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 2 + ] + ] + } + }, + "source-layer": "waterway" + }, + { + "interactive": true, + "layout": { + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "filter": [ + "==", + "class", + "river" + ], + "type": "line", + "source": "mapbox", + "id": "waterway_river", + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [ + 11, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "source-layer": "waterway" + }, + { + "interactive": true, + "layout": { + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "filter": [ + "in", + "class", + "stream", + "canal" + ], + "type": "line", + "source": "mapbox", + "id": "waterway_stream_canal", + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [ + 13, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "source-layer": "waterway" + }, + { + "id": "water", + "type": "fill", + "source": "mapbox", + "source-layer": "water", + "paint": { + "fill-color": "#a0c8f0" + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "interactive": true + }, + { + "id": "water_offset", + "paint": { + "fill-color": "white", + "fill-opacity": 0.3, + "fill-translate": [ + 0, + 2.5 + ] + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "interactive": true, + "ref": "water" + }, + { + "id": "water_pattern", + "paint": { + "fill-translate": [ + 0, + 2.5 + ], + "fill-pattern": "wave" + }, + "metadata": { + "mapbox:group": "1444849382550.77" + }, + "interactive": true, + "ref": "water" + }, + { + "interactive": true, + "minzoom": 11, + "metadata": { + "mapbox:group": "1444849371739.5945" + }, + "filter": [ + "==", + "$type", + "Polygon" + ], + "type": "fill", + "source": "mapbox", + "id": "aeroway_fill", + "paint": { + "fill-color": "#f0ede9", + "fill-opacity": 0.7 + }, + "source-layer": "aeroway" + }, + { + "interactive": true, + "minzoom": 11, + "metadata": { + "mapbox:group": "1444849371739.5945" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "type", + "runway" + ] + ], + "type": "line", + "source": "mapbox", + "id": "aeroway_runway", + "paint": { + "line-color": "#f0ede9", + "line-width": { + "base": 1.2, + "stops": [ + [ + 11, + 3 + ], + [ + 20, + 16 + ] + ] + } + }, + "source-layer": "aeroway" + }, + { + "interactive": true, + "minzoom": 11, + "metadata": { + "mapbox:group": "1444849371739.5945" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "type", + "taxiway" + ] + ], + "type": "line", + "source": "mapbox", + "id": "aeroway_taxiway", + "paint": { + "line-color": "#f0ede9", + "line-width": { + "base": 1.2, + "stops": [ + [ + 11, + 0.5 + ], + [ + 20, + 6 + ] + ] + } + }, + "source-layer": "aeroway" + }, + { + "id": "building", + "type": "fill", + "source": "mapbox", + "source-layer": "building", + "paint": { + "fill-color": { + "base": 1, + "stops": [ + [ + 15.5, + "#f2eae2" + ], + [ + 16, + "#dfdbd7" + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849364238.8171" + }, + "interactive": true + }, + { + "id": "building_top", + "paint": { + "fill-color": "#f2eae2", + "fill-opacity": { + "base": 1, + "stops": [ + [ + 15, + 0 + ], + [ + 16, + 1 + ] + ] + }, + "fill-translate": { + "stops": [ + [ + 15, + [ + 0, + 0 + ] + ], + [ + 16, + [ + -2, + -2 + ] + ] + ], + "base": 1 + }, + "fill-outline-color": "#dfdbd7" + }, + "metadata": { + "mapbox:group": "1444849364238.8171" + }, + "interactive": true, + "ref": "building" + }, + { + "interactive": true, + "layout": { + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_motorway_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-dasharray": [ + 0.5, + 0.25 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "service", + "track" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_service_track_casing", + "paint": { + "line-color": "#cfcdca", + "line-dasharray": [ + 0.5, + 0.25 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1 + ], + [ + 16, + 4 + ], + [ + 20, + 11 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "==", + "class", + "link" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "street", + "street_limited" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_street_casing", + "paint": { + "line-color": "#cfcdca", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 0.5 + ], + [ + 13, + 1 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": { + "stops": [ + [ + 12, + 0 + ], + [ + 12.5, + 1 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_secondary_tertiary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 8, + 1.5 + ], + [ + 20, + 17 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "trunk", + "primary" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_trunk_primary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "==", + "class", + "motorway" + ] + ], + "type": "line", + "source": "mapbox", + "id": "tunnel_motorway_casing", + "paint": { + "line-color": "#e9ac77", + "line-dasharray": [ + 0.5, + 0.25 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source-layer": "road" + }, + { + "id": "tunnel_path_pedestrian", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "path", + "pedestrian" + ] + ] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [ + 1.5, + 0.75 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 4 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "interactive": true + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_motorway_link", + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "tunnel_motorway_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_service_track", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15.5, + 0 + ], + [ + 16, + 2 + ], + [ + 20, + 7.5 + ] + ] + } + }, + "ref": "tunnel_service_track_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_link", + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "tunnel_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_street", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 13.5, + 0 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + }, + "line-opacity": 1 + }, + "ref": "tunnel_street_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_secondary_tertiary", + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "ref": "tunnel_secondary_tertiary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_trunk_primary", + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "tunnel_trunk_primary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "id": "tunnel_motorway", + "paint": { + "line-color": "#ffdaa6", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "tunnel_motorway_casing" + }, + { + "id": "tunnel_major_rail", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "structure", + "tunnel" + ], + [ + "in", + "class", + "major_rail", + "minor_rail" + ] + ], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "interactive": true + }, + { + "id": "tunnel_major_rail_hatching", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 3 + ], + [ + 20, + 8 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849354174.1904" + }, + "interactive": true, + "ref": "tunnel_major_rail" + }, + { + "interactive": true, + "minzoom": 12, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "==", + "class", + "motorway_link" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_motorway_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "in", + "class", + "service", + "track" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_service_track_casing", + "paint": { + "line-color": "#cfcdca", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1 + ], + [ + 16, + 4 + ], + [ + 20, + 11 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "minzoom": 13, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "==", + "class", + "link" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "street", + "street_limited" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_street_casing", + "paint": { + "line-color": "#cfcdca", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 0.5 + ], + [ + 13, + 1 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": { + "stops": [ + [ + 12, + 0 + ], + [ + 12.5, + 1 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "in", + "class", + "secondary", + "tertiary" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_secondary_tertiary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 8, + 1.5 + ], + [ + 20, + 17 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "in", + "class", + "trunk", + "primary" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_trunk_primary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "minzoom": 5, + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "filter": [ + "all", + [ + "==", + "class", + "motorway" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "type": "line", + "source": "mapbox", + "id": "road_motorway_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source-layer": "road" + }, + { + "id": "road_path_pedestrian", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "in", + "class", + "path", + "pedestrian" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [ + 1.5, + 0.75 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 4 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "interactive": true + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_motorway_link", + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "road_motorway_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_service_track", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15.5, + 0 + ], + [ + 16, + 2 + ], + [ + 20, + 7.5 + ] + ] + } + }, + "ref": "road_service_track_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_link", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "road_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_street", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 13.5, + 0 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + }, + "line-opacity": 1 + }, + "ref": "road_street_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_secondary_tertiary", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 8, + 0.5 + ], + [ + 20, + 13 + ] + ] + } + }, + "ref": "road_secondary_tertiary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_trunk_primary", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "road_trunk_primary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "id": "road_motorway", + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "road_motorway_casing" + }, + { + "id": "road_major_rail", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "class", + "major_rail" + ], + [ + "!in", + "structure", + "bridge", + "tunnel" + ] + ], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "interactive": true + }, + { + "id": "road_major_rail_hatching", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 3 + ], + [ + 20, + 8 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849345966.4436" + }, + "interactive": true, + "ref": "road_major_rail" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "==", + "class", + "motorway_link" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_motorway_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "in", + "class", + "service", + "track" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_service_track_casing", + "paint": { + "line-color": "#cfcdca", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1 + ], + [ + 16, + 4 + ], + [ + 20, + 11 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "==", + "class", + "link" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_link_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 1 + ], + [ + 13, + 3 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "in", + "class", + "street", + "street_limited" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_street_casing", + "paint": { + "line-color": "#cfcdca", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12, + 0.5 + ], + [ + 13, + 1 + ], + [ + 14, + 4 + ], + [ + 20, + 15 + ] + ] + }, + "line-opacity": { + "stops": [ + [ + 12, + 0 + ], + [ + 12.5, + 1 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "in", + "class", + "secondary", + "tertiary" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_secondary_tertiary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 8, + 1.5 + ], + [ + 20, + 17 + ] + ] + }, + "line-opacity": 1 + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "in", + "class", + "trunk", + "primary" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_trunk_primary_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source-layer": "road" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "==", + "class", + "motorway" + ] + ], + "type": "line", + "source": "mapbox", + "id": "bridge_motorway_casing", + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [ + 5, + 0.4 + ], + [ + 6, + 0.6 + ], + [ + 7, + 1.5 + ], + [ + 20, + 22 + ] + ] + } + }, + "source-layer": "road" + }, + { + "id": "bridge_path_pedestrian", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "in", + "class", + "path", + "pedestrian" + ] + ] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [ + 1.5, + 0.75 + ], + "line-width": { + "base": 1.2, + "stops": [ + [ + 15, + 1.2 + ], + [ + 20, + 4 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "interactive": true + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_motorway_link", + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "bridge_motorway_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_service_track", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 15.5, + 0 + ], + [ + 16, + 2 + ], + [ + 20, + 7.5 + ] + ] + } + }, + "ref": "bridge_service_track_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_link", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 12.5, + 0 + ], + [ + 13, + 1.5 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + } + }, + "ref": "bridge_link_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_street", + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [ + 13.5, + 0 + ], + [ + 14, + 2.5 + ], + [ + 20, + 11.5 + ] + ] + }, + "line-opacity": 1 + }, + "ref": "bridge_street_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_secondary_tertiary", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 10 + ] + ] + } + }, + "ref": "bridge_secondary_tertiary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_trunk_primary", + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "bridge_trunk_primary_casing" + }, + { + "interactive": true, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "id": "bridge_motorway", + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [ + 6.5, + 0 + ], + [ + 7, + 0.5 + ], + [ + 20, + 18 + ] + ] + } + }, + "ref": "bridge_motorway_casing" + }, + { + "id": "bridge_major_rail", + "type": "line", + "source": "mapbox", + "source-layer": "road", + "filter": [ + "all", + [ + "==", + "structure", + "bridge" + ], + [ + "==", + "class", + "major_rail" + ] + ], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [ + 14, + 0.4 + ], + [ + 15, + 0.75 + ], + [ + 20, + 2 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "interactive": true + }, + { + "id": "bridge_major_rail_hatching", + "paint": { + "line-color": "#bbb", + "line-dasharray": [ + 0.2, + 8 + ], + "line-width": { + "base": 1.4, + "stops": [ + [ + 14.5, + 0 + ], + [ + 15, + 3 + ], + [ + 20, + 8 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849334699.1902" + }, + "interactive": true, + "ref": "bridge_major_rail" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849307123.581" + }, + "filter": [ + "all", + [ + ">=", + "admin_level", + 3 + ], + [ + "==", + "maritime", + 0 + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_level_3", + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [ + 3, + 1, + 1, + 1 + ], + "line-width": { + "base": 1, + "stops": [ + [ + 4, + 0.4 + ], + [ + 5, + 1 + ], + [ + 12, + 3 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "layout": { + "line-join": "round", + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849307123.581" + }, + "filter": [ + "all", + [ + "==", + "admin_level", + 2 + ], + [ + "==", + "disputed", + 0 + ], + [ + "==", + "maritime", + 0 + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_level_2", + "paint": { + "line-color": "#9e9cab", + "line-width": { + "base": 1, + "stops": [ + [ + 4, + 1.4 + ], + [ + 5, + 2 + ], + [ + 12, + 8 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "layout": { + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849307123.581" + }, + "filter": [ + "all", + [ + "==", + "admin_level", + 2 + ], + [ + "==", + "disputed", + 1 + ], + [ + "==", + "maritime", + 0 + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_level_2_disputed", + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [ + 2, + 2 + ], + "line-width": { + "base": 1, + "stops": [ + [ + 4, + 1.4 + ], + [ + 5, + 2 + ], + [ + 12, + 8 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "layout": { + "line-join": "round" + }, + "metadata": { + "mapbox:group": "1444849307123.581" + }, + "filter": [ + "all", + [ + ">=", + "admin_level", + 3 + ], + [ + "==", + "maritime", + 1 + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_level_3_maritime", + "paint": { + "line-color": "#a0c8f0", + "line-opacity": 0.5, + "line-dasharray": [ + 3, + 1, + 1, + 1 + ], + "line-width": { + "base": 1, + "stops": [ + [ + 4, + 0.4 + ], + [ + 5, + 1 + ], + [ + 12, + 3 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "layout": { + "line-cap": "round" + }, + "metadata": { + "mapbox:group": "1444849307123.581" + }, + "filter": [ + "all", + [ + "==", + "admin_level", + 2 + ], + [ + "==", + "maritime", + 1 + ] + ], + "type": "line", + "source": "mapbox", + "id": "admin_level_2_maritime", + "paint": { + "line-color": "#a0c8f0", + "line-opacity": 0.5, + "line-width": { + "base": 1, + "stops": [ + [ + 4, + 1.4 + ], + [ + 5, + 2 + ], + [ + 12, + 8 + ] + ] + } + }, + "source-layer": "admin" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 5, + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849320558.5054" + }, + "filter": [ + "==", + "$type", + "Point" + ], + "type": "symbol", + "source": "mapbox", + "id": "water_label", + "paint": { + "text-color": "#74aee9", + "text-halo-width": 1.5, + "text-halo-color": "rgba(255,255,255,0.7)" + }, + "source-layer": "water_label" + }, + { + "interactive": true, + "minzoom": 16, + "layout": { + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 9, + "text-padding": 2, + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "scalerank", + 4 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label_4", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "minzoom": 15, + "layout": { + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 9, + "text-padding": 2, + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "scalerank", + 3 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label_3", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "minzoom": 14, + "layout": { + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 9, + "text-padding": 2, + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "scalerank", + 2 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label_2", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "poi_label" + }, + { + "layout": { + "text-size": 12, + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-padding": 2, + "visibility": "visible", + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-field": "{name_en}", + "text-max-width": 9 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "type": "symbol", + "source": "mapbox", + "id": "rail_station_label", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "rail_station_label", + "interactive": true + }, + { + "interactive": true, + "minzoom": 13, + "layout": { + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 9, + "text-padding": 2, + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "scalerank", + 1 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "poi_label_1", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "poi_label" + }, + { + "interactive": true, + "minzoom": 11, + "layout": { + "icon-image": "{maki}-11", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 9, + "text-padding": 2, + "text-offset": [ + 0, + 0.6 + ], + "text-anchor": "top", + "text-size": 12 + }, + "metadata": { + "mapbox:group": "1444849297111.495" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "in", + "scalerank", + 1, + 2, + 3 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "airport_label", + "paint": { + "text-color": "#666", + "text-halo-color": "#ffffff", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "airport_label" + }, + { + "interactive": true, + "layout": { + "text-field": "{name_en}", + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-size": { + "base": 1, + "stops": [ + [ + 13, + 12 + ], + [ + 14, + 13 + ] + ] + }, + "symbol-placement": "line" + }, + "metadata": { + "mapbox:group": "1456163609504.0715" + }, + "filter": [ + "!=", + "class", + "ferry" + ], + "type": "symbol", + "source": "mapbox", + "id": "road_label", + "paint": { + "text-color": "#765", + "text-halo-width": 1, + "text-halo-blur": 0.5 + }, + "source-layer": "road_label" + }, + { + "interactive": true, + "minzoom": 8, + "layout": { + "text-field": "{ref}", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 11, + "icon-image": "motorway_{reflen}", + "symbol-placement": { + "base": 1, + "stops": [ + [ + 10, + "point" + ], + [ + 11, + "line" + ] + ] + }, + "symbol-spacing": 500, + "text-rotation-alignment": "viewport", + "icon-rotation-alignment": "viewport" + }, + "metadata": { + "mapbox:group": "1456163609504.0715" + }, + "filter": [ + "<=", + "reflen", + 6 + ], + "type": "symbol", + "source": "mapbox", + "id": "road_label_highway_shield", + "paint": {}, + "source-layer": "road_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-transform": "uppercase", + "text-letter-spacing": 0.1, + "text-field": "{name_en}", + "text-max-width": 9, + "text-size": { + "base": 1.2, + "stops": [ + [ + 12, + 10 + ], + [ + 15, + 14 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849272561.29" + }, + "filter": [ + "in", + "type", + "hamlet", + "suburb", + "neighbourhood", + "island", + "islet" + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_other", + "paint": { + "text-color": "#633", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 10, + 12 + ], + [ + 15, + 22 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849272561.29" + }, + "filter": [ + "==", + "type", + "village" + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_village", + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Regular", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 10, + 14 + ], + [ + 15, + 24 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849272561.29" + }, + "filter": [ + "==", + "type", + "town" + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_town", + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [ + 7, + 14 + ], + [ + 11, + 24 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849272561.29" + }, + "filter": [ + "==", + "type", + "city" + ], + "type": "symbol", + "source": "mapbox", + "id": "place_label_city", + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + }, + "source-layer": "place_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-letter-spacing": 0.2, + "symbol-placement": "line", + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 4, + 12 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + ">=", + "labelrank", + 4 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_line_4", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 6, + "text-letter-spacing": 0.2, + "symbol-placement": "point", + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 4, + 12 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + ">=", + "labelrank", + 4 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_4", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-letter-spacing": 0.2, + "symbol-placement": "line", + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 4, + 14 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "labelrank", + 3 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_line_3", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 5, + "text-letter-spacing": 0.2, + "symbol-placement": "point", + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 4, + 14 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "labelrank", + 3 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_point_3", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-letter-spacing": 0.2, + "symbol-placement": "line", + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 4, + 16 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "labelrank", + 2 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_line_2", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 5, + "text-letter-spacing": 0.2, + "symbol-placement": "point", + "text-size": { + "stops": [ + [ + 3, + 14 + ], + [ + 4, + 16 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "labelrank", + 2 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_point_2", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-letter-spacing": 0.2, + "symbol-placement": "line", + "text-size": { + "stops": [ + [ + 3, + 18 + ], + [ + 4, + 22 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "LineString" + ], + [ + "==", + "labelrank", + 1 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_line_1", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Italic", + "Arial Unicode MS Regular" + ], + "text-field": "{name_en}", + "text-max-width": 5, + "text-letter-spacing": 0.2, + "text-line-height": 1.6, + "symbol-placement": "point", + "text-offset": [ + 0, + 2.4 + ], + "text-size": { + "stops": [ + [ + 3, + 18 + ], + [ + 4, + 22 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849258897.3083" + }, + "filter": [ + "all", + [ + "==", + "$type", + "Point" + ], + [ + "==", + "labelrank", + 1 + ] + ], + "type": "symbol", + "source": "mapbox", + "id": "marine_label_point_1", + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 0.75, + "text-halo-blur": 0.75 + }, + "source-layer": "marine_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 6.25, + "text-transform": "uppercase", + "text-size": { + "stops": [ + [ + 4, + 11 + ], + [ + 6, + 15 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849242106.713" + }, + "filter": [ + ">=", + "scalerank", + 4 + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label_4", + "paint": { + "text-color": "#334", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 6.25, + "text-transform": "uppercase", + "text-size": { + "stops": [ + [ + 3, + 11 + ], + [ + 7, + 17 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849242106.713" + }, + "filter": [ + "==", + "scalerank", + 3 + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label_3", + "paint": { + "text-color": "#334", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 6.25, + "text-transform": "uppercase", + "text-size": { + "stops": [ + [ + 2, + 11 + ], + [ + 5, + 17 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849242106.713" + }, + "filter": [ + "==", + "scalerank", + 2 + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label_2", + "paint": { + "text-color": "#334", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + }, + { + "interactive": true, + "layout": { + "text-font": [ + "Open Sans Bold", + "Arial Unicode MS Bold" + ], + "text-field": "{name_en}", + "text-max-width": 6.25, + "text-transform": "uppercase", + "text-size": { + "stops": [ + [ + 1, + 11 + ], + [ + 4, + 17 + ] + ] + } + }, + "metadata": { + "mapbox:group": "1444849242106.713" + }, + "filter": [ + "==", + "scalerank", + 1 + ], + "type": "symbol", + "source": "mapbox", + "id": "country_label_1", + "paint": { + "text-color": "#334", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2, + "text-halo-blur": 1 + }, + "source-layer": "country_label" + } + ], + "created": "1970-01-01T00:00:00.000Z", + "modified": "1970-01-01T00:00:00.000Z", + "owner": "mapbox", + "id": "bright-v9", + "draft": false, + "visibility": "public" +} \ No newline at end of file diff --git a/rendering/readme.md b/rendering/readme.md index d0837b0f85..0bfed29bd5 100644 --- a/rendering/readme.md +++ b/rendering/readme.md @@ -21,6 +21,12 @@ To run a single rendering test case: node rendering/test.js --match your-test-case-name ``` +If you want to leave the test server running (and the test browser open) after running a test, use the `--interactive` option. + +```bash +node rendering/test.js --match your-test-case-name --interactive +``` + ## Creating a new test To create a new test case, add a directory under `cases` and add a `main.js` to it (copied from one of the other cases). Then to generate the `expected.png` screenshot, run the test script with the `--fix` flag: diff --git a/rendering/test.js b/rendering/test.js index acbfe72a01..fdbf283353 100755 --- a/rendering/test.js +++ b/rendering/test.js @@ -251,7 +251,7 @@ async function render(entries, options) { page.on('console', (message) => { const type = message.type(); if (options.log[type]) { - options.log[type](message.text()); + options.log[type](`console: ${message.text()}`); } }); @@ -260,6 +260,10 @@ async function render(entries, options) { await page.setViewport({width: 256, height: 256}); fail = await renderEach(page, entries, options); } finally { + if (options.interactive) { + options.log.info('🐛 you have thirty minutes to debug, go!'); + await sleep(30 * 60 * 1000); + } browser.close(); } @@ -324,12 +328,16 @@ async function main(entries, options) { try { await render(entries, options); } finally { - if (!options.interactive) { - done(); - } + done(); } } +function sleep(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); +} + if (require.main === module) { const options = yargs .option('fix', { @@ -356,8 +364,7 @@ if (require.main === module) { default: false, }) .option('interactive', { - describe: - 'Run all tests and keep the test server running (this option will be reworked later)', + describe: 'Run all tests and keep the test server running for 30 minutes', type: 'boolean', default: false, }) diff --git a/rendering/webpack.config.js b/rendering/webpack.config.js index 42836e49d7..0c3b0099ff 100644 --- a/rendering/webpack.config.js +++ b/rendering/webpack.config.js @@ -34,4 +34,10 @@ module.exports = { }, ], }, + resolve: { + alias: { + // allow imports from 'ol/module' instead of specifiying the source path + ol: path.join(__dirname, '..', 'src', 'ol'), + }, + }, }; diff --git a/src/ol/layer/MapboxVector.js b/src/ol/layer/MapboxVector.js new file mode 100644 index 0000000000..370e17bd4a --- /dev/null +++ b/src/ol/layer/MapboxVector.js @@ -0,0 +1,405 @@ +/** + * @module ol/layer/MapboxVector + */ +import BaseEvent from '../events/Event.js'; +import EventType from '../events/EventType.js'; +import MVT from '../format/MVT.js'; +import SourceState from '../source/State.js'; +import VectorTileLayer from '../layer/VectorTile.js'; +import VectorTileSource from '../source/VectorTile.js'; +import {applyStyle} from 'ol-mapbox-style'; + +const mapboxBaseUrl = 'https://api.mapbox.com'; + +/** + * Gets the path from a mapbox:// URL. + * @param {string} url The Mapbox URL. + * @return {string} The path. + * @private + */ +export function getMapboxPath(url) { + const startsWith = 'mapbox://'; + if (url.indexOf(startsWith) !== 0) { + return ''; + } + return url.slice(startsWith.length); +} + +/** + * Turns mapbox:// sprite URLs into resolvable URLs. + * @param {string} url The sprite URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeSpriteUrl(url, token) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return url; + } + const startsWith = 'sprites/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(`unexpected sprites url: ${url}`); + } + const sprite = mapboxPath.slice(startsWith.length); + + return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`; +} + +/** + * Turns mapbox:// glyphs URLs into resolvable URLs. + * @param {string} url The glyphs URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeGlyphsUrl(url, token) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return url; + } + const startsWith = 'fonts/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(`unexpected fonts url: ${url}`); + } + const font = mapboxPath.slice(startsWith.length); + + return `${mapboxBaseUrl}/fonts/v1/${font}/0-255.pbf?access_token=${token}`; +} + +/** + * Turns mapbox:// style URLs into resolvable URLs. + * @param {string} url The style URL. + * @param {string} token The access token. + * @return {string} A resolvable URL. + * @private + */ +export function normalizeStyleUrl(url, token) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return url; + } + const startsWith = 'styles/'; + if (mapboxPath.indexOf(startsWith) !== 0) { + throw new Error(`unexpected style url: ${url}`); + } + const style = mapboxPath.slice(startsWith.length); + + return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`; +} + +/** + * Turns mapbox:// source URLs into vector tile URL templates. + * @param {string} url The source URL. + * @param {string} token The access token. + * @return {string} A vector tile template. + * @private + */ +export function normalizeSourceUrl(url, token) { + const mapboxPath = getMapboxPath(url); + if (!mapboxPath) { + return url; + } + return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`; +} + +/** + * @classdesc + * Event emitted on configuration or loading error. + */ +class ErrorEvent extends BaseEvent { + /** + * @param {Error} error error object. + */ + constructor(error) { + super(EventType.ERROR); + + /** + * @type {Error} + */ + this.error = error; + } +} + +/** + * @typedef {Object} StyleObject + * @property {Object