maplibre-gl 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/generate-struct-arrays.ts +1 -1
- package/build/post-ts-build.js +0 -9
- package/build/release-notes.js +7 -32
- package/dist/maplibre-gl.css +1 -1
- package/dist/maplibre-gl.d.ts +57 -219
- package/dist/maplibre-gl.js +4 -4
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +37 -53
- package/src/css/maplibre-gl.css +21 -21
- package/src/data/array_types.ts +1 -1
- package/src/data/bucket/circle_bucket.ts +1 -1
- package/src/data/bucket/fill_bucket.test.ts +1 -1
- package/src/data/bucket/fill_bucket.ts +1 -1
- package/src/data/bucket/fill_extrusion_bucket.ts +1 -1
- package/src/data/bucket/line_bucket.test.ts +1 -1
- package/src/data/bucket/line_bucket.ts +1 -1
- package/src/data/bucket/symbol_bucket.test.ts +1 -1
- package/src/data/bucket/symbol_bucket.ts +4 -4
- package/src/data/bucket.ts +1 -1
- package/src/data/evaluation_feature.ts +1 -1
- package/src/data/feature_index.ts +1 -1
- package/src/data/load_geometry.ts +1 -1
- package/src/data/program_configuration.ts +1 -1
- package/src/geo/edge_insets.ts +1 -1
- package/src/geo/transform.test.ts +1 -1
- package/src/geo/transform.ts +1 -1
- package/src/index.ts +1 -1
- package/src/render/draw_debug.ts +1 -1
- package/src/render/draw_symbol.ts +1 -1
- package/src/render/glyph_manager.ts +1 -1
- package/src/render/painter.ts +5 -3
- package/src/render/program/circle_program.ts +1 -1
- package/src/render/program/line_program.ts +3 -3
- package/src/render/program/symbol_program.ts +1 -1
- package/src/source/geojson_source.test.ts +29 -1
- package/src/source/geojson_source.ts +2 -4
- package/src/source/geojson_wrapper.ts +1 -1
- package/src/source/image_source.test.ts +153 -0
- package/src/source/query_features.test.ts +1 -1
- package/src/source/query_features.ts +1 -1
- package/src/source/raster_dem_tile_source.test.ts +2 -1
- package/src/source/raster_dem_tile_source.ts +1 -1
- package/src/source/raster_tile_source.test.ts +2 -1
- package/src/source/raster_tile_source.ts +1 -1
- package/src/source/source_cache.test.ts +2 -2
- package/src/source/source_cache.ts +1 -1
- package/src/source/tile.test.ts +1 -1
- package/src/source/tile.ts +1 -1
- package/src/source/tile_id.test.ts +10 -12
- package/src/source/tile_id.ts +3 -3
- package/src/source/vector_tile_source.test.ts +2 -1
- package/src/source/vector_tile_source.ts +2 -2
- package/src/source/vector_tile_worker_source.test.ts +306 -0
- package/src/style/load_sprite.ts +2 -1
- package/src/style/properties.ts +1 -1
- package/src/style/query_utils.ts +1 -1
- package/src/style/style.test.ts +4 -0
- package/src/style/style.ts +1 -1
- package/src/style/style_layer/circle_style_layer.ts +1 -1
- package/src/style/style_layer/custom_style_layer.ts +2 -2
- package/src/style/style_layer/fill_extrusion_style_layer.ts +2 -2
- package/src/style/style_layer/fill_style_layer.ts +1 -1
- package/src/style/style_layer/line_style_layer.ts +1 -1
- package/src/style/style_layer/symbol_style_layer.ts +19 -0
- package/src/style/style_layer/symbol_style_layer_properties.ts +6 -0
- package/src/style/style_layer.ts +1 -1
- package/src/style-spec/CHANGELOG.md +6 -0
- package/src/style-spec/expression/index.ts +1 -1
- package/src/style-spec/feature_filter/feature_filter.test.ts +1 -1
- package/src/style-spec/migrate.test.ts +112 -0
- package/src/style-spec/package.json +1 -1
- package/src/style-spec/reference/v8.json +68 -2
- package/src/style-spec/style-spec.ts +0 -3
- package/src/style-spec/types.ts +2 -0
- package/src/style-spec/validate_spec.test.ts +29 -0
- package/src/symbol/anchor.ts +1 -1
- package/src/symbol/check_max_angle.test.ts +1 -1
- package/src/symbol/check_max_angle.ts +1 -1
- package/src/symbol/clip_line.test.ts +1 -1
- package/src/symbol/clip_line.ts +1 -1
- package/src/symbol/collision_feature.test.ts +1 -1
- package/src/symbol/collision_feature.ts +1 -1
- package/src/symbol/collision_index.ts +20 -20
- package/src/symbol/get_anchors.test.ts +1 -1
- package/src/symbol/get_anchors.ts +1 -1
- package/src/symbol/grid_index.test.ts +42 -19
- package/src/symbol/grid_index.ts +62 -33
- package/src/symbol/mergelines.test.ts +1 -1
- package/src/symbol/path_interpolator.test.ts +1 -1
- package/src/symbol/path_interpolator.ts +1 -1
- package/src/symbol/placement.ts +83 -54
- package/src/symbol/projection.ts +1 -1
- package/src/symbol/quads.ts +1 -1
- package/src/symbol/symbol_layout.ts +1 -1
- package/src/symbol/symbol_style_layer.test.ts +48 -1
- package/src/ui/camera.test.ts +0 -8
- package/src/ui/camera.ts +13 -3
- package/src/ui/control/navigation_control.ts +1 -1
- package/src/ui/events.ts +1 -1
- package/src/ui/handler/box_zoom.ts +1 -1
- package/src/ui/handler/click_zoom.ts +1 -1
- package/src/ui/handler/handler_util.ts +1 -1
- package/src/ui/handler/map_event.ts +1 -1
- package/src/ui/handler/mouse.ts +1 -1
- package/src/ui/handler/scroll_zoom.ts +1 -1
- package/src/ui/handler/tap_drag_zoom.ts +1 -1
- package/src/ui/handler/tap_recognizer.ts +1 -1
- package/src/ui/handler/tap_zoom.ts +1 -1
- package/src/ui/handler/touch_pan.ts +1 -1
- package/src/ui/handler/touch_zoom_rotate.ts +1 -1
- package/src/ui/handler_inertia.ts +1 -1
- package/src/ui/handler_manager.ts +1 -1
- package/src/ui/map.test.ts +61 -0
- package/src/ui/map.ts +35 -10
- package/src/ui/marker.test.ts +1 -1
- package/src/ui/marker.ts +2 -1
- package/src/ui/popup.test.ts +1 -1
- package/src/ui/popup.ts +2 -2
- package/src/util/ajax.test.ts +206 -0
- package/src/util/classify_rings.test.ts +1 -1
- package/src/util/classify_rings.ts +1 -1
- package/src/util/dom.ts +1 -1
- package/src/util/find_pole_of_inaccessibility.test.ts +1 -1
- package/src/util/find_pole_of_inaccessibility.ts +1 -1
- package/src/util/intersection_tests.ts +1 -1
- package/src/util/smart_wrap.ts +1 -1
- package/src/util/test/util.ts +14 -0
- package/src/util/util.test.ts +1 -1
- package/src/util/util.ts +1 -1
- package/CHANGELOG.md +0 -2585
- package/src/types/packages-types/vector-tile/index.d.ts +0 -27
- package/src/util/point.ts +0 -349
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maplibre-gl",
|
|
3
3
|
"description": "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"main": "dist/maplibre-gl.js",
|
|
6
6
|
"style": "dist/maplibre-gl.css",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
@@ -9,20 +9,17 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git://github.com/maplibre/maplibre-gl-js.git"
|
|
11
11
|
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=14.0.0"
|
|
14
|
-
},
|
|
15
12
|
"types": "dist/maplibre-gl.d.ts",
|
|
16
13
|
"type": "module",
|
|
17
14
|
"dependencies": {
|
|
18
15
|
"@mapbox/geojson-rewind": "^0.5.0",
|
|
19
16
|
"@mapbox/jsonlint-lines-primitives": "^2.0.2",
|
|
20
17
|
"@mapbox/mapbox-gl-supported": "^2.0.1",
|
|
18
|
+
"@mapbox/point-geometry": "^0.1.0",
|
|
21
19
|
"@mapbox/tiny-sdf": "^2.0.4",
|
|
22
20
|
"@mapbox/unitbezier": "^0.0.1",
|
|
23
21
|
"@mapbox/vector-tile": "^1.3.1",
|
|
24
22
|
"@mapbox/whoots-js": "^3.1.0",
|
|
25
|
-
"@types/pbf": "^3.0.2",
|
|
26
23
|
"csscolorparser": "~1.0.3",
|
|
27
24
|
"earcut": "^2.2.2",
|
|
28
25
|
"geojson-vt": "^3.2.1",
|
|
@@ -31,7 +28,7 @@
|
|
|
31
28
|
"pbf": "^3.2.1",
|
|
32
29
|
"potpack": "^1.0.1",
|
|
33
30
|
"quickselect": "^2.0.0",
|
|
34
|
-
"supercluster": "^7.1.
|
|
31
|
+
"supercluster": "^7.1.4",
|
|
35
32
|
"tinyqueue": "^2.0.3",
|
|
36
33
|
"vt-pbf": "^3.1.1"
|
|
37
34
|
},
|
|
@@ -40,35 +37,35 @@
|
|
|
40
37
|
"@mapbox/gazetteer": "^5.1.0",
|
|
41
38
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.1",
|
|
42
39
|
"@mapbox/mvt-fixtures": "^3.6.0",
|
|
43
|
-
"@
|
|
44
|
-
"@rollup/plugin-commonjs": "^21.0.0",
|
|
40
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
45
41
|
"@rollup/plugin-json": "^4.1.0",
|
|
46
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
47
|
-
"@rollup/plugin-replace": "^3.0.
|
|
42
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
43
|
+
"@rollup/plugin-replace": "^3.0.1",
|
|
48
44
|
"@rollup/plugin-strip": "^2.1.0",
|
|
49
45
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
50
46
|
"@types/babel__core": "^7.1.12",
|
|
51
47
|
"@types/babelify": "^7.3.6",
|
|
52
48
|
"@types/benchmark": "^2.1.0",
|
|
53
49
|
"@types/browserify": "^12.0.36",
|
|
54
|
-
"@types/cssnano": "^
|
|
55
|
-
"@types/d3": "^
|
|
50
|
+
"@types/cssnano": "^5.0.0",
|
|
51
|
+
"@types/d3": "^5.16.4",
|
|
56
52
|
"@types/diff": "^4.0.2",
|
|
57
53
|
"@types/earcut": "^2.1.1",
|
|
58
54
|
"@types/ejs": "^3.1.0",
|
|
59
55
|
"@types/eslint": "^8.2.1",
|
|
60
|
-
"@types/geojson": "^7946.0.
|
|
56
|
+
"@types/geojson": "^7946.0.8",
|
|
61
57
|
"@types/gl": "^4.1.0",
|
|
62
58
|
"@types/glob": "^7.1.3",
|
|
63
59
|
"@types/jest": "^27.0.2",
|
|
64
|
-
"@types/jsdom": "^16.2.
|
|
65
|
-
"@types/jsonwebtoken": "^8.5.5",
|
|
60
|
+
"@types/jsdom": "^16.2.14",
|
|
66
61
|
"@types/lodash.template": "^4.5.0",
|
|
62
|
+
"@types/mapbox__point-geometry": "^0.1.2",
|
|
63
|
+
"@types/mapbox__vector-tile": "^1.3.0",
|
|
67
64
|
"@types/minimist": "^1.2.1",
|
|
68
65
|
"@types/murmurhash-js": "^1.0.3",
|
|
69
66
|
"@types/node-notifier": "^8.0.0",
|
|
70
|
-
"@types/npm-packlist": "^1.1.1",
|
|
71
67
|
"@types/offscreencanvas": "^2019.6.3",
|
|
68
|
+
"@types/pbf": "^3.0.2",
|
|
72
69
|
"@types/pixelmatch": "^5.2.2",
|
|
73
70
|
"@types/pngjs": "^6.0.1",
|
|
74
71
|
"@types/puppeteer": "^5.4.4",
|
|
@@ -79,46 +76,42 @@
|
|
|
79
76
|
"@types/selenium-webdriver": "^4.0.16",
|
|
80
77
|
"@types/shuffle-seed": "^1.1.0",
|
|
81
78
|
"@types/sinon": "^10.0.2",
|
|
82
|
-
"@types/stylelint": "^
|
|
79
|
+
"@types/stylelint": "^14.0.0",
|
|
83
80
|
"@types/supercluster": "^5.0.2",
|
|
84
81
|
"@types/tape": "^4.13.2",
|
|
85
82
|
"@types/window-or-global": "^1.0.4",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
87
|
-
"@typescript-eslint/parser": "^
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
84
|
+
"@typescript-eslint/parser": "^5.9.1",
|
|
88
85
|
"address": "^1.1.2",
|
|
89
86
|
"babel-eslint": "^10.0.1",
|
|
90
87
|
"babel-jest": "^27.2.5",
|
|
91
88
|
"babelify": "^10.0.0",
|
|
92
89
|
"benchmark": "^2.1.4",
|
|
93
90
|
"browserify": "^17.0.0",
|
|
94
|
-
"canvas": "^2.
|
|
95
|
-
"chalk": "^4.1.2",
|
|
91
|
+
"canvas": "^2.9.0",
|
|
96
92
|
"chokidar": "^3.0.2",
|
|
97
93
|
"cssnano": "^5.0.8",
|
|
98
|
-
"d3": "^
|
|
94
|
+
"d3": "^5.16.0",
|
|
95
|
+
"d3-queue": "^3.0.7",
|
|
99
96
|
"diff": "^4.0.1",
|
|
100
|
-
"documentation": "
|
|
97
|
+
"documentation": "^12.3.0",
|
|
101
98
|
"dts-bundle-generator": "^6.0.0",
|
|
102
99
|
"ejs": "^3.1.6",
|
|
103
|
-
"eslint": "^7.
|
|
100
|
+
"eslint": "^8.7.0",
|
|
104
101
|
"eslint-config-mourner": "^3.0.0",
|
|
105
102
|
"eslint-plugin-html": "^6.1.2",
|
|
106
103
|
"eslint-plugin-import": "^2.24.2",
|
|
107
|
-
"eslint-plugin-jest": "^
|
|
104
|
+
"eslint-plugin-jest": "^26.0.0",
|
|
108
105
|
"eslint-plugin-jsdoc": "^37.0.3",
|
|
109
106
|
"eslint-plugin-react": "^7.25.1",
|
|
110
|
-
"gl": "^
|
|
107
|
+
"gl": "^5.0.0",
|
|
111
108
|
"glob": "^7.1.4",
|
|
112
109
|
"is-builtin-module": "^3.0.0",
|
|
113
110
|
"jest": "^27.2.4",
|
|
114
111
|
"jest-canvas-mock": "^2.3.1",
|
|
115
|
-
"jest-codemods": "^0.25.0",
|
|
116
112
|
"jest-raw-loader": "^1.0.1",
|
|
117
|
-
"
|
|
118
|
-
"jsdom": "^13.0.0",
|
|
113
|
+
"jsdom": "^19.0.0",
|
|
119
114
|
"json-stringify-pretty-compact": "^3.0.0",
|
|
120
|
-
"jsonwebtoken": "^8.3.0",
|
|
121
|
-
"list-npm-contents": "^1.0.2",
|
|
122
115
|
"lodash": "^4.17.19",
|
|
123
116
|
"lodash.template": "^4.5.0",
|
|
124
117
|
"mapbox-gl-styles": "^2.0.2",
|
|
@@ -127,10 +120,9 @@
|
|
|
127
120
|
"node-notifier": "^10.0.0",
|
|
128
121
|
"node-plantuml": "^0.9.0",
|
|
129
122
|
"npm-font-open-sans": "^1.1.0",
|
|
130
|
-
"npm-packlist": "^3.0.0",
|
|
131
123
|
"npm-run-all": "^4.1.5",
|
|
132
124
|
"nyc": "^15.1.0",
|
|
133
|
-
"
|
|
125
|
+
"pdf-merger-js": "^3.2.1",
|
|
134
126
|
"pixelmatch": "^5.1.0",
|
|
135
127
|
"pngjs": "^6.0.0",
|
|
136
128
|
"postcss": "^8.3.11",
|
|
@@ -138,16 +130,10 @@
|
|
|
138
130
|
"postcss-inline-svg": "^5.0.0",
|
|
139
131
|
"pretty-bytes": "^5.1.0",
|
|
140
132
|
"puppeteer": "^13.0.1",
|
|
141
|
-
"qrcode-terminal": "^0.12.0",
|
|
142
133
|
"react": "^17.0.2",
|
|
143
134
|
"react-dom": "^17.0.2",
|
|
144
|
-
"replace-in-file": "^6.2.0",
|
|
145
135
|
"request": "^2.88.0",
|
|
146
136
|
"rollup": "^2.56.3",
|
|
147
|
-
"rollup-plugin-buble": "^0.19.8",
|
|
148
|
-
"rollup-plugin-commonjs": "^10.1.0",
|
|
149
|
-
"rollup-plugin-node-resolve": "^5.2.0",
|
|
150
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
151
137
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
152
138
|
"rollup-plugin-terser": "^7.0.2",
|
|
153
139
|
"rollup-plugin-unassert": "^0.3.0",
|
|
@@ -159,16 +145,15 @@
|
|
|
159
145
|
"sinon": "^12.0.1",
|
|
160
146
|
"source-map-explorer": "^2.5.1",
|
|
161
147
|
"st": "^3.0.0",
|
|
162
|
-
"stylelint": "^
|
|
163
|
-
"stylelint-config-standard": "^
|
|
164
|
-
"tap": "~12.4.1",
|
|
148
|
+
"stylelint": "^14.3.0",
|
|
149
|
+
"stylelint-config-standard": "^24.0.0",
|
|
165
150
|
"tap-parser": "^10.0.1",
|
|
166
151
|
"tape": "^5.3.1",
|
|
167
152
|
"tape-filter": "^1.0.4",
|
|
168
|
-
"testem": "^3.
|
|
153
|
+
"testem": "^3.6.0",
|
|
169
154
|
"ts-jest": "^27.0.5",
|
|
170
|
-
"ts-node": "^10.
|
|
171
|
-
"typescript": "^4.4
|
|
155
|
+
"ts-node": "^10.4.0",
|
|
156
|
+
"typescript": "^4.5.4"
|
|
172
157
|
},
|
|
173
158
|
"browser": {
|
|
174
159
|
"./rollup/build/tsc/src/util/web_worker.js": "./build/web_worker_replacement.js"
|
|
@@ -201,22 +186,21 @@
|
|
|
201
186
|
"test": "run-s lint lint-css lint-docs test-unit",
|
|
202
187
|
"test-suite": "run-s test-render test-query test-expressions",
|
|
203
188
|
"test-suite-clean": "find test/integration/{render,query, expressions}-tests -mindepth 2 -type d -exec test -e \"{}/actual.png\" \\; -not \\( -exec test -e \"{}/style.json\" \\; \\) -print | xargs -t rm -r",
|
|
204
|
-
"test-
|
|
205
|
-
"test-
|
|
206
|
-
"test-build": "tap --node-arg --no-warnings --node-arg --experimental-specifier-resolution=node --node-arg --experimental-json-modules --reporter classic --no-coverage test/build/**/*.test.js",
|
|
207
|
-
"test-browser": "tap --node-arg --no-warnings --node-arg --experimental-specifier-resolution=node --node-arg --experimental-json-modules --reporter classic --no-coverage test/browser/**/*.test.js",
|
|
189
|
+
"test-build": "jest ./test/build",
|
|
190
|
+
"test-browser": "jest ./test/browser",
|
|
208
191
|
"test-render": "node --experimental-specifier-resolution=node --experimental-json-modules --max-old-space-size=2048 test/render.test.js",
|
|
209
192
|
"watch-query": "testem -f test/integration/testem.cjs",
|
|
210
193
|
"test-query": "testem ci -f test/integration/testem.cjs -R xunit > test/integration/query-tests/test-results.xml",
|
|
211
194
|
"test-expressions": "node --experimental-specifier-resolution=node test/expression.test.js",
|
|
212
195
|
"test-cov": "nyc --reporter=text-summary --reporter=lcov --cache run-s test-unit test-expressions test-query test-render",
|
|
213
|
-
"test-
|
|
214
|
-
"codegen": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-style-code.ts && node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-struct-arrays.ts && node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-style-spec.ts"
|
|
196
|
+
"test-unit": "jest ./src",
|
|
197
|
+
"codegen": "node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-style-code.ts && node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-struct-arrays.ts && node --loader ts-node/esm --experimental-specifier-resolution=node build/generate-style-spec.ts",
|
|
198
|
+
"benchmark": "node bench/run-benchmarks.js",
|
|
199
|
+
"gl-stats": "node bench/gl-stats.js"
|
|
215
200
|
},
|
|
216
201
|
"files": [
|
|
217
202
|
"build/",
|
|
218
|
-
"dist
|
|
219
|
-
"dist/style-spec/",
|
|
203
|
+
"dist/*",
|
|
220
204
|
"src/"
|
|
221
205
|
]
|
|
222
206
|
}
|
package/src/css/maplibre-gl.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.maplibregl-map,
|
|
2
2
|
.mapboxgl-map {
|
|
3
|
-
font: 12px/20px
|
|
3
|
+
font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
position: relative;
|
|
6
6
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
@@ -224,75 +224,75 @@
|
|
|
224
224
|
|
|
225
225
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon,
|
|
226
226
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
|
|
227
|
-
background-image: svg-load(
|
|
227
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #333);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
|
|
231
231
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon {
|
|
232
|
-
background-image: svg-load(
|
|
232
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #333);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
@media (-ms-high-contrast: active) {
|
|
236
236
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon,
|
|
237
237
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
|
|
238
|
-
background-image: svg-load(
|
|
238
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #fff);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
|
|
242
242
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon {
|
|
243
|
-
background-image: svg-load(
|
|
243
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #fff);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
@media (-ms-high-contrast: black-on-white) {
|
|
248
248
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon,
|
|
249
249
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
|
|
250
|
-
background-image: svg-load(
|
|
250
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-out.svg", fill: #000);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
|
|
254
254
|
.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon {
|
|
255
|
-
background-image: svg-load(
|
|
255
|
+
background-image: svg-load("svg/maplibregl-ctrl-zoom-in.svg", fill: #000);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon,
|
|
260
260
|
.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon {
|
|
261
|
-
background-image: svg-load(
|
|
261
|
+
background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #333);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon,
|
|
265
265
|
.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon {
|
|
266
|
-
background-image: svg-load(
|
|
266
|
+
background-image: svg-load("svg/maplibregl-ctrl-shrink.svg");
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
@media (-ms-high-contrast: active) {
|
|
270
270
|
.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon,
|
|
271
271
|
.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon {
|
|
272
|
-
background-image: svg-load(
|
|
272
|
+
background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #fff);
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon,
|
|
276
276
|
.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon {
|
|
277
|
-
background-image: svg-load(
|
|
277
|
+
background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #fff);
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
@media (-ms-high-contrast: black-on-white) {
|
|
282
282
|
.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon,
|
|
283
283
|
.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon {
|
|
284
|
-
background-image: svg-load(
|
|
284
|
+
background-image: svg-load("svg/maplibregl-ctrl-fullscreen.svg", fill: #000);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon,
|
|
288
288
|
.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon {
|
|
289
|
-
background-image: svg-load(
|
|
289
|
+
background-image: svg-load("svg/maplibregl-ctrl-shrink.svg", fill: #000);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon,
|
|
294
294
|
.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon {
|
|
295
|
-
background-image: svg-load(
|
|
295
|
+
background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #333);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
@media (-ms-high-contrast: active) {
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
@media (-ms-high-contrast: black-on-white) {
|
|
311
311
|
.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon,
|
|
312
312
|
.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon {
|
|
313
|
-
background-image: svg-load(
|
|
313
|
+
background-image: svg-load("svg/maplibregl-ctrl-compass.svg", fill: #000);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
|
|
@@ -483,7 +483,7 @@ a.mapboxgl-ctrl-logo {
|
|
|
483
483
|
background-repeat: no-repeat;
|
|
484
484
|
cursor: pointer;
|
|
485
485
|
overflow: hidden;
|
|
486
|
-
background-image: svg-load(
|
|
486
|
+
background-image: svg-load("svg/maplibregl-ctrl-logo.svg");
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
a.maplibregl-ctrl-logo.maplibregl-compact,
|
|
@@ -558,7 +558,7 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
558
558
|
display: none;
|
|
559
559
|
cursor: pointer;
|
|
560
560
|
position: absolute;
|
|
561
|
-
background-image: svg-load(
|
|
561
|
+
background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");
|
|
562
562
|
background-color: rgba(255, 255, 255, 0.5);
|
|
563
563
|
width: 24px;
|
|
564
564
|
height: 24px;
|
|
@@ -617,14 +617,14 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
617
617
|
@media screen and (-ms-high-contrast: active) {
|
|
618
618
|
.maplibregl-ctrl-attrib.maplibregl-compact::after,
|
|
619
619
|
.mapboxgl-ctrl-attrib.mapboxgl-compact::after {
|
|
620
|
-
background-image: svg-load(
|
|
620
|
+
background-image: svg-load("svg/maplibregl-ctrl-attrib.svg", fill=#fff);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
|
|
624
624
|
@media screen and (-ms-high-contrast: black-on-white) {
|
|
625
625
|
.maplibregl-ctrl-attrib.maplibregl-compact::after,
|
|
626
626
|
.mapboxgl-ctrl-attrib.mapboxgl-compact::after {
|
|
627
|
-
background-image: svg-load(
|
|
627
|
+
background-image: svg-load("svg/maplibregl-ctrl-attrib.svg");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
|
|
@@ -862,7 +862,7 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
862
862
|
.maplibregl-user-location-dot::before,
|
|
863
863
|
.mapboxgl-user-location-dot::before {
|
|
864
864
|
background-color: #1da1f2;
|
|
865
|
-
content:
|
|
865
|
+
content: "";
|
|
866
866
|
width: 15px;
|
|
867
867
|
height: 15px;
|
|
868
868
|
border-radius: 50%;
|
|
@@ -877,7 +877,7 @@ a.mapboxgl-ctrl-logo.mapboxgl-compact {
|
|
|
877
877
|
.mapboxgl-user-location-dot::after {
|
|
878
878
|
border-radius: 50%;
|
|
879
879
|
border: 2px solid #fff;
|
|
880
|
-
content:
|
|
880
|
+
content: "";
|
|
881
881
|
height: 19px;
|
|
882
882
|
left: -2px;
|
|
883
883
|
position: absolute;
|
package/src/data/array_types.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import assert from 'assert';
|
|
4
4
|
import {Struct, StructArray} from '../util/struct_array';
|
|
5
5
|
import {register} from '../util/web_worker_transfer';
|
|
6
|
-
import Point from '
|
|
6
|
+
import Point from '@mapbox/point-geometry';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Implementation of the StructArray layout:
|
|
@@ -23,7 +23,7 @@ import type HeatmapStyleLayer from '../../style/style_layer/heatmap_style_layer'
|
|
|
23
23
|
import type Context from '../../gl/context';
|
|
24
24
|
import type IndexBuffer from '../../gl/index_buffer';
|
|
25
25
|
import type VertexBuffer from '../../gl/vertex_buffer';
|
|
26
|
-
import type Point from '
|
|
26
|
+
import type Point from '@mapbox/point-geometry';
|
|
27
27
|
import type {FeatureStates} from '../../source/source_state';
|
|
28
28
|
import type {ImagePosition} from '../../render/image_atlas';
|
|
29
29
|
import type {VectorTileLayer} from '@mapbox/vector-tile';
|
|
@@ -3,7 +3,7 @@ import fs from 'fs';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import Protobuf from 'pbf';
|
|
5
5
|
import {VectorTile} from '@mapbox/vector-tile';
|
|
6
|
-
import Point from '
|
|
6
|
+
import Point from '@mapbox/point-geometry';
|
|
7
7
|
import segment from '../segment';
|
|
8
8
|
import FillBucket from './fill_bucket';
|
|
9
9
|
import FillStyleLayer from '../../style/style_layer/fill_style_layer';
|
|
@@ -26,7 +26,7 @@ import type FillStyleLayer from '../../style/style_layer/fill_style_layer';
|
|
|
26
26
|
import type Context from '../../gl/context';
|
|
27
27
|
import type IndexBuffer from '../../gl/index_buffer';
|
|
28
28
|
import type VertexBuffer from '../../gl/vertex_buffer';
|
|
29
|
-
import type Point from '
|
|
29
|
+
import type Point from '@mapbox/point-geometry';
|
|
30
30
|
import type {FeatureStates} from '../../source/source_state';
|
|
31
31
|
import type {ImagePosition} from '../../render/image_atlas';
|
|
32
32
|
import type {VectorTileLayer} from '@mapbox/vector-tile';
|
|
@@ -30,7 +30,7 @@ import type FillExtrusionStyleLayer from '../../style/style_layer/fill_extrusion
|
|
|
30
30
|
import type Context from '../../gl/context';
|
|
31
31
|
import type IndexBuffer from '../../gl/index_buffer';
|
|
32
32
|
import type VertexBuffer from '../../gl/vertex_buffer';
|
|
33
|
-
import type Point from '
|
|
33
|
+
import type Point from '@mapbox/point-geometry';
|
|
34
34
|
import type {FeatureStates} from '../../source/source_state';
|
|
35
35
|
import type {ImagePosition} from '../../render/image_atlas';
|
|
36
36
|
import type {VectorTileLayer} from '@mapbox/vector-tile';
|
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import Protobuf from 'pbf';
|
|
4
4
|
import {VectorTile} from '@mapbox/vector-tile';
|
|
5
|
-
import Point from '
|
|
5
|
+
import Point from '@mapbox/point-geometry';
|
|
6
6
|
import segment from '../segment';
|
|
7
7
|
import LineBucket from './line_bucket';
|
|
8
8
|
import LineStyleLayer from '../../style/style_layer/line_style_layer';
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
PopulateParameters
|
|
24
24
|
} from '../bucket';
|
|
25
25
|
import type LineStyleLayer from '../../style/style_layer/line_style_layer';
|
|
26
|
-
import type Point from '
|
|
26
|
+
import type Point from '@mapbox/point-geometry';
|
|
27
27
|
import type {Segment} from '../segment';
|
|
28
28
|
import {RGBAImage} from '../../util/image';
|
|
29
29
|
import type Context from '../../gl/context';
|
|
@@ -11,7 +11,7 @@ import {OverscaledTileID} from '../../source/tile_id';
|
|
|
11
11
|
import Tile from '../../source/tile';
|
|
12
12
|
import CrossTileSymbolIndex from '../../symbol/cross_tile_symbol_index';
|
|
13
13
|
import FeatureIndex from '../../data/feature_index';
|
|
14
|
-
import {createSymbolBucket, createSymbolIconBucket} from '../../../test/util/
|
|
14
|
+
import {createSymbolBucket, createSymbolIconBucket} from '../../../test/util/create_symbol_layer';
|
|
15
15
|
import {RGBAImage} from '../../util/image';
|
|
16
16
|
import {ImagePosition} from '../../render/image_atlas';
|
|
17
17
|
import {IndexedFeature, PopulateParameters} from '../bucket';
|
|
@@ -16,7 +16,7 @@ import {SymbolLayoutArray,
|
|
|
16
16
|
SymbolLineVertexArray
|
|
17
17
|
} from '../array_types';
|
|
18
18
|
|
|
19
|
-
import Point from '
|
|
19
|
+
import Point from '@mapbox/point-geometry';
|
|
20
20
|
import SegmentVector from '../segment';
|
|
21
21
|
import {ProgramConfigurationSet} from '../program_configuration';
|
|
22
22
|
import {TriangleIndexArray, LineIndexArray} from '../index_array_type';
|
|
@@ -48,7 +48,7 @@ import type {
|
|
|
48
48
|
} from '../bucket';
|
|
49
49
|
import type {CollisionBoxArray, CollisionBox, SymbolInstance} from '../array_types';
|
|
50
50
|
import type {StructArray, StructArrayMember, ViewType} from '../../util/struct_array';
|
|
51
|
-
import SymbolStyleLayer from '../../style/style_layer/symbol_style_layer';
|
|
51
|
+
import SymbolStyleLayer, {getOverlapMode} from '../../style/style_layer/symbol_style_layer';
|
|
52
52
|
import type Context from '../../gl/context';
|
|
53
53
|
import type IndexBuffer from '../../gl/index_buffer';
|
|
54
54
|
import type VertexBuffer from '../../gl/vertex_buffer';
|
|
@@ -388,8 +388,8 @@ class SymbolBucket implements Bucket {
|
|
|
388
388
|
const sortKey = layout.get('symbol-sort-key');
|
|
389
389
|
const zOrder = layout.get('symbol-z-order');
|
|
390
390
|
this.canOverlap =
|
|
391
|
-
layout
|
|
392
|
-
layout
|
|
391
|
+
getOverlapMode(layout, 'text-overlap', 'text-allow-overlap') !== 'never' ||
|
|
392
|
+
getOverlapMode(layout, 'icon-overlap', 'icon-allow-overlap') !== 'never' ||
|
|
393
393
|
layout.get('text-ignore-placement') ||
|
|
394
394
|
layout.get('icon-ignore-placement');
|
|
395
395
|
this.sortFeaturesByKey = zOrder !== 'viewport-y' && !sortKey.isConstant();
|
package/src/data/bucket.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {FeatureStates} from '../source/source_state';
|
|
|
7
7
|
import type {ImagePosition} from '../render/image_atlas';
|
|
8
8
|
import type {CanonicalTileID} from '../source/tile_id';
|
|
9
9
|
import type {VectorTileFeature, VectorTileLayer} from '@mapbox/vector-tile';
|
|
10
|
-
import Point from '
|
|
10
|
+
import Point from '@mapbox/point-geometry';
|
|
11
11
|
|
|
12
12
|
export type BucketParameters<Layer extends TypedStyleLayer> = {
|
|
13
13
|
index: number;
|
|
@@ -2,7 +2,7 @@ import {warnOnce, clamp} from '../util/util';
|
|
|
2
2
|
|
|
3
3
|
import EXTENT from './extent';
|
|
4
4
|
|
|
5
|
-
import type Point from '
|
|
5
|
+
import type Point from '@mapbox/point-geometry';
|
|
6
6
|
import type {VectorTileFeature} from '@mapbox/vector-tile';
|
|
7
7
|
|
|
8
8
|
// These bounds define the minimum and maximum supported coordinate values.
|
|
@@ -129,7 +129,7 @@ class ConstantBinder implements UniformBinder {
|
|
|
129
129
|
|
|
130
130
|
class CrossFadedConstantBinder implements UniformBinder {
|
|
131
131
|
uniformNames: Array<string>;
|
|
132
|
-
patternFrom: Array<number
|
|
132
|
+
patternFrom: Array<number>;
|
|
133
133
|
patternTo: Array<number>;
|
|
134
134
|
pixelRatioFrom: number;
|
|
135
135
|
pixelRatioTo: number;
|
package/src/geo/edge_insets.ts
CHANGED
package/src/geo/transform.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import LngLat from './lng_lat';
|
|
2
2
|
import LngLatBounds from './lng_lat_bounds';
|
|
3
3
|
import MercatorCoordinate, {mercatorXfromLng, mercatorYfromLat, mercatorZfromAltitude} from './mercator_coordinate';
|
|
4
|
-
import Point from '
|
|
4
|
+
import Point from '@mapbox/point-geometry';
|
|
5
5
|
import {wrap, clamp} from '../util/util';
|
|
6
6
|
import {number as interpolate} from '../style-spec/util/interpolate';
|
|
7
7
|
import EXTENT from '../data/extent';
|
package/src/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ import Marker from './ui/marker';
|
|
|
13
13
|
import Style from './style/style';
|
|
14
14
|
import LngLat from './geo/lng_lat';
|
|
15
15
|
import LngLatBounds from './geo/lng_lat_bounds';
|
|
16
|
-
import Point from '
|
|
16
|
+
import Point from '@mapbox/point-geometry';
|
|
17
17
|
import MercatorCoordinate from './geo/mercator_coordinate';
|
|
18
18
|
import {Evented} from './util/evented';
|
|
19
19
|
import config from './util/config';
|
package/src/render/draw_debug.ts
CHANGED
|
@@ -55,7 +55,7 @@ function drawDebugSSRect(painter: Painter, x: number, y: number, width: number,
|
|
|
55
55
|
const gl = context.gl;
|
|
56
56
|
|
|
57
57
|
gl.enable(gl.SCISSOR_TEST);
|
|
58
|
-
gl.scissor(x *
|
|
58
|
+
gl.scissor(x * painter.pixelRatio, y * painter.pixelRatio, width * painter.pixelRatio, height * painter.pixelRatio);
|
|
59
59
|
context.clear({color});
|
|
60
60
|
gl.disable(gl.SCISSOR_TEST);
|
|
61
61
|
}
|
|
@@ -103,7 +103,7 @@ export default class GlyphManager {
|
|
|
103
103
|
let requests = entry.requests[range];
|
|
104
104
|
if (!requests) {
|
|
105
105
|
requests = entry.requests[range] = [];
|
|
106
|
-
GlyphManager.loadGlyphRange(stack, range, this.url
|
|
106
|
+
GlyphManager.loadGlyphRange(stack, range, this.url, this.requestManager,
|
|
107
107
|
(err, response?: {
|
|
108
108
|
[_: number]: StyleGlyph | null;
|
|
109
109
|
} | null) => {
|
package/src/render/painter.ts
CHANGED
|
@@ -92,6 +92,7 @@ class Painter {
|
|
|
92
92
|
emptyProgramConfiguration: ProgramConfiguration;
|
|
93
93
|
width: number;
|
|
94
94
|
height: number;
|
|
95
|
+
pixelRatio: number;
|
|
95
96
|
tileExtentBuffer: VertexBuffer;
|
|
96
97
|
tileExtentSegments: SegmentVector;
|
|
97
98
|
debugBuffer: VertexBuffer;
|
|
@@ -146,9 +147,10 @@ class Painter {
|
|
|
146
147
|
* Update the GL viewport, projection matrix, and transforms to compensate
|
|
147
148
|
* for a new width and height value.
|
|
148
149
|
*/
|
|
149
|
-
resize(width: number, height: number) {
|
|
150
|
-
this.width = width *
|
|
151
|
-
this.height = height *
|
|
150
|
+
resize(width: number, height: number, pixelRatio: number) {
|
|
151
|
+
this.width = width * pixelRatio;
|
|
152
|
+
this.height = height * pixelRatio;
|
|
153
|
+
this.pixelRatio = pixelRatio;
|
|
152
154
|
this.context.viewport.set([0, 0, this.width, this.height]);
|
|
153
155
|
|
|
154
156
|
if (this.style) {
|
|
@@ -53,7 +53,7 @@ const circleUniformValues = (
|
|
|
53
53
|
layer.paint.get('circle-translate'),
|
|
54
54
|
layer.paint.get('circle-translate-anchor')),
|
|
55
55
|
'u_pitch_with_map': +(pitchWithMap),
|
|
56
|
-
'u_device_pixel_ratio':
|
|
56
|
+
'u_device_pixel_ratio': painter.pixelRatio,
|
|
57
57
|
'u_extrude_scale': extrudeScale
|
|
58
58
|
};
|
|
59
59
|
};
|