maplibre-gl 3.2.1 → 3.3.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 +6 -3
- package/build/generate-style-code.ts +7 -8
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp-worker.js.map +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-csp.js.map +1 -1
- package/dist/maplibre-gl-dev.js +565 -243
- package/dist/maplibre-gl-dev.js.map +1 -1
- package/dist/maplibre-gl.d.ts +111 -57
- package/dist/maplibre-gl.js +4 -4
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +20 -20
- package/src/data/array_types.g.ts +110 -24
- package/src/data/bucket/circle_bucket.ts +1 -0
- package/src/data/bucket/line_bucket.ts +1 -0
- package/src/data/bucket/symbol_attributes.ts +7 -1
- package/src/data/bucket/symbol_bucket.ts +5 -1
- package/src/data/feature_index.ts +1 -0
- package/src/data/program_configuration.ts +1 -0
- package/src/data/segment.ts +2 -0
- package/src/geo/transform.ts +1 -0
- package/src/gl/context.ts +1 -0
- package/src/gl/framebuffer.ts +1 -0
- package/src/gl/index_buffer.ts +1 -0
- package/src/gl/render_pool.ts +2 -1
- package/src/gl/vertex_buffer.ts +1 -0
- package/src/render/draw_symbol.ts +8 -9
- package/src/render/image_atlas.ts +1 -0
- package/src/render/line_atlas.ts +1 -0
- package/src/render/painter.ts +1 -0
- package/src/render/program.ts +1 -0
- package/src/render/render_to_texture.ts +31 -14
- package/src/render/terrain.ts +3 -0
- package/src/render/texture.ts +1 -0
- package/src/render/uniform_binding.ts +2 -0
- package/src/render/vertex_array_object.ts +1 -0
- package/src/shaders/symbol_sdf.fragment.glsl +9 -3
- package/src/shaders/symbol_sdf.fragment.glsl.g.ts +1 -1
- package/src/source/canvas_source.ts +1 -3
- package/src/source/geojson_source.ts +1 -3
- package/src/source/image_source.ts +2 -4
- package/src/source/source_cache.ts +1 -0
- package/src/source/source_state.ts +1 -0
- package/src/source/terrain_source_cache.ts +1 -0
- package/src/source/tile.ts +1 -0
- package/src/source/tile_cache.ts +1 -1
- package/src/source/tile_id.ts +1 -0
- package/src/source/vector_tile_worker_source.test.ts +79 -0
- package/src/source/vector_tile_worker_source.ts +26 -1
- package/src/source/worker_source.ts +1 -0
- package/src/style/evaluation_parameters.ts +1 -0
- package/src/style/properties.ts +18 -0
- package/src/style/style.ts +1 -0
- package/src/style/style_glyph.ts +1 -0
- package/src/style/style_layer/background_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/circle_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/fill_extrusion_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/fill_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/heatmap_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/hillshade_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/line_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/raster_style_layer_properties.g.ts +1 -6
- package/src/style/style_layer/symbol_style_layer_properties.g.ts +4 -6
- package/src/style/style_layer/variable_text_anchor.test.ts +117 -0
- package/src/style/style_layer/variable_text_anchor.ts +163 -0
- package/src/symbol/collision_index.ts +1 -0
- package/src/symbol/grid_index.ts +1 -0
- package/src/symbol/placement.ts +52 -40
- package/src/symbol/symbol_layout.ts +42 -116
- package/src/ui/camera.ts +8 -8
- package/src/ui/handler/box_zoom.ts +1 -3
- package/src/ui/handler/click_zoom.ts +1 -3
- package/src/ui/handler/keyboard.ts +1 -3
- package/src/ui/handler/scroll_zoom.ts +1 -3
- package/src/ui/handler/shim/dblclick_zoom.ts +1 -3
- package/src/ui/handler/shim/drag_pan.ts +1 -3
- package/src/ui/handler/shim/drag_rotate.ts +1 -3
- package/src/ui/handler/shim/two_fingers_touch.ts +1 -3
- package/src/ui/handler/transform-provider.ts +1 -0
- package/src/ui/handler/two_fingers_touch.ts +1 -3
- package/src/ui/map.ts +7 -6
- package/src/util/ajax.test.ts +33 -0
- package/src/util/ajax.ts +5 -0
- package/src/util/image.ts +1 -0
- package/src/util/image_request.ts +2 -2
- package/src/util/performance.ts +1 -2
- package/src/util/struct_array.ts +5 -1
- package/src/util/test/mock_fetch.ts +51 -0
|
@@ -35,7 +35,8 @@ import {
|
|
|
35
35
|
placement,
|
|
36
36
|
symbolInstance,
|
|
37
37
|
glyphOffset,
|
|
38
|
-
lineVertex
|
|
38
|
+
lineVertex,
|
|
39
|
+
textAnchorOffset
|
|
39
40
|
} from '../src/data/bucket/symbol_attributes';
|
|
40
41
|
|
|
41
42
|
const typeAbbreviations = {
|
|
@@ -164,6 +165,7 @@ createStructArrayType('placed_symbol', placement, true);
|
|
|
164
165
|
createStructArrayType('symbol_instance', symbolInstance, true);
|
|
165
166
|
createStructArrayType('glyph_offset', glyphOffset, true);
|
|
166
167
|
createStructArrayType('symbol_line_vertex', lineVertex, true);
|
|
168
|
+
createStructArrayType('text_anchor_offset', textAnchorOffset, true);
|
|
167
169
|
|
|
168
170
|
// feature index array
|
|
169
171
|
createStructArrayType('feature_index', createLayout([
|
|
@@ -227,6 +229,7 @@ function emitStructArrayLayout(locals) {
|
|
|
227
229
|
|
|
228
230
|
output.push(
|
|
229
231
|
`/**
|
|
232
|
+
* @internal
|
|
230
233
|
* Implementation of the StructArray layout:`);
|
|
231
234
|
|
|
232
235
|
for (const member of members) {
|
|
@@ -348,7 +351,7 @@ function emitStructArray(locals) {
|
|
|
348
351
|
|
|
349
352
|
if (includeStructAccessors && !useComponentGetters) {
|
|
350
353
|
output.push(
|
|
351
|
-
`/** */
|
|
354
|
+
`/** @internal */
|
|
352
355
|
class ${structTypeClass} extends Struct {
|
|
353
356
|
_structArray: ${structArrayClass};`);
|
|
354
357
|
|
|
@@ -384,7 +387,7 @@ export type ${structTypeClass.replace('Struct', '')} = ${structTypeClass};
|
|
|
384
387
|
} // end 'if (includeStructAccessors)'
|
|
385
388
|
|
|
386
389
|
output.push(
|
|
387
|
-
`/** */
|
|
390
|
+
`/** @internal */
|
|
388
391
|
export class ${structArrayClass} extends ${structArrayLayoutClass} {`);
|
|
389
392
|
|
|
390
393
|
if (useComponentGetters) {
|
|
@@ -29,6 +29,8 @@ function nativeType(property) {
|
|
|
29
29
|
return 'Color';
|
|
30
30
|
case 'padding':
|
|
31
31
|
return 'Padding';
|
|
32
|
+
case 'variableAnchorOffsetCollection':
|
|
33
|
+
return 'VariableAnchorOffsetCollection';
|
|
32
34
|
case 'sprite':
|
|
33
35
|
return 'Sprite';
|
|
34
36
|
case 'formatted':
|
|
@@ -41,7 +43,7 @@ function nativeType(property) {
|
|
|
41
43
|
} else {
|
|
42
44
|
return `Array<${nativeType({type: property.value, values: property.values})}>`;
|
|
43
45
|
}
|
|
44
|
-
default: throw new Error(`unknown type for ${property.name}`);
|
|
46
|
+
default: throw new Error(`unknown type "${property.type}" for "${property.name}"`);
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -93,6 +95,8 @@ function runtimeType(property) {
|
|
|
93
95
|
return 'ColorType';
|
|
94
96
|
case 'padding':
|
|
95
97
|
return 'PaddingType';
|
|
98
|
+
case 'variableAnchorOffsetCollection':
|
|
99
|
+
return 'VariableAnchorOffsetCollectionType';
|
|
96
100
|
case 'sprite':
|
|
97
101
|
return 'SpriteType';
|
|
98
102
|
case 'formatted':
|
|
@@ -105,7 +109,7 @@ function runtimeType(property) {
|
|
|
105
109
|
} else {
|
|
106
110
|
return `array(${runtimeType({type: property.value})})`;
|
|
107
111
|
}
|
|
108
|
-
default: throw new Error(`unknown type for ${property.name}`);
|
|
112
|
+
default: throw new Error(`unknown type "${property.type}" for "${property.name}"`);
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
|
|
@@ -182,12 +186,7 @@ import {
|
|
|
182
186
|
CrossFaded
|
|
183
187
|
} from '../properties';
|
|
184
188
|
|
|
185
|
-
import type {Color} from '@maplibre/maplibre-gl-style-spec';
|
|
186
|
-
import type {Padding} from '@maplibre/maplibre-gl-style-spec';
|
|
187
|
-
|
|
188
|
-
import type {Formatted} from '@maplibre/maplibre-gl-style-spec';
|
|
189
|
-
|
|
190
|
-
import type {ResolvedImage} from '@maplibre/maplibre-gl-style-spec';
|
|
189
|
+
import type {Color, Formatted, Padding, ResolvedImage, VariableAnchorOffsetCollection} from '@maplibre/maplibre-gl-style-spec';
|
|
191
190
|
import {StylePropertySpecification} from '@maplibre/maplibre-gl-style-spec';
|
|
192
191
|
`);
|
|
193
192
|
|