maplibre-gl 6.2.0 → 6.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/dist/maplibre-gl-dev.mjs +522 -223
- package/dist/maplibre-gl-dev.mjs.map +1 -1
- package/dist/maplibre-gl-shared-dev.mjs +103 -58
- package/dist/maplibre-gl-shared-dev.mjs.map +1 -1
- package/dist/maplibre-gl-shared.mjs +2 -2
- package/dist/maplibre-gl-shared.mjs.map +1 -1
- package/dist/maplibre-gl-worker-dev.mjs +23 -49
- package/dist/maplibre-gl-worker-dev.mjs.map +1 -1
- package/dist/maplibre-gl-worker.mjs +2 -2
- package/dist/maplibre-gl-worker.mjs.map +1 -1
- package/dist/maplibre-gl.css +1 -1
- package/dist/maplibre-gl.d.ts +214 -59
- package/dist/maplibre-gl.mjs +44 -44
- package/dist/maplibre-gl.mjs.map +1 -1
- package/package.json +10 -20
- package/src/data/feature_index.bench.ts +21 -0
- package/src/data/segment.test.ts +2 -2
- package/src/geo/edge_insets.test.ts +1 -1
- package/src/geo/lng_lat.test.ts +7 -7
- package/src/geo/lng_lat_bounds.test.ts +4 -4
- package/src/geo/mercator_coordinate.test.ts +2 -2
- package/src/geo/projection/camera_helper.ts +5 -0
- package/src/geo/projection/globe_transform.test.ts +25 -0
- package/src/geo/projection/globe_transform.ts +7 -3
- package/src/geo/projection/mercator_camera_helper.ts +1 -1
- package/src/geo/projection/mercator_transform.ts +21 -5
- package/src/geo/projection/vertical_perspective_camera_helper.ts +60 -31
- package/src/geo/projection/vertical_perspective_transform.ts +7 -1
- package/src/geo/transform_interface.ts +13 -1
- package/src/index.ts +7 -2
- package/src/render/image_atlas.test.ts +72 -0
- package/src/render/image_atlas.ts +17 -2
- package/src/render/image_manager.test.ts +46 -0
- package/src/render/image_manager.ts +9 -2
- package/src/render/painter.ts +1 -12
- package/src/render/update_pattern_positions_in_program.test.ts +1 -1
- package/src/shaders/glsl/_prelude.vertex.glsl +2 -3
- package/src/shaders/glsl/_prelude.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/circle.vertex.glsl +4 -4
- package/src/shaders/glsl/circle.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/fill_extrusion.vertex.glsl +3 -3
- package/src/shaders/glsl/fill_extrusion.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/fill_extrusion_pattern.vertex.glsl +5 -5
- package/src/shaders/glsl/fill_extrusion_pattern.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/heatmap.vertex.glsl +4 -4
- package/src/shaders/glsl/heatmap.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/line.vertex.glsl +7 -7
- package/src/shaders/glsl/line.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/line_gradient.vertex.glsl +6 -6
- package/src/shaders/glsl/line_gradient.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/line_gradient_sdf.vertex.glsl +7 -7
- package/src/shaders/glsl/line_gradient_sdf.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/line_pattern.vertex.glsl +7 -7
- package/src/shaders/glsl/line_pattern.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/line_sdf.vertex.glsl +7 -7
- package/src/shaders/glsl/line_sdf.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/raster.fragment.glsl +4 -4
- package/src/shaders/glsl/raster.fragment.glsl.g.ts +1 -1
- package/src/shaders/glsl/raster.vertex.glsl +11 -6
- package/src/shaders/glsl/raster.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/symbol_icon.vertex.glsl +5 -5
- package/src/shaders/glsl/symbol_icon.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/symbol_sdf.vertex.glsl +5 -5
- package/src/shaders/glsl/symbol_sdf.vertex.glsl.g.ts +1 -1
- package/src/shaders/glsl/symbol_text_and_icon.vertex.glsl +6 -6
- package/src/shaders/glsl/symbol_text_and_icon.vertex.glsl.g.ts +1 -1
- package/src/source/canvas_source.test.ts +31 -0
- package/src/source/canvas_source.ts +2 -1
- package/src/source/geojson_worker_source.test.ts +88 -0
- package/src/source/geojson_worker_source.ts +22 -39
- package/src/source/image_source.test.ts +205 -7
- package/src/source/image_source.ts +118 -4
- package/src/source/raster_dem_tile_worker_source.test.ts +1 -1
- package/src/source/vector_tile_worker_source.test.ts +94 -2
- package/src/source/vector_tile_worker_source.ts +18 -27
- package/src/source/video_source.test.ts +12 -8
- package/src/source/worker_tile.bench.ts +10 -0
- package/src/source/worker_tile.ts +0 -3
- package/src/style/create_style_layer.bench.ts +15 -0
- package/src/style/properties.bench.ts +81 -0
- package/src/style/style.test.ts +11 -10
- package/src/style/style_image.ts +67 -9
- package/src/style/style_layer.bench.ts +65 -0
- package/src/style/style_layer.test.ts +1 -1
- package/src/style/style_layer.ts +2 -2
- package/src/style/validate_style.bench.ts +11 -0
- package/src/style/validate_style.test.ts +2 -2
- package/src/symbol/anchor.test.ts +2 -2
- package/src/symbol/collision_index.bench.ts +116 -0
- package/src/symbol/cross_tile_symbol_index.bench.ts +49 -0
- package/src/symbol/shaping.test.ts +2 -1
- package/src/symbol/symbol_layout.bench.ts +30 -0
- package/src/tile/tile_id.test.ts +1 -1
- package/src/tile/tile_manager.ts +2 -2
- package/src/ui/control/fullscreen_control.test.ts +10 -10
- package/src/ui/control/geolocate_control.test.ts +3 -5
- package/src/ui/control/globe_control.test.ts +6 -6
- package/src/ui/events.ts +1 -1
- package/src/ui/handler/scroll_zoom.test.ts +50 -0
- package/src/ui/handler/two_fingers_touch.test.ts +3 -3
- package/src/ui/handler_manager.test.ts +243 -3
- package/src/ui/handler_manager.ts +79 -16
- package/src/ui/map.ts +17 -3
- package/src/ui/map_tests/map_cross_window.test.ts +2 -2
- package/src/ui/map_tests/map_events.test.ts +3 -3
- package/src/ui/map_tests/map_images.test.ts +29 -0
- package/src/ui/map_tests/map_style.test.ts +9 -8
- package/src/ui/map_tests/map_webgl.test.ts +29 -0
- package/src/ui/marker.test.ts +26 -42
- package/src/ui/popup.test.ts +14 -14
- package/src/util/evented.test.ts +33 -28
- package/src/util/evented.ts +69 -43
- package/src/util/test/null_gl.ts +10 -0
- package/src/util/test/util.ts +2 -1
- package/src/util/util.test.ts +1 -1
- package/src/util/web_worker_transfer.test.ts +5 -5
- package/src/webgl/context.ts +20 -0
- package/src/webgl/draw/draw_raster.ts +11 -6
- package/src/webgl/program/raster_program.ts +11 -0
- package/src/webgl/program.ts +31 -16
- package/src/webgl/texture.test.ts +16 -1
- package/src/webgl/texture.ts +3 -0
- package/src/webgl/vertex_buffer.test.ts +17 -2
- package/src/webgl/vertex_buffer.ts +24 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MapLibre GL JS
|
|
3
|
-
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.
|
|
3
|
+
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.3.0/LICENSE.txt
|
|
4
4
|
*/
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
6
|
var __create = Object.create;
|
|
@@ -436,6 +436,15 @@ function invert$5(out, a) {
|
|
|
436
436
|
return out;
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
|
+
* Calculates the determinant of a mat2
|
|
440
|
+
*
|
|
441
|
+
* @param {ReadonlyMat2} a the source matrix
|
|
442
|
+
* @returns {Number} determinant of a
|
|
443
|
+
*/
|
|
444
|
+
function determinant$3(a) {
|
|
445
|
+
return a[0] * a[3] - a[2] * a[1];
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
439
448
|
* Rotates a mat2 by the given angle
|
|
440
449
|
*
|
|
441
450
|
* @param {mat2} out the receiving matrix
|
|
@@ -3167,23 +3176,23 @@ var Evented = class {
|
|
|
3167
3176
|
return this;
|
|
3168
3177
|
}
|
|
3169
3178
|
fire(event, properties) {
|
|
3170
|
-
|
|
3171
|
-
const type =
|
|
3179
|
+
const firedEvent = typeof event === "string" ? new Event(event, properties || {}) : event;
|
|
3180
|
+
const type = firedEvent.type;
|
|
3172
3181
|
if (this.listens(type)) {
|
|
3173
|
-
|
|
3174
|
-
const listeners = this._listeners?.[type]
|
|
3175
|
-
for (const listener of listeners) listener.call(this,
|
|
3176
|
-
const oneTimeListeners = this._oneTimeListeners?.[type]
|
|
3182
|
+
firedEvent.target = this;
|
|
3183
|
+
const listeners = this._listeners?.[type]?.slice() ?? [];
|
|
3184
|
+
for (const listener of listeners) listener.call(this, firedEvent);
|
|
3185
|
+
const oneTimeListeners = this._oneTimeListeners?.[type]?.slice() ?? [];
|
|
3177
3186
|
for (const listener of oneTimeListeners) {
|
|
3178
3187
|
_removeEventListener(type, listener, this._oneTimeListeners);
|
|
3179
|
-
listener.call(this,
|
|
3188
|
+
listener.call(this, firedEvent);
|
|
3180
3189
|
}
|
|
3181
3190
|
const parent = this._eventedParent;
|
|
3182
3191
|
if (parent) {
|
|
3183
|
-
extend(
|
|
3184
|
-
parent.fire(
|
|
3192
|
+
extend(firedEvent, typeof this._eventedParentData === "function" ? this._eventedParentData() : this._eventedParentData);
|
|
3193
|
+
parent.fire(firedEvent);
|
|
3185
3194
|
}
|
|
3186
|
-
} else if (
|
|
3195
|
+
} else if (firedEvent instanceof ErrorEvent) console.error(firedEvent.error);
|
|
3187
3196
|
return this;
|
|
3188
3197
|
}
|
|
3189
3198
|
/**
|
|
@@ -3193,7 +3202,7 @@ var Evented = class {
|
|
|
3193
3202
|
* @returns `true` if there is at least one registered listener for specified event type, `false` otherwise
|
|
3194
3203
|
*/
|
|
3195
3204
|
listens(type) {
|
|
3196
|
-
return this._listeners?.[type]?.length
|
|
3205
|
+
return Boolean(this._listeners?.[type]?.length || this._oneTimeListeners?.[type]?.length || this._eventedParent?.listens(type));
|
|
3197
3206
|
}
|
|
3198
3207
|
/**
|
|
3199
3208
|
* Bubble all events fired by this instance of Evented to this parent instance of Evented.
|
|
@@ -15670,8 +15679,10 @@ var SourceExpressionBinder = class {
|
|
|
15670
15679
|
}
|
|
15671
15680
|
}
|
|
15672
15681
|
upload(context) {
|
|
15673
|
-
if (this.paintVertexArray?.arrayBuffer.byteLength)
|
|
15674
|
-
|
|
15682
|
+
if (this.paintVertexArray?.arrayBuffer.byteLength) {
|
|
15683
|
+
if (this.paintVertexBuffer?.buffer) this.paintVertexBuffer.updateData(this.paintVertexArray);
|
|
15684
|
+
else this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);
|
|
15685
|
+
}
|
|
15675
15686
|
}
|
|
15676
15687
|
destroy() {
|
|
15677
15688
|
if (this.paintVertexBuffer) this.paintVertexBuffer.destroy();
|
|
@@ -15716,8 +15727,10 @@ var CompositeExpressionBinder = class {
|
|
|
15716
15727
|
}
|
|
15717
15728
|
}
|
|
15718
15729
|
upload(context) {
|
|
15719
|
-
if (this.paintVertexArray?.arrayBuffer.byteLength)
|
|
15720
|
-
|
|
15730
|
+
if (this.paintVertexArray?.arrayBuffer.byteLength) {
|
|
15731
|
+
if (this.paintVertexBuffer?.buffer) this.paintVertexBuffer.updateData(this.paintVertexArray);
|
|
15732
|
+
else this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);
|
|
15733
|
+
}
|
|
15721
15734
|
}
|
|
15722
15735
|
destroy() {
|
|
15723
15736
|
if (this.paintVertexBuffer) this.paintVertexBuffer.destroy();
|
|
@@ -16831,6 +16844,8 @@ var Texture = class {
|
|
|
16831
16844
|
gl.deleteTexture(this.texture);
|
|
16832
16845
|
this.texture = gl.createTexture();
|
|
16833
16846
|
this._ownedHandle = this.texture;
|
|
16847
|
+
this.filter = void 0;
|
|
16848
|
+
this.wrap = void 0;
|
|
16834
16849
|
}
|
|
16835
16850
|
gl.bindTexture(gl.TEXTURE_2D, this.texture);
|
|
16836
16851
|
context.pixelStoreUnpackFlipY.set(false);
|
|
@@ -18280,8 +18295,10 @@ function subdivideVertexLine(linePoints, granularity, isRing = false) {
|
|
|
18280
18295
|
const first = linePoints[0];
|
|
18281
18296
|
const last = linePoints[linePoints.length - 1];
|
|
18282
18297
|
const addLastToFirstSegment = isRing && (first.x !== last.x || first.y !== last.y);
|
|
18283
|
-
if (granularity < 2)
|
|
18284
|
-
|
|
18298
|
+
if (granularity < 2) {
|
|
18299
|
+
if (addLastToFirstSegment) return [...linePoints, linePoints[0]];
|
|
18300
|
+
else return [...linePoints];
|
|
18301
|
+
}
|
|
18285
18302
|
const cellSize = Math.floor(EXTENT$1 / granularity);
|
|
18286
18303
|
const finalLineVertices = [];
|
|
18287
18304
|
finalLineVertices.push(new Point(linePoints[0].x, linePoints[0].y));
|
|
@@ -22655,8 +22672,10 @@ function getGlyphAdvance(codePoint, section, glyphMap, imagePositions, spacing,
|
|
|
22655
22672
|
}
|
|
22656
22673
|
function calculateBadness(lineWidth, targetWidth, penalty, isLastBreak) {
|
|
22657
22674
|
const raggedness = Math.pow(lineWidth - targetWidth, 2);
|
|
22658
|
-
if (isLastBreak)
|
|
22659
|
-
|
|
22675
|
+
if (isLastBreak) {
|
|
22676
|
+
if (lineWidth < targetWidth) return raggedness / 2;
|
|
22677
|
+
else return raggedness * 2;
|
|
22678
|
+
}
|
|
22660
22679
|
return raggedness + Math.abs(penalty) * penalty;
|
|
22661
22680
|
}
|
|
22662
22681
|
function calculatePenalty(codePoint, nextCodePoint, penalizableIdeographicBreak) {
|
|
@@ -23582,25 +23601,27 @@ function readUtf8$1(buf, pos, end) {
|
|
|
23582
23601
|
function writeUtf8(buf, str, pos) {
|
|
23583
23602
|
for (let i = 0, c, lead; i < str.length; i++) {
|
|
23584
23603
|
c = str.charCodeAt(i);
|
|
23585
|
-
if (c > 55295 && c < 57344)
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
+
if (c > 55295 && c < 57344) {
|
|
23605
|
+
if (lead) {
|
|
23606
|
+
if (c < 56320) {
|
|
23607
|
+
buf[pos++] = 239;
|
|
23608
|
+
buf[pos++] = 191;
|
|
23609
|
+
buf[pos++] = 189;
|
|
23610
|
+
lead = c;
|
|
23611
|
+
continue;
|
|
23612
|
+
} else {
|
|
23613
|
+
c = lead - 55296 << 10 | c - 56320 | 65536;
|
|
23614
|
+
lead = null;
|
|
23615
|
+
}
|
|
23616
|
+
} else {
|
|
23617
|
+
if (c > 56319 || i + 1 === str.length) {
|
|
23618
|
+
buf[pos++] = 239;
|
|
23619
|
+
buf[pos++] = 191;
|
|
23620
|
+
buf[pos++] = 189;
|
|
23621
|
+
} else lead = c;
|
|
23622
|
+
continue;
|
|
23623
|
+
}
|
|
23624
|
+
} else if (lead) {
|
|
23604
23625
|
buf[pos++] = 239;
|
|
23605
23626
|
buf[pos++] = 191;
|
|
23606
23627
|
buf[pos++] = 189;
|
|
@@ -23656,15 +23677,15 @@ function readGlyph(tag, glyph, pbf) {
|
|
|
23656
23677
|
function parseGlyphPbf(data) {
|
|
23657
23678
|
return new PbfReader(data).readFields(readFontstacks, []);
|
|
23658
23679
|
}
|
|
23680
|
+
function isStyleImageWebGLData(data) {
|
|
23681
|
+
return typeof data?.renderWithWebGL === "function";
|
|
23682
|
+
}
|
|
23659
23683
|
function renderStyleImage(image) {
|
|
23660
23684
|
const { userImage } = image;
|
|
23661
|
-
if (userImage?.render)
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
}
|
|
23666
|
-
}
|
|
23667
|
-
return false;
|
|
23685
|
+
if (!userImage?.render) return false;
|
|
23686
|
+
if (!userImage.render()) return false;
|
|
23687
|
+
if (!isStyleImageWebGLData(userImage.data)) image.data.replace(new Uint8Array(userImage.data.buffer));
|
|
23688
|
+
return true;
|
|
23668
23689
|
}
|
|
23669
23690
|
//#endregion
|
|
23670
23691
|
//#region node_modules/potpack/index.js
|
|
@@ -23741,13 +23762,14 @@ function potpack(boxes) {
|
|
|
23741
23762
|
};
|
|
23742
23763
|
}
|
|
23743
23764
|
var ImagePosition = class {
|
|
23744
|
-
constructor(paddedRect, { pixelRatio, version, stretchX, stretchY, content, textFitWidth, textFitHeight }) {
|
|
23765
|
+
constructor(paddedRect, { pixelRatio, version, isWebGLImage = false, stretchX, stretchY, content, textFitWidth, textFitHeight }) {
|
|
23745
23766
|
this.paddedRect = paddedRect;
|
|
23746
23767
|
this.pixelRatio = pixelRatio;
|
|
23747
23768
|
this.stretchX = stretchX;
|
|
23748
23769
|
this.stretchY = stretchY;
|
|
23749
23770
|
this.content = content;
|
|
23750
23771
|
this.version = version;
|
|
23772
|
+
this.needsFirstWebGLRender = isWebGLImage;
|
|
23751
23773
|
this.textFitWidth = textFitWidth;
|
|
23752
23774
|
this.textFitHeight = textFitHeight;
|
|
23753
23775
|
}
|
|
@@ -23781,6 +23803,7 @@ var ImageAtlas = class {
|
|
|
23781
23803
|
});
|
|
23782
23804
|
for (const id in icons) {
|
|
23783
23805
|
const src = icons[id];
|
|
23806
|
+
if (src.isWebGLImage) continue;
|
|
23784
23807
|
const bin = iconPositions[id].paddedRect;
|
|
23785
23808
|
RGBAImage.copy(src.data, image, {
|
|
23786
23809
|
x: 0,
|
|
@@ -23869,13 +23892,29 @@ var ImageAtlas = class {
|
|
|
23869
23892
|
}
|
|
23870
23893
|
patchUpdatedImage(position, image, texture) {
|
|
23871
23894
|
if (!position || !image) return;
|
|
23872
|
-
if (position.version === image.version) return;
|
|
23895
|
+
if (!position.needsFirstWebGLRender && position.version === image.version) return;
|
|
23896
|
+
position.needsFirstWebGLRender = false;
|
|
23873
23897
|
position.version = image.version;
|
|
23874
23898
|
const [x, y] = position.tl;
|
|
23875
|
-
|
|
23899
|
+
const data = image.userImage?.data;
|
|
23900
|
+
if (!isStyleImageWebGLData(data)) {
|
|
23901
|
+
texture.update(image.data, void 0, {
|
|
23902
|
+
x,
|
|
23903
|
+
y
|
|
23904
|
+
});
|
|
23905
|
+
return;
|
|
23906
|
+
}
|
|
23907
|
+
const { width, height } = image.data;
|
|
23908
|
+
texture.context.setCustomLayerDefaults();
|
|
23909
|
+
data.renderWithWebGL({
|
|
23910
|
+
gl: texture.context.gl,
|
|
23911
|
+
texture: texture.texture,
|
|
23876
23912
|
x,
|
|
23877
|
-
y
|
|
23913
|
+
y,
|
|
23914
|
+
width,
|
|
23915
|
+
height
|
|
23878
23916
|
});
|
|
23917
|
+
texture.context.setDirty();
|
|
23879
23918
|
}
|
|
23880
23919
|
};
|
|
23881
23920
|
register("ImagePosition", ImagePosition);
|
|
@@ -24952,10 +24991,14 @@ var SymbolStyleLayer = class SymbolStyleLayer extends StyleLayer {
|
|
|
24952
24991
|
}
|
|
24953
24992
|
recalculate(parameters, availableImages) {
|
|
24954
24993
|
super.recalculate(parameters, availableImages);
|
|
24955
|
-
if (this.layout.get("icon-rotation-alignment") === "auto")
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
|
|
24994
|
+
if (this.layout.get("icon-rotation-alignment") === "auto") {
|
|
24995
|
+
if (this.layout.get("symbol-placement") !== "point") this.layout._values["icon-rotation-alignment"] = "map";
|
|
24996
|
+
else this.layout._values["icon-rotation-alignment"] = "viewport";
|
|
24997
|
+
}
|
|
24998
|
+
if (this.layout.get("text-rotation-alignment") === "auto") {
|
|
24999
|
+
if (this.layout.get("symbol-placement") !== "point") this.layout._values["text-rotation-alignment"] = "map";
|
|
25000
|
+
else this.layout._values["text-rotation-alignment"] = "viewport";
|
|
25001
|
+
}
|
|
24959
25002
|
if (this.layout.get("text-pitch-alignment") === "auto") this.layout._values["text-pitch-alignment"] = this.layout.get("text-rotation-alignment") === "map" ? "map" : "viewport";
|
|
24960
25003
|
if (this.layout.get("icon-pitch-alignment") === "auto") this.layout._values["icon-pitch-alignment"] = this.layout.get("icon-rotation-alignment");
|
|
24961
25004
|
if (this.layout.get("symbol-placement") === "point") {
|
|
@@ -29877,8 +29920,10 @@ function decodeTile(tile, geometryScaling, idWithinMaxSafeInteger = true) {
|
|
|
29877
29920
|
const numStreams = hasStreamCount(columnMetadata) ? decodeVarintInt32(tile, offset, 1)[0] : 1;
|
|
29878
29921
|
if (numStreams === 0) continue;
|
|
29879
29922
|
const propertyVector = decodePropertyColumn(tile, offset, columnMetadata, numStreams, numFeatures, void 0);
|
|
29880
|
-
if (propertyVector)
|
|
29881
|
-
|
|
29923
|
+
if (propertyVector) {
|
|
29924
|
+
if (Array.isArray(propertyVector)) for (const property of propertyVector) propertyVectors.push(property);
|
|
29925
|
+
else propertyVectors.push(propertyVector);
|
|
29926
|
+
}
|
|
29882
29927
|
}
|
|
29883
29928
|
}
|
|
29884
29929
|
const featureTable = new FeatureTable(featureTableMetadata.name, geometryVector, idVector, propertyVectors, extent);
|
|
@@ -30778,7 +30823,7 @@ function getGlyphQuads(anchor, shaping, textOffset, layer, alongLine, feature, i
|
|
|
30778
30823
|
if (rotateVerticalGlyph) {
|
|
30779
30824
|
const center = new Point(-halfAdvance, halfAdvance - -17);
|
|
30780
30825
|
const verticalRotation = -Math.PI / 2;
|
|
30781
|
-
const xHalfWidthOffsetCorrection =
|
|
30826
|
+
const xHalfWidthOffsetCorrection = 12 - halfAdvance;
|
|
30782
30827
|
const yImageOffsetCorrection = positionedGlyph.imageName ? xHalfWidthOffsetCorrection : 0;
|
|
30783
30828
|
const halfWidthOffsetCorrection = new Point(22 - xHalfWidthOffsetCorrection, -yImageOffsetCorrection);
|
|
30784
30829
|
const verticalOffsetCorrection = new Point(...verticalizedLabelOffset);
|
|
@@ -31403,6 +31448,6 @@ function anchorIsTooClose(bucket, text, repeatDistance, anchor) {
|
|
|
31403
31448
|
return false;
|
|
31404
31449
|
}
|
|
31405
31450
|
//#endregion
|
|
31406
|
-
export {
|
|
31451
|
+
export { projectToWorldCoordinates as $, defaultEasing as $n, add$4 as $r, Transitionable as $t, getOverlapMode as A, rotateZ$3 as Ai, makeRequest as An, rollPitchBearingEqual as Ar, Uniform1f as At, parseGlyphPbf as B, offscreenCanvasSupported as Bi, MAX_VALID_LATITUDE as Bn, zoomScale as Br, CollisionBoxArray as Bt, createStyleLayer as C, identity$2 as Ci, Evented as Cn, parseCacheControl as Cr, isHeatmapStyleLayer as Ct, isSymbolStyleLayer as D, perspective as Di, getJSON as Dn, rayPlaneIntersection as Dr, isCircleStyleLayer as Dt, isBackgroundStyleLayer as E, ortho as Ei, getArrayBuffer as En, radiansToDegrees as Er, RGBAImage as Et, ImageAtlas as F, create$8 as Fi, config as Fn, threePlaneIntersection as Fr, UniformColor as Ft, GeoJSONVT as G, clamp$2 as Gn, scale as Gr, QuadTriangleArray as Gt, collisionCircleLayout as H, arrayBufferToImage as Hn, EXTENT$1 as Hr, LineStripIndexArray as Ht, ImagePosition as I, determinant$3 as Ii, AbortError as In, translatePosition as Ir, UniformColorArray as It, calculateTileMatrix as J, createIdentityMat4f64 as Jn, fromEuler as Jr, createLayout as Jt, isFillExtrusionStyleLayer as K, clone as Kn, sqrLen as Kr, RasterBoundsArray as Kt, potpack as L, invert$5 as Li, isAbortError as Ln, uniqueId as Lr, UniformFloatArray as Lt, evaluateSizeForZoom as M, translate$2 as Mi, addProtocol as Mn, scaleZoom as Mr, Uniform2f as Mt, WritingMode as N, create$6 as Ni, getProtocol as Nn, sphericalToCartesian as Nr, Uniform3f as Nt, SymbolBucket as O, rotateX$3 as Oi, getReferrer as On, readImageUsingVideoFrame as Or, polygonIntersectsPolygon as Ot, getAnchorAlignment as P, fromRotation$2 as Pi, removeProtocol as Pn, subscribe as Pr, Uniform4f as Pt, maxMercatorHorizonAngle as Q, deepEqual$1 as Qn, transformMat4$1 as Qr, TRANSITION_SUFFIX as Qt, isStyleImageWebGLData as R, rotate$4 as Ri, throwIfAborted as Rn, warnOnce as Rr, UniformMatrix4f as Rt, Actor as S, fromScaling as Si, Event as Sn, nextPowerOfTwo as Sr, HEATMAP_FULL_RENDER_FBO_KEY as St, validateCustomStyleLayer as T, multiply$5 as Ti, GLOBAL_DISPATCHER_ID as Tn, pointPlaneSignedDistance as Tr, AlphaImage as Tt, isLineStyleLayer as U, arrayBufferToImageBitmap as Un, create as Ur, Pos3dArray as Ut, PbfReader as V, Point as Vi, angleToRotateBetweenVectors2D as Vn, pixelsToTileUnits as Vr, CollisionCircleLayoutArray as Vt, LineBucket as W, bezier as Wn, length as Wr, PosArray as Wt, cameraMercatorCoordinateFromCenterAndRotation as X, createVec3f64 as Xn, mul$3 as Xr, DataConstantProperty as Xt, cameraDirectionFromPitchBearing as Y, createMat4f64 as Yn, slerp as Yr, isRasterStyleLayer as Yt, getMercatorHorizon as Z, createVec4f64 as Zn, scale$3 as Zr, Properties as Zt, OverscaledTileID as _, clone$6 as _i, featureFilter as _n, isTouchableOrPointableType as _r, SubdivisionGranularitySetting as _t, clipLine as a, negate$2 as ai, SPEC_SOURCE_TYPES as an, extend as ar, lngFromMercatorX as at, compareTileId as b, equals$6 as bi, latest as bn, mapObject as br, Texture as bt, FeatureIndex as c, rotateY$2 as ci, validateStyle as cn, getAABB as cr, mercatorZfromAltitude as ct, DictionaryCoder as d, scaleAndAdd$2 as di, ProjectionDefinition as dn, getImageData as dr, VectorTile as dt, clone$5 as ei, EvaluationParameters as en, degreesToRadians as er, tileCoordinatesToMercatorCoordinates as et, GEOJSON_TILE_LAYER_NAME as f, sub$2 as fi, ValidationError as fn, getRollPitchBearing as fr, isFillStyleLayer as ft, CanonicalTileID as g, zero$2 as gi, emptyStyle as gn, isTouchableEvent as gr, SubdivisionGranularityExpression as gt, Bounds as h, transformQuat$1 as hi, diff as hn, isSafari as hr, SOUTH_POLE_Y as ht, clipGeometry as i, length$4 as ii, register as in, evaluateZoomSnap as ir, latFromMercatorY as it, evaluateSizeForFeature as j, scale$5 as ji, sameOrigin as jn, rollPitchBearingToQuat as jr, Uniform1i as jt, addDynamicAttributes as k, rotateY$3 as ki, getVideo as kn, remapSaturate as kr, toEvaluationFeature as kt, MLTVectorTile as l, rotateZ$2 as li, validateStyleAndEmit as ln, getAngleDelta as lr, LngLat as lt, fromVectorTileJs as m, transformMat4$2 as mi, derefLayers as mn, isPointableEvent as mr, NORTH_POLE_Y as mt, performSymbolLayout as n, dot$5 as ni, codePointUsesLocalIdeographFontFamily as nn, distanceOfAnglesRadians as nr, MercatorCoordinate as nt, BoundedLRUCache as o, normalize$4 as oi, emitValidationErrors as on, filterObject as or, mercatorXfromLng as ot, GeoJSONWrapper as p, transformMat3$1 as pi, createExpression as pn, isImageBitmap as pr, FillBucket as pt, FillExtrusionBucket as q, createIdentityMat4f32 as qn, zero as qr, TriangleIndexArray as qt, TextAnchorEnum as r, len$4 as ri, ZoomHistory as rn, ensureError as rr, altitudeFromMercatorZ as rt, TileCache as s, rotateX$2 as si, validateAndEmit as sn, findLineIntersection as sr, mercatorYfromLat as st, getAnchorJustification as t, cross$2 as ti, rtlWorkerPlugin as tn, differenceOfAnglesDegrees as tr, unprojectFromWorldCoordinates as tt, GeoJSONFeature as u, scale$4 as ui, Color as un, getEdgeTiles as ur, earthRadius as ut, UnwrappedTileID as v, copy$5 as vi, groupByLayout as vn, isWorker as vr, isColorReliefStyleLayer as vt, isCustomStyleLayer as w, invert$2 as wi, AJAXError as wn, pick as wr, renderColorRamp as wt, isInBoundsForZoomLngLat as x, exactEquals$5 as xi, ErrorEvent as xn, mod as xr, isHillshadeStyleLayer as xt, calculateTileKey as y, create$5 as yi, interpolateFactory as yn, lerp as yr, DEMData as yt, renderStyleImage as z, isOffscreenCanvasDistorted as zi, JSON_PREFIX as zn, wrap$1 as zr, SegmentVector as zt };
|
|
31407
31452
|
|
|
31408
31453
|
//# sourceMappingURL=maplibre-gl-shared-dev.mjs.map
|