diff --git a/packages/map/src/config/amap.js b/packages/map/src/config/amap.js index 33d7bae1a743e7baaa9d449ad1fcfb02747db9c4..ecb285bf660f8d51e7297cbc9d09897df872efba 100644 --- a/packages/map/src/config/amap.js +++ b/packages/map/src/config/amap.js @@ -1,7 +1,11 @@ -const url = 'https://webapi.amap.com/maps?v=1.4.15&key=e83f64300a2a55a33fa8e4ab9a46bca6'; +const url = window.location.protocol + '//webapi.amap.com/maps?'; + +const key = 'e83f64300a2a55a33fa8e4ab9a46bca6'; + +const v = '1.4.15'; const plugins = ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.DistrictSearch']; -const amapConfig = { url, plugins }; +const amapConfig = { url, plugins, key, v }; export default amapConfig; diff --git a/packages/map/src/config/module.js b/packages/map/src/config/module.js deleted file mode 100644 index 4fea8550bc8797a4414b487c078a52a2aab49b1e..0000000000000000000000000000000000000000 --- a/packages/map/src/config/module.js +++ /dev/null @@ -1,34 +0,0 @@ -export default [ - 'gis/Map', - 'gis/Basemap', - 'gis/views/MapView', - 'gis/views/SceneView', - 'gis/layers/TileLayer', - 'gis/layers/MapImageLayer', - 'gis/layers/ElevationLayer', - 'gis/Ground', - 'gis/layers/SceneLayer', - 'gis/layers/FeatureLayer', - 'gis/layers/GroupLayer', - 'gis/layers/VectorTileLayer', - 'gis/layers/OpenStreetMapLayer', - 'gis/geometry/Extent', - 'gis/core/Collection', - 'gis/Camera', - 'gis/Viewpoint', - 'gis/geometry/support/jsonUtils', - 'gis/core/watchUtils', - 'gis/Graphic', - 'gis/symbols/PictureMarkerSymbol', - 'gis/widgets/Popup', - 'gis/layers/GraphicsLayer', - 'dojox/gfx/matrix', - 'gis/Color', - 'gis/symbols/SimpleFillSymbol', - 'gis/symbols/SimpleLineSymbol', - 'gis/symbols/TextSymbol', - 'gis/geometry/Point', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - 'gis/core/urlUtils', -]; diff --git a/packages/map/src/core/loadMapModules.js b/packages/map/src/core/loadMapModules.js new file mode 100644 index 0000000000000000000000000000000000000000..741c95e5ae5d3cc079d2829b28c64f14e9239595 --- /dev/null +++ b/packages/map/src/core/loadMapModules.js @@ -0,0 +1,30 @@ +import gisConfig from '../config/gis'; +import esriLoader from 'esri-loader'; +const loadedModules = {}; //宸茬粡鍔犺浇鐨勬ā鍧� + +const loadMapModules = async (modules) => { + let needLoadModules = isNeedRequest(modules); + if (Object.keys(needLoadModules).length > 0) { + let moduleArr = Object.entries(needLoadModules); + let moduleUrlsArray = moduleArr.map((item) => item[1]); + let requestloadedModules = await esriLoader.loadModules(moduleUrlsArray, gisConfig); + requestloadedModules.map((item, index) => { + loadedModules[moduleArr[index][0]] = item; + }); + } + return loadedModules; +}; + +const isNeedRequest = (modules) => { + let needLoadModules = {}; + for (let key in modules) { + if (!loadedModules[key]) needLoadModules[key] = modules[key]; + } + return needLoadModules; +}; + +const getMapModules = () => { + return loadedModules; +}; + +export { getMapModules, loadMapModules }; diff --git a/packages/map/src/core/loadScripts.js b/packages/map/src/core/loadScripts.js new file mode 100644 index 0000000000000000000000000000000000000000..5cd46810070c13397af6f8334981a25490c57e15 --- /dev/null +++ b/packages/map/src/core/loadScripts.js @@ -0,0 +1,35 @@ +function loadScripts(srcs) { + return new Promise((resolve, reject) => { + if (srcs && srcs.length > 0) { + var scriptOrLink; + var _src = srcs.shift(); + if (_src) { + var isCSS = _src.lastIndexOf('.css') == _src.length - 4; + if (isCSS) { + scriptOrLink = document.createElement('link'); + scriptOrLink.type = 'text/css'; + scriptOrLink.rel = 'stylesheet'; + scriptOrLink.href = _src; + } else { + scriptOrLink = document.createElement('script'); + scriptOrLink.type = 'text/javascript'; + scriptOrLink.charset = 'utf-8'; + scriptOrLink.src = _src; + } + if (scriptOrLink) { + scriptOrLink.onload = function () { + if (srcs.length > 0) { + loadScripts(srcs).then(resolve, reject); + } else { + resolve(); + } + }; + scriptOrLink.onerror = reject; + document.getElementsByTagName('head')[0].appendChild(scriptOrLink); + } + } + } + }); +} + +export default loadScripts; diff --git a/packages/map/src/core/utils.js b/packages/map/src/core/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..f17cdc0011b245019f26e89142ebb4e95f0f3cbb --- /dev/null +++ b/packages/map/src/core/utils.js @@ -0,0 +1,82 @@ +import { loadMapModules, getMapModules } from './loadMapModules'; +const _ = require('lodash'); +const querystring = require('querystring'); +const modules = { + jsonUtils: 'gis/geometry/support/jsonUtils', +}; + +const layerOperation = { + isInGroup(lyr, reorderGroups = []) { + let { lyrIndex, groupIndex } = this.getGroup(lyr, reorderGroups); + return _.isNumber(lyrIndex) && groupIndex >= 0; + }, + getLayerWeight(lyr, reorderGroups) { + if ('graphics' == lyr.type) { + let { lyrIndex, groupIndex } = this.getGroup(lyr, reorderGroups); + if (this.isInGroup(lyr, reorderGroups)) return (groupIndex + 1) * 100 + lyrIndex; + } else { + return -1; + } + }, + registerReorderStrategy: (groupName, reorderGroups = []) => { + var index = reorderGroups.indexOf(groupName); + return index < 0 && reorderGroups.push(groupName); + }, + getGroup(lyr, reorderGroups) { + let groupName = lyr.order.split('-')[0], + lyrIndex = Number(lyr.order.split('-')[1]), + groupIndex = reorderGroups.indexOf(groupName); + return { lyrIndex, groupIndex }; + }, +}; + +const urlUtils = { + urlToObject: (url) => { + let [path, params] = url.split('?'); + let query = querystring.parse(params); + return { path, query }; + }, + objectToUrl: (url, query) => {}, +}; + +const geomUtils = { + toGeometry(jsonObj, view) { + const { jsonUtils } = getMapModules(); + if (jsonObj) { + jsonObj.spatialReference = { + wkid: view.spatialReference.wkid, + }; + return jsonUtils.fromJSON(jsonObj); + } + }, +}; + +const loadUtilMapModules = async () => { + await loadMapModules(modules); +}; + +const mapUtils = { + getNearestScale(extent, view) { + let resolution = extent.width / view.width, + zoom = 0, + nearestScale = -1, + diff = Number.POSITIVE_INFINITY; + if (view.map.basemap && view.map.basemap.baseLayers.length > 0) { + view.map.basemap.baseLayers.getItemAt(0).tileInfo.lods.forEach( + function (item) { + if (item.resolution >= resolution) { + var difftemp = item.resolution - resolution; + if (difftemp < diff) { + diff = difftemp; + nearestScale = item.scale; + zoom = item.level; + } + } + }.bind(this), + ); + } + return { scale: nearestScale, zoom }; + }, +}; + +export { layerOperation, urlUtils, loadUtilMapModules, geomUtils, mapUtils }; diff --git a/packages/map/src/core/withModule.jsx b/packages/map/src/core/withModule.jsx new file mode 100644 index 0000000000000000000000000000000000000000..bfce881b019ab5c22b767ffa50705a43c98703c6 --- /dev/null +++ b/packages/map/src/core/withModule.jsx @@ -0,0 +1,63 @@ +/************************************************************************************************ + * Copyright 漏, 2018-2020, MapGIS + * @Description: 鍦板浘妯″潡鍔犺浇鍣� + * @Author: Chenzilong + * @History: 1銆佸垵濮嬬増鏈� 2018-11-19 Chenzilong + * @Usage: 楂橀樁缁勪欢鐨勫疄鐢� => 閫氳繃灏佽涓€涓珮闃剁粍浠讹紝鍏堝姞杞藉湴鍥剧浉瀵瑰簲鐨勬ā鍧楋紝鍔犺浇瀹屾垚锛屽啀鏉ュ姞杞藉湴鍥捐祫婧愶紝杩欐牱鍦ㄥ皝瑁呯殑缁勪欢閲岄潰灏变笉浼氭湁寮傛杩囩▼锛屽苟涓旇繕浣跨敤浜嗗叏灞€鍙橀噺鏉ヨ繘琛岀粍浠剁紦瀛樼粍浠� + * + * //鍔犺浇妯″潡 + * const modules = { Graphic:"esri/Graphic",GraphicsLayer:"esri/layers/GraphicsLayer" }; //闇€瑕佸姞杞界殑鍦板浘妯″潡瀹氫箟 + * 1銆乧lass淇グ绗︽柟寮� + * @withModule(modules) //浣跨敤淇グ绗︿慨楗扮粍浠� + * class SomeComponent extends React.Component{} + * 2銆佸嚱鏁拌皟鐢ㄦ柟寮� + * const WrappedComponent = withModule(modules)(SomeComponent) + * //浣跨敤缁勪欢 + * <WrappedComponent wrappedComponentRef={ref=>this.ref = ref}/> //鑾峰彇缁勪欢瀹炰緥寮曠敤浣跨敤wrappedComponentRef + * //鑾峰彇妯″潡 + * 缁勪欢鍐呴儴閫氳繃 const {module:{Graphic,GraphicsLayer}} = this.props 鑾峰彇琚姞杞芥ā鍧� + * + * withModule浼氬湪鍔犺浇瀹屾墍鏈夋ā鍧楀悗鏄剧ず缁勪欢锛屽苟灏嗘ā鍧楅€氳繃props.module娉ㄥ叆鍒扮粍浠朵腑 + ************************************************************************************************/ + +import React from 'react'; +import { loadMapModules, getMapModules } from './loadMapModules'; + +const withModule = (modules) => { + return function wrapper(Component) { + class Proxy extends React.Component { + state = { + loaded: false, + }; + + unmounted = false; + + componentDidMount() { + if (modules) { + this.loadModules(); + } else { + this.setState({ loaded: true }); + } + } + + componentWillUnmount() { + this.unmounted = true; + } + + async loadModules() { + await loadMapModules(modules); + if (!this.unmounted) this.setState({ loaded: true }); + } + + render() { + const { wrappedComponentRef, ...rest } = this.props; + return this.state.loaded ? ( + <Component modules={getMapModules()} {...rest} ref={wrappedComponentRef} /> + ) : null; + } + } + return Proxy; + }; +}; + +export default withModule; diff --git a/packages/map/src/demos/createMap.jsx b/packages/map/src/demos/createMap.jsx index 7c9a6e85e65d7152fbc8063d8dabe698564b35f3..638195c553274d767f6f5f416f2b4c90b978d251 100644 --- a/packages/map/src/demos/createMap.jsx +++ b/packages/map/src/demos/createMap.jsx @@ -1,5 +1,5 @@ import mapsettings from '../mapData'; -import MapManganer from '../index'; +import MapView from '../index'; export default class CreateMap extends React.Component { constructor(props) { @@ -8,17 +8,44 @@ export default class CreateMap extends React.Component { if (!window._config) { window._config = { site: '', - mapsettings: mapsettings, useCoverMap: true, }; } } + state = { + loaded: false, + mapsettings: null, + }; + componentDidMount() { - window.mapManager = this.mapManganerRef.current; + let url = location.origin + '/CityInterface/rest/services.svc/GetWebSiteConfig?client=city'; + fetch(url) + .then((data) => data.json()) + .then((response) => { + let data = response[0]['mapsettings']; + this.setState({ + mapsettings: data, + loaded: true, + }); + }) + .catch(() => { + new Error('璇锋眰璧勬簮澶辫触'); + }); } render() { - return <MapManganer mapsettings={mapsettings} ref={this.mapManganerRef} />; + const { loaded, mapsettings } = this.state; + return ( + <> + {loaded ? ( + <MapView mapsettings={mapsettings} ref={this.mapManganerRef} /> + ) : ( + <div> + <h1>鍔犺浇涓�.....</h1> + </div> + )} + </> + ); } } diff --git a/packages/map/src/extensions/PromiseRegistry.js b/packages/map/src/extensions/PromiseRegistry.js deleted file mode 100644 index 3ec10cdd14923372fb267fae93b14702774ea73d..0000000000000000000000000000000000000000 --- a/packages/map/src/extensions/PromiseRegistry.js +++ /dev/null @@ -1,76 +0,0 @@ -// All material copyright GIS, All Rights Reserved, unless otherwise specified. -// See https://js.gis.com/4.3/gis/copyright.txt for details. -//>>built -define('require exports gis/core/tsSupport/declareExtendsHelper gis/core/tsSupport/decorateHelper gis/core/Accessor gis/core/accessorSupport/decorators'.split( - ' ', -), function (c, k, g, f, h, e) { - c = (function (c) { - function b() { - var a = c.call(this) || this; - a._groups = null; - a._groups = {}; - return a; - } - g(b, c); - b.prototype.destroy = function () { - this.removeAll(); - this._groups = null; - }; - Object.defineProperty(b.prototype, 'size', { - get: function () { - var a = 0, - d = this._groups, - b; - for (b in d) a += d[b].length; - return a; - }, - enumerable: !0, - configurable: !0, - }); - b.prototype.add = function (a, b) { - if (!this._isPromise(a) && !Array.isArray(a)) return this; - b = this._getOrCreateGroup(b); - if (Array.isArray(a)) for (var d = 0; d < a.length; d++) b.push(a[d]); - else b.push(a); - this.notifyChange('size'); - return this; - }; - b.prototype.has = function (a) { - a = this._groups[a]; - return !!a && 0 < a.length; - }; - b.prototype.remove = function (a) { - if (Array.isArray(a)) a.forEach(this.remove.bind(this)); - else { - a = this._getGroup(a); - if (!a) return this; - for (var b = 0; b < a.length; b++) - !a[b].isFulfilled() && !a[b].isCanceled() && a[b].cancel(); - a.length = 0; - this.notifyChange('size'); - } - return this; - }; - b.prototype.removeAll = function () { - var a = this._groups, - b; - for (b in a) this.remove(b), delete a[b]; - return this; - }; - b.prototype._isPromise = function (a) { - return a && !!a.cancel && !!a.isCanceled; - }; - b.prototype._getOrCreateGroup = function (a) { - return this._getGroup(a) || (this._groups[this._ensureGroupName(a)] = []); - }; - b.prototype._getGroup = function (a) { - return this._groups[this._ensureGroupName(a)]; - }; - b.prototype._ensureGroupName = function (a) { - return a || '_default_'; - }; - return b; - })(e.declared(h)); - f([e.property({ readOnly: !0 })], c.prototype, 'size', null); - return (c = f([e.subclass()], c)); -}); diff --git a/packages/map/src/extensions/layers/AMapTileLayer.js b/packages/map/src/extensions/layers/AMapTileLayer.js index 9ad302a1973ab0cab15ab42ad718f7aca42829ba..b827c296112ff8df0f4134242830ad765d1f8287 100644 --- a/packages/map/src/extensions/layers/AMapTileLayer.js +++ b/packages/map/src/extensions/layers/AMapTileLayer.js @@ -1,6 +1,7 @@ import TilemetaUtils from './support/TilemetaUtils'; -console.log('Amap-tilelayer'); -export default function (TileLayer, lang, promiseUtils) { +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ TileLayer, lang, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 99, //鍦板浘缂╂斁绾ф暟 maxlevel = 18, //鍦板浘鎬荤骇鏁� diff --git a/packages/map/src/extensions/layers/BaiduTileLayer.js b/packages/map/src/extensions/layers/BaiduTileLayer.js index e861ceb4e65a25544e859d6099a479a385b64376..1f3d95cae17bef42565c2303916da6f6c43a2f7e 100644 --- a/packages/map/src/extensions/layers/BaiduTileLayer.js +++ b/packages/map/src/extensions/layers/BaiduTileLayer.js @@ -1,7 +1,7 @@ import TilemetaUtils from './support/TilemetaUtils'; - +import { getMapModules } from '../../core/loadMapModules'; //鐧惧害鍦板浘 -export default function (TileLayer, promiseUtils) { +export default function ({ TileLayer, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 99, //鍦板浘缂╂斁绾ф暟 maxlevel = 20, //鍦板浘鎬荤骇鏁� diff --git a/packages/map/src/extensions/layers/GoogleTileLayer.js b/packages/map/src/extensions/layers/GoogleTileLayer.js index d60281acae6ac720789a4f6f75bb81d1065bca75..c655fa86190d1fc23b25977b8ac5ffb7c6e10900 100644 --- a/packages/map/src/extensions/layers/GoogleTileLayer.js +++ b/packages/map/src/extensions/layers/GoogleTileLayer.js @@ -1,8 +1,9 @@ // 璋锋瓕鍦板浘 (鐢盩ileLayer鎵╁睍) // create by czl 2017/12/2 import TilemetaUtils from './support/TilemetaUtils'; +import { getMapModules } from '../../core/loadMapModules'; -export default function (TileLayer, lang, promiseUtils) { +export default function ({ TileLayer, lang, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 99, //鍦板浘缂╂斁绾ф暟 levelStart = 3, // 璧峰绾ф暟 diff --git a/packages/map/src/extensions/layers/MapBoxLayer.js b/packages/map/src/extensions/layers/MapBoxLayer.js index 1c780d35ea144e1d0df4660882137f73f527a5d7..08c62cf8bf5122a037fd8c18c95ed0e992e27b28 100644 --- a/packages/map/src/extensions/layers/MapBoxLayer.js +++ b/packages/map/src/extensions/layers/MapBoxLayer.js @@ -1,8 +1,8 @@ -// All material copyright GIS, All Rights Reserved, unless otherwise specified. -// See https://js.gis.com/4.3/gis/copyright.txt for details. -//>>built -//streets銆乴ight銆乨ark銆乻atellite銆乻treets-satellite銆亀heatpaste銆乻treets-basic銆乧omic銆乷utdoors銆乺un-bike-hike銆乸encil銆乸irates銆乪merald銆乭igh-contrast -define(['gis/config', 'gis/layers/WebTileLayer'], function (a, b) { +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ config, WebTileLayer } = getMapModules()) { + let a = config, + b = WebTileLayer; a.request.corsEnabledServers.push('a.tile.mapbox.org', 'b.tile.mapbox.org', 'c.tile.mapbox.org'); return b.createSubclass({ declaredClass: 'gis.layers.MapBoxLayer', @@ -15,4 +15,4 @@ define(['gis/config', 'gis/layers/WebTileLayer'], function (a, b) { type: { value: 'mapbox', json: { read: !1 } }, }, }); -}); +} diff --git a/packages/map/src/extensions/layers/PipenetTileLayer.js b/packages/map/src/extensions/layers/PipenetTileLayer.js index 56fae31035f68690f2d8b286ec66ee9b36664f63..4232a4e71caeab9a7aa6328cd3d627271ce8fbae 100644 --- a/packages/map/src/extensions/layers/PipenetTileLayer.js +++ b/packages/map/src/extensions/layers/PipenetTileLayer.js @@ -1,12 +1,9 @@ // 鑷畾涔夊簳鍥� (鐢盩ileLayer鎵╁睍) // create by zxc 2020/7/16 -define([ - 'gis/layers/TileLayer', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - './support/TilemetaUtils', - 'gis/request', -], function (TileLayer, lang, promiseUtils, TilemetaUtils, request) { +import TilemetaUtils from './support/TilemetaUtils'; +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ TileLayer, lang, promiseUtils, request } = getMapModules()) { var dpi = 96, //pixel per inch level = 99, //鍦板浘缂╂斁绾ф暟 levelStart = 0, // 璧峰绾ф暟 @@ -103,4 +100,4 @@ define([ ); }, }); -}); +} diff --git a/packages/map/src/extensions/layers/TiandituTileLayer.js b/packages/map/src/extensions/layers/TiandituTileLayer.js index ba5ab1981cdbf0e393c88617bd6c4e18f266ca64..e8a2620bffee8fa76e10f7de36c5617d29a2e773 100644 --- a/packages/map/src/extensions/layers/TiandituTileLayer.js +++ b/packages/map/src/extensions/layers/TiandituTileLayer.js @@ -1,11 +1,9 @@ // 澶╁湴鍥� (鐢盩ileLayer鎵╁睍) // create by czl 2017/12/2 -define([ - 'gis/layers/TileLayer', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - './support/TilemetaUtils', -], function (TileLayer, lang, promiseUtils, TilemetaUtils) { +import TilemetaUtils from './support/TilemetaUtils'; +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ TileLayer, lang, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 20, //鍦板浘鎬荤骇鏁� levelStart = 3, // 璧峰绾ф暟 @@ -165,4 +163,4 @@ define([ }); }, }); -}); +} diff --git a/packages/map/src/extensions/layers/UserTileLayer.js b/packages/map/src/extensions/layers/UserTileLayer.js index 1486bc76326e2f177b2cf3e2e2cdc1e2f89fd189..fcf31bf7c5189b7f9cfb72cdbc7e5d7484f63c55 100644 --- a/packages/map/src/extensions/layers/UserTileLayer.js +++ b/packages/map/src/extensions/layers/UserTileLayer.js @@ -1,12 +1,9 @@ // 鑷畾涔夊簳鍥� (鐢盩ileLayer鎵╁睍) // create by ysq 2019/5/8 -define([ - 'gis/layers/TileLayer', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - './support/TilemetaUtils', - 'gis/request', -], function (TileLayer, lang, promiseUtils, TilemetaUtils, request) { +import TilemetaUtils from './support/TilemetaUtils'; +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ TileLayer, lang, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 99, //鍦板浘缂╂斁绾ф暟 levelStart = 0, // 璧峰绾ф暟 @@ -97,4 +94,4 @@ define([ }); }, }); -}); +} diff --git a/packages/map/src/extensions/layers/WMTSTileLayer.js b/packages/map/src/extensions/layers/WMTSTileLayer.js index 22a6a15460c1568b12fc15c6351e2015d9e3177d..7f8d42b3ed8374cbbe51e22a78d7da2b3723a439 100644 --- a/packages/map/src/extensions/layers/WMTSTileLayer.js +++ b/packages/map/src/extensions/layers/WMTSTileLayer.js @@ -1,10 +1,8 @@ // create by ysq 2018/11/7 -define([ - 'gis/layers/TileLayer', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - './support/TilemetaUtils', -], function (TileLayer, lang, promiseUtils, TilemetaUtils) { +import TilemetaUtils from './support/TilemetaUtils'; +import { getMapModules } from '../../core/loadMapModules'; + +export default function ({ TileLayer, lang, promiseUtils } = getMapModules()) { var dpi = 96, //pixel per inch level = 19, //鍦板浘鎬荤骇鏁� levelStart = 9, // 璧峰绾ф暟 @@ -51,12 +49,4 @@ define([ }); }, }); -}); - -import gisConfig from '../../config/gis'; -const modules = [ - 'gis/layers/TileLayer', - 'dojo/_base/lang', - 'gis/core/promiseUtils', - './support/TilemetaUtils', -]; +} diff --git a/packages/map/src/extensions/layers/index.js b/packages/map/src/extensions/layers/index.js new file mode 100644 index 0000000000000000000000000000000000000000..a61be31f7744e8e3cbc9d02c10c7a328b370d59b --- /dev/null +++ b/packages/map/src/extensions/layers/index.js @@ -0,0 +1,34 @@ +import { loadMapModules } from '../../core/loadMapModules'; +import AMapTileLayer from './AMapTileLayer'; +import BaiduTileLayer from './BaiduTileLayer'; +import GoogleTileLayer from './GoogleTileLayer'; +import MapBoxLayer from './MapBoxLayer'; +import PipenetTileLayer from './PipenetTileLayer'; +import TiandituTileLayer from './TiandituTileLayer'; +import UserTileLayer from './UserTileLayer'; +import WMTSTileLayer from './WMTSTileLayer'; + +const modules = { + TileLayer: 'gis/layers/TileLayer', + lang: 'dojo/_base/lang', + promiseUtils: 'gis/core/promiseUtils', + config: 'gis/config', + WebTileLayer: 'gis/layers/WebTileLayer', + request: 'gis/request', +}; + +const loadMapLayerModules = async () => { + await loadMapModules(modules); +}; + +export { + loadMapLayerModules, + AMapTileLayer, + BaiduTileLayer, + GoogleTileLayer, + MapBoxLayer, + PipenetTileLayer, + TiandituTileLayer, + UserTileLayer, + WMTSTileLayer, +}; diff --git a/packages/map/src/extensions/layers/root.json b/packages/map/src/extensions/layers/root.json deleted file mode 100644 index 7df26e7d3bc3cafda3874c124e2eeea4687c1a93..0000000000000000000000000000000000000000 --- a/packages/map/src/extensions/layers/root.json +++ /dev/null @@ -1,6723 +0,0 @@ -{ - "layers": [ - { - "paint": { - "background-color": "#212121" - }, - "type": "background", - "id": "background" - }, - { - "layout": {}, - "paint": { - "fill-color": "#212121" - }, - "source": "esri", - "minzoom": 0, - "source-layer": "Land", - "type": "fill", - "id": "Land" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [5, "#165C66"], - [10, "#212121"] - ] - }, - "fill-opacity": 0.13 - }, - "source": "esri", - "minzoom": 5, - "source-layer": "Urban area", - "maxzoom": 15, - "type": "fill", - "id": "Urban area" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": { - "stops": [ - [0, 0.7], - [11, 0.2] - ] - } - }, - "source": "esri", - "minzoom": 0, - "source-layer": "Land", - "type": "fill", - "id": "Land/pattern" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 12, - "source-layer": "Openspace or forest", - "type": "fill", - "id": "Openspace or forest" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 7, - "source-layer": "Admin0 forest or park", - "type": "fill", - "id": "Admin0 forest or park" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 8, - "source-layer": "Admin1 forest or park", - "type": "fill", - "id": "Admin1 forest or park" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 12, - "source-layer": "Zoo", - "type": "fill", - "id": "Zoo" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 9, - "source-layer": "Airport", - "type": "fill", - "id": "Airport/Airport property" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.4 - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 11, - "source-layer": "Airport", - "type": "fill", - "id": "Airport/Airport runway" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 14, - "source-layer": "Pedestrian", - "type": "fill", - "id": "Pedestrian" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 12, - "source-layer": "Park or farming", - "type": "fill", - "id": "Park or farming" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Special area of interest/Sand", - "fill-opacity": 0.3 - }, - "source": "esri", - "minzoom": 13, - "source-layer": "Beach", - "type": "fill", - "id": "Beach" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 15], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Parking" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.2 - }, - "filter": ["==", "_symbol", 11], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Green openspace" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.15 - }, - "filter": ["==", "_symbol", 8], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Grass" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.25 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Baseball field or other grounds" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Special area of interest/Groundcover", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 13], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Groundcover" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Field or court exterior" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Football field or court" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": "#025665", - "fill-color": "#012233" - }, - "filter": ["==", "_symbol", 10], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Hardcourt" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 14], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Mulch or dirt" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Athletic track" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Special area of interest/Sand", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 6], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Sand" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Special area of interest/Rock or gravel", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 16], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Rock or gravel" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Park", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Bike, walk or pedestrian" - }, - { - "layout": {}, - "paint": { - "fill-color": "#02182B" - }, - "filter": ["==", "_symbol", 7], - "source": "esri", - "minzoom": 15, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Water" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 7], - "source": "esri", - "minzoom": 15, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Water/pattern" - }, - { - "layout": { - "line-join": "round", - "visibility": "none" - }, - "paint": { - "line-color": "#02182B", - "line-width": 0.5 - }, - "source": "esri", - "minzoom": 1, - "source-layer": "Water line small scale", - "maxzoom": 5, - "type": "line", - "id": "Water line small scale" - }, - { - "layout": { - "line-join": "round", - "visibility": "none" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.5], - [7, 0.7] - ] - } - }, - "source": "esri", - "minzoom": 6, - "source-layer": "Water line medium scale", - "maxzoom": 7, - "type": "line", - "id": "Water line medium scale" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round", - "visibility": "none" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [7, 0.7], - [11, 0.8] - ] - } - }, - "source": "esri", - "minzoom": 7, - "source-layer": "Water line large scale", - "maxzoom": 11, - "type": "line", - "id": "Water line large scale" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#1D3543", - "line-dasharray": [5, 5], - "line-width": 0.8 - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Waterfall" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.7], - [14, 0.7], - [17, 2] - ] - } - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Dam or weir" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.7], - [14, 0.7], - [17, 2] - ] - } - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Levee" - }, - { - "layout": { - "line-cap": "round" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.8], - [14, 0.8], - [17, 2] - ] - } - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Canal or ditch" - }, - { - "layout": {}, - "paint": { - "line-color": "#1D3543", - "line-dasharray": [7, 3], - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.8], - [14, 0.8], - [17, 2] - ] - } - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Stream or river intermittent" - }, - { - "layout": { - "line-cap": "round" - }, - "paint": { - "line-color": "#1D3543", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.8], - [14, 0.8], - [17, 2] - ] - } - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 11, - "source-layer": "Water line", - "type": "line", - "id": "Water line/Stream or river" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#05375A"], - [10.6, "#02182B"] - ] - } - }, - "source": "esri", - "source-layer": "Marine area", - "type": "fill", - "id": "Marine area" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "source": "esri", - "source-layer": "Marine area", - "type": "fill", - "id": "Marine area/2" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#043151"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 2 (shallow water)" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 2 (shallow water)/1" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#042B47"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 3" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 3/1" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#03253E"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 4" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 4/1" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#021E35"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 5" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 5/1" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#02182B"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 6" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 6/1" - }, - { - "layout": {}, - "paint": { - "fill-color": { - "stops": [ - [0, "#212121"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 7 (deep water)" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "source-layer": "Bathymetry", - "maxzoom": 11, - "type": "fill", - "id": "Bathymetry/depth 7 (deep water)/1" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": { - "stops": [ - [0, "#074b7b"], - [7, "#05375A"] - ] - }, - "fill-color": { - "stops": [ - [0, "#05375A"], - [10.6, "#02182B"] - ] - } - }, - "source": "esri", - "minzoom": 1, - "source-layer": "Water area small scale", - "maxzoom": 5, - "type": "fill", - "id": "Water area small scale" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "source": "esri", - "minzoom": 1, - "source-layer": "Water area small scale", - "maxzoom": 5, - "type": "fill", - "id": "Water area small scale/pattern" - }, - { - "layout": {}, - "paint": { - "fill-color": "#02182B" - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 5, - "source-layer": "Water area medium scale", - "maxzoom": 7, - "type": "fill", - "id": "Water area medium scale/Lake intermittent" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Lake or river intermittent", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 5, - "source-layer": "Water area medium scale", - "maxzoom": 7, - "type": "fill", - "id": "Water area medium scale/Lake intermittent/pattern" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": { - "stops": [ - [0, "#074b7b"], - [7, "#05375A"] - ] - }, - "fill-color": { - "stops": [ - [0, "#05375A"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 5, - "source-layer": "Water area medium scale", - "maxzoom": 7, - "type": "fill", - "id": "Water area medium scale/Lake or river" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 5, - "source-layer": "Water area medium scale", - "maxzoom": 7, - "type": "fill", - "id": "Water area medium scale/Lake or river/pattern" - }, - { - "layout": {}, - "paint": { - "fill-color": "#02182B" - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale", - "maxzoom": 11, - "type": "fill", - "id": "Water area large scale/Lake intermittent" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Lake or river intermittent", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale", - "maxzoom": 11, - "type": "fill", - "id": "Water area large scale/Lake intermittent/pattern" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": { - "stops": [ - [0, "#074b7b"], - [7, "#05375A"], - [9, "#02182B"] - ] - }, - "fill-color": { - "stops": [ - [0, "#05375A"], - [10.6, "#02182B"] - ] - } - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale", - "maxzoom": 11, - "type": "fill", - "id": "Water area large scale/Lake or river" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale", - "maxzoom": 11, - "type": "fill", - "id": "Water area large scale/Lake or river/pattern" - }, - { - "layout": {}, - "paint": { - "fill-color": "#02182B" - }, - "filter": ["==", "_symbol", 7], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Lake, river or bay" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Land", - "fill-opacity": 0.7 - }, - "filter": ["==", "_symbol", 7], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Lake, river or bay/pattern" - }, - { - "layout": {}, - "paint": { - "fill-color": "#02182B" - }, - "filter": ["==", "_symbol", 6], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Lake or river intermittent" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Lake or river intermittent", - "fill-opacity": 0.5 - }, - "filter": ["==", "_symbol", 6], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Lake or river intermittent/pattern" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Inundated area", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Inundated area" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Swamp or marsh", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Swamp or marsh" - }, - { - "layout": {}, - "paint": { - "fill-pattern": "Water area/Playa", - "fill-opacity": 0.3 - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Playa" - }, - { - "layout": {}, - "paint": { - "fill-color": "#012233" - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "fill", - "id": "Water area/Dam or weir" - }, - { - "layout": {}, - "paint": { - "line-color": { - "stops": [ - [15, "#005F7D"], - [17, "#0082ac"] - ] - }, - "line-opacity": { - "stops": [ - [15, 0.4], - [17, 0.6] - ] - }, - "line-width": { - "stops": [ - [15, 1.1], - [17, 2.5] - ] - } - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area", - "type": "line", - "id": "Water area/Dam or weir/line" - }, - { - "layout": {}, - "paint": { - "fill-color": "#012233" - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Building", - "type": "fill", - "id": "Building" - }, - { - "layout": {}, - "paint": { - "line-color": { - "stops": [ - [15, "#005F7D"], - [17, "#0082ac"] - ] - }, - "line-opacity": { - "stops": [ - [15, 0.4], - [17, 0.6] - ] - }, - "line-width": { - "stops": [ - [15, 1.1], - [17, 2.5] - ] - } - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Building", - "type": "line", - "id": "Building/line" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#212121", - "line-width": { - "base": 1.2, - "stops": [ - [15, 0.7], - [17, 1.2] - ] - } - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 15, - "source-layer": "Special area of interest line", - "type": "line", - "id": "Special area of interest line/Dock or pier" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-width": { - "base": 1.2, - "stops": [ - [15, 0.7], - [17, 1.2] - ] - } - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 15, - "source-layer": "Special area of interest line", - "type": "line", - "id": "Special area of interest line/Parking lot" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-width": { - "base": 1.2, - "stops": [ - [15, 0.7], - [17, 1.2] - ] - } - }, - "filter": ["==", "_symbol", 6], - "source": "esri", - "minzoom": 15, - "source-layer": "Special area of interest line", - "type": "line", - "id": "Special area of interest line/Sports field" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#212121", - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.5], - [16, 3.3], - [18, 4] - ] - } - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Trail or path", - "type": "line", - "id": "Trail or path/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-dasharray": [2.0, 1.0], - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.5], - [14, 3.3], - [18, 8.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 10], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road", - "type": "line", - "id": "Road/4WD/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.5], - [14, 3.3], - [18, 8.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road", - "type": "line", - "id": "Road/Service/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.4, - "stops": [ - [11, 1.5], - [14, 4], - [16, 6], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Road", - "type": "line", - "id": "Road/Local/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#212121", - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.5], - [16, 3.3], - [18, 4] - ] - } - }, - "filter": ["all", ["==", "_symbol", 9], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road", - "type": "line", - "id": "Road/Pedestrian/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [11, 1], - [14, 4], - [16, 9.6], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road", - "type": "line", - "id": "Road/Minor, ramp or traffic circle/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [11, 2.6], - [14, 5.6], - [16, 9.6], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road", - "type": "line", - "id": "Road/Minor/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [9, 1.5], - [14, 7.3], - [16, 10.3], - [18, 18] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major, ramp or traffic circle/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.0, - "stops": [ - [9, 1.5], - [14, 7.3], - [16, 10.3], - [18, 18] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.0, - "stops": [ - [9, 0.3], - [14, 8.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway, ramp or traffic circle/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.3], - [14, 8.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road", - "type": "line", - "id": "Road/Highway/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.3], - [14, 8.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#064853", - "line-dasharray": [3, 1.5], - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.3], - [16, 2], - [18, 2.3] - ] - } - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Trail or path", - "type": "line", - "id": "Trail or path/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#064853", - "line-dasharray": [3, 1.5], - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.3], - [16, 2], - [18, 2.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 9], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road", - "type": "line", - "id": "Road/Pedestrian/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 1.3], - [18, 6.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 10], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road", - "type": "line", - "id": "Road/4WD/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 1.3], - [18, 6.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road", - "type": "line", - "id": "Road/Service/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [11, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.4, - "stops": [ - [11, 1.1], - [14, 2], - [16, 4], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Road", - "type": "line", - "id": "Road/Local/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#011527", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1.5], - [14, 2.5], - [17, 3] - ] - } - }, - "source": "esri", - "minzoom": 12, - "source-layer": "Railroad", - "type": "line", - "id": "Railroad/2" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#193645", - "line-width": { - "base": 1.2, - "stops": [ - [12, 0.5], - [14, 1], - [17, 1.75] - ] - } - }, - "source": "esri", - "minzoom": 12, - "source-layer": "Railroad", - "type": "line", - "id": "Railroad/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#011527", - "line-width": { - "base": 1.2, - "stops": [ - [12, 1.5], - [14, 2.5], - [17, 3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Ferry", - "type": "line", - "id": "Ferry/Rail ferry/2" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#193645", - "line-width": { - "base": 1.2, - "stops": [ - [12, 0.5], - [14, 1], - [17, 1.75] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Ferry", - "type": "line", - "id": "Ferry/Rail ferry/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [11, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 2], - [16, 7.65], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road", - "type": "line", - "id": "Road/Minor, ramp or traffic circle/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [11, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.3], - [14, 3.65], - [16, 7.65], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road", - "type": "line", - "id": "Road/Minor/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major, ramp or traffic circle/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway, ramp or traffic circle/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road", - "type": "line", - "id": "Road/Highway/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 6, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major, ramp or traffic circle/-1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road", - "type": "line", - "id": "Road/Major/-1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway, ramp or traffic circle/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [8, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road", - "type": "line", - "id": "Road/Highway/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [5, 0.3], - [14, 6.3], - [16, 10.3], - [18, 24] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.1], - [14, 1], - [16, 1], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 6, - "source-layer": "Road", - "type": "line", - "id": "Road/Freeway Motorway/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-dasharray": [2.0, 1.0], - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.5], - [14, 3.3], - [18, 8.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 10], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/4WD/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.5], - [14, 3.3], - [18, 8.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Service/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.4, - "stops": [ - [11, 1.5], - [14, 4], - [16, 6], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Local/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.5], - [16, 3.3], - [18, 4] - ] - } - }, - "filter": ["all", ["==", "_symbol", 9], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Pedestrian/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 1], - [14, 4], - [16, 9.65], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Minor, ramp or traffic circle/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 2.6], - [14, 5.65], - [16, 9.65], - [18, 17.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Minor/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 1.5], - [14, 7.3], - [16, 10.3], - [18, 18] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major, ramp or traffic circle/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.0, - "stops": [ - [9, 1.5], - [14, 7.3], - [16, 10.3], - [18, 18] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.3], - [14, 8.3], - [16, 14.3], - [18, 28] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway, ramp or traffic circle/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.3], - [14, 8.3], - [16, 14.3], - [18, 28] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Highway/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#00080f", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.3], - [14, 8.3], - [16, 14.3], - [18, 28] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-dasharray": [3, 1.5], - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [14, 1.3], - [16, 2], - [18, 2.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 9], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Pedestrian/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 1.3], - [18, 6.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 10], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/4WD/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#025665", - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 1.3], - [18, 6.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Service/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.4, - "stops": [ - [11, 1.1], - [14, 2], - [16, 4], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 12, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Local/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 0.75], - [14, 2], - [16, 7.65], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Minor, ramp or traffic circle/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [11, 1.3], - [14, 3.65], - [16, 7.65], - [18, 15.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 11, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Minor/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major, ramp or traffic circle/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.3], - [14, 6.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway, ramp or traffic circle/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.3], - [14, 6.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Highway/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#025665"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.3], - [14, 6.3], - [16, 12.3], - [18, 26] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 6, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major, ramp or traffic circle/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Major/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [9, 0.75], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [9, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 7, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway, ramp or traffic circle/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [8, 0.1], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 8, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Highway/-1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-blur": { - "base": 1.2, - "stops": [ - [5, 0.1], - [14, 5.3], - [16, 8.3], - [18, 16] - ] - }, - "line-color": { - "stops": [ - [6, "#012D3D"], - [13, "#00CFE1"] - ] - }, - "line-opacity": 0.5, - "line-width": { - "base": 1.2, - "stops": [ - [5, 0.1], - [14, 1], - [16, 2], - [18, 10] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 6, - "source-layer": "Road tunnel", - "type": "line", - "id": "Road tunnel/Freeway Motorway/-1" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": "#025665", - "fill-color": "#012233" - }, - "filter": ["==", "_symbol", 9], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Gutter" - }, - { - "layout": {}, - "paint": { - "fill-outline-color": "#025665", - "fill-color": "#012233" - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "minzoom": 14, - "source-layer": "Special area of interest", - "type": "fill", - "id": "Special area of interest/Curb" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#024053", - "line-opacity": 0.95, - "line-width": { - "base": 1.0, - "stops": [ - [4, 0.65], - [14, 7], - [17, 7] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin2/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#026c8d", - "line-dasharray": [7.0, 5.0], - "line-width": { - "base": 1.2, - "stops": [ - [1, 0.65], - [14, 1.3], - [17, 2.65] - ] - } - }, - "filter": ["all", ["==", "_symbol", 8], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin2/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#024053", - "line-width": { - "base": 1.0, - "stops": [ - [4, 0.65], - [14, 7] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 4, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin1/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#024053", - "line-width": { - "base": 1.0, - "stops": [ - [1, 0.65], - [14, 9.3] - ] - } - }, - "filter": [ - "all", - ["==", "_symbol", 6], - ["!in", "Viz", 3], - ["!in", "DisputeID", 8, 16, 90, 96, 0] - ], - "source": "esri", - "minzoom": 1, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin0/1" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#026c8d", - "line-dasharray": [6.0, 5.0], - "line-width": { - "base": 1.2, - "stops": [ - [1, 0.65], - [14, 1.3], - [17, 2.65] - ] - } - }, - "filter": ["all", ["==", "_symbol", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 4, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin1/0" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#026c8d", - "line-dasharray": [7.0, 5.0], - "line-width": { - "base": 1.2, - "stops": [ - [1, 0.65], - [14, 1.3], - [17, 2.65] - ] - } - }, - "filter": [ - "all", - ["==", "_symbol", 6], - ["!in", "Viz", 3], - ["!in", "DisputeID", 8, 16, 90, 96, 0] - ], - "source": "esri", - "minzoom": 1, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Disputed admin0/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#031c2f", - "line-opacity": 0.6, - "line-width": { - "base": 1.2, - "stops": [ - [8, 2.3], - [14, 3.65] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin2/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#032640", - "line-width": { - "base": 1.0, - "stops": [ - [4, 0.73], - [14, 8] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 4, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin1/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#032640", - "line-width": { - "base": 1.0, - "stops": [ - [1, 0.65], - [14, 10.5] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 1, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin0/1" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#023c4e", - "line-dasharray": [5, 3], - "line-width": 1 - }, - "filter": ["all", ["==", "_symbol", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 16, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin5" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#023c4e", - "line-dasharray": [5, 3], - "line-width": 1 - }, - "filter": ["all", ["==", "_symbol", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 16, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin4" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": "#023c4e", - "line-dasharray": [5, 3], - "line-width": 1 - }, - "filter": ["all", ["==", "_symbol", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 16, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin3" - }, - { - "layout": { - "line-join": "round" - }, - "paint": { - "line-color": "#023c4e", - "line-dasharray": [6, 4], - "line-width": { - "base": 1.2, - "stops": [ - [8, 0.5], - [14, 1] - ] - } - }, - "filter": ["all", ["==", "_symbol", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 9, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin2/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-blur": { - "stops": [ - [4, 0], - [14, 0.65] - ] - }, - "line-color": { - "stops": [ - [4, "#73b4c1"], - [8, "#99d7e3"] - ] - }, - "line-dasharray": [7, 5.3], - "line-opacity": { - "stops": [ - [1, 0.3], - [14, 1] - ] - }, - "line-width": { - "base": 1.0, - "stops": [ - [4, 0.3], - [14, 1.3] - ] - } - }, - "filter": ["all", ["==", "_symbol", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 4, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin1/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-blur": { - "stops": [ - [1, 0], - [14, 1] - ] - }, - "line-color": { - "stops": [ - [1, "#73b4c1"], - [5, "#99d7e3"] - ] - }, - "line-opacity": { - "stops": [ - [1, 0.3], - [14, 1] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [1, 0.3], - [14, 2] - ] - } - }, - "filter": ["all", ["==", "_symbol", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 1, - "source-layer": "Boundary line", - "type": "line", - "id": "Boundary line/Admin0/0" - }, - { - "layout": { - "line-cap": "round", - "line-join": "round" - }, - "paint": { - "line-color": { - "stops": [ - [0, "#074b7b"], - [7, "#05375A"], - [9, "#02182B"] - ] - }, - "line-width": { - "base": 1.2, - "stops": [ - [0, 0.5], - [9, 1.33333] - ] - } - }, - "source": "esri", - "source-layer": "Coastline", - "maxzoom": 9, - "type": "line", - "id": "Coastline" - }, - { - "layout": { - "text-letter-spacing": 0.3, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-line-height": 1.6, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-padding": 15, - "text-size": { - "stops": [ - [9, 8.5], - [15, 15.5] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Sea or ocean" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 7], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Island" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 0.7, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 5], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Dam or weir" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 0.7, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 6], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Playa" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 5 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Canal or ditch" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Stream or river" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Lake or reservoir" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-line-height": 1.1, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-padding": 15, - "text-size": { - "stops": [ - [9, 8.5], - [15, 10] - ] - }, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 9, - "source-layer": "Water point", - "type": "symbol", - "id": "Water point/Bay or inlet" - }, - { - "layout": { - "text-letter-spacing": 0.07, - "symbol-avoid-edges": true, - "text-max-angle": 18, - "symbol-placement": "line", - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-offset": [0, -0.5], - "text-size": 9, - "text-max-width": 8, - "symbol-spacing": 800 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 11, - "source-layer": "Water line/label", - "type": "symbol", - "id": "Water line/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-color": "#466a86" - }, - "source": "esri", - "minzoom": 16, - "source-layer": "Marine park/label", - "type": "symbol", - "id": "Marine park/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 8], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Dam or weir" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 9], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Playa" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "symbol-placement": "line", - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 5, - "symbol-spacing": 1000 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Canal or ditch" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "symbol-placement": "line", - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8, - "symbol-spacing": 1000 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 7], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Small river" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "symbol-placement": "line", - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 1000 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Large river" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 6], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Small lake or reservoir" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-line-height": 1.15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-padding": 15, - "text-size": 11, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Large lake or reservoir" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-line-height": 1.15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-padding": 15, - "text-size": 11, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Bay or inlet" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Small island" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 5], - "source": "esri", - "minzoom": 11, - "source-layer": "Water area/label", - "type": "symbol", - "id": "Water area/label/Large island" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "symbol-placement": "line", - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 9, - "text-max-width": 4, - "symbol-spacing": 1000 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale/label", - "maxzoom": 11, - "type": "symbol", - "id": "Water area large scale/label/River" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 7, - "source-layer": "Water area large scale/label", - "maxzoom": 11, - "type": "symbol", - "id": "Water area large scale/label/Lake or lake intermittent" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 5, - "source-layer": "Water area medium scale/label", - "maxzoom": 7, - "type": "symbol", - "id": "Water area medium scale/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 9, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 1, - "source-layer": "Water area small scale/label", - "maxzoom": 5, - "type": "symbol", - "id": "Water area small scale/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 11, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 11, - "source-layer": "Marine area/label", - "type": "symbol", - "id": "Marine area/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.12, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [1, 9], - [6, 11] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.2, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 4, - "source-layer": "Marine waterbody/label", - "maxzoom": 10, - "type": "symbol", - "id": "Marine waterbody/label/small" - }, - { - "layout": { - "text-letter-spacing": 0.15, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [1, 9], - [6, 11] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.2, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 4, - "source-layer": "Marine waterbody/label", - "maxzoom": 10, - "type": "symbol", - "id": "Marine waterbody/label/medium" - }, - { - "layout": { - "text-letter-spacing": 0.18, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [1, 9], - [6, 12] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.5, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 4, - "source-layer": "Marine waterbody/label", - "maxzoom": 10, - "type": "symbol", - "id": "Marine waterbody/label/large" - }, - { - "layout": { - "text-letter-spacing": 0.2, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [1, 10], - [6, 13] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.5, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 3, - "source-layer": "Marine waterbody/label", - "maxzoom": 10, - "type": "symbol", - "id": "Marine waterbody/label/x large" - }, - { - "layout": { - "text-letter-spacing": 0.3, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "icon-size": { - "stops": [ - [2, 0.6], - [3, 1] - ] - }, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "icon-image": "Ocean label", - "text-size": 0, - "text-field": "{_name}", - "text-line-height": 1.6, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 2, - "source-layer": "Marine waterbody/label", - "maxzoom": 10, - "type": "symbol", - "id": "Marine waterbody/label/2x large" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-offset": [0, -0.6], - "text-size": 8.5, - "text-max-width": 8, - "symbol-spacing": 1000 - }, - "paint": { - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["all", ["==", "_label_class", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 16, - "source-layer": "Ferry/label", - "type": "symbol", - "id": "Ferry/label/Rail ferry" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-offset": [0, -0.6], - "text-size": 8.5, - "text-max-width": 8, - "symbol-spacing": 1000 - }, - "paint": { - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "source": "esri", - "minzoom": 16, - "source-layer": "Railroad/label", - "type": "symbol", - "id": "Railroad/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.3, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Pedestrian" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Local, service, 4WD" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Minor" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Major, alt name" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Major" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 7], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Highway" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Freeway Motorway, alt name" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road tunnel/label", - "type": "symbol", - "id": "Road tunnel/label/Freeway Motorway" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 0.7, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Building/label", - "type": "symbol", - "id": "Building/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.3, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Trail or path/label", - "type": "symbol", - "id": "Trail or path/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.3, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 6], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Pedestrian" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 5], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 15, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Local" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#01ADBE", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 4], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Minor" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 3], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Major, alt name" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 2], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 14, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Major" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 20, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 75], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Highway" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 20, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 1], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Freeway Motorway, alt name" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "symbol-placement": "line", - "text-padding": 20, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 10.5, - "text-max-width": 8, - "symbol-spacing": 400 - }, - "paint": { - "text-color": "#00CFE1", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 0], ["!in", "Viz", 3]], - "source": "esri", - "minzoom": 13, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Freeway Motorway" - }, - { - "layout": { - "symbol-avoid-edges": true, - "text-max-angle": 25, - "symbol-placement": "line", - "text-padding": 20, - "text-font": ["Audiowide Regular"], - "icon-image": "Road/Rectangle white black (Alt)/{_len}", - "text-field": "{_name}", - "icon-rotation-alignment": "viewport", - "text-offset": [0, 0.2], - "text-rotation-alignment": "viewport", - "text-size": 9.3, - "text-max-width": 8, - "symbol-spacing": 800 - }, - "paint": { - "text-color": "#021C32" - }, - "filter": [ - "all", - [ - "in", - "_label_class", - 8, - 10, - 12, - 14, - 16, - 20, - 22, - 24, - 26, - 28, - 30, - 32, - 34, - 36, - 38, - 40, - 42, - 44, - 46, - 48, - 50, - 52, - 54, - 56, - 58, - 60, - 62, - 64, - 66, - 68, - 70, - 72, - 74 - ], - ["!in", "Viz", 3] - ], - "source": "esri", - "minzoom": 14, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Rectangle white black (Alt)" - }, - { - "layout": { - "symbol-avoid-edges": true, - "text-max-angle": 25, - "symbol-placement": "line", - "text-padding": 20, - "text-font": ["Audiowide Regular"], - "icon-image": "Road/Rectangle white black/{_len}", - "text-field": "{_name}", - "icon-rotation-alignment": "viewport", - "text-offset": [0, 0.2], - "text-rotation-alignment": "viewport", - "text-size": 9.3, - "text-max-width": 8, - "symbol-spacing": 800 - }, - "paint": { - "text-color": "#021C32" - }, - "filter": [ - "all", - [ - "in", - "_label_class", - 7, - 9, - 11, - 13, - 15, - 17, - 19, - 21, - 23, - 25, - 27, - 29, - 31, - 33, - 35, - 37, - 39, - 41, - 43, - 45, - 47, - 49, - 51, - 53, - 55, - 57, - 59, - 61, - 63, - 65, - 67, - 69, - 71, - 73 - ], - ["!in", "Viz", 3] - ], - "source": "esri", - "minzoom": 14, - "source-layer": "Road/label", - "type": "symbol", - "id": "Road/label/Rectangle white black" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 16, - "source-layer": "Cemetery/label", - "type": "symbol", - "id": "Cemetery/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Freight/label", - "type": "symbol", - "id": "Freight/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Water and wastewater/label", - "type": "symbol", - "id": "Water and wastewater/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Port/label", - "type": "symbol", - "id": "Port/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Industry/label", - "type": "symbol", - "id": "Industry/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": false, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Government/label", - "type": "symbol", - "id": "Government/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Finance/label", - "type": "symbol", - "id": "Finance/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Emergency/label", - "type": "symbol", - "id": "Emergency/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Indigenous/label", - "type": "symbol", - "id": "Indigenous/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 25, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Military/label", - "type": "symbol", - "id": "Military/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Transportation/label", - "type": "symbol", - "id": "Transportation/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": false, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Pedestrian/label", - "type": "symbol", - "id": "Pedestrian/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Beach/label", - "type": "symbol", - "id": "Beach/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Golf course/label", - "type": "symbol", - "id": "Golf course/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Zoo/label", - "type": "symbol", - "id": "Zoo/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Retail/label", - "type": "symbol", - "id": "Retail/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Landmark/label", - "type": "symbol", - "id": "Landmark/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": false, - "text-allow-overlap": false, - "text-padding": 25, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 14, - "source-layer": "Openspace or forest/label", - "type": "symbol", - "id": "Openspace or forest/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": false, - "text-allow-overlap": false, - "text-padding": 25, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 14, - "source-layer": "Park or farming/label", - "type": "symbol", - "id": "Park or farming/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 14, - "source-layer": "Point of interest", - "type": "symbol", - "id": "Point of interest/Park" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Education/label", - "type": "symbol", - "id": "Education/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 17, - "source-layer": "Medical/label", - "type": "symbol", - "id": "Medical/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": false, - "text-allow-overlap": false, - "text-padding": 25, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [12, 9.5] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 9, - "source-layer": "Admin1 forest or park/label", - "type": "symbol", - "id": "Admin1 forest or park/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 25, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [12, 9.5] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 9, - "source-layer": "Admin0 forest or park/label", - "type": "symbol", - "id": "Admin0 forest or park/label/Default" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [9, 8.5], - [12, 9.5] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "source": "esri", - "minzoom": 9, - "source-layer": "Airport/label", - "type": "symbol", - "id": "Airport/label/Airport property" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": 0.2, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 9, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#376071", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 9, - "source-layer": "Admin2 area/label", - "maxzoom": 11, - "type": "symbol", - "id": "Admin2 area/label/small" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": 0.2, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-field": "{_name}", - "text-size": 10, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#376071", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 9, - "source-layer": "Admin2 area/label", - "maxzoom": 11, - "type": "symbol", - "id": "Admin2 area/label/large" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.1], - [8, 0.18] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 9], - [5, 9], - [6, 9.5], - [9, 10] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 5], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/x small" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.1], - [8, 0.18] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 9], - [5, 9], - [6, 9.5], - [9, 11.5] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/small" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.1], - [8, 0.18] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 10], - [5, 10], - [6, 10.5], - [9, 12] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/medium" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.1], - [8, 0.2] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 10], - [5, 10.5], - [6, 11], - [9, 15] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/large" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.13], - [8, 0.3] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 10.5], - [5, 11], - [6, 11.5], - [9, 17] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/x large" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [4, 0.13], - [8, 0.4] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Audiowide Regular"], - "text-size": { - "stops": [ - [4, 11], - [5, 11.5], - [6, 12], - [9, 17.5] - ] - }, - "text-field": "{_name}", - "text-transform": "uppercase", - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#2d5b6d", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin1 area/label", - "maxzoom": 10, - "type": "symbol", - "id": "Admin1 area/label/2x large" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "text-field": "{_name_global}", - "text-size": 9, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 17, - "source-layer": "Point of interest", - "type": "symbol", - "id": "Point of interest/General" - }, - { - "layout": { - "text-letter-spacing": 0.04, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-offset": [0, -0.9], - "text-size": 9, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "minzoom": 17, - "source-layer": "Point of interest", - "type": "symbol", - "id": "Point of interest/Bus station" - }, - { - "layout": { - "text-letter-spacing": 0.04, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 5, - "text-font": ["Audiowide Regular"], - "text-field": "{_name_global}", - "text-offset": [0, -0.9], - "text-size": 9, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#212121" - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "minzoom": 17, - "source-layer": "Point of interest", - "type": "symbol", - "id": "Point of interest/Rail station" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 10], - [16, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "source": "esri", - "minzoom": 15, - "source-layer": "Neighborhood", - "maxzoom": 17, - "type": "symbol", - "id": "Neighborhood" - }, - { - "layout": { - "text-letter-spacing": 0.08, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 15, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 10], - [16, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 5], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/town small" - }, - { - "layout": { - "text-letter-spacing": 0.09, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 10], - [16, 15] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/town large" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 11], - [16, 16] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/small" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 13], - [16, 18.5] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/medium" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 14], - [16, 22] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/large" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-field": "{_name_global}", - "text-size": { - "stops": [ - [10, 15], - [16, 25] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 10, - "source-layer": "City large scale", - "maxzoom": 17, - "type": "symbol", - "id": "City large scale/x large" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 17], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/town small non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 15], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/town large non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 12], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/small non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 9], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/medium non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 18], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/other capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 14], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/town large other capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 11], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/small other capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": 9.5, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 8], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/medium other capital" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [5, 0.13], - [8, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-field": "{_name}", - "text-size": { - "stops": [ - [5, 10], - [10, 12.5] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 5], - "source": "esri", - "minzoom": 5, - "source-layer": "Admin0 point", - "maxzoom": 10, - "type": "symbol", - "id": "Admin0 point/x small" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [4, 0.13], - [8, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-field": "{_name}", - "text-size": { - "stops": [ - [4, 10], - [10, 12.5] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 4], - "source": "esri", - "minzoom": 4, - "source-layer": "Admin0 point", - "maxzoom": 10, - "type": "symbol", - "id": "Admin0 point/small" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [2, 0.13], - [8, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-field": "{_name}", - "text-size": { - "stops": [ - [2, 8], - [4, 10], - [10, 16] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 3], - "source": "esri", - "minzoom": 2, - "source-layer": "Admin0 point", - "maxzoom": 10, - "type": "symbol", - "id": "Admin0 point/medium" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [2, 0.13], - [8, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-field": "{_name}", - "text-size": { - "stops": [ - [2, 9], - [4, 10], - [6, 16] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 2], - "source": "esri", - "minzoom": 2, - "source-layer": "Admin0 point", - "maxzoom": 10, - "type": "symbol", - "id": "Admin0 point/large" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [2, 0.15], - [6, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-size": { - "stops": [ - [2, 9], - [4, 10], - [6, 16] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.5, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 1], - "source": "esri", - "minzoom": 2, - "source-layer": "Admin0 point", - "maxzoom": 8, - "type": "symbol", - "id": "Admin0 point/x large" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 10.5], - [8, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 16], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/town small admin0 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 10.5], - [8, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 13], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/town large admin0 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 10.5], - [8, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 10], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/small admin0 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 10.5], - [8, 13] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 7], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/medium admin0 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 11], - [8, 14] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 5], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/large other capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 11], - [6, 12], - [8, 15] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 2], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/x large admin2 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 11], - [8, 14] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 6], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/large non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 10], - [6, 11], - [8, 14] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 4], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/large admin0 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 11], - [6, 12], - [8, 15] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 3], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/x large non capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/non-capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 11], - [6, 12], - [8, 15] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 1], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/x large admin1 capital" - }, - { - "layout": { - "text-letter-spacing": 0.05, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Orbitron Regular"], - "text-anchor": "bottom", - "icon-image": "City small scale/capital", - "text-field": "{_name}", - "text-offset": [0, -0.25], - "text-size": { - "stops": [ - [3, 11], - [6, 12], - [8, 15] - ] - }, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#B5EFFA", - "text-halo-width": 1, - "text-halo-color": "#165C66" - }, - "filter": ["==", "_symbol", 0], - "source": "esri", - "minzoom": 2, - "source-layer": "City small scale", - "maxzoom": 10, - "type": "symbol", - "id": "City small scale/x large admin0 capital" - }, - { - "layout": { - "text-transform": "uppercase", - "text-letter-spacing": { - "stops": [ - [2, 0.3], - [5, 0.5] - ] - }, - "symbol-avoid-edges": true, - "text-allow-overlap": false, - "text-padding": 1, - "text-font": ["Black Ops One Regular"], - "text-size": { - "stops": [ - [2, 13], - [4, 16.5], - [5, 20] - ] - }, - "text-field": "{_name}", - "text-line-height": 1.7, - "text-max-width": 8 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["==", "_label_class", 0], - "source": "esri", - "minzoom": 2, - "source-layer": "Admin0 point", - "maxzoom": 6, - "type": "symbol", - "id": "Admin0 point/2x large" - }, - { - "layout": { - "text-letter-spacing": 0.13, - "icon-allow-overlap": true, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "icon-image": "Disputed label point", - "text-field": "{_name}", - "text-optional": true, - "text-size": { - "stops": [ - [6, 7], - [15, 10] - ] - }, - "text-max-width": 4 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#70bbc9", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["all", ["==", "_label_class", 1], ["in", "DisputeID", 0]], - "source": "esri", - "minzoom": 6, - "source-layer": "Disputed label point", - "type": "symbol", - "id": "Disputed label point/Island" - }, - { - "layout": { - "text-letter-spacing": 0.1, - "icon-allow-overlap": true, - "text-font": ["Audiowide Regular"], - "text-anchor": "center", - "icon-image": "Disputed label point", - "text-field": "{_name}", - "text-optional": true, - "text-size": { - "stops": [ - [2, 8], - [6, 9.3] - ] - }, - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#466a86", - "text-halo-width": 0.5, - "text-halo-color": "#212121" - }, - "filter": ["all", ["==", "_label_class", 0], ["in", "DisputeID", 1006]], - "source": "esri", - "minzoom": 2, - "source-layer": "Disputed label point", - "maxzoom": 10, - "type": "symbol", - "id": "Disputed label point/Waterbody" - }, - { - "layout": { - "text-letter-spacing": { - "stops": [ - [2, 0.13], - [8, 0.5] - ] - }, - "icon-allow-overlap": true, - "text-size": { - "stops": [ - [2, 8], - [4, 10], - [10, 16] - ] - }, - "text-font": ["Black Ops One Regular"], - "text-anchor": "center", - "icon-image": "Disputed label point", - "text-field": "{_name}", - "text-optional": true, - "text-transform": "uppercase", - "text-max-width": 6 - }, - "paint": { - "text-halo-blur": 1, - "text-color": "#024053", - "text-halo-width": 1, - "text-halo-color": "#010d19" - }, - "filter": ["all", ["==", "_label_class", 2], ["in", "DisputeID", 1021]], - "source": "esri", - "minzoom": 2, - "source-layer": "Disputed label point", - "type": "symbol", - "id": "Disputed label point/Admin0" - } - ], - "glyphs": "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf", - "version": 8, - "glyphsold": "https://ss{num}.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile¶m={param}", - "sources": { - "esri": { - "urlzz": "http://localhost:8090/Web4/framework/extensions/layers/TileInfo.json", - "url": "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer", - "type": "vector" - } - } -} diff --git a/packages/map/src/index.js b/packages/map/src/index.js index 009850bbabad407d9e1f72c0d7aa44c31becb1a0..480e9ee8043985cf5102b8a638f946ec6b99db3a 100644 --- a/packages/map/src/index.js +++ b/packages/map/src/index.js @@ -1,241 +1,232 @@ import React from 'react'; -import PropTypes from 'prop-types'; - import amapConfig from './config/amap'; -import gisModules from './config/module'; - -import AMapTileLayer from './extensions/layers/AMapTileLayer'; -import GoogleTileLayer from './extensions/layers/GoogleTileLayer'; - -import * as Utils from './utils/Utils'; - -import * as GeomUtils from './utils/GeometryTool'; +import { layerOperation, loadUtilMapModules, geomUtils, mapUtils } from './core/utils'; +import { Spin } from 'antd'; +import { + loadMapLayerModules, + AMapTileLayer, + BaiduTileLayer, + GoogleTileLayer, + MapBoxLayer, + PipenetTileLayer, + TiandituTileLayer, + UserTileLayer, + WMTSTileLayer, +} from './extensions/layers/index'; +import withModule from './core/withModule'; +import loadScripts from './core/loadScripts'; +const _ = require('lodash'); + +const modules = { + Map: 'gis/Map', + Basemap: 'gis/Basemap', + MapView: 'gis/views/MapView', + SceneView: 'gis/views/SceneView', + TileLayer: 'gis/layers/TileLayer', + MapImageLayer: 'gis/layers/MapImageLayer', + ElevationLayer: 'gis/layers/ElevationLayer', + Ground: 'gis/Ground', + SceneLayer: 'gis/layers/SceneLayer', + FeatureLayer: 'gis/layers/FeatureLayer', + GroupLayer: 'gis/layers/GroupLayer', + VectorTileLayer: 'gis/layers/VectorTileLayer', + OpenStreetMapLayer: 'gis/layers/OpenStreetMapLayer', + Extent: 'gis/geometry/Extent', + Collection: 'gis/core/Collection', + Camera: 'gis/Camera', + Viewpoint: 'gis/Viewpoint', + jsonUtils: 'gis/geometry/support/jsonUtils', + watchUtils: 'gis/core/watchUtils', + Graphic: 'gis/Graphic', + PictureMarkerSymbol: 'gis/symbols/PictureMarkerSymbol', + Popup: 'gis/widgets/Popup', + GraphicsLayer: 'gis/layers/GraphicsLayer', + matrix: 'dojox/gfx/matrix', + Color: 'gis/Color', + SimpleFillSymbol: 'gis/symbols/SimpleFillSymbol', + SimpleLineSymbol: 'gis/symbols/SimpleLineSymbol', + TextSymbol: 'gis/symbols/TextSymbol', + Point: 'gis/geometry/Point', +}; -export default class MapManager extends React.Component { +@withModule(modules) +export default class Map extends React.Component { static defaultProps = { id: '#jsmap', - width: '100%', - height: '420px', + style: { + width: '100%', + height: '420px', + }, mapsettings: {}, - modules: gisModules, + viewRef: React.createRef(), + }; + + state = { + viewReady: true, //瑙嗗浘鍑嗗鐨勬潯浠� 锛� 1.has map 2. has container 3. extent + loaded: true, //鏄剧ず鍦板浘 create view }; constructor(props) { super(props); - this.mapRef = React.createRef(); this.initializeVariables(); } - async initializeVariables() { + initializeVariables = () => { this.view = null; this.map = null; this.basemap = null; this.tipManager = null; this.AreaLayerSum = null; - this.reorderGroups = []; this.hidetipHandler = null; this.showtipHandler = null; - this.renderMenu = true; + this.reorderGroups = []; + this.basemaps = []; this.mapsettings = this.props.mapsettings; - } + this.setInitialViewpoint = this.setInitialViewpoint.bind(this); + this.layerAddedHandler = this.layerAddedHandler.bind(this); + this.matrixLayerViewCreated = this.matrixLayerViewCreated.bind(this); + this.matrixLayerMoveStart = this.matrixLayerMoveStart.bind(this); + this.matrixLayerViewChange = this.matrixLayerViewChange.bind(this); + this.matrixLayerMoveEnd = this.matrixLayerMoveEnd.bind(this); + }; - getStyle() { - return { - width: this.props.width, - height: this.props.height, - }; - } + loadAMapScript = () => { + let amapUrl = `${amapConfig.url}v=${amapConfig.v}&key=${ + amapConfig.key + }&plugin=${amapConfig.plugins.join(',')}`; + return loadScripts([amapUrl]); + }; - async componentDidMount() { - let moduleArr = await Utils.asyncLoadModules(this.props.modules); - await GeomUtils.loadAllDependencies(); - this.getModules(moduleArr); - this.createMapLayers(); + componentDidMount = async () => { + await loadMapLayerModules(); + await loadUtilMapModules(); this.renderView(); - this.loadAMap(); - } - - loadAMap() { - console.log('load AMap'); - let url = 'https://webapi.amap.com/maps?v=1.4.15&key=e83f64300a2a55a33fa8e4ab9a46bca6'; - fetch(url).then((params) => { - console.log(params); - console.log(window); - // let plugins = ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.DistrictSearch'] - // AMap.plugins(plugins, () => { - - // }) - let UIurl = '//webapi.amap.com/ui/1.1/main.js'; - fetch(UIurl, () => {}); - }); - } - - getModules(moduleArr) { - this.loadedModules = { - Map: moduleArr[0], - BaseMap: moduleArr[1], - MapView: moduleArr[2], - SceneView: moduleArr[3], - TileLayer: moduleArr[4], - MapImageLayer: moduleArr[5], - ElevationLayer: moduleArr[6], - Ground: moduleArr[7], - SceneLayer: moduleArr[8], - FeatureLayer: moduleArr[9], - GroupLayer: moduleArr[10], - VectorTileLayer: moduleArr[11], - OpenStreetMapLayer: moduleArr[12], - Extent: moduleArr[13], - Collection: moduleArr[14], - Camera: moduleArr[15], - Viewpoint: moduleArr[16], - jsonUtils: moduleArr[17], - watchUtils: moduleArr[18], - Graphic: moduleArr[19], - PictureMarkerSymbol: moduleArr[20], - Popup: moduleArr[21], - GraphicsLayer: moduleArr[22], - matrix: moduleArr[23], - Color: moduleArr[24], - SimpleFillSymbol: moduleArr[25], - SimpleLineSymbol: moduleArr[26], - TextSymbol: moduleArr[27], - Point: moduleArr[28], - lang: moduleArr[29], - promiseUtils: moduleArr[30], - urlUtils: moduleArr[31], - }; - Utils.bindUrlUtils(this.loadedModules.urlUtils); - } - - createMapLayers() { - this.loadedModules.AMapTileLayer = AMapTileLayer( - this.loadedModules.TileLayer, - this.loadedModules.lang, - this.loadedModules.promiseUtils, - ); - this.loadedModules.GoogleTileLayer = GoogleTileLayer( - this.loadedModules.TileLayer, - this.loadedModules.lang, - this.loadedModules.promiseUtils, - ); - } + }; - renderView() { + renderView = () => { this.addLayerProxy(); this.addMap(); this.addBasemaps(); this.addLayerReorder(); this.addLayers(); - if ('2d' == this.mapsettings.type.toLowerCase()) { - this.addMatrixLayer(); //鍔犲叆绌虹殑GraphicsLayer锛岀敤浜庤幏鍙栧湴鍥剧殑moveStart,viewChange,moveEnd浜嬩欢 - } + this.addMatrixLayer(); this.addTipManager(); - if (this.renderMenu && this.view && this.view.type == '2d') { - this.loadedModules.watchUtils.whenTrue( - this.view, - 'ready', - this.renderRightClickMenu.bind(this), - ); - this.loadedModules.watchUtils.whenTrueOnce(this.view, 'ready', this.renderRoamte.bind(this)); - // edit by zhangyao on 2018/11/1 - this.hidetipHandler = this.loadedModules.watchUtils.whenTrue( - this.view, - 'stationary', - function (e) { - console.log('鍦板浘绂佹'); - // this.tipManager.$el.show(); - // this.$el.find(".gis-view-surface div.gis-display-object").show(); - if (this.updateLayerView) this.updateLayerView(); - }.bind(this), - ); - this.showtipHandler = this.loadedModules.watchUtils.whenFalse( - this.view, - 'stationary', - function (e) { - if (this.view.animation) { - // 鍒ゆ柇鍦板浘鏄惁鍦ㄧ缉鏀� - // this.tipManager.$el.hide(); - // this.$el.find(".gis-view-surface div.gis-display-object").hide(); - console.log('鍦板浘绉诲姩'); - } - }.bind(this), - ); - } - } + this.bindViewEvents(); + }; + + addLayerProxy = () => {}; - addLayerProxy() {} + changeState = (key, value) => { + this.setState({ key, value }); + }; - addMap() { - const mapsettings = this.mapsettings; - this.map = new this.loadedModules.Map(); - if (this.mapsettings.ground) { - if ('string' == typeof this.mapsettings.ground) { - this.map.ground = this.mapsettings.ground; + addMap = () => { + const { Map, Collection, MapView, Ground, SceneView } = this.props.modules; + const { + type, + ground, + resizeAlign, + viewingMode, + environment, + clippingArea, + extent, + qualityProfile, + constraints, + } = this.mapsettings; + const viewRef = this.props.viewRef; + this.map = new Map(); + this.addGround({ ground, Ground, Collection }); + switch (type.toLowerCase()) { + case '2d': + this.createMapView({ MapView, viewRef, resizeAlign }); + break; + case '3d': + this.createMapSceneView({ + SceneView, + viewRef, + viewingMode, + environment, + clippingArea, + extent, + qualityProfile, + }); + break; + default: + break; + } + if (constraints) this.view.constraints = constraints; + this.viewpoint = this.mapsettings.viewpoint; + this.view.then(this.setInitialViewpoint); + this.changeState('loaded', true); + }; + + addGround = ({ ground, Ground, Collection }) => { + if (ground) { + if ('string' == typeof ground) { + this.map.ground = ground; } else { - var layers = mapsettings.ground.layers, - layer, - groundlayers = new this.loadedModules.Collection(); - layers.forEach( - function (layerconfig) { - this.createLayer(layerconfig, groundlayers, false, ''); - }.bind(this), - ); + let layers = ground.layers, + groundLayers = new Collection(); + layers.map((layerConfig) => { + this.createLayer(layerConfig, groundLayers, false, ''); + }); this.map.ground = new Ground({ - layers: groundlayers, + layers: groundLayers, }); } } - if ('2d' == mapsettings.type.toLowerCase()) { - this.view = new this.loadedModules.MapView({ - map: this.map, - container: this.mapRef.current, - manager: this, - resizeAlign: mapsettings.resizeAlign || 'top-left', - }); - } else if ('3d' == mapsettings.type.toLowerCase()) { - this.view = new this.loadedModules.SceneView({ - map: this.map, - manager: this, - qualityProfile: mapsettings.qualityProfile || 'high', - container: this.mapRef.current, - }); - if (mapsettings.viewingMode) { - this.view.viewingMode = mapsettings.viewingMode; - } - if (mapsettings.environment) { - this.view.environment = mapsettings.environment; - } - if (mapsettings.clippingArea) { - this.view.clippingArea = new Extent(mapsettings.clippingArea); - } - if (mapsettings.extent) { - this.view.extent = new Extent(mapsettings.extent); - } - } - //璁剧疆View鍒濆鑼冨洿 - this.viewpoint = mapsettings.viewpoint; - this.setInitialViewpoint = this.setInitialViewpoint.bind(this); - this.view.then(this.setInitialViewpoint); - } + }; - setInitialViewpoint() { - window.view = this.view; + createMapView = ({ MapView, viewRef, resizeAlign }) => { + this.view = new MapView({ + map: this.map, + container: viewRef.current, + manager: this, + resizeAlign: resizeAlign || 'top-left', + }); + }; + + createMapSceneView = ({ + SceneView, + viewRef, + viewingMode, + environment, + clippingArea, + extent, + qualityProfile, + }) => { + this.view = new SceneView({ + map: this.map, + manager: this, + qualityProfile: qualityProfile || 'high', + container: viewRef.current, + }); + if (viewingMode) this.view.viewingMode = viewingMode; + if (environment) this.view.environment = environment; + if (clippingArea) this.view.clippingArea = clippingArea; + if (extent) this.view.extent = extent; + }; + + setInitialViewpoint = () => { + const { Viewpoint, Camera } = this.props.modules; if (this.viewpoint) { - this.initialViewpoint = new this.loadedModules.Viewpoint(); - if (this.viewpoint.camera) { - this.initialViewpoint.camera = new this.loadedModules.Camera(this.viewpoint.camera); - this.viewpoint.targetGeometry && - (this.initialViewpoint.targetGeometry = GeomUtils.toGeometry( - this.viewpoint.targetGeometry, - )); - this.viewpoint.scale && (this.initialViewpoint.scale = this.viewpoint.scale); - this.viewpoint.rotation && (this.initialViewpoint.rotation = this.viewpoint.rotation); - } - var geom = this.initialViewpoint.targetGeometry; + this.initialViewpoint = new Viewpoint(); + this.viewpoint.camera && (this.initialViewpoint.camera = new Camera(this.viewpoint.camera)); + this.viewpoint.targetGeometry && + (this.initialViewpoint.targetGeometry = geomUtils.toGeometry( + this.viewpoint.targetGeometry, + this.view, + )); + this.viewpoint.scale && (this.initialViewpoint.scale = this.viewpoint.scale); + this.viewpoint.rotation && (this.initialViewpoint.rotation = this.viewpoint.rotation); + let geom = this.initialViewpoint.targetGeometry; if (geom && !(geom.xmin == 0 && geom.ymin == 0 && geom.xmax == 0 && geom.ymax == 0)) { if (geom.type == 'extent') { - var scale = this.getNearestScale(geom.clone()); + let { zoom, scale } = mapUtils.getNearestScale(geom.clone(), this.view); + if (!this.mapsettings.scale) { + this.mapsettings.scale = scale; + this.mapsettings.zoom = zoom; + } if (scale != -1) { this.initialViewpoint.scale = scale; } @@ -250,7 +241,6 @@ export default class MapManager extends React.Component { } else { this.initialViewpoint = this.view.viewpoint; } - if ( this.mapsettings.areasettings && this.mapsettings.areasettings.areaName.toLowerCase().indexOf('offlinearea') > -1 && @@ -261,170 +251,135 @@ export default class MapManager extends React.Component { this.areaLayerInit = true; return; } - - if (!this.areaLayerInit) { + this.mapsettings.useCoverMap = _.isUndefined(this.mapsettings.useCoverMap) + ? true + : !!this.mapsettings.useCoverMap; + if (this.mapsettings.useCoverMap && !this.areaLayerInit) { this.loadAreaLayer(); + } else { + this.showPipeNetLayer(); } - } + }; - addBasemaps() { + addBasemaps = () => { let basemapconfigs = this.mapsettings.basemaps; - this.basemaps = []; if (basemapconfigs) { - basemapconfigs.forEach( - function (basemapconfig) { - this.basemaps.push(this.createBasemap(basemapconfig)); - }.bind(this), - ); + basemapconfigs.map((basemapconfig) => { + this.basemaps.push(this.createBasemap(basemapconfig)); + }); } else { this.basemaps.push(this.createDefaultBasemap()); } + if (this.basemaps.length) this.map.basemap = this.basemaps[0]; + }; - if (this.basemaps.length) { - this.map.basemap = this.basemaps[0]; - } - } + createDefaultBasemap = () => {}; - createBasemap(basemap) { - var bm; + createBasemap = (basemap) => { + const { Collection, Basemap } = this.props.modules; + let bm; if (basemap) { if ('string' == typeof basemap) { bm = basemap; } else { - // var layer, - var bls = new this.loadedModules.Collection(), + let bls = new Collection(), id = basemap.id, title = basemap.title, thumbnailUrl = basemap.thumbnailUrl, baseLayers = basemap.baseLayers; - baseLayers.forEach( - function (layerconfig) { - this.createLayer(layerconfig, bls, false, 'baseMap'); - }.bind(this), - ); - bm = new this.loadedModules.BaseMap({ - id: id, - title: title, - thumbnailUrl: thumbnailUrl, + baseLayers.map((layerconfig) => { + this.createLayer(layerconfig, bls, false, 'baseMap'); + }); + bm = new Basemap({ + id, + title, + thumbnailUrl, baseLayers: bls, }); } } return bm; - } - - createDefaultBasemap() {} + }; - addLayerReorder() { - this.layerAddedHandler = this.layerAddedHandler.bind(this); + addLayerReorder = () => { this.map.layers.on('after-add', this.layerAddedHandler); - } + }; - layerAddedHandler(event) { - var lyr = event.item; - if ('graphics' === lyr.type) { - if (this.isInGroup(lyr)) { - var layer = this.map.layers.find( - function (l) { - return this.getLayerWeight(l) > this.getLayerWeight(lyr); - }.bind(this), - ); + layerAddedHandler = (event) => { + let lyr = event.item; + let reorderGroups = this.reorderGroups; + if ('graphics' == lyr.type) { + if (layerOperation.isInGroup(lyr, reorderGroups)) { + let layer = this.map.layers.find((layer) => { + return ( + layerOperation.getLayerWeight(layer, reorderGroups) > + layerOperation.getLayerWeight(lyr, reorderGroups) + ); + }); if (layer) { this.map.layers.reorder(lyr, this.map.layers.indexOf(layer) - 1); } } } - } - - isInGroup(lyr) { - var groupName = lyr.order.split('-')[0], - lyrIndex = Number(lyr.order.split('-')[1]), - groupIndex = this.reorderGroups.indexOf(groupName); - return _.isNumber(lyrIndex) && groupIndex >= 0; - } - - getLayerWeight() { - if ('graphics' === lyr.type) { - var groupName = lyr.order.split('-')[0], - lyrIndex = Number(lyr.order.split('-')[1]), - groupIndex = this.reorderGroups.indexOf(groupName); - if (_.isNumber(lyrIndex) && groupIndex >= 0) { - return (groupIndex + 1) * 100 + lyrIndex; - } else { - return 0; - } - } else { - return -1; - } - } - - registerReorderStrategy(groupName) { - var index = this.reorderGroups.indexOf(groupName); - index < 0 && this.reorderGroups.push(groupName); - } + }; - addLayers() { - let layerconfigs = this.mapsettings.layers; + addLayers = () => { + let layerconfigs = this.props.mapsettings.layers; if (layerconfigs) { - var layer; - layerconfigs.forEach( - function (layerconfig) { - if (!layerconfig.id) return; - this.createLayer(layerconfig, this.map, false, 'pipeLayer'); - }.bind(this), - ); + layerconfigs.map((layerconfig) => { + if (!layerconfig.id) return; + this.createLayer(layerconfig, this.map, false, 'pipeLayer'); + }); } - } + }; - addMatrixLayer() { - this._matrixLayer = new this.loadedModules.GraphicsLayer(); + addMatrixLayer = () => { + if (this.view.type != '2d') return; + let { GraphicsLayer } = this.props.modules; + this._matrixLayer = new GraphicsLayer(); this.view.map.add(this._matrixLayer); - this.matrixLayerViewCreated = this.matrixLayerViewCreated.bind(this); - this.matrixLayerMoveStart = this.matrixLayerMoveStart.bind(this); - this.matrixLayerViewChange = this.matrixLayerViewChange.bind(this); - this.matrixLayerMoveEnd = this.matrixLayerMoveEnd.bind(this); this.view.whenLayerView(this._matrixLayer).then(this.matrixLayerViewCreated); - } + }; - matrixLayerViewCreated(lyrView) { + matrixLayerViewCreated = (lyrView) => { if (lyrView) { lyrView.on('moveStart', this.matrixLayerMoveStart); lyrView.on('viewChange', this.matrixLayerViewChange); lyrView.on('moveEnd', this.matrixLayerMoveEnd); } - } + }; - matrixLayerMoveStart(lyrView) { - var m = this.getLayerViewMatrix(lyrView); + matrixLayerMoveStart = (lyrView) => { + let m = this.getLayerViewMatrix(lyrView); this.view.emit('moveStart', { layerView: lyrView, matrix: m, matrixString: this.toMatrixString(m), }); - } + }; - matrixLayerViewChange(lyrView) { - var m = this.getLayerViewMatrix(lyrView); + matrixLayerViewChange = (lyrView) => { + let m = this.getLayerViewMatrix(lyrView); this.view.emit('viewChange', { layerView: lyrView, matrix: m, zooming: m.xx != 1, matrixString: this.toMatrixString(m), }); - } + }; - matrixLayerMoveEnd(lyrView) { - var m = this.getLayerViewMatrix(lyrView); + matrixLayerMoveEnd = (lyrView) => { + let m = this.getLayerViewMatrix(lyrView); this.view.emit('moveEnd', { layerView: lyrView, matrix: m, matrixString: this.toMatrixString(m), }); - } + }; - getLayerViewMatrix(lyrView) { - let matrix = this.loadedModules.matrix; - var m = matrix.clone(matrix.identify); + getLayerViewMatrix = (lyrView) => { + const { matrix } = this.props.modules; + let m = matrix.clone(matrix.identify); if ( lyrView.graphicsView && lyrView.graphicsView._frontGroup && @@ -446,9 +401,9 @@ export default class MapManager extends React.Component { m = matrix.clone(targetMatrix); } return m; - } + }; - toMatrixString(m) { + toMatrixString = (m) => { return ( 'matrix(' + [ @@ -461,65 +416,94 @@ export default class MapManager extends React.Component { ].join() + ')' ); - } - - addTipManager() { - this.openedPopups = []; - //鍚庢湡鍋歵ipMananger - // this.tipManager = new TipManager({ - // view: this.view, - // container: this.$el.find(".gis-view-surface") - // }); - // this.tipManager.render(); - } + }; - renderRightClickMenu() {} + addTipManager = () => {}; - renderRoamte() {} + bindViewEvents = () => {}; - createLayer(config, collection, returnLayer, layerType) { - var layer; - var layers = []; - if (config.url) { - config.url = this.loadedModules.urlUtils.getUrl(config.url); + loadAreaLayer = () => { + let url = amapConfig.url; + this.areaLayerInit = true; + this.extent = { + spatialReference: { + wkid: 4526, + }, + xmin: 0, + ymin: 0, + xmax: 0, + ymax: 0, + }; + let areasettings = this.mapsettings.areasettings; + if (!areasettings) return; + let area = areasettings.areaName.split(','); + if (window.navigator.onLine == true && area.length == 1) { + this.loadAMapScript() + .then(() => { + this.getAreaLayer(); + }) + .catch(() => new Error('鍔犺浇楂樺痉鍦板浘璧勬簮澶辫触')); + } else { } - switch (config.layerType.toLowerCase()) { + }; + + getAreaLayer = () => {}; + + createLayer = (config, collection, returnLayer, mapType) => { + let layer, + layers = []; + let proxyUrl, configString, configv, configva, configi, configia; + let layerType = config.layerType.toLowerCase(); + const { + TileLayer, + MapImageLayer, + ElevationLayer, + SceneLayer, + FeatureLayer, + GroupLayer, + OpenStreetMapLayer, + } = this.props.modules; + config.url = this.getLayerUrl(config.url); + switch (layerType) { case 'tilelayer': - layer = new this.loadedModules.TileLayer(config); + layer = new TileLayer(config); break; case 'pipenetlayer': case 'mapimagelayer': - layer = new this.loadedModules.MapImageLayer( - Utils._.extend({}, config, { - token: _config.token, + layer = new MapImageLayer( + _.extend({}, config, { + token: _config && _config.token, client: 'webgis', visible: false, }), ); layer.then( function () { - layer.visible = true; if (layer.hasAnnotation) { - // layer.annotationLayer = this.addAnnotationLayer(layer.title, layer.url, config.visible); + layer.annotationLayer = this.addAnnotationLayer( + layer.title, + layer.url, + config.visible, + ); } }.bind(this), ); break; case 'elevationlayer': - layer = new this.loadedModules.ElevationLayer(config); + layer = new ElevationLayer(config); break; case 'scenelayer': - layer = new this.loadedModules.SceneLayer(config); + layer = new SceneLayer(config); break; case 'featurelayer': - layer = new this.loadedModules.FeatureLayer(config); + layer = new FeatureLayer(config); break; case 'grouplayer': - var layers = config.layers.map(function (c) { + layers = config.layers.map(function (c) { return this.createLayer(c, [], true, ''); }, this); - layer = new this.loadedModules.GroupLayer( - Utils._.extend({}, config, { + layer = new GroupLayer( + _.extend({}, config, { layers: layers, }), ); @@ -528,25 +512,24 @@ export default class MapManager extends React.Component { case 'google-i': case 'google-i-a': case 'google-ia': - layer = new this.loadedModules.GoogleTileLayer( - Utils._.extend(config, { + layer = new GoogleTileLayer()( + _.extend(config, { url: 'http://fack.com', }), ); break; case 'google-user': - var proxyUrl = config.proxyUrl ? config.proxyUrl : config.wmtsUrl ? config.wmtsUrl : null; - layer = new this.loadedModules.UserTileLayer( - Utils._.extend(config, { + proxyUrl = config.proxyUrl ? config.proxyUrl : config.wmtsUrl ? config.wmtsUrl : null; + layer = new UserTileLayer()( + _.extend(config, { url: proxyUrl, }), ); - layer.then((res) => console.log(res)); break; case 'pipenet-tile': - var proxyUrl = config.proxyUrl ? config.proxyUrl : config.wmtsUrl ? config.wmtsUrl : null; - layer = new this.loadedModules.PipenetTileLayer( - Utils._.extend(config, { + proxyUrl = config.proxyUrl ? config.proxyUrl : config.wmtsUrl ? config.wmtsUrl : null; + layer = new PipenetTileLayer()( + _.extend(config, { url: proxyUrl, }), ); @@ -554,8 +537,8 @@ export default class MapManager extends React.Component { case 'baidu-v': case 'baidu-i': case 'baidu-ia': - layer = new this.loadedModules.BaiduTileLayer( - Utils._.extend(config, { + layer = new BaiduTileLayer()( + _.extend(config, { url: 'http://fack.com', }), ); @@ -566,8 +549,8 @@ export default class MapManager extends React.Component { case 'amap-v2': case 'amap-i2': case 'amap-ia2': - layer = new this.loadedModules.AMapTileLayer( - Utils._.extend(config, { + layer = new AMapTileLayer()( + _.extend(config, { url: 'http://fack.com', }), ); @@ -584,59 +567,57 @@ export default class MapManager extends React.Component { case 'tianditu-ll-ia': case 'tianditu-ll-t': case 'tianditu-ll-ta': - layer = new this.loadedModules.TiandituTileLayer( - Utils._.extend(config, { + layer = new TiandituTileLayer()( + _.extend(config, { url: 'http://fack.com', }), ); break; case 'tianditu-v-va': //娣辨嫹璐漜onfig - var configString = JSON.stringify(config); + configString = JSON.stringify(config); //澶╁湴鍥剧煝閲� - var configv = Utils._.extend(JSON.parse(configString), { + configv = _.extend(JSON.parse(configString), { layerType: 'tianditu-v', }); this.createLayer(configv, collection, false, layerType); //澶╁湴鍥炬敞璁� - var configva = Utils._.extend(JSON.parse(configString), { + configva = _.extend(JSON.parse(configString), { layerType: 'tianditu-va', }); this.createLayer(configva, collection, false, layerType); break; case 'tianditu-i-ia': //娣辨嫹璐漜onfig - var configString = JSON.stringify(config); + configString = JSON.stringify(config); //澶╁湴鍥剧煝閲� - var configi = Utils._.extend(JSON.parse(configString), { + configi = _.extend(JSON.parse(configString), { layerType: 'tianditu-i', }); this.createLayer(configi, collection, false, layerType); - //澶╁湴鍥炬敞璁� - var configia = Utils._.extend(JSON.parse(configString), { + configia = _.extend(JSON.parse(configString), { layerType: 'tianditu-ia', }); this.createLayer(configia, collection, false, layerType); - break; case 'osm': - layer = new this.loadedModules.OpenStreetMapLayer( - Utils._.extend(config, { + layer = new OpenStreetMapLayer( + _.extend(config, { url: 'http://fack.com', }), ); break; case 'wmts-v': - layer = new this.loadedModules.WMTSTileLayer(Utils._.extend(config, {})); + layer = new WMTSTileLayer()(_.extend(config, {})); break; case 'arcgis-streetpurplishblue': case 'arcgis-streetwarm': case 'arcgis-community': case 'arcgis-streetgray': - layer = new this.loadedModules.TileLayer( - Utils._.extend(config, { + layer = new TileLayer( + _.extend(config, { url: 'http://map.geoq.cn/ArcGIS/rest/services/ChinaOnline' + config.layerType.replace('arcgis-', '') + @@ -645,18 +626,18 @@ export default class MapManager extends React.Component { ); break; case 'arcgis-tilelayer': - if (_config.ip.indexOf('222.92') > -1) + if (_config.ip && _config.ip.indexOf('222.92') > -1) config.url = config.url.replace(/\d+\.\d+\.\d+\.\d+/, window.location.hostname); - layer = new this.loadedModules.TileLayer({ + layer = new TileLayer({ url: config.url, title: config.title, - // id: _.uniqueId('arcgis-tilelayer_') + id: _.uniqueId('arcgis-tilelayer_'), }); break; default: - if (config.layerType.toLowerCase().indexOf('tianditu-') > -1) { - layer = new this.loadedModules.TiandituTileLayer( - Utils._.extend(config, { + if (layerType.indexOf('tianditu-') > -1) { + layer = new TiandituTileLayer( + _.extend(config, { url: 'http://fack.com', }), ); @@ -664,19 +645,14 @@ export default class MapManager extends React.Component { } break; } - //returnLayer 鏄惁闇€瑕佽繑鍥瀕ayer if (returnLayer) return layer; - - //layer鏈粰鍊� if (_.isUndefined(layer)) return this._layerCreateErrorLog(config); - - //layerType - switch (layerType) { + switch (mapType) { case 'baseMap': layer.visible = true; break; case 'pipeLayer': - Utils._.extend(layer, { + _.extend(layer, { preload: true, }); break; @@ -684,102 +660,63 @@ export default class MapManager extends React.Component { break; } collection.add(layer); - } + }; - loadAreaLayer() { - var url = window.location.protocol + '//webapi.amap.com/maps?'; - this.areaLayerInit = true; - this.extent = { - spatialReference: { - wkid: 4526, - }, - xmin: 0, - ymin: 0, - xmax: 0, - ymax: 0, - }; - if (!this.mapsettings.areasettings) return null; - // if (this.basemaps && this.basemaps[0] && this.basemaps[0]['id'] == '鑷畾涔夊簳鍥�') return this.setExtent() - var area = this.mapsettings.areasettings.areaName.split(','); - if (window.navigator.onLine == true && area.length == 1) { - let timer = setInterval( - function () { - if (window.AMap && window.AMap.DistrictSearch) { - clearInterval(timer); - this.getAreaLayer(); - } - }.bind(this), - 500, - ); - } else { - // if (this.getPipenetLayer()) var url = this.getPipenetLayer().url; - // if (url && _config.mapsettings.areasettings.areaName) { - // request(url + "/GetMapArea", { - // query: { - // areaName: _config.mapsettings.areasettings.areaName.split(',')[0], - // outSR: webgisPandaTool.getCurrentMapWkid(), - // }, - // cacheBust: true - // }).then(function (r) { - // if (r.data && r.data.length > 0) { - // this.polygon = [], this.edge = [], this.area = [], this.bound = null; - // r.data.forEach(function (point) { - // this.polygon.push([point.x, point.y]); - // }.bind(this)) - // this.edge.push(this.polygon); - // _config.useCoverMap && this.area.push(this.polygon); - // this._setAreaLayer(); - // } else { - // console.log("琛屾斂鍖哄浘灞傛棤鏁版嵁"); - // } - // }.bind(this), function (error) { - // console.log("鏈煡璇㈠埌琛屾斂鍖哄浘灞傛暟鎹紒"); - // }.bind(this)) - // } - } - } + _layerCreateErrorLog = (layerconfig) => { + var error = + "mapView - can't createlayer (title:" + + layerconfig.title + + ',type:' + + layerconfig.layerType + + ',url:' + + layerconfig.url + + ')'; + console.log(error); + }; - getAreaLayer() {} - - setExtent() {} - - showPipeNetLayer() {} - - getNearestScale(extent) { - var resolution = extent.width / this.view.width, - zoom = 0, - nearestScale = -1, - diff = Number.POSITIVE_INFINITY; - if (this.view.map.basemap && this.view.map.basemap.baseLayers.length > 0) { - this.view.map.basemap.baseLayers.getItemAt(0).tileInfo.lods.forEach( - function (item) { - if (item.resolution >= resolution) { - var difftemp = item.resolution - resolution; - if (difftemp < diff) { - diff = difftemp; - nearestScale = item.scale; - zoom = item.level; - } - } - }.bind(this), - ); - } - if (!this.mapsettings.scale) { - this.mapsettings.scale = nearestScale; - this.mapsettings.zoom = zoom; + getLayerUrl = (url) => { + if (!url) return ''; + let protocol = location.protocol; + let host = location.host; + return `${protocol}${host}/${url}`; + }; + + addAnnotationLayer = (title, url, visible) => { + let query = url.split('?')[1]; + const { MapImageLayer } = this.props.modules; + url += query ? '&annotation=true' : 'annotation=true'; + let annotationLayer = new MapImageLayer({ + title: title + '锛堟敞璁帮級', + url: annotationLayerUrl, + visible: visible, + token: _config && _config.token, + client: 'webgis', + }); + _.extend(annotationLayer, { + preload: true, + }); + this.view.map.add(annotationLayer); + return annotationLayer; + }; + + showPipeNetLayer = () => { + var layers = this.map && this.map.layers; + if (layers && layers.items) { + layers.items.forEach(function (lyr) { + if ('pipenetlayer' === lyr.layerType.toLowerCase()) { + lyr.visible = true; + } + }); } - return nearestScale; - } + }; - render() { - return <div ref={this.mapRef} id={this.props.id} style={this.getStyle()}></div>; - } + render = () => { + const { id, viewRef, style } = this.props; + const { viewReady } = this.state; + return ( + <div id={id} ref={viewRef} style={style}> + {viewReady ? '' : <Spin tip="姝e湪鍔犺浇搴曞浘涓�..." />} + </div> + ); + }; } - -MapManager.propTypes = { - id: PropTypes.string, - width: PropTypes.string, - height: PropTypes.string, - mapsettings: PropTypes.object, - modules: PropTypes.array, -}; diff --git a/packages/map/src/utils/GeometryTool.js b/packages/map/src/utils/GeometryTool.js deleted file mode 100644 index cff838a9d8662f711e4d0b9d310ff2925aaab139..0000000000000000000000000000000000000000 --- a/packages/map/src/utils/GeometryTool.js +++ /dev/null @@ -1,69 +0,0 @@ -import gisConfig from '../config/gis'; -import esriLoader from 'esri-loader'; - -console.log('test---geometry'); - -export function toGeometry(jsonObj, mapMng) { - var geometry, - mm = mapMng || mapManager; - if (jsonObj) { - jsonObj.spatialReference = { - wkid: mm.view.spatialReference.wkid, - }; - geometry = AllDependenciesLoadedModules['jsonUtils'].fromJSON(jsonObj); - } - return geometry; -} - -const toGeometryDependenciesModules = { - jsonUtils: 'gis/geometry/support/jsonUtils', -}; -const getDefaultSymbolDependenciesModules = { - SimpleMarkerSymbol: 'gis/symbols/SimpleMarkerSymbol', - SimpleLineSymbol: 'gis/symbols/SimpleLineSymbol', - SimpleFillSymbol: 'gis/symbols/SimpleFillSymbol', - Color: 'gis/Color', -}; -const ALLDependenciesModules = Object.assign( - {}, - toGeometryDependenciesModules, - getDefaultSymbolDependenciesModules, -); -const AllDependenciesLoadedModules = {}; - -export async function loadAllDependencies() { - isRequestLoadModules(ALLDependenciesModules, AllDependenciesLoadedModules) - ? await loadCommonModules(ALLDependenciesModules, AllDependenciesLoadedModules) - : ''; -} - -export async function loadToGeometryDependencies() { - isRequestLoadModules(toGeometryDependenciesModules, AllDependenciesLoadedModules) - ? await loadCommonModules(toGeometryDependenciesModules, AllDependenciesLoadedModules) - : ''; -} - -export async function loadGetDefaultSymbolDependencies() { - isRequestLoadModules(getDefaultSymbolDependenciesModules, AllDependenciesLoadedModules) - ? await loadCommonModules(getDefaultSymbolDependenciesModules, AllDependenciesLoadedModules) - : ''; -} - -async function loadCommonModules(modulesUrlsObject, loadedModuleObject) { - let moduleArr = Object.entries(modulesUrlsObject); - let moduleUrlsArray = moduleArr.map((item) => item[1]); - let modules = await esriLoader.loadModules(moduleUrlsArray, gisConfig); - modules.map( - function (module, index) { - loadedModuleObject[moduleArr[index][0]] = module; - }.bind(this), - ); -} - -function isRequestLoadModules(originModules, targetModule) { - let flag = false; - for (let key in originModules) { - if (!flag && !targetModule[key]) flag = true; - } - return flag; -} diff --git a/packages/map/src/utils/utils.js b/packages/map/src/utils/utils.js deleted file mode 100644 index 73494c2da95aac143c356a94ab8552ac9d06c3bd..0000000000000000000000000000000000000000 --- a/packages/map/src/utils/utils.js +++ /dev/null @@ -1,87 +0,0 @@ -import gisConfig from '../config/gis'; -import esriLoader from 'esri-loader'; - -export const _ = require('lodash'); - -export function loadModules(modules = [], mapSettings = {}) { - let mergeMapSettings = Object.assign(gisConfig, mapSettings); - return new Promise( - function (resolve, reject) { - esriLoader.loadModules(modules, mergeMapSettings).then( - function (array) { - resolve(array); - }.bind(this), - ); - }.bind(this), - ); -} - -export async function asyncLoadModules(modules = [], mapSettings = {}) { - let mergeMapSettings = Object.assign(gisConfig, mapSettings); - let results = await esriLoader.loadModules(modules, mergeMapSettings); - return results; -} - -export function bindUrlUtils(urlUtils) { - if (!urlUtils.getUrl) { - urlUtils.getUrl = urlUtilsGetUrl; - } -} - -function urlUtilsGetUrl(template, _module) { - var urlArr = []; - urlArr.push(location.protocol + '/'); - urlArr.push(location.host); - if (_config.prefix) { - urlArr.push(_config.prefix); - } - - if (_module && _module.length) { - // url鏈嶅姟鎺ュ彛 妯″潡閰嶇疆璺緞閲囩敤缁濆璺緞 - var _urlModuleTempl = { - CaseManageREST: 'CityInterface/Services/CityServer_CaseManage/REST/CaseManageREST.svc', - EditREST: 'CityInterface/Services/CityServer_Edit/REST/EditREST.svc', - MapREST: 'CityInterface/rest/services/MapServer.svc', - MapRESTOld: 'CityInterface/Services/CityServer_Map/REST/MapREST.svc', - WorkFlowREST: 'CityInterface/Services/CityServer_WorkFlow/REST/WorkFlowREST.svc', - AuditREST: 'CityInterface/Services/CityServer_Audit/REST/AuditREST.svc', - LocatorREST: 'CityInterface/Services/CityServer_Locator/REST/LocatorREST.svc', - NewNotificationREST: - 'CityInterface/Services/CityServer_NewNotification/REST/NewNotificationREST.svc', - OfficeTemplateREST: - 'Cityinterface/Services/CityServer_OfficeTemplate/REST/OfficeTemplate.svc', - OfflineTaskEditREST: - 'CityInterface/Services/CityServer_OfflineTaskEdit/REST/OfflineTaskEditREST.svc', - PatrolStandardRest: 'CityInterface/rest/services/PatrolStandard.svc', - PatrolStandardRestOld: - 'CityInterface/Services/CityServer_Patrol_Standard/REST/PatrolStandardRest.svc', - NewPatrolREST: 'CityInterface/rest/services/NewPatrol.svc', - OldPatrolREST: 'CityInterface/Services/CityServer_NewPatrol/REST/Newpatrolrest.svc', - MobileBusinessBaseREST: 'CityInterface/Services/CityServer_MobileBusiness/REST/BaseREST.svc', - HZGSProjectBoxREST: - 'CityInterface/Services/CityServer_HZGSProjectBox/REST/HZGSProjectBoxREST.svc', - ZS_ProjectManageREST: - 'CityInterface/Services/CityServer_ProjectManage_ZS/REST/ProjectManageREST.svc', - }; - var _templ = _urlModuleTempl[_module] ? _urlModuleTempl[_module] : ''; - urlArr.push(_templ); - return urlArr.join('/'); - } else { - if ( - ['{host}', '{protocol}', '{prefix}', '{ip}'].some(function (str) { - return template.toLowerCase().indexOf(str) >= 0; - }) - ) { - return template - .replace(/\{host\}/gi, urlArr.join('/')) - .replace(/\{protocol\}/gi, _config.protocol + '//') - .replace(/\{prefix\}/gi, _config.prefix || '') - .replace(/\{ip\}/gi, _config.ip); - } else if (template.indexOf('http://') == 0 || template.indexOf('https://') == 0) { - return template; - } else { - urlArr.push(template); - return urlArr.join('/'); - } - } -}