diff --git a/.circleci/config.yml b/.circleci/config.yml index 85df3ccb7b2..e1922cd1bc0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -231,7 +231,7 @@ jobs: command: .circleci/test.sh mathjax-firefox82+ make-baselines-virtual-webgl: - parallelism: 4 + parallelism: 6 docker: - image: circleci/python:3.8.9 working_directory: ~/plotly.js @@ -268,7 +268,7 @@ jobs: - plotly.js make-baselines: - parallelism: 4 + parallelism: 8 docker: - image: circleci/python:3.8.9 working_directory: ~/plotly.js @@ -287,7 +287,7 @@ jobs: - plotly.js make-baselines-b64: - parallelism: 4 + parallelism: 8 docker: - image: circleci/python:3.8.9 working_directory: ~/plotly.js @@ -486,12 +486,12 @@ jobs: - run: name: Test plotly.min.js import using requirejs command: npm run test-requirejs - - run: - name: Test plotly bundles against es6 - command: npm run no-es6-dist - - run: - name: Display function constructors in all bundles - command: npm run no-new-func + # - run: + # name: Test plotly bundles against es6 + # command: npm run no-es6-dist + # - run: + # name: Display function constructors in all bundles + # command: npm run no-new-func test-stackgl-bundle: docker: diff --git a/devtools/test_dashboard/devtools.js b/devtools/test_dashboard/devtools.js index 6a779e9656e..74e82767ff1 100644 --- a/devtools/test_dashboard/devtools.js +++ b/devtools/test_dashboard/devtools.js @@ -4,7 +4,6 @@ var Fuse = require('fuse.js/dist/fuse.common.js'); var mocks = require('../../build/test_dashboard_mocks.json'); -var credentials = require('../../build/credentials.json'); var Lib = require('../../src/lib'); require('./perf'); @@ -19,10 +18,6 @@ var Tabs = { // use local topojson files topojsonURL: '../../node_modules/sane-topojson/dist/', - // register mapbox access token - // run `npm run preset` if you haven't yet - mapboxAccessToken: credentials.MAPBOX_ACCESS_TOKEN, - // show all logs in console logging: 2 }); diff --git a/draftlogs/7015_change.md b/draftlogs/7015_change.md new file mode 100644 index 00000000000..a7126009cf6 --- /dev/null +++ b/draftlogs/7015_change.md @@ -0,0 +1 @@ +- Replace @plotly/mapbox-gl with maplibre-gl [[#7015](https://github.com/plotly/plotly.js/pull/7015)] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e8e78009214..fad0c63f692 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@plotly/d3": "3.8.2", "@plotly/d3-sankey": "0.7.2", "@plotly/d3-sankey-circular": "0.33.1", - "@plotly/mapbox-gl": "1.13.4", "@turf/area": "^6.4.0", "@turf/bbox": "^6.4.0", "@turf/centroid": "^6.0.2", @@ -37,6 +36,7 @@ "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", "is-mobile": "^4.0.0", + "maplibre-gl": "^4.4.0", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", "mouse-wheel": "^1.2.0", @@ -2143,27 +2143,14 @@ "geojson-rewind": "geojson-rewind" } }, - "node_modules/@mapbox/geojson-types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz", - "integrity": "sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==" - }, "node_modules/@mapbox/jsonlint-lines-primitives": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=", + "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", "engines": { "node": ">= 0.6" } }, - "node_modules/@mapbox/mapbox-gl-supported": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz", - "integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==", - "peerDependencies": { - "mapbox-gl": ">=0.32.1 <2.0.0" - } - }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz", @@ -2202,17 +2189,17 @@ "node_modules/@mapbox/point-geometry": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=" + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" }, "node_modules/@mapbox/tiny-sdf": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.1.1.tgz", - "integrity": "sha512-Ihn1nZcGIswJ5XGbgFAvVumOgWpvIjBX9jiRlIl46uQG9vJOF51ViBYHF95rEZupuyQbEmhLaDPLQlU7fUTsBg==" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", + "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" }, "node_modules/@mapbox/unitbezier": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", - "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", + "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" }, "node_modules/@mapbox/vector-tile": { "version": "1.3.1", @@ -2230,6 +2217,26 @@ "node": ">=6.0.0" } }, + "node_modules/@maplibre/maplibre-gl-style-spec": { + "version": "20.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-20.3.0.tgz", + "integrity": "sha512-eSiQ3E5LUSxAOY9ABXGyfNhout2iEa6mUxKeaQ9nJ8NL1NuaQYU7zKqzx/LEYcXe1neT4uYAgM1wYZj3fTSXtA==", + "dependencies": { + "@mapbox/jsonlint-lines-primitives": "~2.0.2", + "@mapbox/unitbezier": "^0.0.1", + "json-stringify-pretty-compact": "^4.0.0", + "minimist": "^1.2.8", + "quickselect": "^2.0.0", + "rw": "^1.3.3", + "sort-object": "^3.0.3", + "tinyqueue": "^2.0.3" + }, + "bin": { + "gl-style-format": "dist/gl-style-format.mjs", + "gl-style-migrate": "dist/gl-style-migrate.mjs", + "gl-style-validate": "dist/gl-style-validate.mjs" + } + }, "node_modules/@nicolo-ribaudo/semver-v6": { "version": "6.3.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", @@ -2301,38 +2308,6 @@ "elementary-circuits-directed-graph": "^1.0.4" } }, - "node_modules/@plotly/mapbox-gl": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/@plotly/mapbox-gl/-/mapbox-gl-1.13.4.tgz", - "integrity": "sha512-sR3/Pe5LqT/fhYgp4rT4aSFf1rTsxMbGiH6Hojc7PH36ny5Bn17iVFUjpzycafETURuFbLZUfjODO8LvSI+5zQ==", - "dependencies": { - "@mapbox/geojson-rewind": "^0.5.2", - "@mapbox/geojson-types": "^1.0.2", - "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/mapbox-gl-supported": "^1.5.0", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^1.1.1", - "@mapbox/unitbezier": "^0.0.0", - "@mapbox/vector-tile": "^1.3.1", - "@mapbox/whoots-js": "^3.1.0", - "csscolorparser": "~1.0.3", - "earcut": "^2.2.2", - "geojson-vt": "^3.2.1", - "gl-matrix": "^3.2.1", - "grid-index": "^1.1.0", - "murmurhash-js": "^1.0.0", - "pbf": "^3.2.1", - "potpack": "^1.0.1", - "quickselect": "^2.0.0", - "rw": "^1.3.3", - "supercluster": "^7.1.0", - "tinyqueue": "^2.0.3", - "vt-pbf": "^3.1.1" - }, - "engines": { - "node": ">=6.4.0" - } - }, "node_modules/@plotly/point-cluster": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/@plotly/point-cluster/-/point-cluster-3.1.9.tgz", @@ -2478,6 +2453,19 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/geojson": { + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + }, + "node_modules/@types/geojson-vt": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@types/geojson-vt/-/geojson-vt-3.2.5.tgz", + "integrity": "sha512-qDO7wqtprzlpe8FfQ//ClPV9xiuoh2nkIgiouIptON9w5jvD/fA4szvP9GBlDVdJ5dldAl0kX/sy3URbWwLx0g==", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -2490,6 +2478,11 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/junit-report-builder": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/junit-report-builder/-/junit-report-builder-3.0.2.tgz", + "integrity": "sha512-R5M+SYhMbwBeQcNXYWNCZkl09vkVfAtcPIaCGdzIkkbeaTrVbGQ7HVgi4s+EmM/M1K4ZuWQH0jGcvMvNePfxYA==" + }, "node_modules/@types/karma": { "version": "1.7.8", "resolved": "https://registry.npmjs.org/@types/karma/-/karma-1.7.8.tgz", @@ -2500,12 +2493,40 @@ "@types/node": "*" } }, + "node_modules/@types/mapbox__point-geometry": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz", + "integrity": "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA==" + }, + "node_modules/@types/mapbox__vector-tile": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.4.tgz", + "integrity": "sha512-bpd8dRn9pr6xKvuEBQup8pwQfD4VUyqO/2deGjfpe6AwC8YRlyEipvefyRJUSiCJTZuCb8Pl1ciVV5ekqJ96Bg==", + "dependencies": { + "@types/geojson": "*", + "@types/mapbox__point-geometry": "*", + "@types/pbf": "*" + } + }, "node_modules/@types/node": { "version": "14.11.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", "dev": true }, + "node_modules/@types/pbf": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.5.tgz", + "integrity": "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==" + }, + "node_modules/@types/supercluster": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz", + "integrity": "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@typescript-eslint/types": { "version": "5.54.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz", @@ -3073,6 +3094,14 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-bounds": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-bounds/-/array-bounds-1.0.1.tgz", @@ -3156,6 +3185,14 @@ "util": "^0.12.0" } }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ast-module-types": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", @@ -3727,6 +3764,23 @@ "node": ">= 0.8" } }, + "node_modules/bytewise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", + "integrity": "sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ==", + "dependencies": { + "bytewise-core": "^1.2.2", + "typewise": "^1.0.3" + } + }, + "node_modules/bytewise-core": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", + "integrity": "sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA==", + "dependencies": { + "typewise-core": "^1.2" + } + }, "node_modules/call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -4504,11 +4558,6 @@ "resolved": "https://registry.npmjs.org/css-system-font-keywords/-/css-system-font-keywords-1.0.0.tgz", "integrity": "sha1-hcbwhquk6zLFcaMIav/ENLhII+0=" }, - "node_modules/csscolorparser": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", - "integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs=" - }, "node_modules/cssom": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", @@ -5349,9 +5398,9 @@ } }, "node_modules/earcut": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", - "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==" + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" }, "node_modules/ecstatic": { "version": "4.1.4", @@ -6048,6 +6097,17 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/extra-iterable": { "version": "2.5.22", "resolved": "https://registry.npmjs.org/extra-iterable/-/extra-iterable-2.5.22.tgz", @@ -6715,15 +6775,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/gl-mat4": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gl-mat4/-/gl-mat4-1.2.0.tgz", "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, "node_modules/gl-matrix": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz", - "integrity": "sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", + "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" }, "node_modules/gl-text": { "version": "1.4.0", @@ -6801,6 +6869,19 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -7075,11 +7156,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/grid-index": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", - "integrity": "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA==" - }, "node_modules/gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -7536,8 +7612,7 @@ "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/internal-slot": { "version": "1.0.5", @@ -7702,6 +7777,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7854,7 +7937,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "dependencies": { "isobject": "^3.0.1" }, @@ -8068,14 +8150,12 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -8271,6 +8351,11 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "node_modules/json-stringify-pretty-compact": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-4.0.0.tgz", + "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==" + }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -8498,15 +8583,14 @@ } }, "node_modules/kdbush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", - "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", + "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -8853,38 +8937,45 @@ "integrity": "sha1-douOecAJvytk/ugG4ip7HEGQyZA=", "dev": true }, - "node_modules/mapbox-gl": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.13.1.tgz", - "integrity": "sha512-GSyubcoSF5MyaP8z+DasLu5v7KmDK2pp4S5+VQ5WdVQUOaAqQY4jwl4JpcdNho3uWm2bIKs7x1l7q3ynGmW60g==", - "peer": true, + "node_modules/maplibre-gl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-4.4.0.tgz", + "integrity": "sha512-RS5ZYjUfcTuyTjR+jbPNGO+Cbjgid8jtBsUpgmx/m+2voj9oY6DmpanBBm2xvjOxZSfChR2wUpzK22mf6sEOlw==", "dependencies": { - "@mapbox/geojson-rewind": "^0.5.0", - "@mapbox/geojson-types": "^1.0.2", + "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/mapbox-gl-supported": "^1.5.0", "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^1.1.1", - "@mapbox/unitbezier": "^0.0.0", + "@mapbox/tiny-sdf": "^2.0.6", + "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", - "csscolorparser": "~1.0.3", - "earcut": "^2.2.2", + "@maplibre/maplibre-gl-style-spec": "^20.3.0", + "@types/geojson": "^7946.0.14", + "@types/geojson-vt": "3.2.5", + "@types/junit-report-builder": "^3.0.2", + "@types/mapbox__point-geometry": "^0.1.4", + "@types/mapbox__vector-tile": "^1.3.4", + "@types/pbf": "^3.0.5", + "@types/supercluster": "^7.1.3", + "earcut": "^2.2.4", "geojson-vt": "^3.2.1", - "gl-matrix": "^3.2.1", - "grid-index": "^1.1.0", - "minimist": "^1.2.5", + "gl-matrix": "^3.4.3", + "global-prefix": "^3.0.0", + "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", - "potpack": "^1.0.1", + "potpack": "^2.0.0", "quickselect": "^2.0.0", - "rw": "^1.3.3", - "supercluster": "^7.1.0", + "supercluster": "^8.0.1", "tinyqueue": "^2.0.3", - "vt-pbf": "^3.1.1" + "vt-pbf": "^3.1.3" }, "engines": { - "node": ">=6.4.0" + "node": ">=16.14.0", + "npm": ">=8.1.0" + }, + "funding": { + "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" } }, "node_modules/math-log2": { @@ -9122,9 +9213,12 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { "version": "3.1.6", @@ -10283,9 +10377,9 @@ } }, "node_modules/potpack": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.1.tgz", - "integrity": "sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz", + "integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw==" }, "node_modules/precinct": { "version": "8.3.1", @@ -10642,9 +10736,9 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/protocol-buffers-schema": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz", - "integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" }, "node_modules/psl": { "version": "1.8.0", @@ -11279,7 +11373,7 @@ "node_modules/rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, "node_modules/safe-buffer": { "version": "5.2.1", @@ -11432,6 +11526,20 @@ "node": ">= 0.4" } }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -11608,6 +11716,38 @@ "node": ">=10.0.0" } }, + "node_modules/sort-asc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.2.0.tgz", + "integrity": "sha512-umMGhjPeHAI6YjABoSTrFp2zaBtXBej1a0yKkuMUyjjqu6FJsTF+JYwCswWDg+zJfk/5npWUUbd33HH/WLzpaA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-desc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/sort-desc/-/sort-desc-0.2.0.tgz", + "integrity": "sha512-NqZqyvL4VPW+RAxxXnB8gvE1kyikh8+pR+T+CXLksVRN9eiQqkQlPwqWYU0mF9Jm7UnctShlxLyAt1CaBOTL1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-object": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sort-object/-/sort-object-3.0.3.tgz", + "integrity": "sha512-nK7WOY8jik6zaG9CRwZTaD5O7ETWDLZYMM12pqY8htll+7dYeqGfEUPcUBHOpSJg2vJOrvFIY2Dl5cX2ih1hAQ==", + "dependencies": { + "bytewise": "^1.1.0", + "get-value": "^2.0.2", + "is-extendable": "^0.1.1", + "sort-asc": "^0.2.0", + "sort-desc": "^0.2.0", + "union-value": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -11674,6 +11814,40 @@ "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", "dev": true }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/stack-trace": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", @@ -11933,11 +12107,11 @@ } }, "node_modules/supercluster": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz", - "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", + "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", "dependencies": { - "kdbush": "^3.0.0" + "kdbush": "^4.0.2" } }, "node_modules/superscript-text": { @@ -12480,6 +12654,19 @@ "node": ">=4.2.0" } }, + "node_modules/typewise": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typewise/-/typewise-1.0.3.tgz", + "integrity": "sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ==", + "dependencies": { + "typewise-core": "^1.2.0" + } + }, + "node_modules/typewise-core": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typewise-core/-/typewise-core-1.2.0.tgz", + "integrity": "sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg==" + }, "node_modules/ua-parser-js": { "version": "0.7.33", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz", @@ -12539,6 +12726,20 @@ "node": ">=4" } }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -12722,13 +12923,13 @@ } }, "node_modules/vt-pbf": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.1.tgz", - "integrity": "sha512-pHjWdrIoxurpmTcbfBWXaPwSmtPAHS105253P1qyEfSTV2HJddqjM+kIHquaT/L6lVJIk9ltTGc0IxR/G47hYA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", + "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", "dependencies": { "@mapbox/point-geometry": "0.1.0", "@mapbox/vector-tile": "^1.3.1", - "pbf": "^3.0.5" + "pbf": "^3.2.1" } }, "node_modules/w3c-hr-time": { @@ -13012,7 +13213,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -14631,21 +14831,10 @@ "minimist": "^1.2.6" } }, - "@mapbox/geojson-types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz", - "integrity": "sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==" - }, "@mapbox/jsonlint-lines-primitives": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=" - }, - "@mapbox/mapbox-gl-supported": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz", - "integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==", - "requires": {} + "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==" }, "@mapbox/node-pre-gyp": { "version": "1.0.8", @@ -14678,17 +14867,17 @@ "@mapbox/point-geometry": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=" + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" }, "@mapbox/tiny-sdf": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.1.1.tgz", - "integrity": "sha512-Ihn1nZcGIswJ5XGbgFAvVumOgWpvIjBX9jiRlIl46uQG9vJOF51ViBYHF95rEZupuyQbEmhLaDPLQlU7fUTsBg==" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", + "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" }, "@mapbox/unitbezier": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", - "integrity": "sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", + "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" }, "@mapbox/vector-tile": { "version": "1.3.1", @@ -14703,6 +14892,21 @@ "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==" }, + "@maplibre/maplibre-gl-style-spec": { + "version": "20.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-20.3.0.tgz", + "integrity": "sha512-eSiQ3E5LUSxAOY9ABXGyfNhout2iEa6mUxKeaQ9nJ8NL1NuaQYU7zKqzx/LEYcXe1neT4uYAgM1wYZj3fTSXtA==", + "requires": { + "@mapbox/jsonlint-lines-primitives": "~2.0.2", + "@mapbox/unitbezier": "^0.0.1", + "json-stringify-pretty-compact": "^4.0.0", + "minimist": "^1.2.8", + "quickselect": "^2.0.0", + "rw": "^1.3.3", + "sort-object": "^3.0.3", + "tinyqueue": "^2.0.3" + } + }, "@nicolo-ribaudo/semver-v6": { "version": "6.3.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", @@ -14762,35 +14966,6 @@ "elementary-circuits-directed-graph": "^1.0.4" } }, - "@plotly/mapbox-gl": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/@plotly/mapbox-gl/-/mapbox-gl-1.13.4.tgz", - "integrity": "sha512-sR3/Pe5LqT/fhYgp4rT4aSFf1rTsxMbGiH6Hojc7PH36ny5Bn17iVFUjpzycafETURuFbLZUfjODO8LvSI+5zQ==", - "requires": { - "@mapbox/geojson-rewind": "^0.5.2", - "@mapbox/geojson-types": "^1.0.2", - "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/mapbox-gl-supported": "^1.5.0", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^1.1.1", - "@mapbox/unitbezier": "^0.0.0", - "@mapbox/vector-tile": "^1.3.1", - "@mapbox/whoots-js": "^3.1.0", - "csscolorparser": "~1.0.3", - "earcut": "^2.2.2", - "geojson-vt": "^3.2.1", - "gl-matrix": "^3.2.1", - "grid-index": "^1.1.0", - "murmurhash-js": "^1.0.0", - "pbf": "^3.2.1", - "potpack": "^1.0.1", - "quickselect": "^2.0.0", - "rw": "^1.3.3", - "supercluster": "^7.1.0", - "tinyqueue": "^2.0.3", - "vt-pbf": "^3.1.1" - } - }, "@plotly/point-cluster": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/@plotly/point-cluster/-/point-cluster-3.1.9.tgz", @@ -14937,6 +15112,19 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "@types/geojson": { + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + }, + "@types/geojson-vt": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@types/geojson-vt/-/geojson-vt-3.2.5.tgz", + "integrity": "sha512-qDO7wqtprzlpe8FfQ//ClPV9xiuoh2nkIgiouIptON9w5jvD/fA4szvP9GBlDVdJ5dldAl0kX/sy3URbWwLx0g==", + "requires": { + "@types/geojson": "*" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -14949,6 +15137,11 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "@types/junit-report-builder": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/junit-report-builder/-/junit-report-builder-3.0.2.tgz", + "integrity": "sha512-R5M+SYhMbwBeQcNXYWNCZkl09vkVfAtcPIaCGdzIkkbeaTrVbGQ7HVgi4s+EmM/M1K4ZuWQH0jGcvMvNePfxYA==" + }, "@types/karma": { "version": "1.7.8", "resolved": "https://registry.npmjs.org/@types/karma/-/karma-1.7.8.tgz", @@ -14959,12 +15152,40 @@ "@types/node": "*" } }, + "@types/mapbox__point-geometry": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz", + "integrity": "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA==" + }, + "@types/mapbox__vector-tile": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.4.tgz", + "integrity": "sha512-bpd8dRn9pr6xKvuEBQup8pwQfD4VUyqO/2deGjfpe6AwC8YRlyEipvefyRJUSiCJTZuCb8Pl1ciVV5ekqJ96Bg==", + "requires": { + "@types/geojson": "*", + "@types/mapbox__point-geometry": "*", + "@types/pbf": "*" + } + }, "@types/node": { "version": "14.11.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", "dev": true }, + "@types/pbf": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.5.tgz", + "integrity": "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==" + }, + "@types/supercluster": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz", + "integrity": "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==", + "requires": { + "@types/geojson": "*" + } + }, "@typescript-eslint/types": { "version": "5.54.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz", @@ -15421,6 +15642,11 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==" + }, "array-bounds": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-bounds/-/array-bounds-1.0.1.tgz", @@ -15497,6 +15723,11 @@ "util": "^0.12.0" } }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==" + }, "ast-module-types": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-3.0.0.tgz", @@ -15964,6 +16195,23 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, + "bytewise": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", + "integrity": "sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ==", + "requires": { + "bytewise-core": "^1.2.2", + "typewise": "^1.0.3" + } + }, + "bytewise-core": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", + "integrity": "sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA==", + "requires": { + "typewise-core": "^1.2" + } + }, "call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -16621,11 +16869,6 @@ "resolved": "https://registry.npmjs.org/css-system-font-keywords/-/css-system-font-keywords-1.0.0.tgz", "integrity": "sha1-hcbwhquk6zLFcaMIav/ENLhII+0=" }, - "csscolorparser": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", - "integrity": "sha1-s085HupNqPPpgjHizNjfnAQfFxs=" - }, "cssom": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", @@ -17318,9 +17561,9 @@ } }, "earcut": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", - "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==" + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" }, "ecstatic": { "version": "4.1.4", @@ -17876,6 +18119,14 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "requires": { + "is-extendable": "^0.1.0" + } + }, "extra-iterable": { "version": "2.5.22", "resolved": "https://registry.npmjs.org/extra-iterable/-/extra-iterable-2.5.22.tgz", @@ -18393,15 +18644,20 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==" + }, "gl-mat4": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gl-mat4/-/gl-mat4-1.2.0.tgz", "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, "gl-matrix": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz", - "integrity": "sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", + "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" }, "gl-text": { "version": "1.4.0", @@ -18470,6 +18726,16 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, "globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -18723,11 +18989,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "grid-index": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", - "integrity": "sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA==" - }, "gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -19089,8 +19350,7 @@ "ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "internal-slot": { "version": "1.0.5", @@ -19198,6 +19458,11 @@ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==" + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -19296,7 +19561,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "requires": { "isobject": "^3.0.1" } @@ -19444,14 +19708,12 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" }, "jasmine": { "version": "3.5.0", @@ -19598,6 +19860,11 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json-stringify-pretty-compact": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-4.0.0.tgz", + "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==" + }, "json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -19778,15 +20045,14 @@ } }, "kdbush": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", - "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", + "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "levn": { "version": "0.3.0", @@ -20040,35 +20306,38 @@ "integrity": "sha1-douOecAJvytk/ugG4ip7HEGQyZA=", "dev": true }, - "mapbox-gl": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-1.13.1.tgz", - "integrity": "sha512-GSyubcoSF5MyaP8z+DasLu5v7KmDK2pp4S5+VQ5WdVQUOaAqQY4jwl4JpcdNho3uWm2bIKs7x1l7q3ynGmW60g==", - "peer": true, + "maplibre-gl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-4.4.0.tgz", + "integrity": "sha512-RS5ZYjUfcTuyTjR+jbPNGO+Cbjgid8jtBsUpgmx/m+2voj9oY6DmpanBBm2xvjOxZSfChR2wUpzK22mf6sEOlw==", "requires": { - "@mapbox/geojson-rewind": "^0.5.0", - "@mapbox/geojson-types": "^1.0.2", + "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/mapbox-gl-supported": "^1.5.0", "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^1.1.1", - "@mapbox/unitbezier": "^0.0.0", + "@mapbox/tiny-sdf": "^2.0.6", + "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", - "csscolorparser": "~1.0.3", - "earcut": "^2.2.2", + "@maplibre/maplibre-gl-style-spec": "^20.3.0", + "@types/geojson": "^7946.0.14", + "@types/geojson-vt": "3.2.5", + "@types/junit-report-builder": "^3.0.2", + "@types/mapbox__point-geometry": "^0.1.4", + "@types/mapbox__vector-tile": "^1.3.4", + "@types/pbf": "^3.0.5", + "@types/supercluster": "^7.1.3", + "earcut": "^2.2.4", "geojson-vt": "^3.2.1", - "gl-matrix": "^3.2.1", - "grid-index": "^1.1.0", - "minimist": "^1.2.5", + "gl-matrix": "^3.4.3", + "global-prefix": "^3.0.0", + "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", - "potpack": "^1.0.1", + "potpack": "^2.0.0", "quickselect": "^2.0.0", - "rw": "^1.3.3", - "supercluster": "^7.1.0", + "supercluster": "^8.0.1", "tinyqueue": "^2.0.3", - "vt-pbf": "^3.1.1" + "vt-pbf": "^3.1.3" } }, "math-log2": { @@ -20260,9 +20529,9 @@ } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, "minipass": { "version": "3.1.6", @@ -21153,9 +21422,9 @@ } }, "potpack": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.1.tgz", - "integrity": "sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz", + "integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw==" }, "precinct": { "version": "8.3.1", @@ -21415,9 +21684,9 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "protocol-buffers-schema": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz", - "integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" }, "psl": { "version": "1.8.0", @@ -21927,7 +22196,7 @@ "rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, "safe-buffer": { "version": "5.2.1", @@ -22035,6 +22304,17 @@ "has-property-descriptors": "^1.0.0" } }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + } + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -22172,6 +22452,29 @@ "debug": "~4.3.1" } }, + "sort-asc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.2.0.tgz", + "integrity": "sha512-umMGhjPeHAI6YjABoSTrFp2zaBtXBej1a0yKkuMUyjjqu6FJsTF+JYwCswWDg+zJfk/5npWUUbd33HH/WLzpaA==" + }, + "sort-desc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/sort-desc/-/sort-desc-0.2.0.tgz", + "integrity": "sha512-NqZqyvL4VPW+RAxxXnB8gvE1kyikh8+pR+T+CXLksVRN9eiQqkQlPwqWYU0mF9Jm7UnctShlxLyAt1CaBOTL1w==" + }, + "sort-object": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sort-object/-/sort-object-3.0.3.tgz", + "integrity": "sha512-nK7WOY8jik6zaG9CRwZTaD5O7ETWDLZYMM12pqY8htll+7dYeqGfEUPcUBHOpSJg2vJOrvFIY2Dl5cX2ih1hAQ==", + "requires": { + "bytewise": "^1.1.0", + "get-value": "^2.0.2", + "is-extendable": "^0.1.1", + "sort-asc": "^0.2.0", + "sort-desc": "^0.2.0", + "union-value": "^1.0.1" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -22232,6 +22535,33 @@ "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", "dev": true }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "stack-trace": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", @@ -22454,11 +22784,11 @@ } }, "supercluster": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz", - "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", + "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", "requires": { - "kdbush": "^3.0.0" + "kdbush": "^4.0.2" } }, "superscript-text": { @@ -22878,6 +23208,19 @@ "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", "dev": true }, + "typewise": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typewise/-/typewise-1.0.3.tgz", + "integrity": "sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ==", + "requires": { + "typewise-core": "^1.2.0" + } + }, + "typewise-core": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typewise-core/-/typewise-core-1.2.0.tgz", + "integrity": "sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg==" + }, "ua-parser-js": { "version": "0.7.33", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.33.tgz", @@ -22912,6 +23255,17 @@ "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -23058,13 +23412,13 @@ "dev": true }, "vt-pbf": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.1.tgz", - "integrity": "sha512-pHjWdrIoxurpmTcbfBWXaPwSmtPAHS105253P1qyEfSTV2HJddqjM+kIHquaT/L6lVJIk9ltTGc0IxR/G47hYA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", + "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", "requires": { "@mapbox/point-geometry": "0.1.0", "@mapbox/vector-tile": "^1.3.1", - "pbf": "^3.0.5" + "pbf": "^3.2.1" } }, "w3c-hr-time": { @@ -23271,7 +23625,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } diff --git a/package.json b/package.json index 84854a19331..4d12c49e2d2 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,6 @@ "@plotly/d3": "3.8.2", "@plotly/d3-sankey": "0.7.2", "@plotly/d3-sankey-circular": "0.33.1", - "@plotly/mapbox-gl": "1.13.4", "@turf/area": "^6.4.0", "@turf/bbox": "^6.4.0", "@turf/centroid": "^6.0.2", @@ -99,6 +98,7 @@ "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", "is-mobile": "^4.0.0", + "maplibre-gl": "^4.4.0", "mouse-change": "^1.4.0", "mouse-event-offset": "^3.0.2", "mouse-wheel": "^1.2.0", diff --git a/src/plot_api/plot_config.js b/src/plot_api/plot_config.js index 577710ac3ac..4225cd462c0 100644 --- a/src/plot_api/plot_config.js +++ b/src/plot_api/plot_config.js @@ -382,16 +382,6 @@ var configAttributes = { ].join(' ') }, - mapboxAccessToken: { - valType: 'string', - dflt: null, - description: [ - 'Mapbox access token (required to plot mapbox trace types)', - 'If using an Mapbox Atlas server, set this option to \'\'', - 'so that plotly.js won\'t attempt to authenticate to the public Mapbox server.' - ].join(' ') - }, - logging: { valType: 'integer', min: 0, diff --git a/src/plots/mapbox/constants.js b/src/plots/mapbox/constants.js index 86e955cb4cd..fe684ff4f49 100644 --- a/src/plots/mapbox/constants.js +++ b/src/plots/mapbox/constants.js @@ -5,10 +5,6 @@ var sortObjectKeys = require('../../lib/sort_object_keys'); var requiredVersion = '1.13.4'; var OSM = '© OpenStreetMap contributors'; -var carto = [ - '© Carto', - OSM -].join(' '); var stamenTerrainOrToner = [ 'Map tiles by Stamen Design', @@ -26,7 +22,118 @@ var stamenWaterColor = [ 'under CC BY SA' ].join(' '); -var stylesNonMapbox = { + +var cartoPositron = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json'; +var cartoDarkmatter = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json'; +var cartoVoyager = 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json'; +var cartoPositronNoLabels = 'https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json'; +var cartoDarkmatterNoLabels = 'https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json'; +var cartoVoyagerNoLabels = 'https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json'; +var arcgisSatHybrid = 'https://raw.githubusercontent.com/go2garret/maps/main/src/assets/json/arcgis_hybrid.json'; +var arcgisSat = { + version: 8, + name: 'orto', + metadata: {}, + center: [ + 1.537786, + 41.837539 + ], + zoom: 12, + bearing: 0, + pitch: 0, + light: { + anchor: 'viewport', + color: 'white', + intensity: 0.4, + position: [ + 1.15, + 45, + 30 + ] + }, + sources: { + ortoEsri: { + type: 'raster', + tiles: [ + 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}' + ], + tileSize: 256, + maxzoom: 18, + attribution: 'ESRI © ESRI' + }, + ortoInstaMaps: { + type: 'raster', + tiles: [ + 'https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png' + ], + tileSize: 256, + maxzoom: 13 + }, + ortoICGC: { + type: 'raster', + tiles: [ + 'https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg' + ], + tileSize: 256, + minzoom: 13.1, + maxzoom: 20 + }, + openmaptiles: { + type: 'vector', + url: 'https://geoserveis.icgc.cat/contextmaps/basemap.json' + } + }, + + sprite: 'https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1', + glyphs: 'https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf', + layers: [ + { + id: 'background', + type: 'background', + paint: { + 'background-color': '#F4F9F4' + } + }, + { + id: 'ortoEsri', + type: 'raster', + source: 'ortoEsri', + maxzoom: 16, + layout: { + visibility: 'visible' + } + }, + { + id: 'ortoICGC', + type: 'raster', + source: 'ortoICGC', + minzoom: 13.1, + maxzoom: 19, + layout: { + visibility: 'visible' + } + }, + { + id: 'ortoInstaMaps', + type: 'raster', + source: 'ortoInstaMaps', + maxzoom: 13, + layout: { + visibility: 'visible' + } + }, + ], + +}; + +var stylesMapbox = { + basic: cartoVoyager, + streets: cartoVoyager, + outdoors: cartoVoyager, + light: cartoPositronNoLabels, + dark: cartoDarkmatterNoLabels, + satellite: arcgisSat, + 'satellite-streets': arcgisSatHybrid, 'open-street-map': { id: 'osm', version: 8, @@ -35,8 +142,7 @@ var stylesNonMapbox = { type: 'raster', attribution: OSM, tiles: [ - 'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png', - 'https://b.tile.openstreetmap.org/{z}/{x}/{y}.png' + 'https://tile.openstreetmap.org/{z}/{x}/{y}.png' ], tileSize: 256 } @@ -63,46 +169,12 @@ var stylesNonMapbox = { }], glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf' }, - 'carto-positron': { - id: 'carto-positron', - version: 8, - sources: { - 'plotly-carto-positron': { - type: 'raster', - attribution: carto, - tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png'], - tileSize: 256 - } - }, - layers: [{ - id: 'plotly-carto-positron', - type: 'raster', - source: 'plotly-carto-positron', - minzoom: 0, - maxzoom: 22 - }], - glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf' - }, - 'carto-darkmatter': { - id: 'carto-darkmatter', - version: 8, - sources: { - 'plotly-carto-darkmatter': { - type: 'raster', - attribution: carto, - tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png'], - tileSize: 256 - } - }, - layers: [{ - id: 'plotly-carto-darkmatter', - type: 'raster', - source: 'plotly-carto-darkmatter', - minzoom: 0, - maxzoom: 22 - }], - glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf' - }, + 'carto-positron': cartoPositron, + 'carto-darkmatter': cartoDarkmatter, + 'carto-voyager': cartoVoyager, + 'carto-positron-nolabels': cartoPositronNoLabels, + 'carto-darkmatter-nolabels': cartoDarkmatterNoLabels, + 'carto-voyager-nolabels': cartoVoyagerNoLabels, 'stamen-terrain': { id: 'stamen-terrain', version: 8, @@ -110,7 +182,7 @@ var stylesNonMapbox = { 'plotly-stamen-terrain': { type: 'raster', attribution: stamenTerrainOrToner, - tiles: ['https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key='], + tiles: ['https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png'], tileSize: 256 } }, @@ -130,7 +202,7 @@ var stylesNonMapbox = { 'plotly-stamen-toner': { type: 'raster', attribution: stamenTerrainOrToner, - tiles: ['https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key='], + tiles: ['https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png'], tileSize: 256 } }, @@ -150,7 +222,7 @@ var stylesNonMapbox = { 'plotly-stamen-watercolor': { type: 'raster', attribution: stamenWaterColor, - tiles: ['https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key='], + tiles: ['https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg'], tileSize: 256 } }, @@ -165,91 +237,28 @@ var stylesNonMapbox = { } }; -var styleValuesNonMapbox = sortObjectKeys(stylesNonMapbox); +var styleValuesMapbox = sortObjectKeys(stylesMapbox); module.exports = { requiredVersion: requiredVersion, - styleUrlPrefix: 'mapbox://styles/mapbox/', - styleUrlSuffix: 'v9', - styleValuesMapbox: ['basic', 'streets', 'outdoors', 'light', 'dark', 'satellite', 'satellite-streets'], styleValueDflt: 'basic', - stylesNonMapbox: stylesNonMapbox, - styleValuesNonMapbox: styleValuesNonMapbox, + stylesMapbox: stylesMapbox, + styleValuesMapbox: styleValuesMapbox, traceLayerPrefix: 'plotly-trace-layer-', layoutLayerPrefix: 'plotly-layout-layer-', - wrongVersionErrorMsg: [ - 'Your custom plotly.js bundle is not using the correct mapbox-gl version', - 'Please install @plotly/mapbox-gl@' + requiredVersion + '.' - ].join('\n'), - - noAccessTokenErrorMsg: [ - 'Missing Mapbox access token.', - 'Mapbox trace type require a Mapbox access token to be registered.', - 'For example:', - ' Plotly.newPlot(gd, data, layout, { mapboxAccessToken: \'my-access-token\' });', - 'More info here: https://www.mapbox.com/help/define-access-token/' - ].join('\n'), missingStyleErrorMsg: [ - 'No valid mapbox style found, please set `mapbox.style` to one of:', - styleValuesNonMapbox.join(', '), - 'or register a Mapbox access token to use a Mapbox-served style.' + 'No valid maplibre style found, please set `mapbox.style` to one of:', + styleValuesMapbox.join(', '), + 'or use a tile service.' ].join('\n'), - multipleTokensErrorMsg: [ - 'Set multiple mapbox access token across different mapbox subplot,', - 'using first token found as mapbox-gl does not allow multiple' + - 'access tokens on the same page.' - ].join('\n'), mapOnErrorMsg: 'Mapbox error.', - // Mapbox logo for static export - mapboxLogo: { - path0: 'm 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z', - path1: 'M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z', - path2: 'M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z', - polygon: '11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34' - }, - // a subset of node_modules/mapbox-gl/dist/mapbox-gl.css - styleRules: { - map: 'overflow:hidden;position:relative;', - 'missing-css': 'display:none;', - canary: 'background-color:salmon;', - - // Reusing CSS directives from: https://api.tiles.mapbox.com/mapbox-gl-js/v1.1.1/mapbox-gl.css - 'ctrl-bottom-left': 'position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;', - 'ctrl-bottom-right': 'position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;', - ctrl: 'clear: both; pointer-events: auto; transform: translate(0, 0);', - - // Compact ctrl - 'ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner': 'display: none;', - 'ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner': 'display: block; margin-top:2px', - 'ctrl-attrib.mapboxgl-compact:hover': 'padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;', - 'ctrl-attrib.mapboxgl-compact::after': 'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;', - 'ctrl-attrib.mapboxgl-compact': 'min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;', - 'ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after': 'bottom: 0; right: 0', - 'ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after': 'bottom: 0; left: 0', - - 'ctrl-bottom-left .mapboxgl-ctrl': 'margin: 0 0 10px 10px; float: left;', - 'ctrl-bottom-right .mapboxgl-ctrl': 'margin: 0 10px 10px 0; float: right;', - - 'ctrl-attrib': 'color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px', - 'ctrl-attrib a': 'color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px', - 'ctrl-attrib a:hover': 'color: inherit; text-decoration: underline;', - - 'ctrl-attrib .mapbox-improve-map': 'font-weight: bold; margin-left: 2px;', - 'attrib-empty': 'display: none;', - - // Compact Mapbox logo without text - 'ctrl-logo': 'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')' - - // Mapbox logo WITH text below (commented out for now) - // 'ctrl-logo': 'width: 85px; height: 21px; margin: 0 0 -3px -3px; display: block; background-repeat: no-repeat; cursor: pointer; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E%3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 84.49 21" style="enable-background:new 0 0 84.49 21;" xml:space="preserve"%3E%3Cg%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M83.25,14.26c0,0.12-0.09,0.21-0.21,0.21h-1.61c-0.13,0-0.24-0.06-0.3-0.17l-1.44-2.39l-1.44,2.39 c-0.06,0.11-0.18,0.17-0.3,0.17h-1.61c-0.04,0-0.08-0.01-0.12-0.03c-0.09-0.06-0.13-0.19-0.06-0.28l0,0l2.43-3.68L76.2,6.84 c-0.02-0.03-0.03-0.07-0.03-0.12c0-0.12,0.09-0.21,0.21-0.21h1.61c0.13,0,0.24,0.06,0.3,0.17l1.41,2.36l1.4-2.35 c0.06-0.11,0.18-0.17,0.3-0.17H83c0.04,0,0.08,0.01,0.12,0.03c0.09,0.06,0.13,0.19,0.06,0.28l0,0l-2.37,3.63l2.43,3.67 C83.24,14.18,83.25,14.22,83.25,14.26z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M66.24,9.59c-0.39-1.88-1.96-3.28-3.84-3.28c-1.03,0-2.03,0.42-2.73,1.18V3.51c0-0.13-0.1-0.23-0.23-0.23h-1.4 c-0.13,0-0.23,0.11-0.23,0.23v10.72c0,0.13,0.1,0.23,0.23,0.23h1.4c0.13,0,0.23-0.11,0.23-0.23V13.5c0.71,0.75,1.7,1.18,2.73,1.18 c1.88,0,3.45-1.41,3.84-3.29C66.37,10.79,66.37,10.18,66.24,9.59L66.24,9.59z M62.08,13c-1.32,0-2.39-1.11-2.41-2.48v-0.06 c0.02-1.38,1.09-2.48,2.41-2.48s2.42,1.12,2.42,2.51S63.41,13,62.08,13z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M71.67,6.32c-1.98-0.01-3.72,1.35-4.16,3.29c-0.13,0.59-0.13,1.19,0,1.77c0.44,1.94,2.17,3.32,4.17,3.3 c2.35,0,4.26-1.87,4.26-4.19S74.04,6.32,71.67,6.32z M71.65,13.01c-1.33,0-2.42-1.12-2.42-2.51s1.08-2.52,2.42-2.52 c1.33,0,2.42,1.12,2.42,2.51S72.99,13,71.65,13.01L71.65,13.01z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M62.08,7.98c-1.32,0-2.39,1.11-2.41,2.48v0.06C59.68,11.9,60.75,13,62.08,13s2.42-1.12,2.42-2.51 S63.41,7.98,62.08,7.98z M62.08,11.76c-0.63,0-1.14-0.56-1.17-1.25v-0.04c0.01-0.69,0.54-1.25,1.17-1.25 c0.63,0,1.17,0.57,1.17,1.27C63.24,11.2,62.73,11.76,62.08,11.76z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M71.65,7.98c-1.33,0-2.42,1.12-2.42,2.51S70.32,13,71.65,13s2.42-1.12,2.42-2.51S72.99,7.98,71.65,7.98z M71.65,11.76c-0.64,0-1.17-0.57-1.17-1.27c0-0.7,0.53-1.26,1.17-1.26s1.17,0.57,1.17,1.27C72.82,11.21,72.29,11.76,71.65,11.76z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M45.74,6.53h-1.4c-0.13,0-0.23,0.11-0.23,0.23v0.73c-0.71-0.75-1.7-1.18-2.73-1.18 c-2.17,0-3.94,1.87-3.94,4.19s1.77,4.19,3.94,4.19c1.04,0,2.03-0.43,2.73-1.19v0.73c0,0.13,0.1,0.23,0.23,0.23h1.4 c0.13,0,0.23-0.11,0.23-0.23V6.74c0-0.12-0.09-0.22-0.22-0.22C45.75,6.53,45.75,6.53,45.74,6.53z M44.12,10.53 C44.11,11.9,43.03,13,41.71,13s-2.42-1.12-2.42-2.51s1.08-2.52,2.4-2.52c1.33,0,2.39,1.11,2.41,2.48L44.12,10.53z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M41.71,7.98c-1.33,0-2.42,1.12-2.42,2.51S40.37,13,41.71,13s2.39-1.11,2.41-2.48v-0.06 C44.1,9.09,43.03,7.98,41.71,7.98z M40.55,10.49c0-0.7,0.52-1.27,1.17-1.27c0.64,0,1.14,0.56,1.17,1.25v0.04 c-0.01,0.68-0.53,1.24-1.17,1.24C41.08,11.75,40.55,11.19,40.55,10.49z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M52.41,6.32c-1.03,0-2.03,0.42-2.73,1.18V6.75c0-0.13-0.1-0.23-0.23-0.23h-1.4c-0.13,0-0.23,0.11-0.23,0.23 v10.72c0,0.13,0.1,0.23,0.23,0.23h1.4c0.13,0,0.23-0.1,0.23-0.23V13.5c0.71,0.75,1.7,1.18,2.74,1.18c2.17,0,3.94-1.87,3.94-4.19 S54.58,6.32,52.41,6.32z M52.08,13.01c-1.32,0-2.39-1.11-2.42-2.48v-0.07c0.02-1.38,1.09-2.49,2.4-2.49c1.32,0,2.41,1.12,2.41,2.51 S53.4,13,52.08,13.01L52.08,13.01z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M52.08,7.98c-1.32,0-2.39,1.11-2.42,2.48v0.06c0.03,1.38,1.1,2.48,2.42,2.48s2.41-1.12,2.41-2.51 S53.4,7.98,52.08,7.98z M52.08,11.76c-0.63,0-1.14-0.56-1.17-1.25v-0.04c0.01-0.69,0.54-1.25,1.17-1.25c0.63,0,1.17,0.58,1.17,1.27 S52.72,11.76,52.08,11.76z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M36.08,14.24c0,0.13-0.1,0.23-0.23,0.23h-1.41c-0.13,0-0.23-0.11-0.23-0.23V9.68c0-0.98-0.74-1.71-1.62-1.71 c-0.8,0-1.46,0.7-1.59,1.62l0.01,4.66c0,0.13-0.11,0.23-0.23,0.23h-1.41c-0.13,0-0.23-0.11-0.23-0.23V9.68 c0-0.98-0.74-1.71-1.62-1.71c-0.85,0-1.54,0.79-1.6,1.8v4.48c0,0.13-0.1,0.23-0.23,0.23h-1.4c-0.13,0-0.23-0.11-0.23-0.23V6.74 c0.01-0.13,0.1-0.22,0.23-0.22h1.4c0.13,0,0.22,0.11,0.23,0.22V7.4c0.5-0.68,1.3-1.09,2.16-1.1h0.03c1.09,0,2.09,0.6,2.6,1.55 c0.45-0.95,1.4-1.55,2.44-1.56c1.62,0,2.93,1.25,2.9,2.78L36.08,14.24z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M84.34,13.59l-0.07-0.13l-1.96-2.99l1.94-2.95c0.44-0.67,0.26-1.56-0.41-2.02c-0.02,0-0.03,0-0.04-0.01 c-0.23-0.15-0.5-0.22-0.78-0.22h-1.61c-0.56,0-1.08,0.29-1.37,0.78L79.72,6.6l-0.34-0.56C79.09,5.56,78.57,5.27,78,5.27h-1.6 c-0.6,0-1.13,0.37-1.35,0.92c-2.19-1.66-5.28-1.47-7.26,0.45c-0.35,0.34-0.65,0.72-0.89,1.14c-0.9-1.62-2.58-2.72-4.5-2.72 c-0.5,0-1.01,0.07-1.48,0.23V3.51c0-0.82-0.66-1.48-1.47-1.48h-1.4c-0.81,0-1.47,0.66-1.47,1.47v3.75 c-0.95-1.36-2.5-2.18-4.17-2.19c-0.74,0-1.46,0.16-2.12,0.47c-0.24-0.17-0.54-0.26-0.84-0.26h-1.4c-0.45,0-0.87,0.21-1.15,0.56 c-0.02-0.03-0.04-0.05-0.07-0.08c-0.28-0.3-0.68-0.47-1.09-0.47h-1.39c-0.3,0-0.6,0.09-0.84,0.26c-0.67-0.3-1.39-0.46-2.12-0.46 c-1.83,0-3.43,1-4.37,2.5c-0.2-0.46-0.48-0.89-0.83-1.25c-0.8-0.81-1.89-1.25-3.02-1.25h-0.01c-0.89,0.01-1.75,0.33-2.46,0.88 c-0.74-0.57-1.64-0.88-2.57-0.88H28.1c-0.29,0-0.58,0.03-0.86,0.11c-0.28,0.06-0.56,0.16-0.82,0.28c-0.21-0.12-0.45-0.18-0.7-0.18 h-1.4c-0.82,0-1.47,0.66-1.47,1.47v7.5c0,0.82,0.66,1.47,1.47,1.47h1.4c0.82,0,1.48-0.66,1.48-1.48l0,0V9.79 c0.03-0.36,0.23-0.59,0.36-0.59c0.18,0,0.38,0.18,0.38,0.47v4.57c0,0.82,0.66,1.47,1.47,1.47h1.41c0.82,0,1.47-0.66,1.47-1.47 l-0.01-4.57c0.06-0.32,0.25-0.47,0.35-0.47c0.18,0,0.38,0.18,0.38,0.47v4.57c0,0.82,0.66,1.47,1.47,1.47h1.41 c0.82,0,1.47-0.66,1.47-1.47v-0.38c0.96,1.29,2.46,2.06,4.06,2.06c0.74,0,1.46-0.16,2.12-0.47c0.24,0.17,0.54,0.26,0.84,0.26h1.39 c0.3,0,0.6-0.09,0.84-0.26v2.01c0,0.82,0.66,1.47,1.47,1.47h1.4c0.82,0,1.47-0.66,1.47-1.47v-1.77c0.48,0.15,0.99,0.23,1.49,0.22 c1.7,0,3.22-0.87,4.17-2.2v0.52c0,0.82,0.66,1.47,1.47,1.47h1.4c0.3,0,0.6-0.09,0.84-0.26c0.66,0.31,1.39,0.47,2.12,0.47 c1.92,0,3.6-1.1,4.49-2.73c1.54,2.65,4.95,3.53,7.58,1.98c0.18-0.11,0.36-0.22,0.53-0.36c0.22,0.55,0.76,0.91,1.35,0.9H78 c0.56,0,1.08-0.29,1.37-0.78l0.37-0.61l0.37,0.61c0.29,0.48,0.81,0.78,1.38,0.78h1.6c0.81,0,1.46-0.66,1.45-1.46 C84.49,14.02,84.44,13.8,84.34,13.59L84.34,13.59z M35.86,14.47h-1.41c-0.13,0-0.23-0.11-0.23-0.23V9.68 c0-0.98-0.74-1.71-1.62-1.71c-0.8,0-1.46,0.7-1.59,1.62l0.01,4.66c0,0.13-0.1,0.23-0.23,0.23h-1.41c-0.13,0-0.23-0.11-0.23-0.23 V9.68c0-0.98-0.74-1.71-1.62-1.71c-0.85,0-1.54,0.79-1.6,1.8v4.48c0,0.13-0.1,0.23-0.23,0.23h-1.4c-0.13,0-0.23-0.11-0.23-0.23 V6.74c0.01-0.13,0.11-0.22,0.23-0.22h1.4c0.13,0,0.22,0.11,0.23,0.22V7.4c0.5-0.68,1.3-1.09,2.16-1.1h0.03 c1.09,0,2.09,0.6,2.6,1.55c0.45-0.95,1.4-1.55,2.44-1.56c1.62,0,2.93,1.25,2.9,2.78l0.01,5.16C36.09,14.36,35.98,14.46,35.86,14.47 L35.86,14.47z M45.97,14.24c0,0.13-0.1,0.23-0.23,0.23h-1.4c-0.13,0-0.23-0.11-0.23-0.23V13.5c-0.7,0.76-1.69,1.18-2.72,1.18 c-2.17,0-3.94-1.87-3.94-4.19s1.77-4.19,3.94-4.19c1.03,0,2.02,0.43,2.73,1.18V6.74c0-0.13,0.1-0.23,0.23-0.23h1.4 c0.12-0.01,0.22,0.08,0.23,0.21c0,0.01,0,0.01,0,0.02v7.51h-0.01V14.24z M52.41,14.67c-1.03,0-2.02-0.43-2.73-1.18v3.97 c0,0.13-0.1,0.23-0.23,0.23h-1.4c-0.13,0-0.23-0.1-0.23-0.23V6.75c0-0.13,0.1-0.22,0.23-0.22h1.4c0.13,0,0.23,0.11,0.23,0.23v0.73 c0.71-0.76,1.7-1.18,2.73-1.18c2.17,0,3.94,1.86,3.94,4.18S54.58,14.67,52.41,14.67z M66.24,11.39c-0.39,1.87-1.96,3.29-3.84,3.29 c-1.03,0-2.02-0.43-2.73-1.18v0.73c0,0.13-0.1,0.23-0.23,0.23h-1.4c-0.13,0-0.23-0.11-0.23-0.23V3.51c0-0.13,0.1-0.23,0.23-0.23 h1.4c0.13,0,0.23,0.11,0.23,0.23v3.97c0.71-0.75,1.7-1.18,2.73-1.17c1.88,0,3.45,1.4,3.84,3.28C66.37,10.19,66.37,10.8,66.24,11.39 L66.24,11.39L66.24,11.39z M71.67,14.68c-2,0.01-3.73-1.35-4.17-3.3c-0.13-0.59-0.13-1.19,0-1.77c0.44-1.94,2.17-3.31,4.17-3.3 c2.36,0,4.26,1.87,4.26,4.19S74.03,14.68,71.67,14.68L71.67,14.68z M83.04,14.47h-1.61c-0.13,0-0.24-0.06-0.3-0.17l-1.44-2.39 l-1.44,2.39c-0.06,0.11-0.18,0.17-0.3,0.17h-1.61c-0.04,0-0.08-0.01-0.12-0.03c-0.09-0.06-0.13-0.19-0.06-0.28l0,0l2.43-3.68 L76.2,6.84c-0.02-0.03-0.03-0.07-0.03-0.12c0-0.12,0.09-0.21,0.21-0.21h1.61c0.13,0,0.24,0.06,0.3,0.17l1.41,2.36l1.41-2.36 c0.06-0.11,0.18-0.17,0.3-0.17h1.61c0.04,0,0.08,0.01,0.12,0.03c0.09,0.06,0.13,0.19,0.06,0.28l0,0l-2.38,3.64l2.43,3.67 c0.02,0.03,0.03,0.07,0.03,0.12C83.25,14.38,83.16,14.47,83.04,14.47L83.04,14.47L83.04,14.47z"/%3E %3Cpath class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" d="M10.5,1.24c-5.11,0-9.25,4.15-9.25,9.25s4.15,9.25,9.25,9.25s9.25-4.15,9.25-9.25 C19.75,5.38,15.61,1.24,10.5,1.24z M14.89,12.77c-1.93,1.93-4.78,2.31-6.7,2.31c-0.7,0-1.41-0.05-2.1-0.16c0,0-1.02-5.64,2.14-8.81 c0.83-0.83,1.95-1.28,3.13-1.28c1.27,0,2.49,0.51,3.39,1.42C16.59,8.09,16.64,11,14.89,12.77z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M10.5-0.01C4.7-0.01,0,4.7,0,10.49s4.7,10.5,10.5,10.5S21,16.29,21,10.49C20.99,4.7,16.3-0.01,10.5-0.01z M10.5,19.74c-5.11,0-9.25-4.15-9.25-9.25s4.14-9.26,9.25-9.26s9.25,4.15,9.25,9.25C19.75,15.61,15.61,19.74,10.5,19.74z"/%3E %3Cpath class="st1" style="opacity:0.35; enable-background:new;" d="M14.74,6.25C12.9,4.41,9.98,4.35,8.23,6.1c-3.16,3.17-2.14,8.81-2.14,8.81s5.64,1.02,8.81-2.14 C16.64,11,16.59,8.09,14.74,6.25z M12.47,10.34l-0.91,1.87l-0.9-1.87L8.8,9.43l1.86-0.9l0.9-1.87l0.91,1.87l1.86,0.9L12.47,10.34z"/%3E %3Cpolygon class="st0" style="opacity:0.9; fill: %23FFFFFF; enable-background: new;" points="14.33,9.43 12.47,10.34 11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 "/%3E%3C/g%3E%3C/svg%3E\');' - } }; diff --git a/src/plots/mapbox/index.js b/src/plots/mapbox/index.js index 1dfb85b75fa..e01b89af81d 100644 --- a/src/plots/mapbox/index.js +++ b/src/plots/mapbox/index.js @@ -1,11 +1,9 @@ 'use strict'; -var mapboxgl = require('@plotly/mapbox-gl/dist/mapbox-gl-unminified'); - var Lib = require('../../lib'); var strTranslate = Lib.strTranslate; var strScale = Lib.strScale; -var getSubplotCalcData = require('../../plots/get_data').getSubplotCalcData; +var getSubplotCalcData = require('../get_data').getSubplotCalcData; var xmlnsNamespaces = require('../../constants/xmlns_namespaces'); var d3 = require('@plotly/d3'); var Drawing = require('../../components/drawing'); @@ -15,8 +13,6 @@ var Mapbox = require('./mapbox'); var MAPBOX = 'mapbox'; -var constants = exports.constants = require('./constants'); - exports.name = MAPBOX; exports.attr = 'subplot'; @@ -48,13 +44,6 @@ exports.plot = function plot(gd) { var calcData = gd.calcdata; var mapboxIds = fullLayout._subplots[MAPBOX]; - if(mapboxgl.version !== constants.requiredVersion) { - throw new Error(constants.wrongVersionErrorMsg); - } - - var accessToken = findAccessToken(gd, mapboxIds); - mapboxgl.accessToken = accessToken; - for(var i = 0; i < mapboxIds.length; i++) { var id = mapboxIds[i]; var subplotCalcData = getSubplotCalcData(calcData, MAPBOX, id); @@ -116,41 +105,9 @@ exports.toSVG = function(gd) { var subplotDiv = d3.select(opts._subplot.div); - // Append logo if visible - var hidden = subplotDiv.select('.mapboxgl-ctrl-logo').node().offsetParent === null; - if(!hidden) { - var logo = fullLayout._glimages.append('g'); - logo.attr('transform', strTranslate(size.l + size.w * domain.x[0] + 10, size.t + size.h * (1 - domain.y[0]) - 31)); - logo.append('path') - .attr('d', constants.mapboxLogo.path0) - .style({ - opacity: 0.9, - fill: '#ffffff', - 'enable-background': 'new' - }); - - logo.append('path') - .attr('d', constants.mapboxLogo.path1) - .style('opacity', 0.35) - .style('enable-background', 'new'); - - logo.append('path') - .attr('d', constants.mapboxLogo.path2) - .style('opacity', 0.35) - .style('enable-background', 'new'); - - logo.append('polygon') - .attr('points', constants.mapboxLogo.polygon) - .style({ - opacity: 0.9, - fill: '#ffffff', - 'enable-background': 'new' - }); - } - // Add attributions var attributions = subplotDiv - .select('.mapboxgl-ctrl-attrib').text() + .select('.maplibregl-ctrl-attrib').text() .replace('Improve this map', ''); var attributionGroup = fullLayout._glimages.append('g'); @@ -202,75 +159,6 @@ exports.toSVG = function(gd) { } }; -// N.B. mapbox-gl only allows one accessToken to be set per page: -// https://github.com/mapbox/mapbox-gl-js/issues/6331 -function findAccessToken(gd, mapboxIds) { - var fullLayout = gd._fullLayout; - var context = gd._context; - - // special case for Mapbox Atlas users - if(context.mapboxAccessToken === '') return ''; - - var tokensUseful = []; - var tokensListed = []; - var hasOneSetMapboxStyle = false; - var wontWork = false; - - // Take the first token we find in a mapbox subplot. - // These default to the context value but may be overridden. - for(var i = 0; i < mapboxIds.length; i++) { - var opts = fullLayout[mapboxIds[i]]; - var token = opts.accesstoken; - - if(isStyleRequireAccessToken(opts.style)) { - if(token) { - Lib.pushUnique(tokensUseful, token); - } else { - if(isStyleRequireAccessToken(opts._input.style)) { - Lib.error('Uses Mapbox map style, but did not set an access token.'); - hasOneSetMapboxStyle = true; - } - wontWork = true; - } - } - - if(token) { - Lib.pushUnique(tokensListed, token); - } - } - - if(wontWork) { - var msg = hasOneSetMapboxStyle ? - constants.noAccessTokenErrorMsg : - constants.missingStyleErrorMsg; - Lib.error(msg); - throw new Error(msg); - } - - if(tokensUseful.length) { - if(tokensUseful.length > 1) { - Lib.warn(constants.multipleTokensErrorMsg); - } - return tokensUseful[0]; - } else { - if(tokensListed.length) { - Lib.log([ - 'Listed mapbox access token(s)', tokensListed.join(','), - 'but did not use a Mapbox map style, ignoring token(s).' - ].join(' ')); - } - return ''; - } -} - -function isStyleRequireAccessToken(s) { - return typeof s === 'string' && ( - constants.styleValuesMapbox.indexOf(s) !== -1 || - s.indexOf('mapbox://') === 0 || - s.indexOf('stamen') === 0 - ); -} - exports.updateFx = function(gd) { var fullLayout = gd._fullLayout; var subplotIds = fullLayout._subplots[MAPBOX]; diff --git a/src/plots/mapbox/layout_attributes.js b/src/plots/mapbox/layout_attributes.js index 4e829ffd077..1152d0bfbd5 100644 --- a/src/plots/mapbox/layout_attributes.js +++ b/src/plots/mapbox/layout_attributes.js @@ -27,22 +27,9 @@ var attrs = module.exports = overrideAll({ domain: domainAttrs({name: 'mapbox'}), - accesstoken: { - valType: 'string', - noBlank: true, - strict: true, - description: [ - 'Sets the mapbox access token to be used for this mapbox map.', - 'Alternatively, the mapbox access token can be set in the', - 'configuration options under `mapboxAccessToken`.', - 'Note that accessToken are only required when `style`', - '(e.g with values :', constants.styleValuesMapbox.join(', '), ')', - 'and/or a layout layer references the Mapbox server.' - ].join(' ') - }, style: { valType: 'any', - values: constants.styleValuesMapbox.concat(constants.styleValuesNonMapbox), + values: constants.styleValuesMapbox, dflt: constants.styleValueDflt, description: [ 'Defines the map layers that are rendered by default below the trace layers defined in `data`,', @@ -50,21 +37,13 @@ var attrs = module.exports = overrideAll({ '', 'These layers can be defined either explicitly as a Mapbox Style object which can contain multiple', 'layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS)', - 'or implicitly by using one of the built-in style objects which use WMSes which do not require any', - 'access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of', - 'which require a Mapbox access token', - '', - 'Note that Mapbox access token can be set in the `accesstoken` attribute', - 'or in the `mapboxAccessToken` config option.', - '', - 'Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at', - 'https://docs.mapbox.com/mapbox-gl-js/style-spec', - '', - 'The built-in plotly.js styles objects are:', constants.styleValuesNonMapbox.join(', '), + 'or implicitly by using one of the built-in style objects which use WMSes', + 'or by using a custom style URL', '', - 'The built-in Mapbox styles are:', constants.styleValuesMapbox.join(', '), + 'Mapbox Style objects are of the form described in the MapLibre GL JS documentation available at', + 'https://maplibre.org/maplibre-style-spec/', '', - 'Mapbox style URLs are of the form: mapbox://mapbox.mapbox--' + 'The built-in plotly.js styles objects are:', constants.styleValuesMapbox.join(', ') + '.' ].join(' ') }, diff --git a/src/plots/mapbox/layout_defaults.js b/src/plots/mapbox/layout_defaults.js index 8fe4891a4f4..118a02e11cd 100644 --- a/src/plots/mapbox/layout_defaults.js +++ b/src/plots/mapbox/layout_defaults.js @@ -12,13 +12,11 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { type: 'mapbox', attributes: layoutAttributes, handleDefaults: handleDefaults, - partition: 'y', - accessToken: layoutOut._mapboxAccessToken + partition: 'y' }); }; -function handleDefaults(containerIn, containerOut, coerce, opts) { - coerce('accesstoken', opts.accessToken); +function handleDefaults(containerIn, containerOut, coerce) { coerce('style'); coerce('center.lon'); coerce('center.lat'); diff --git a/src/plots/mapbox/mapbox.js b/src/plots/mapbox/mapbox.js index fb85de019f2..7a5583dcdd4 100644 --- a/src/plots/mapbox/mapbox.js +++ b/src/plots/mapbox/mapbox.js @@ -1,6 +1,6 @@ 'use strict'; -var mapboxgl = require('@plotly/mapbox-gl/dist/mapbox-gl-unminified'); +var maplibregl = require('maplibre-gl/dist/maplibre-gl-unminified'); var Lib = require('../../lib'); var geoUtils = require('../../lib/geo_location_utils'); @@ -42,7 +42,6 @@ function Mapbox(gd, id) { // state variables used to infer how and what to update this.map = null; - this.accessToken = null; this.styleObj = null; this.traceHash = {}; this.layerList = []; @@ -55,16 +54,6 @@ var proto = Mapbox.prototype; proto.plot = function(calcData, fullLayout, promises) { var self = this; - var opts = fullLayout[self.id]; - - // remove map and create a new map if access token has change - if(self.map && (opts.accesstoken !== self.accessToken)) { - self.map.remove(); - self.map = null; - self.styleObj = null; - self.traceHash = {}; - self.layerList = []; - } var promise; @@ -86,16 +75,14 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { var opts = fullLayout[self.id]; // store style id and URL or object - var styleObj = self.styleObj = getStyleObj(opts.style, fullLayout); + var styleObj = self.styleObj = getStyleObj(opts.style); - // store access token associated with this map - self.accessToken = opts.accesstoken; var bounds = opts.bounds; var maxBounds = bounds ? [[bounds.west, bounds.south], [bounds.east, bounds.north]] : null; // create the map! - var map = self.map = new mapboxgl.Map({ + var map = self.map = new maplibregl.Map({ container: self.div, style: styleObj.style, @@ -113,10 +100,19 @@ proto.createMap = function(calcData, fullLayout, resolve, reject) { attributionControl: false }) - .addControl(new mapboxgl.AttributionControl({ + .addControl(new maplibregl.AttributionControl({ compact: true })); + map.setTransformRequest(function(url) { + url = url.replace('https://fonts.openmaptiles.org/Open Sans Extrabold', 'https://fonts.openmaptiles.org/Open Sans Extra Bold'); + url = url.replace('https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold', 'https://fonts.openmaptiles.org/Open Sans Extra Bold'); + url = url.replace('https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular', 'https://fonts.openmaptiles.org/Klokantech Noto Sans Regular'); + return { + url: url + }; + }); + // make sure canvas does not inherit left and top css map._canvas.style.left = '0px'; @@ -152,7 +148,7 @@ proto.updateMap = function(calcData, fullLayout, resolve, reject) { self.rejectOnError(reject); var promises = []; - var styleObj = getStyleObj(opts.style, fullLayout); + var styleObj = getStyleObj(opts.style); if(JSON.stringify(self.styleObj) !== JSON.stringify(styleObj)) { self.styleObj = styleObj; @@ -434,7 +430,7 @@ proto.initFx = function(calcData, fullLayout) { self.wheeling = false; } - if(fullLayoutNow._rehover) { + if(fullLayoutNow && fullLayoutNow._rehover) { fullLayoutNow._rehover(); } }); @@ -717,7 +713,7 @@ proto.addLayer = function(opts, below) { // convenience method to project a [lon, lat] array to pixel coords proto.project = function(v) { - return this.map.project(new mapboxgl.LngLat(v[0], v[1])); + return this.map.project(new maplibregl.LngLat(v[0], v[1])); }; // get map's current view values in plotly.js notation @@ -768,7 +764,7 @@ proto.getViewEditsWithDerived = function(cont) { return obj; }; -function getStyleObj(val, fullLayout) { +function getStyleObj(val) { var styleObj = {}; if(Lib.isPlainObject(val)) { @@ -777,20 +773,8 @@ function getStyleObj(val, fullLayout) { } else if(typeof val === 'string') { styleObj.id = val; - if(constants.styleValuesMapbox.indexOf(val) !== -1) { - styleObj.style = convertStyleVal(val); - } else if(constants.stylesNonMapbox[val]) { - styleObj.style = constants.stylesNonMapbox[val]; - var spec = styleObj.style.sources['plotly-' + val]; - var tiles = spec ? spec.tiles : undefined; - if( - tiles && - tiles[0] && - tiles[0].slice(-9) === '?api_key=' - ) { - // provide api_key for stamen styles - tiles[0] += fullLayout._mapboxAccessToken; - } + if(constants.stylesMapbox[val]) { + styleObj.style = constants.stylesMapbox[val]; } else { styleObj.style = val; } diff --git a/src/plots/plots.js b/src/plots/plots.js index e75d2066d83..c48178ad934 100644 --- a/src/plots/plots.js +++ b/src/plots/plots.js @@ -325,8 +325,6 @@ plots.supplyDefaults = function(gd, opts) { var formatObj = getFormatObj(gd, d3FormatKeys); - // stash the token from context so mapbox subplots can use it as default - newFullLayout._mapboxAccessToken = context.mapboxAccessToken; // first fill in what we can of layout without looking at data // because fullData needs a few things from layout diff --git a/src/registry.js b/src/registry.js index 20039e99a97..8732693b4d5 100644 --- a/src/registry.js +++ b/src/registry.js @@ -4,7 +4,6 @@ var Loggers = require('./lib/loggers'); var noop = require('./lib/noop'); var pushUnique = require('./lib/push_unique'); var isPlainObject = require('./lib/is_plain_object'); -var addStyleRule = require('./lib/dom').addStyleRule; var ExtendModule = require('./lib/extend'); var basePlotAttributes = require('./plots/attributes'); @@ -217,6 +216,18 @@ exports.call = function() { return exports.apiMethodRegistry[name].apply(null, args); }; +function addCss(fileName) { + var head = document.head; + var link = document.createElement('link'); + + link.type = 'text/css'; + link.rel = 'stylesheet'; + link.href = fileName; + + head.appendChild(link); +} + + function registerTraceModule(_module) { var thisType = _module.name; var categoriesIn = _module.categories; @@ -264,12 +275,9 @@ function registerTraceModule(_module) { var basePlotModule = _module.basePlotModule; var bpmName = basePlotModule.name; - // add mapbox-gl CSS here to avoid console warning on instantiation + // add maplibre-gl CSS here to avoid console warning on instantiation if(bpmName === 'mapbox') { - var styleRules = basePlotModule.constants.styleRules; - for(var k in styleRules) { - addStyleRule('.js-plotly-plot .plotly .mapboxgl-' + k, styleRules[k]); - } + addCss('https://unpkg.com/maplibre-gl@^4.3.2/dist/maplibre-gl.css'); } // if `plotly-geo-assets.js` is not included, diff --git a/src/snapshot/cloneplot.js b/src/snapshot/cloneplot.js index b210c6d673e..b864816566d 100644 --- a/src/snapshot/cloneplot.js +++ b/src/snapshot/cloneplot.js @@ -55,7 +55,6 @@ module.exports = function clonePlot(graphObj, options) { var oldLayout = graphObj.layout; var newData = extendDeep([], oldData); var newLayout = extendDeep({}, oldLayout, cloneLayoutOverride(options.tileClass)); - var context = graphObj._context || {}; if(options.width) newLayout.width = options.width; if(options.height) newLayout.height = options.height; @@ -143,7 +142,6 @@ module.exports = function clonePlot(graphObj, options) { displaylogo: options.displaylogo || false, showLink: options.showLink || false, showTips: options.showTips || false, - mapboxAccessToken: context.mapboxAccessToken } }; diff --git a/src/traces/densitymapbox/convert.js b/src/traces/densitymapbox/convert.js index 5dc11b89a30..9b133504d6b 100644 --- a/src/traces/densitymapbox/convert.js +++ b/src/traces/densitymapbox/convert.js @@ -64,7 +64,7 @@ module.exports = function convert(calcTrace) { // Add alpha channel to first colorscale step. // If not, we would essentially color the entire map. - // See https://docs.mapbox.com/mapbox-gl-js/example/heatmap-layer/ + // See https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/ var scl01 = scl[0][1]; var color0 = Color.opacity(scl01) < 1 ? scl01 : Color.addOpacity(scl01, 0); diff --git a/src/traces/scattermapbox/index.js b/src/traces/scattermapbox/index.js index 5a93d8e2c70..5a449fb9c47 100644 --- a/src/traces/scattermapbox/index.js +++ b/src/traces/scattermapbox/index.js @@ -26,7 +26,7 @@ module.exports = { hrName: 'scatter_mapbox', description: [ 'The data visualized as scatter point, lines or marker symbols', - 'on a Mapbox GL geographic map', + 'on a MapLibre GL geographic map', 'is provided by longitude/latitude pairs in `lon` and `lat`.' ].join(' ') } diff --git a/tasks/noci_test.sh b/tasks/noci_test.sh index 4d50039e206..98fe73bc601 100755 --- a/tasks/noci_test.sh +++ b/tasks/noci_test.sh @@ -22,29 +22,12 @@ test_jasmine () { npm run test-jasmine -- --tags=noCI,noCIdep --nowatch || EXIT_STATE=$? } -# having problem creating baselines for 2 mapbox mocks using kaleido -# we must use orca -test_image () { - $root/../orca/bin/orca.js graph \ - $root/test/image/mocks/mapbox_osm-style.json \ - $root/test/image/mocks/mapbox_density0-legend.json \ - --mathjax $root/node_modules/mathjax-v2/MathJax.js \ - --plotly $root/build/plotly.js \ - --mapbox-access-token "pk.eyJ1IjoicGxvdGx5LWRvY3MiLCJhIjoiY2xpMGYyNWgxMGJhdzNzbXhtNGI0Nnk0aSJ9.0oBvi_UUZ0O1N0xk0yfRwg" \ - --output-dir $root/test/image/baselines/ \ - --verbose || EXIT_STATE=$? -} - case $1 in jasmine) test_jasmine ;; - image) - test_image - ;; *) test_jasmine - test_image ;; esac diff --git a/tasks/pretest.js b/tasks/pretest.js index 89b6ab3846f..a768f1182c6 100644 --- a/tasks/pretest.js +++ b/tasks/pretest.js @@ -4,19 +4,8 @@ var constants = require('./util/constants'); var common = require('./util/common'); // main -makeCredentialsFile(); makeTestImageFolders(); -// Create a credentials json file, -// to be required in jasmine test suites and test dashboard -function makeCredentialsFile() { - var credentials = JSON.stringify({ - MAPBOX_ACCESS_TOKEN: constants.mapboxAccessToken - }, null, 2); - - common.writeFile(constants.pathToCredentials, credentials); - logger('make build/credentials.json'); -} // Make artifact folders for image tests function makeTestImageFolders() { diff --git a/tasks/util/constants.js b/tasks/util/constants.js index cc29bd49276..948719bb211 100644 --- a/tasks/util/constants.js +++ b/tasks/util/constants.js @@ -237,10 +237,6 @@ module.exports = { pathToJasmineTests: path.join(pathToRoot, 'test/jasmine/tests'), pathToJasmineBundleTests: path.join(pathToRoot, 'test/jasmine/bundle_tests'), - // this mapbox access token is 'public', no need to hide it - // more info: https://www.mapbox.com/help/define-access-token/ - mapboxAccessToken: 'pk.eyJ1IjoicGxvdGx5LWRvY3MiLCJhIjoiY2xpMGYyNWgxMGJhdzNzbXhtNGI0Nnk0aSJ9.0oBvi_UUZ0O1N0xk0yfRwg', - pathToCredentials: path.join(pathToBuild, 'credentials.json'), testContainerImage: 'plotly/testbed:latest', testContainerName: process.env.PLOTLYJS_TEST_CONTAINER_NAME || 'imagetest', diff --git a/test/image/baselines/mapbox_0.png b/test/image/baselines/mapbox_0.png index fcb6d98db3e..d0f0b0319e9 100644 Binary files a/test/image/baselines/mapbox_0.png and b/test/image/baselines/mapbox_0.png differ diff --git a/test/image/baselines/mapbox_angles.png b/test/image/baselines/mapbox_angles.png index 5e6bbb5355b..4873b9a499b 100644 Binary files a/test/image/baselines/mapbox_angles.png and b/test/image/baselines/mapbox_angles.png differ diff --git a/test/image/baselines/mapbox_bubbles-text.png b/test/image/baselines/mapbox_bubbles-text.png index e9b72df1095..8c6de876e7a 100644 Binary files a/test/image/baselines/mapbox_bubbles-text.png and b/test/image/baselines/mapbox_bubbles-text.png differ diff --git a/test/image/baselines/mapbox_bubbles.png b/test/image/baselines/mapbox_bubbles.png index 7af878af6a7..b931416eb68 100644 Binary files a/test/image/baselines/mapbox_bubbles.png and b/test/image/baselines/mapbox_bubbles.png differ diff --git a/test/image/baselines/mapbox_carto-style.png b/test/image/baselines/mapbox_carto-style.png index 5c3266e87c2..f05a18062fe 100644 Binary files a/test/image/baselines/mapbox_carto-style.png and b/test/image/baselines/mapbox_carto-style.png differ diff --git a/test/image/baselines/mapbox_carto-text.png b/test/image/baselines/mapbox_carto-text.png index 490029437c4..b2db2139043 100644 Binary files a/test/image/baselines/mapbox_carto-text.png and b/test/image/baselines/mapbox_carto-text.png differ diff --git a/test/image/baselines/mapbox_choropleth-multiple.png b/test/image/baselines/mapbox_choropleth-multiple.png index 0aad2f170ef..ac110ee13cd 100644 Binary files a/test/image/baselines/mapbox_choropleth-multiple.png and b/test/image/baselines/mapbox_choropleth-multiple.png differ diff --git a/test/image/baselines/mapbox_choropleth-raw-geojson.png b/test/image/baselines/mapbox_choropleth-raw-geojson.png index c24bc368021..4b1c8d69242 100644 Binary files a/test/image/baselines/mapbox_choropleth-raw-geojson.png and b/test/image/baselines/mapbox_choropleth-raw-geojson.png differ diff --git a/test/image/baselines/mapbox_choropleth0-legend.png b/test/image/baselines/mapbox_choropleth0-legend.png index 89fadb9b8e6..0084b155b47 100644 Binary files a/test/image/baselines/mapbox_choropleth0-legend.png and b/test/image/baselines/mapbox_choropleth0-legend.png differ diff --git a/test/image/baselines/mapbox_choropleth0.png b/test/image/baselines/mapbox_choropleth0.png index 729b347693a..d62b97547f8 100644 Binary files a/test/image/baselines/mapbox_choropleth0.png and b/test/image/baselines/mapbox_choropleth0.png differ diff --git a/test/image/baselines/mapbox_connectgaps.png b/test/image/baselines/mapbox_connectgaps.png index 3bf4f38c704..9eca6b08bf1 100644 Binary files a/test/image/baselines/mapbox_connectgaps.png and b/test/image/baselines/mapbox_connectgaps.png differ diff --git a/test/image/baselines/mapbox_custom-style.png b/test/image/baselines/mapbox_custom-style.png index ef8db778507..10672d90d50 100644 Binary files a/test/image/baselines/mapbox_custom-style.png and b/test/image/baselines/mapbox_custom-style.png differ diff --git a/test/image/baselines/mapbox_density-multiple.png b/test/image/baselines/mapbox_density-multiple.png index c0320fa3aa5..b4de65c44f3 100644 Binary files a/test/image/baselines/mapbox_density-multiple.png and b/test/image/baselines/mapbox_density-multiple.png differ diff --git a/test/image/baselines/mapbox_density-multiple_legend.png b/test/image/baselines/mapbox_density-multiple_legend.png index b22ce481f17..f20de173cb1 100644 Binary files a/test/image/baselines/mapbox_density-multiple_legend.png and b/test/image/baselines/mapbox_density-multiple_legend.png differ diff --git a/test/image/baselines/mapbox_density0-legend.png b/test/image/baselines/mapbox_density0-legend.png index 59529644c16..20a8daa42d2 100644 Binary files a/test/image/baselines/mapbox_density0-legend.png and b/test/image/baselines/mapbox_density0-legend.png differ diff --git a/test/image/baselines/mapbox_density0.png b/test/image/baselines/mapbox_density0.png index 1e0fddd2c98..1f25cdc9693 100644 Binary files a/test/image/baselines/mapbox_density0.png and b/test/image/baselines/mapbox_density0.png differ diff --git a/test/image/baselines/mapbox_earthquake-density.png b/test/image/baselines/mapbox_earthquake-density.png index ae5056fb10a..8df3af12987 100644 Binary files a/test/image/baselines/mapbox_earthquake-density.png and b/test/image/baselines/mapbox_earthquake-density.png differ diff --git a/test/image/baselines/mapbox_fill.png b/test/image/baselines/mapbox_fill.png index b721239ba0e..cd52700e54b 100644 Binary files a/test/image/baselines/mapbox_fill.png and b/test/image/baselines/mapbox_fill.png differ diff --git a/test/image/baselines/mapbox_fonts-supported-metropolis-italic.png b/test/image/baselines/mapbox_fonts-supported-metropolis-italic.png index 378be30d784..42c337a345e 100644 Binary files a/test/image/baselines/mapbox_fonts-supported-metropolis-italic.png and b/test/image/baselines/mapbox_fonts-supported-metropolis-italic.png differ diff --git a/test/image/baselines/mapbox_fonts-supported-metropolis-weight.png b/test/image/baselines/mapbox_fonts-supported-metropolis-weight.png index 21643f6ecb3..f73f6842386 100644 Binary files a/test/image/baselines/mapbox_fonts-supported-metropolis-weight.png and b/test/image/baselines/mapbox_fonts-supported-metropolis-weight.png differ diff --git a/test/image/baselines/mapbox_fonts-supported-metropolis.png b/test/image/baselines/mapbox_fonts-supported-metropolis.png index 21643f6ecb3..f73f6842386 100644 Binary files a/test/image/baselines/mapbox_fonts-supported-metropolis.png and b/test/image/baselines/mapbox_fonts-supported-metropolis.png differ diff --git a/test/image/baselines/mapbox_fonts-supported-open-sans-weight.png b/test/image/baselines/mapbox_fonts-supported-open-sans-weight.png index 4b1e4ba38a8..f5ae9a81828 100644 Binary files a/test/image/baselines/mapbox_fonts-supported-open-sans-weight.png and b/test/image/baselines/mapbox_fonts-supported-open-sans-weight.png differ diff --git a/test/image/baselines/mapbox_fonts-supported-open-sans.png b/test/image/baselines/mapbox_fonts-supported-open-sans.png index 4b1e4ba38a8..f5ae9a81828 100644 Binary files a/test/image/baselines/mapbox_fonts-supported-open-sans.png and b/test/image/baselines/mapbox_fonts-supported-open-sans.png differ diff --git a/test/image/baselines/mapbox_geojson-attributes.png b/test/image/baselines/mapbox_geojson-attributes.png index 54452862087..9796e85cfa6 100644 Binary files a/test/image/baselines/mapbox_geojson-attributes.png and b/test/image/baselines/mapbox_geojson-attributes.png differ diff --git a/test/image/baselines/mapbox_layers.png b/test/image/baselines/mapbox_layers.png index 4d982f243b3..f521708cce1 100644 Binary files a/test/image/baselines/mapbox_layers.png and b/test/image/baselines/mapbox_layers.png differ diff --git a/test/image/baselines/mapbox_osm-style.png b/test/image/baselines/mapbox_osm-style.png index c5e360e1e3b..fdc63fb8dd5 100644 Binary files a/test/image/baselines/mapbox_osm-style.png and b/test/image/baselines/mapbox_osm-style.png differ diff --git a/test/image/baselines/mapbox_scattercluster.png b/test/image/baselines/mapbox_scattercluster.png index ef7ca7834ff..a146ed49732 100644 Binary files a/test/image/baselines/mapbox_scattercluster.png and b/test/image/baselines/mapbox_scattercluster.png differ diff --git a/test/image/baselines/mapbox_symbol-text.png b/test/image/baselines/mapbox_symbol-text.png index 3dd8292f383..5a0513055eb 100644 Binary files a/test/image/baselines/mapbox_symbol-text.png and b/test/image/baselines/mapbox_symbol-text.png differ diff --git a/test/image/baselines/mapbox_texttemplate.png b/test/image/baselines/mapbox_texttemplate.png index 2d8ec42649b..9bbe36ff230 100644 Binary files a/test/image/baselines/mapbox_texttemplate.png and b/test/image/baselines/mapbox_texttemplate.png differ diff --git a/test/image/baselines/pie_textpad_radial.png b/test/image/baselines/pie_textpad_radial.png index 236b381d089..20733b24acc 100644 Binary files a/test/image/baselines/pie_textpad_radial.png and b/test/image/baselines/pie_textpad_radial.png differ diff --git a/test/image/baselines/ternary-mathjax.png b/test/image/baselines/ternary-mathjax.png index ad0cebb9730..dadffbb51a7 100644 Binary files a/test/image/baselines/ternary-mathjax.png and b/test/image/baselines/ternary-mathjax.png differ diff --git a/test/image/baselines/treemap_sunburst_marker_colors.png b/test/image/baselines/treemap_sunburst_marker_colors.png index 2ad27d25deb..3de4376b7a6 100644 Binary files a/test/image/baselines/treemap_sunburst_marker_colors.png and b/test/image/baselines/treemap_sunburst_marker_colors.png differ diff --git a/test/image/compare_pixels_test.js b/test/image/compare_pixels_test.js index 8d0991752aa..eff421122eb 100644 --- a/test/image/compare_pixels_test.js +++ b/test/image/compare_pixels_test.js @@ -60,15 +60,15 @@ argv._.forEach(function(pattern) { } }); -allMockList = allMockList.filter(function(a) { - return ( - // used to pass before 2023 Jun 20 - a !== 'mapbox_stamen-style' && - - // skip for now | TODO: figure out why needed this in https://github.com/plotly/plotly.js/pull/6610 - a !== 'mapbox_custom-style' - ); -}); +var blacklist = [ + 'gl2d_pointcloud-basic', + 'gl2d_heatmapgl', + 'gl2d_heatmapgl_discrete', + 'mapbox_stamen-style', + 'plot_types', + 'trace_metatext', + 'zz-gl3d_surface_small_timerange', +]; if(virtualWebgl) { allMockList = allMockList.filter(function(a) { @@ -106,12 +106,7 @@ for(var i = 0; i < allMockList.length; i++) { var mockName = allMockList[i]; // skip blacklist - if([ - 'mapbox_density0-legend', - 'mapbox_osm-style' - ].indexOf(mockName) !== -1) { - continue; - } + if(blacklist.indexOf(mockName) !== -1) continue; var isMapbox = mockName.substr(0, 7) === 'mapbox_'; var isOtherFlaky = [ @@ -164,10 +159,6 @@ for(var i = 0; i < allMockList.length; i++) { var threshold = shouldBePixelPerfect ? 0 : [ // more flaky - 'mapbox_angles', - 'mapbox_layers', - 'mapbox_custom-style', - 'mapbox_geojson-attributes' ].indexOf(mockName) !== -1 ? 1 : 0.15; if(virtualWebgl) { diff --git a/test/image/make_baseline.py b/test/image/make_baseline.py index 3c0b50d1bc5..dae22e4d819 100644 --- a/test/image/make_baseline.py +++ b/test/image/make_baseline.py @@ -55,10 +55,6 @@ pio.kaleido.scope.plotlyjs = plotlyjs pio.templates.default = 'none' -_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r') -pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN'] -_credentials.close() - ALL_MOCKS = [os.path.splitext(a)[0] for a in os.listdir(dirIn) if a.endswith('.json')] ALL_MOCKS.sort() @@ -95,10 +91,13 @@ # unable to generate baselines for the following mocks blacklist = [ - 'mapbox_density0-legend', - 'mapbox_osm-style', - 'mapbox_stamen-style', # Could pass by setting mapboxAccessToken to a stadiamaps.com token - 'mapbox_custom-style' # Figure out why needed this in https://github.com/plotly/plotly.js/pull/6610 + 'gl2d_pointcloud-basic', + 'gl2d_heatmapgl', + 'gl2d_heatmapgl_discrete', + 'mapbox_stamen-style', + 'plot_types', + 'trace_metatext', + 'zz-gl3d_surface_small_timerange', ] allNames = [a for a in allNames if a not in blacklist] diff --git a/test/image/make_exports.py b/test/image/make_exports.py index e00fd79bdf1..33fc05f3b45 100644 --- a/test/image/make_exports.py +++ b/test/image/make_exports.py @@ -10,10 +10,6 @@ pio.templates.default = 'none' pio.kaleido.scope.plotlyjs = os.path.join(root, 'build', 'plotly.js') -_credentials = open(os.path.join(root, 'build', 'credentials.json'), 'r') -pio.kaleido.scope.mapbox_access_token = json.load(_credentials)['MAPBOX_ACCESS_TOKEN'] -_credentials.close() - allFormats = ['svg', 'jpg', 'jpeg', 'webp', 'eps', 'pdf'] # 'png' is tested by image-test diff --git a/test/image/mocks/mapbox_custom-style.json b/test/image/mocks/mapbox_custom-style.json index 58fb4a38322..dbc0632c8cf 100644 --- a/test/image/mocks/mapbox_custom-style.json +++ b/test/image/mocks/mapbox_custom-style.json @@ -48,7 +48,7 @@ ], "layout": { "mapbox": { - "style": "mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m", + "style": "carto-positron", "center": { "lon": -73.60287319770295, "lat": 45.50110152988742 @@ -56,7 +56,7 @@ "zoom": 11.4 }, "mapbox2": { - "style": "satellite-streets", + "style": "satellite", "center": { "lon": -73.60287319770295, "lat": 45.50110152988742 diff --git a/test/image/mocks/mapbox_layers.json b/test/image/mocks/mapbox_layers.json index ce1bfe36e3d..34af1d98da7 100644 --- a/test/image/mocks/mapbox_layers.json +++ b/test/image/mocks/mapbox_layers.json @@ -539,23 +539,13 @@ "below": "water", "color": "#ece2f0", "opacity": 0.8 - }, - { - "sourcetype": "vector", - "source": "mapbox://mapbox.mapbox-terrain-v2", - "sourcelayer": "contour", - "type": "line", - "color": "red", - "line": { - "width": 2 - } } ] }, "mapbox2": { "domain": {"x": [0.52, 1], "y": [0, 1]}, - "style": "mapbox://styles/mapbox/light-v10", + "style": "https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json", "zoom": 4.5, "center": {"lon": -74.5, "lat": 42}, "layers": [ diff --git a/test/jasmine/bundle_tests/minified_bundle_test.js b/test/jasmine/bundle_tests/minified_bundle_test.js index 9c83946a28c..00cee0d829d 100644 --- a/test/jasmine/bundle_tests/minified_bundle_test.js +++ b/test/jasmine/bundle_tests/minified_bundle_test.js @@ -1,6 +1,6 @@ /* global Plotly:false */ -var MAPBOX_ACCESS_TOKEN = require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN; + var mockLists = require('../assets/mock_lists'); // only needed for mapbox subplots @@ -17,7 +17,7 @@ describe('Test plotly.min.js', function() { }); Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN + }); mockLists.all.forEach(function(mockSpec) { diff --git a/test/jasmine/tests/choroplethmapbox_test.js b/test/jasmine/tests/choroplethmapbox_test.js index df061c8fcd0..1bc3bc34b5a 100644 --- a/test/jasmine/tests/choroplethmapbox_test.js +++ b/test/jasmine/tests/choroplethmapbox_test.js @@ -4,7 +4,6 @@ var Lib = require('../../../src/lib'); var loggers = require('../../../src/lib/loggers'); var convertModule = require('../../../src/traces/choroplethmapbox/convert'); -var MAPBOX_ACCESS_TOKEN = require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN; var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); @@ -550,7 +549,7 @@ describe('Test choroplethmapbox hover:', function() { if(!fig.layout) fig.layout = {}; if(!fig.layout.mapbox) fig.layout.mapbox = {}; - fig.layout.mapbox.accesstoken = MAPBOX_ACCESS_TOKEN; + var pos = s.pos || [270, 220]; @@ -710,19 +709,19 @@ describe('Test choroplethmapbox interactions:', function() { Plotly.newPlot(gd, [trace0, trace1], - {mapbox: {style: 'basic'}}, - {mapboxAccessToken: MAPBOX_ACCESS_TOKEN} + {mapbox: {style: 'carto-positron'}}, + {} ) .then(function() { - _assert('base', { layerCnt: 24 }); + _assert('base', { layerCnt: 97 }); }) .then(function() { return Plotly.deleteTraces(gd, [0]); }) .then(function() { - _assert('w/o trace0', { layerCnt: 22 }); + _assert('w/o trace0', { layerCnt: 95 }); }) .then(function() { return Plotly.addTraces(gd, [trace0]); }) .then(function() { - _assert('after adding trace0', { layerCnt: 24 }); + _assert('after adding trace0', { layerCnt: 97 }); }) .then(done, done.fail); }); @@ -741,52 +740,28 @@ describe('Test choroplethmapbox interactions:', function() { z: [10], geojson: geojson, uid: 'a' - }], {}, {mapboxAccessToken: MAPBOX_ACCESS_TOKEN}) + }], {}, {}) .then(function() { expect(getLayerIds()).withContext('default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber' ]); }) .then(function() { return Plotly.restyle(gd, 'below', ''); }) .then(function() { expect(getLayerIds()).withContext('*below* set to \'\'').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label', - 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber', 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line' ]); }) .then(function() { return Plotly.restyle(gd, 'below', 'place_label_other'); }) .then(function() { expect(getLayerIds()).withContext('*below* set to same base layer').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line', - 'place_label_other', 'place_label_city', 'country_label', + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber', 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line' ]); }) .then(function() { return Plotly.restyle(gd, 'below', null); }) .then(function() { expect(getLayerIds()).withContext('back to default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'plotly-trace-layer-a-fill', 'plotly-trace-layer-a-line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber' ]); }) .then(done, done.fail); diff --git a/test/jasmine/tests/densitymapbox_test.js b/test/jasmine/tests/densitymapbox_test.js index c8cadd7cefb..8336c843b32 100644 --- a/test/jasmine/tests/densitymapbox_test.js +++ b/test/jasmine/tests/densitymapbox_test.js @@ -3,7 +3,7 @@ var Plots = require('../../../src/plots/plots'); var Lib = require('../../../src/lib'); var convert = require('../../../src/traces/densitymapbox/convert'); -var MAPBOX_ACCESS_TOKEN = require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN; + var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); @@ -292,7 +292,7 @@ describe('Test densitymapbox hover:', function() { if(!fig.layout) fig.layout = {}; if(!fig.layout.mapbox) fig.layout.mapbox = {}; - fig.layout.mapbox.accesstoken = MAPBOX_ACCESS_TOKEN; + var pos = s.pos || [353, 143]; @@ -413,18 +413,18 @@ describe('Test densitymapbox interactions:', function() { Plotly.newPlot(gd, [trace0, trace1], {mapbox: {style: 'basic'}}, - {mapboxAccessToken: MAPBOX_ACCESS_TOKEN} + {} ) .then(function() { - _assert('base', { layerCnt: 22 }); + _assert('base', { layerCnt: 95 }); }) .then(function() { return Plotly.deleteTraces(gd, [0]); }) .then(function() { - _assert('w/o trace0', { layerCnt: 21 }); + _assert('w/o trace0', { layerCnt: 94 }); }) .then(function() { return Plotly.addTraces(gd, [trace0]); }) .then(function() { - _assert('after adding trace0', { layerCnt: 22 }); + _assert('after adding trace0', { layerCnt: 95 }); }) .then(done, done.fail); }); @@ -443,54 +443,28 @@ describe('Test densitymapbox interactions:', function() { lat: [15, 25, 35], z: [1, 20, 5], uid: 'a' - }], {}, {mapboxAccessToken: MAPBOX_ACCESS_TOKEN}) + }], {}, {}) .then(function() { expect(getLayerIds()).withContext('default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', - 'plotly-trace-layer-a-heatmap', - 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'plotly-trace-layer-a-heatmap', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber' ]); }) .then(function() { return Plotly.restyle(gd, 'below', ''); }) .then(function() { expect(getLayerIds()).withContext('default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label', - 'plotly-trace-layer-a-heatmap' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber', 'plotly-trace-layer-a-heatmap' ]); }) .then(function() { return Plotly.restyle(gd, 'below', 'place_label_other'); }) .then(function() { expect(getLayerIds()).withContext('default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', 'poi_label', 'road_major_label', - 'plotly-trace-layer-a-heatmap', - 'place_label_other', 'place_label_city', 'country_label', + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber', 'plotly-trace-layer-a-heatmap' ]); }) .then(function() { return Plotly.restyle(gd, 'below', null); }) .then(function() { expect(getLayerIds()).withContext('back to default *below*').toEqual([ - 'background', 'landuse_overlay_national_park', 'landuse_park', - 'waterway', 'water', - 'building', 'tunnel_minor', 'tunnel_major', 'road_minor', 'road_major', - 'bridge_minor case', 'bridge_major case', 'bridge_minor', 'bridge_major', - 'admin_country', - 'plotly-trace-layer-a-heatmap', - 'poi_label', 'road_major_label', - 'place_label_other', 'place_label_city', 'country_label' + 'background', 'landcover', 'park_national_park', 'park_nature_reserve', 'landuse_residential', 'landuse', 'waterway', 'boundary_county', 'boundary_state', 'water', 'water_shadow', 'aeroway-runway', 'aeroway-taxiway', 'plotly-trace-layer-a-heatmap', 'waterway_label', 'tunnel_service_case', 'tunnel_minor_case', 'tunnel_sec_case', 'tunnel_pri_case', 'tunnel_trunk_case', 'tunnel_mot_case', 'tunnel_path', 'tunnel_service_fill', 'tunnel_minor_fill', 'tunnel_sec_fill', 'tunnel_pri_fill', 'tunnel_trunk_fill', 'tunnel_mot_fill', 'tunnel_rail', 'tunnel_rail_dash', 'road_service_case', 'road_minor_case', 'road_pri_case_ramp', 'road_trunk_case_ramp', 'road_mot_case_ramp', 'road_sec_case_noramp', 'road_pri_case_noramp', 'road_trunk_case_noramp', 'road_mot_case_noramp', 'road_path', 'road_service_fill', 'road_minor_fill', 'road_pri_fill_ramp', 'road_trunk_fill_ramp', 'road_mot_fill_ramp', 'road_sec_fill_noramp', 'road_pri_fill_noramp', 'road_trunk_fill_noramp', 'road_mot_fill_noramp', 'rail', 'rail_dash', 'bridge_service_case', 'bridge_minor_case', 'bridge_sec_case', 'bridge_pri_case', 'bridge_trunk_case', 'bridge_mot_case', 'bridge_path', 'bridge_service_fill', 'bridge_minor_fill', 'bridge_sec_fill', 'bridge_pri_fill', 'bridge_trunk_fill', 'bridge_mot_fill', 'building', 'building-top', 'boundary_country_outline', 'boundary_country_inner', 'watername_ocean', 'watername_sea', 'watername_lake', 'watername_lake_line', 'place_hamlet', 'place_suburbs', 'place_villages', 'place_town', 'place_country_2', 'place_country_1', 'place_state', 'place_continent', 'place_city_r6', 'place_city_r5', 'place_city_dot_r7', 'place_city_dot_r4', 'place_city_dot_r2', 'place_city_dot_z7', 'place_capital_dot_z7', 'poi_stadium', 'poi_park', 'roadname_minor', 'roadname_sec', 'roadname_pri', 'roadname_major', 'housenumber' ]); }) .then(done, done.fail); @@ -511,7 +485,7 @@ describe('Test densitymapbox interactions:', function() { lat: [15, 25, 35], z: [1, 20, 5] }], {}, { - mapboxAccessToken: MAPBOX_ACCESS_TOKEN + }) .then(function() { _assert('after first', 'densitymapbox'); }) .then(function() { return Plotly.restyle(gd, 'type', 'scattermapbox'); }) diff --git a/test/jasmine/tests/draw_newselection_test.js b/test/jasmine/tests/draw_newselection_test.js index e41bf917af6..4f7f47d155c 100644 --- a/test/jasmine/tests/draw_newselection_test.js +++ b/test/jasmine/tests/draw_newselection_test.js @@ -279,7 +279,7 @@ describe('Draw new selections to layout', function() { data: fig.data, layout: fig.layout, config: { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN + } }) .then(function() { diff --git a/test/jasmine/tests/draw_newshape_test.js b/test/jasmine/tests/draw_newshape_test.js index 62419944a58..c2f5043b04d 100644 --- a/test/jasmine/tests/draw_newshape_test.js +++ b/test/jasmine/tests/draw_newshape_test.js @@ -769,7 +769,7 @@ describe('Draw new shapes to layout', function() { data: fig.data, layout: fig.layout, config: { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN + } }) .then(function() { diff --git a/test/jasmine/tests/mapbox_test.js b/test/jasmine/tests/mapbox_test.js index 25784aa8840..a80ca102bb3 100644 --- a/test/jasmine/tests/mapbox_test.js +++ b/test/jasmine/tests/mapbox_test.js @@ -2,7 +2,6 @@ var Plotly = require('../../../lib/index'); var Lib = require('../../../src/lib'); var Fx = require('../../../src/components/fx'); -var constants = require('../../../src/plots/mapbox/constants'); var supplyLayoutDefaults = require('../../../src/plots/mapbox/layout_defaults'); var d3Select = require('../../strict-d3').select; @@ -25,7 +24,6 @@ var SORTED_EVENT_KEYS = [ 'bbox' ].sort(); -var MAPBOX_ACCESS_TOKEN = require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN; var TRANSITION_DELAY = 500; var MOUSE_DELAY = 100; var LONG_TIMEOUT_INTERVAL = 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL; @@ -33,7 +31,7 @@ var LONG_TIMEOUT_INTERVAL = 5 * jasmine.DEFAULT_TIMEOUT_INTERVAL; var noop = function() {}; Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN + }); describe('mapbox defaults', function() { @@ -247,252 +245,6 @@ describe('mapbox defaults', function() { }); }); -describe('mapbox credentials', function() { - var gd; - - var dummyToken = 'asfdsa124331wersdsa1321q3'; - - var osmStyle = { - id: 'osm', - version: 8, - sources: { - 'osm-tiles': { - type: 'raster', - tiles: [ - 'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png', - 'https://b.tile.openstreetmap.org/{z}/{x}/{y}.png' - ], - tileSize: 256 - } - }, - layers: [{ - id: 'osm-tiles', - type: 'raster', - source: 'osm-tiles', - minzoom: 0, - maxzoom: 22 - }] - }; - - beforeEach(function() { - gd = createGraphDiv(); - - Plotly.setPlotConfig({ - mapboxAccessToken: null - }); - }); - - afterEach(function() { - Plotly.purge(gd); - destroyGraphDiv(); - - Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }); - }); - - it('@gl should throw error when no non-mapbox style is set and missing a mapbox access token token', function() { - spyOn(Lib, 'error'); - - expect(function() { - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }]); - }).toThrow(new Error(constants.missingStyleErrorMsg)); - - expect(Lib.error).toHaveBeenCalledWith(constants.missingStyleErrorMsg); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should throw error when setting a Mapbox style w/o a registered token', function() { - spyOn(Lib, 'error'); - - expect(function() { - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: {style: 'basic'} - }); - }).toThrow(new Error(constants.noAccessTokenErrorMsg)); - - expect(Lib.error).toHaveBeenCalledWith('Uses Mapbox map style, but did not set an access token.'); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should throw error if token is invalid', function(done) { - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], {}, { - mapboxAccessToken: dummyToken - }) - .catch(function(err) { - cnt++; - expect(err).toEqual(new Error(constants.mapOnErrorMsg)); - }) - .then(function() { - expect(cnt).toEqual(1); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should use access token in mapbox layout options if present', function(done) { - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: { - accesstoken: MAPBOX_ACCESS_TOKEN - } - }, { - mapboxAccessToken: dummyToken - }).catch(function() { - cnt++; - }).then(function() { - expect(cnt).toEqual(0); - expect(gd._fullLayout.mapbox.accesstoken).toEqual(MAPBOX_ACCESS_TOKEN); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should warn when multiple tokens in mapbox layout options are present', function(done) { - spyOn(Lib, 'warn'); - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }, { - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30], - subplot: 'mapbox2' - }], { - mapbox: { accesstoken: MAPBOX_ACCESS_TOKEN }, - mapbox2: { accesstoken: dummyToken } - }).catch(function() { - cnt++; - }).then(function() { - expect(cnt).toEqual(0); - expect(gd._fullLayout.mapbox.accesstoken).toEqual(MAPBOX_ACCESS_TOKEN); - expect(Lib.warn).toHaveBeenCalledWith(constants.multipleTokensErrorMsg); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should not throw when using a custom non-mapbox style', function(done) { - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: { style: osmStyle } - }).catch(function() { - cnt++; - }).then(function() { - expect(cnt).toEqual(0); - expect(gd._fullLayout.mapbox.accesstoken).toBe(undefined); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@noCI @gl should not throw when using a custom mapbox style URL with an access token in the layout', function(done) { - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: { - accesstoken: MAPBOX_ACCESS_TOKEN, - style: 'mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m' - } - }).catch(function() { - cnt++; - }).then(function() { - expect(cnt).toEqual(0); - expect(gd._fullLayout.mapbox.accesstoken).toBe(MAPBOX_ACCESS_TOKEN); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should log when an access token is set while using a custom non-mapbox style', function(done) { - spyOn(Lib, 'log'); - var cnt = 0; - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: { - style: osmStyle, - accesstoken: MAPBOX_ACCESS_TOKEN - } - }).catch(function() { - cnt++; - }).then(function() { - expect(cnt).toEqual(0); - expect(Lib.log).toHaveBeenCalledWith([ - 'Listed mapbox access token(s)', - MAPBOX_ACCESS_TOKEN, - 'but did not use a Mapbox map style, ignoring token(s).' - ].join(' ')); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should bypass access token in mapbox layout options when config points to an Atlas server', function(done) { - var cnt = 0; - var msg = [ - 'An API access token is required to use Mapbox GL.', - 'See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes' - ].join(' '); - - // TODO potential new way of doing this: - // https://github.com/mapbox/mapbox-gl-js/pull/7594 - // - // https://www.mapbox.com/atlas/#developing-with-atlas - - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [10, 20, 30], - lat: [10, 20, 30] - }], { - mapbox: { - accesstoken: MAPBOX_ACCESS_TOKEN - } - }, { - mapboxAccessToken: '' - }) - .catch(function(err) { - cnt++; - // Note that we get an error here on `new mapboxgl.Map` - // as we don't have an Atlas server running. - // - // In essence, we test that the `new mapboxgl.Map` throws - // as oppose to `findAccessToken` - expect(err).toEqual(new Error(msg)); - }) - .then(function() { - expect(cnt).toEqual(1); - done(); - }); - }, LONG_TIMEOUT_INTERVAL); -}); - describe('mapbox plots', function() { var mock = require('../../image/mocks/mapbox_0.json'); var gd; @@ -598,7 +350,7 @@ describe('mapbox plots', function() { _mouseEvent('mousemove', pointPos, noop).then(function() { return Plotly.relayout(gd, {'mapbox.center': {lon: 13.5, lat: -19.5}}); }).then(function() { - // First relayout on mapbox.center results in setCenter call + // First relayout on maplibre.center results in setCenter call expect(map.setCenter).toHaveBeenCalledWith([13.5, -19.5]); expect(map.setCenter).toHaveBeenCalledTimes(1); }).then(function() { @@ -610,7 +362,7 @@ describe('mapbox plots', function() { }).then(function() { return _mouseEvent('mouseup', p1, noop); }).then(function() { - // Second relayout on mapbox.center does not result in a setCenter + // Second relayout on maplibre.center does not result in a setCenter // call since map drag is underway expect(map.setCenter).toHaveBeenCalledTimes(1); }).then(done, done.fail); @@ -767,16 +519,16 @@ describe('mapbox plots', function() { // 'Unable to perform style diff: Unimplemented: setSprite.. Rebuilding the style from scratch.' // https://github.com/mapbox/mapbox-gl-js/issues/6933 - assertLayout('Mapbox Dark'); + assertLayout('Dark Matter without labels'); - Plotly.relayout(gd, 'mapbox.style', 'light') + Plotly.relayout(gd, 'mapbox.style', 'carto-positron') .then(function() { - assertLayout('Mapbox Light'); + assertLayout('Positron'); - return Plotly.relayout(gd, 'mapbox.style', 'dark'); + return Plotly.relayout(gd, 'mapbox.style', 'carto-darkmatter'); }) .then(function() { - assertLayout('Mapbox Dark'); + assertLayout('Dark Matter'); }) .then(done, done.fail); }, LONG_TIMEOUT_INTERVAL); @@ -785,7 +537,8 @@ describe('mapbox plots', function() { var mockWithLayers = require('../../image/mocks/mapbox_layers'); var layer0 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[0]); - var layer1 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[1]); + var layer1 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[0]); + layer1.type = 'line'; var mapUpdate = { 'mapbox.zoom': mockWithLayers.layout.mapbox.zoom, @@ -1081,9 +834,15 @@ describe('mapbox plots', function() { return Plotly.react(gd, [{type: 'scattermapbox'}], { mapbox: { layers: [{ - sourcetype: 'vector', - sourcelayer: 'contour', - source: 'mapbox://mapbox.mapbox-terrain-v2' + source: { + name: 'LIMADMIN', + type: 'FeatureCollection', + features: [] + }, + type: 'fill', + below: 'water', + color: '#ece2f0', + opacity: 0.8 }] } }); @@ -1136,21 +895,6 @@ describe('mapbox plots', function() { .then(done, done.fail); }, LONG_TIMEOUT_INTERVAL); - it('@gl should be able to update the access token', function(done) { - Plotly.relayout(gd, 'mapbox.accesstoken', 'wont-work') - .catch(function(err) { - expect(gd._fullLayout.mapbox.accesstoken).toEqual('wont-work'); - expect(err).toEqual(new Error(constants.mapOnErrorMsg)); - expect(gd._promises.length).toEqual(1); - - return Plotly.relayout(gd, 'mapbox.accesstoken', MAPBOX_ACCESS_TOKEN); - }) - .then(function() { - expect(gd._fullLayout.mapbox.accesstoken).toEqual(MAPBOX_ACCESS_TOKEN); - expect(gd._promises.length).toEqual(0); - }) - .then(done, done.fail); - }, LONG_TIMEOUT_INTERVAL); it('@gl should be able to update traces', function(done) { function assertDataPts(lengths) { @@ -1378,7 +1122,7 @@ describe('mapbox plots', function() { }) .then(function() { expect(relayoutCnt).toBe(3, 'relayout cnt'); - expect(relayoutingCnt).toBeCloseTo(10, -1, 'relayouting cnt'); + expect(relayoutingCnt).toBeCloseTo(21, -1, 'relayouting cnt'); expect(doubleClickCnt).toBe(1, 'double click cnt'); expect(getMapInfo(gd).zoom).toBeGreaterThan(1.234); }) @@ -1412,7 +1156,6 @@ describe('mapbox plots', function() { it('@noCI @gl should respect scrollZoom config option', function(done) { var mockCopy2 = Lib.extendDeep({}, mock); mockCopy2.config = {scrollZoom: false}; - var relayoutCnt = 0; var addOnGd = function() { gd.on('plotly_relayout', function() { relayoutCnt++; }); @@ -1484,12 +1227,12 @@ describe('mapbox plots', function() { it('@gl should be displayed for style "Carto"', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], {mapbox: {style: 'carto-darkmatter'}}) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); - expect(s.text()).toEqual('© Carto © OpenStreetMap contributors'); + expect(s.text()).toEqual('© CARTO, © OpenStreetMap contributors'); assertLinks(s, [ - 'https://carto.com/', - 'https://www.openstreetmap.org/copyright' + 'https://carto.com/about-carto/', + 'http://www.openstreetmap.org/about/' ]); }) .then(done, done.fail); @@ -1499,7 +1242,7 @@ describe('mapbox plots', function() { it('@noCI @gl should be displayed for style "' + style + '"', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], {mapbox: {style: style}}) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); expect(s.text()).toEqual('Map tiles by Stamen Design under CC BY 3.0 | Data by OpenStreetMap contributors under ODbL'); assertLinks(s, [ @@ -1516,7 +1259,7 @@ describe('mapbox plots', function() { it('@noCI @gl should be displayed for style "stamen-watercolor"', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], {mapbox: {style: 'stamen-watercolor'}}) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); expect(s.text()).toEqual('Map tiles by Stamen Design under CC BY 3.0 | Data by OpenStreetMap contributors under CC BY SA'); assertLinks(s, [ @@ -1532,7 +1275,7 @@ describe('mapbox plots', function() { it('@gl should be displayed for style "open-street-map"', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], {mapbox: {style: 'open-street-map'}}) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); expect(s.text()).toEqual('© OpenStreetMap contributors'); assertLinks(s, [ @@ -1542,16 +1285,15 @@ describe('mapbox plots', function() { .then(done, done.fail); }); - it('@gl should be displayed for style from Mapbox', function(done) { + it('@gl should be displayed for style (basic)', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], {mapbox: {style: 'basic'}}) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); - expect(s.text()).toEqual('© Mapbox © OpenStreetMap Improve this map'); + expect(s.text()).toEqual('© CARTO, © OpenStreetMap contributors'); assertLinks(s, [ - 'https://www.mapbox.com/about/maps/', - 'https://www.openstreetmap.org/about/', - 'https://apps.mapbox.com/feedback/?owner=mapbox&id=basic-v9&access_token=' + MAPBOX_ACCESS_TOKEN // Improve this map + 'https://carto.com/about-carto/', + 'http://www.openstreetmap.org/about/', ]); }) .then(done, done.fail); @@ -1590,7 +1332,7 @@ describe('mapbox plots', function() { it('@gl should not be displayed for custom style without attribution', function(done) { Plotly.newPlot(gd, [{type: 'scattermapbox'}], mockLayoutCustomStyle()) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); expect(s.text()).toEqual(''); }) @@ -1603,7 +1345,7 @@ describe('mapbox plots', function() { layout.mapbox.style.sources['simple-tiles'].attribution = attr; Plotly.newPlot(gd, [{type: 'scattermapbox'}], layout) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); expect(s.text()).toEqual(attr); }) @@ -1621,9 +1363,9 @@ describe('mapbox plots', function() { Plotly.newPlot(gd, customMock) .then(function() { - var s = d3SelectAll('.mapboxgl-ctrl-attrib'); + var s = d3SelectAll('.maplibregl-ctrl-attrib'); expect(s.size()).toBe(1); - expect(s.text()).toEqual([XSS + attr, '© Mapbox © OpenStreetMap Improve this map'].join(' | ')); + expect(s.text()).toEqual([XSS + attr, '© CARTO, © OpenStreetMap contributors'].join(' | ')); expect(s.html().indexOf('')).toBe(-1); expect(s.html().indexOf('<img src=x onerror="alert(XSS);">')).not.toBe(-1); }) @@ -1845,80 +1587,85 @@ describe('test mapbox trace/layout *below* interactions', function() { mapbox: { style: 'basic', layers: [{ - sourcetype: 'vector', - source: 'mapbox://mapbox.mapbox-terrain-v2', - sourcelayer: 'contour', - type: 'line' + source: { + name: 'LIMADMIN', + type: 'FeatureCollection', + features: [] + }, + type: 'fill', + below: 'water', + color: '#ece2f0', + opacity: 0.8 }] } }) .then(function() { _assert('default *below*', { - trace: [20, 21, 22, 23], - layout: 24 + trace: [94, 95, 96, 97], + layout: 9 }); }) .then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', 'traces'); }) .then(function() { _assert('with layout layer *below:traces*', { - trace: [21, 22, 23, 24], - layout: 20 + trace: [94, 95, 96, 97], + layout: 93 }); }) .then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', null); }) .then(function() { _assert('back to default *below* (1)', { - trace: [20, 21, 22, 23], - layout: 24 + trace: [93, 94, 95, 96], + layout: 97 }); }) .then(function() { return Plotly.restyle(gd, 'below', ''); }) .then(function() { _assert('with trace *below:""*', { - trace: [21, 22, 23, 24], - layout: 20 + trace: [94, 95, 96, 97], + layout: 93 }); }) .then(function() { return Plotly.restyle(gd, 'below', null); }) .then(function() { _assert('back to default *below* (2)', { - trace: [20, 21, 22, 23], - layout: 24 + trace: [93, 94, 95, 96], + layout: 97 }); }) .then(function() { return Plotly.restyle(gd, 'below', 'water'); }) .then(function() { _assert('with trace *below:water*', { - trace: [4, 5, 6, 7], - layout: 24 + trace: [9, 10, 11, 12], + layout: 97 }); }) .then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', 'water'); }) .then(function() { _assert('with trace AND layout layer *below:water*', { - trace: [4, 5, 6, 7], - layout: 8 + trace: [9, 10, 11, 12], + layout: 13 }); }) .then(function() { return Plotly.relayout(gd, 'mapbox.layers[0].below', ''); }) .then(function() { _assert('with trace *below:water* and layout layer *below:""*', { - trace: [4, 5, 6, 7], - layout: 24 + trace: [9, 10, 11, 12], + layout: 97 }); }) .then(function() { return Plotly.restyle(gd, 'below', ''); }) .then(function() { _assert('with trace AND layout layer *below:water*', { - trace: [20, 21, 22, 23], - layout: 24 + trace: [93, 94, 95, 96], + layout: 97 }); }) .then(function() { return Plotly.update(gd, {below: null}, {'mapbox.layers[0].below': null}); }) .then(function() { _assert('back to default *below* (3)', { - trace: [20, 21, 22, 23], - layout: 24 + trace: [93, 94, 95, 96], + layout: 97 }); }) .then(done, done.fail); @@ -1965,25 +1712,25 @@ describe('test mapbox trace/layout *below* interactions', function() { }) .then(function() { _assert('base', { - scatter: [23, 24, 25, 26], - density: [17], - choropleth: [5, 6] + scatter: [96, 97, 98, 99], + density: [13], + choropleth: [72, 73] }); }) .then(function() { return Plotly.restyle(gd, 'below', ''); }) .then(function() { _assert('all traces *below:""', { - scatter: [23, 24, 25, 26], - density: [22], - choropleth: [20, 21] + scatter: [96, 97, 98, 99], + density: [95], + choropleth: [93, 94] }); }) .then(function() { return Plotly.restyle(gd, 'below', null); }) .then(function() { _assert('back to base', { - scatter: [23, 24, 25, 26], - density: [17], - choropleth: [5, 6] + scatter: [96, 97, 98, 99], + density: [13], + choropleth: [72, 73] }); }) .then(done, done.fail); @@ -2012,7 +1759,7 @@ describe('test mapbox trace/layout *below* interactions', function() { } Lib.warn.calls.reset(); - getLayerIds().slice(20, -1).forEach(function(id) { + getLayerIds().slice(94, -1).forEach(function(id) { expect(id.indexOf('plotly-')).toBe(0, 'layer ' + id + ' fallback to top of map'); }); } @@ -2035,10 +1782,15 @@ describe('test mapbox trace/layout *below* interactions', function() { mapbox: { style: 'basic', layers: [{ - sourcetype: 'vector', - source: 'mapbox://mapbox.mapbox-terrain-v2', - sourcelayer: 'contour', - type: 'line' + source: { + name: 'LIMADMIN', + type: 'FeatureCollection', + features: [] + }, + type: 'fill', + below: 'water', + color: '#ece2f0', + opacity: 0.8 }] } }) @@ -2142,14 +1894,12 @@ describe('mapbox toImage', function() { afterEach(function() { Plotly.purge(gd); - Plotly.setPlotConfig({ mapboxAccessToken: null }); + Plotly.setPlotConfig({ }); destroyGraphDiv(); }); it('@gl should generate image data with global credentials', function(done) { - Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); Plotly.newPlot(gd, [{ type: 'scattermapbox', @@ -2164,42 +1914,6 @@ describe('mapbox toImage', function() { }) .then(done, done.fail); }, LONG_TIMEOUT_INTERVAL); - - it('@gl should generate image data with config credentials', function(done) { - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [0, 10, 20], - lat: [-10, 10, -10] - }], {}, { - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }) - .then(function() { - return Plotly.toImage(gd); - }) - .then(function(imgData) { - expect(imgData.length).toBeGreaterThan(MINIMUM_LENGTH); - }) - .then(done, done.fail); - }, LONG_TIMEOUT_INTERVAL); - - it('@gl should generate image data with layout credentials', function(done) { - Plotly.newPlot(gd, [{ - type: 'scattermapbox', - lon: [0, 10, 20], - lat: [-10, 10, -10] - }], { - mapbox: { - accesstoken: MAPBOX_ACCESS_TOKEN - } - }) - .then(function() { - return Plotly.toImage(gd); - }) - .then(function(imgData) { - expect(imgData.length).toBeGreaterThan(MINIMUM_LENGTH); - }) - .then(done, done.fail); - }, LONG_TIMEOUT_INTERVAL); }); function getMapInfo(gd) { diff --git a/test/jasmine/tests/modebar_test.js b/test/jasmine/tests/modebar_test.js index dc271a818a7..10276dd2f54 100644 --- a/test/jasmine/tests/modebar_test.js +++ b/test/jasmine/tests/modebar_test.js @@ -1361,7 +1361,7 @@ describe('ModeBar', function() { }); describe('mapbox handlers', function() { - it('@gl button *resetViewMapbox* should reset the mapbox view attribute to their default', function(done) { + it('@gl button *resetViewMapbox* should reset the maplibre view attribute to their default', function(done) { var gd = createGraphDiv(); function _assert(centerLon, centerLat, zoom) { @@ -1381,9 +1381,7 @@ describe('ModeBar', function() { center: {lon: 10, lat: 10}, zoom: 8 } - }, { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }) + }, {}) .then(function() { _assert(10, 10, 8); diff --git a/test/jasmine/tests/plot_api_react_test.js b/test/jasmine/tests/plot_api_react_test.js index 15840446a5e..c4b9eed2a2a 100644 --- a/test/jasmine/tests/plot_api_react_test.js +++ b/test/jasmine/tests/plot_api_react_test.js @@ -18,8 +18,6 @@ var mouseEvent = require('../assets/mouse_event'); var drag = require('../assets/drag'); var delay = require('../assets/delay'); -var MAPBOX_ACCESS_TOKEN = require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN; - describe('@noCIdep Plotly.react', function() { var mockedMethods = [ 'doTraceStyle', @@ -884,9 +882,7 @@ describe('@noCIdep Plotly.react', function() { mockLists.mapbox.forEach(function(mockSpec) { it('@noCI @gl can redraw "' + mockSpec[0] + '" with no changes as a noop (mapbpox mocks)', function(done) { - Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); _runReactMock(mockSpec, done); }); }); @@ -1927,9 +1923,7 @@ describe('Plotly.react and uirevision attributes', function() { var checkInitial = checkState([], attrs(true)); var checkEdited = checkState([], attrs()); - Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); _run(fig, editMap, checkInitial, checkEdited).then(done); }); @@ -2283,10 +2277,8 @@ describe('Test Plotly.react + interactions under uirevision:', function() { .then(done, done.fail); }); - it('@gl mapbox subplots should preserve viewport changes after panning', function(done) { - Plotly.setPlotConfig({ - mapboxAccessToken: MAPBOX_ACCESS_TOKEN - }); + it('@gl maplibre subplots should preserve viewport changes after panning', function(done) { + Plotly.setPlotConfig({}); function _react() { return Plotly.react(gd, [{ diff --git a/test/jasmine/tests/plots_test.js b/test/jasmine/tests/plots_test.js index 11afee51827..95b7ae7465f 100644 --- a/test/jasmine/tests/plots_test.js +++ b/test/jasmine/tests/plots_test.js @@ -886,7 +886,7 @@ describe('Test Plots', function() { var subplotSelectors = { gl3d: '.gl-container>div[id^="scene"]', geo: '.geolayer>g', - mapbox: '.mapboxgl-map', + mapbox: '.maplibregl-map', parcoords: '.parcoords-line-layers', pie: '.pielayer .trace', sankey: '.sankey', diff --git a/test/jasmine/tests/scattermapbox_test.js b/test/jasmine/tests/scattermapbox_test.js index aa07efcd5c8..81c0ed07f4e 100644 --- a/test/jasmine/tests/scattermapbox_test.js +++ b/test/jasmine/tests/scattermapbox_test.js @@ -710,9 +710,7 @@ describe('scattermapbox hover', function() { var gd; beforeAll(function(done) { - Plotly.setPlotConfig({ - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); gd = createGraphDiv(); @@ -963,9 +961,7 @@ describe('Test plotly events on a scattermapbox plot:', function() { var gd; beforeAll(function() { - Plotly.setPlotConfig({ - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); }); beforeEach(function(done) { @@ -1141,9 +1137,7 @@ describe('Test plotly events on a scattermapbox plot when css transform is prese } beforeAll(function() { - Plotly.setPlotConfig({ - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); }); beforeEach(function(done) { @@ -1258,9 +1252,7 @@ describe('scattermapbox restyle', function() { var gd; beforeAll(function() { - Plotly.setPlotConfig({ - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); gd = createGraphDiv(); }); diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 4e18bde72ba..bbca2242159 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -685,10 +685,8 @@ describe('Click-to-select', function() { }); [ - testCase('scattermapbox', require('../../image/mocks/mapbox_0.json'), 650, 195, [[2], []], {}, - { mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }), - testCase('choroplethmapbox', require('../../image/mocks/mapbox_choropleth0.json'), 270, 220, [[0]], {}, - { mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }) + testCase('scattermapbox', require('../../image/mocks/mapbox_0.json'), 650, 195, [[2], []], {}), + testCase('choroplethmapbox', require('../../image/mocks/mapbox_choropleth0.json'), 270, 220, [[0]], {}) ] .forEach(function(testCase) { it('@gl trace type ' + testCase.label, function(done) { @@ -772,10 +770,8 @@ describe('Click-to-select', function() { }); [ - testCase('mapbox', require('../../image/mocks/mapbox_0.json'), 650, 195, [[2], []], {}, - { mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }), - testCase('mapbox', require('../../image/mocks/mapbox_choropleth0.json'), 270, 220, [[0], []], {}, - { mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }) + testCase('mapbox', require('../../image/mocks/mapbox_0.json'), 650, 195, [[2], []], {}), + testCase('mapbox', require('../../image/mocks/mapbox_choropleth0.json'), 270, 220, [[0], []], {}) ].forEach(function(testCase) { it('@gl for base plot ' + testCase.label, function(done) { _run(testCase, done); @@ -2055,7 +2051,6 @@ describe('Test select box and lasso per trace:', function() { delete fig.layout.mapbox.bounds; fig.config = { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }; addInvisible(fig); @@ -2115,7 +2110,6 @@ describe('Test select box and lasso per trace:', function() { fig.layout.dragmode = 'select'; fig.config = { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }; addInvisible(fig); @@ -3232,7 +3226,6 @@ describe('Test select box and lasso per trace:', function() { fig.layout.dragmode = 'select'; fig.config = { - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN }; addInvisible(fig); diff --git a/test/jasmine/tests/snapshot_test.js b/test/jasmine/tests/snapshot_test.js index 2dda2ebe6a2..1b7a02c5d72 100644 --- a/test/jasmine/tests/snapshot_test.js +++ b/test/jasmine/tests/snapshot_test.js @@ -83,7 +83,6 @@ describe('Plotly.Snapshot', function() { showLink: false, showTips: false, setBackground: 'opaque', - mapboxAccessToken: undefined }; var themeTile = Plotly.Snapshot.clone(dummyGraphObj, themeOptions); diff --git a/test/jasmine/tests/transform_filter_test.js b/test/jasmine/tests/transform_filter_test.js index 2f47854171a..1c8cf95ac86 100644 --- a/test/jasmine/tests/transform_filter_test.js +++ b/test/jasmine/tests/transform_filter_test.js @@ -1364,9 +1364,7 @@ describe('filter resulting in empty coordinate arrays', function() { describe('mapbox mocks', function() { var mockList = require('../assets/mock_lists').mapbox; - Plotly.setPlotConfig({ - mapboxAccessToken: require('../../../build/credentials.json').MAPBOX_ACCESS_TOKEN - }); + Plotly.setPlotConfig({}); mockList.forEach(function(d) { it('@gl' + d[0], function(done) { diff --git a/test/plot-schema.json b/test/plot-schema.json index fd2b1659e37..caa033314d2 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -244,11 +244,6 @@ "min": 0, "valType": "integer" }, - "mapboxAccessToken": { - "description": "Mapbox access token (required to plot mapbox trace types) If using an Mapbox Atlas server, set this option to '' so that plotly.js won't attempt to authenticate to the public Mapbox server.", - "dflt": null, - "valType": "string" - }, "modeBarButtons": { "description": "Define fully custom mode bar buttons as nested array, where the outer arrays represents button groups, and the inner arrays have buttons config objects or names of default buttons See ./components/modebar/buttons.js for more info.", "dflt": false, @@ -3876,13 +3871,6 @@ {} ], "_isSubplotObj": true, - "accesstoken": { - "description": "Sets the mapbox access token to be used for this mapbox map. Alternatively, the mapbox access token can be set in the configuration options under `mapboxAccessToken`. Note that accessToken are only required when `style` (e.g with values : basic, streets, outdoors, light, dark, satellite, satellite-streets ) and/or a layout layer references the Mapbox server.", - "editType": "plot", - "noBlank": true, - "strict": true, - "valType": "string" - }, "bearing": { "description": "Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing).", "dflt": 0, @@ -4243,24 +4231,28 @@ }, "role": "object", "style": { - "description": "Defines the map layers that are rendered by default below the trace layers defined in `data`, which are themselves by default rendered below the layers defined in `layout.mapbox.layers`. These layers can be defined either explicitly as a Mapbox Style object which can contain multiple layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS) or implicitly by using one of the built-in style objects which use WMSes which do not require any access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of which require a Mapbox access token Note that Mapbox access token can be set in the `accesstoken` attribute or in the `mapboxAccessToken` config option. Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at https://docs.mapbox.com/mapbox-gl-js/style-spec The built-in plotly.js styles objects are: carto-darkmatter, carto-positron, open-street-map, stamen-terrain, stamen-toner, stamen-watercolor, white-bg The built-in Mapbox styles are: basic, streets, outdoors, light, dark, satellite, satellite-streets Mapbox style URLs are of the form: mapbox://mapbox.mapbox--", + "description": "Defines the map layers that are rendered by default below the trace layers defined in `data`, which are themselves by default rendered below the layers defined in `layout.mapbox.layers`. These layers can be defined either explicitly as a Mapbox Style object which can contain multiple layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS) or implicitly by using one of the built-in style objects which use WMSes or by using a custom style URL Mapbox Style objects are of the form described in the MapLibre GL JS documentation available at https://maplibre.org/maplibre-style-spec/ The built-in plotly.js styles objects are: basic, carto-darkmatter, carto-darkmatter-nolabels, carto-positron, carto-positron-nolabels, carto-voyager, carto-voyager-nolabels, dark, light, open-street-map, outdoors, satellite, satellite-streets, stamen-terrain, stamen-toner, stamen-watercolor, streets, white-bg.", "dflt": "basic", "editType": "plot", "valType": "any", "values": [ "basic", - "streets", - "outdoors", - "light", - "dark", - "satellite", - "satellite-streets", "carto-darkmatter", + "carto-darkmatter-nolabels", "carto-positron", + "carto-positron-nolabels", + "carto-voyager", + "carto-voyager-nolabels", + "dark", + "light", "open-street-map", + "outdoors", + "satellite", + "satellite-streets", "stamen-terrain", "stamen-toner", "stamen-watercolor", + "streets", "white-bg" ] }, @@ -75613,7 +75605,7 @@ "scatter-like" ], "meta": { - "description": "The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.", + "description": "The data visualized as scatter point, lines or marker symbols on a MapLibre GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.", "hrName": "scatter_mapbox" }, "type": "scattermapbox"