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.
Files changed (124) hide show
  1. package/dist/maplibre-gl-dev.mjs +522 -223
  2. package/dist/maplibre-gl-dev.mjs.map +1 -1
  3. package/dist/maplibre-gl-shared-dev.mjs +103 -58
  4. package/dist/maplibre-gl-shared-dev.mjs.map +1 -1
  5. package/dist/maplibre-gl-shared.mjs +2 -2
  6. package/dist/maplibre-gl-shared.mjs.map +1 -1
  7. package/dist/maplibre-gl-worker-dev.mjs +23 -49
  8. package/dist/maplibre-gl-worker-dev.mjs.map +1 -1
  9. package/dist/maplibre-gl-worker.mjs +2 -2
  10. package/dist/maplibre-gl-worker.mjs.map +1 -1
  11. package/dist/maplibre-gl.css +1 -1
  12. package/dist/maplibre-gl.d.ts +214 -59
  13. package/dist/maplibre-gl.mjs +44 -44
  14. package/dist/maplibre-gl.mjs.map +1 -1
  15. package/package.json +10 -20
  16. package/src/data/feature_index.bench.ts +21 -0
  17. package/src/data/segment.test.ts +2 -2
  18. package/src/geo/edge_insets.test.ts +1 -1
  19. package/src/geo/lng_lat.test.ts +7 -7
  20. package/src/geo/lng_lat_bounds.test.ts +4 -4
  21. package/src/geo/mercator_coordinate.test.ts +2 -2
  22. package/src/geo/projection/camera_helper.ts +5 -0
  23. package/src/geo/projection/globe_transform.test.ts +25 -0
  24. package/src/geo/projection/globe_transform.ts +7 -3
  25. package/src/geo/projection/mercator_camera_helper.ts +1 -1
  26. package/src/geo/projection/mercator_transform.ts +21 -5
  27. package/src/geo/projection/vertical_perspective_camera_helper.ts +60 -31
  28. package/src/geo/projection/vertical_perspective_transform.ts +7 -1
  29. package/src/geo/transform_interface.ts +13 -1
  30. package/src/index.ts +7 -2
  31. package/src/render/image_atlas.test.ts +72 -0
  32. package/src/render/image_atlas.ts +17 -2
  33. package/src/render/image_manager.test.ts +46 -0
  34. package/src/render/image_manager.ts +9 -2
  35. package/src/render/painter.ts +1 -12
  36. package/src/render/update_pattern_positions_in_program.test.ts +1 -1
  37. package/src/shaders/glsl/_prelude.vertex.glsl +2 -3
  38. package/src/shaders/glsl/_prelude.vertex.glsl.g.ts +1 -1
  39. package/src/shaders/glsl/circle.vertex.glsl +4 -4
  40. package/src/shaders/glsl/circle.vertex.glsl.g.ts +1 -1
  41. package/src/shaders/glsl/fill_extrusion.vertex.glsl +3 -3
  42. package/src/shaders/glsl/fill_extrusion.vertex.glsl.g.ts +1 -1
  43. package/src/shaders/glsl/fill_extrusion_pattern.vertex.glsl +5 -5
  44. package/src/shaders/glsl/fill_extrusion_pattern.vertex.glsl.g.ts +1 -1
  45. package/src/shaders/glsl/heatmap.vertex.glsl +4 -4
  46. package/src/shaders/glsl/heatmap.vertex.glsl.g.ts +1 -1
  47. package/src/shaders/glsl/line.vertex.glsl +7 -7
  48. package/src/shaders/glsl/line.vertex.glsl.g.ts +1 -1
  49. package/src/shaders/glsl/line_gradient.vertex.glsl +6 -6
  50. package/src/shaders/glsl/line_gradient.vertex.glsl.g.ts +1 -1
  51. package/src/shaders/glsl/line_gradient_sdf.vertex.glsl +7 -7
  52. package/src/shaders/glsl/line_gradient_sdf.vertex.glsl.g.ts +1 -1
  53. package/src/shaders/glsl/line_pattern.vertex.glsl +7 -7
  54. package/src/shaders/glsl/line_pattern.vertex.glsl.g.ts +1 -1
  55. package/src/shaders/glsl/line_sdf.vertex.glsl +7 -7
  56. package/src/shaders/glsl/line_sdf.vertex.glsl.g.ts +1 -1
  57. package/src/shaders/glsl/raster.fragment.glsl +4 -4
  58. package/src/shaders/glsl/raster.fragment.glsl.g.ts +1 -1
  59. package/src/shaders/glsl/raster.vertex.glsl +11 -6
  60. package/src/shaders/glsl/raster.vertex.glsl.g.ts +1 -1
  61. package/src/shaders/glsl/symbol_icon.vertex.glsl +5 -5
  62. package/src/shaders/glsl/symbol_icon.vertex.glsl.g.ts +1 -1
  63. package/src/shaders/glsl/symbol_sdf.vertex.glsl +5 -5
  64. package/src/shaders/glsl/symbol_sdf.vertex.glsl.g.ts +1 -1
  65. package/src/shaders/glsl/symbol_text_and_icon.vertex.glsl +6 -6
  66. package/src/shaders/glsl/symbol_text_and_icon.vertex.glsl.g.ts +1 -1
  67. package/src/source/canvas_source.test.ts +31 -0
  68. package/src/source/canvas_source.ts +2 -1
  69. package/src/source/geojson_worker_source.test.ts +88 -0
  70. package/src/source/geojson_worker_source.ts +22 -39
  71. package/src/source/image_source.test.ts +205 -7
  72. package/src/source/image_source.ts +118 -4
  73. package/src/source/raster_dem_tile_worker_source.test.ts +1 -1
  74. package/src/source/vector_tile_worker_source.test.ts +94 -2
  75. package/src/source/vector_tile_worker_source.ts +18 -27
  76. package/src/source/video_source.test.ts +12 -8
  77. package/src/source/worker_tile.bench.ts +10 -0
  78. package/src/source/worker_tile.ts +0 -3
  79. package/src/style/create_style_layer.bench.ts +15 -0
  80. package/src/style/properties.bench.ts +81 -0
  81. package/src/style/style.test.ts +11 -10
  82. package/src/style/style_image.ts +67 -9
  83. package/src/style/style_layer.bench.ts +65 -0
  84. package/src/style/style_layer.test.ts +1 -1
  85. package/src/style/style_layer.ts +2 -2
  86. package/src/style/validate_style.bench.ts +11 -0
  87. package/src/style/validate_style.test.ts +2 -2
  88. package/src/symbol/anchor.test.ts +2 -2
  89. package/src/symbol/collision_index.bench.ts +116 -0
  90. package/src/symbol/cross_tile_symbol_index.bench.ts +49 -0
  91. package/src/symbol/shaping.test.ts +2 -1
  92. package/src/symbol/symbol_layout.bench.ts +30 -0
  93. package/src/tile/tile_id.test.ts +1 -1
  94. package/src/tile/tile_manager.ts +2 -2
  95. package/src/ui/control/fullscreen_control.test.ts +10 -10
  96. package/src/ui/control/geolocate_control.test.ts +3 -5
  97. package/src/ui/control/globe_control.test.ts +6 -6
  98. package/src/ui/events.ts +1 -1
  99. package/src/ui/handler/scroll_zoom.test.ts +50 -0
  100. package/src/ui/handler/two_fingers_touch.test.ts +3 -3
  101. package/src/ui/handler_manager.test.ts +243 -3
  102. package/src/ui/handler_manager.ts +79 -16
  103. package/src/ui/map.ts +17 -3
  104. package/src/ui/map_tests/map_cross_window.test.ts +2 -2
  105. package/src/ui/map_tests/map_events.test.ts +3 -3
  106. package/src/ui/map_tests/map_images.test.ts +29 -0
  107. package/src/ui/map_tests/map_style.test.ts +9 -8
  108. package/src/ui/map_tests/map_webgl.test.ts +29 -0
  109. package/src/ui/marker.test.ts +26 -42
  110. package/src/ui/popup.test.ts +14 -14
  111. package/src/util/evented.test.ts +33 -28
  112. package/src/util/evented.ts +69 -43
  113. package/src/util/test/null_gl.ts +10 -0
  114. package/src/util/test/util.ts +2 -1
  115. package/src/util/util.test.ts +1 -1
  116. package/src/util/web_worker_transfer.test.ts +5 -5
  117. package/src/webgl/context.ts +20 -0
  118. package/src/webgl/draw/draw_raster.ts +11 -6
  119. package/src/webgl/program/raster_program.ts +11 -0
  120. package/src/webgl/program.ts +31 -16
  121. package/src/webgl/texture.test.ts +16 -1
  122. package/src/webgl/texture.ts +3 -0
  123. package/src/webgl/vertex_buffer.test.ts +17 -2
  124. 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.2.0/LICENSE.txt
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
- if (typeof event === "string") event = new Event(event, properties || {});
3171
- const type = event.type;
3179
+ const firedEvent = typeof event === "string" ? new Event(event, properties || {}) : event;
3180
+ const type = firedEvent.type;
3172
3181
  if (this.listens(type)) {
3173
- event.target = this;
3174
- const listeners = this._listeners?.[type] ? this._listeners[type].slice() : [];
3175
- for (const listener of listeners) listener.call(this, event);
3176
- const oneTimeListeners = this._oneTimeListeners?.[type] ? this._oneTimeListeners[type].slice() : [];
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, event);
3188
+ listener.call(this, firedEvent);
3180
3189
  }
3181
3190
  const parent = this._eventedParent;
3182
3191
  if (parent) {
3183
- extend(event, typeof this._eventedParentData === "function" ? this._eventedParentData() : this._eventedParentData);
3184
- parent.fire(event);
3192
+ extend(firedEvent, typeof this._eventedParentData === "function" ? this._eventedParentData() : this._eventedParentData);
3193
+ parent.fire(firedEvent);
3185
3194
  }
3186
- } else if (event instanceof ErrorEvent) console.error(event.error);
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 > 0 || this._oneTimeListeners?.[type]?.length > 0 || this._eventedParent?.listens(type);
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) if (this.paintVertexBuffer?.buffer) this.paintVertexBuffer.updateData(this.paintVertexArray);
15674
- else this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);
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) if (this.paintVertexBuffer?.buffer) this.paintVertexBuffer.updateData(this.paintVertexArray);
15720
- else this.paintVertexBuffer = context.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent);
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) if (addLastToFirstSegment) return [...linePoints, linePoints[0]];
18284
- else return [...linePoints];
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) if (lineWidth < targetWidth) return raggedness / 2;
22659
- else return raggedness * 2;
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) if (lead) if (c < 56320) {
23586
- buf[pos++] = 239;
23587
- buf[pos++] = 191;
23588
- buf[pos++] = 189;
23589
- lead = c;
23590
- continue;
23591
- } else {
23592
- c = lead - 55296 << 10 | c - 56320 | 65536;
23593
- lead = null;
23594
- }
23595
- else {
23596
- if (c > 56319 || i + 1 === str.length) {
23597
- buf[pos++] = 239;
23598
- buf[pos++] = 191;
23599
- buf[pos++] = 189;
23600
- } else lead = c;
23601
- continue;
23602
- }
23603
- else if (lead) {
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
- if (userImage.render()) {
23663
- image.data.replace(new Uint8Array(userImage.data.buffer));
23664
- return true;
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
- texture.update(image.data, void 0, {
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") if (this.layout.get("symbol-placement") !== "point") this.layout._values["icon-rotation-alignment"] = "map";
24956
- else this.layout._values["icon-rotation-alignment"] = "viewport";
24957
- if (this.layout.get("text-rotation-alignment") === "auto") if (this.layout.get("symbol-placement") !== "point") this.layout._values["text-rotation-alignment"] = "map";
24958
- else this.layout._values["text-rotation-alignment"] = "viewport";
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) if (Array.isArray(propertyVector)) for (const property of propertyVector) propertyVectors.push(property);
29881
- else propertyVectors.push(propertyVector);
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 = 24 / 2 - halfAdvance;
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 { tileCoordinatesToMercatorCoordinates as $, degreesToRadians as $n, clone$5 as $r, EvaluationParameters as $t, getOverlapMode as A, scale$5 as Ai, sameOrigin as An, rollPitchBearingToQuat as Ar, Uniform1i as At, PbfReader as B, angleToRotateBetweenVectors2D as Bn, pixelsToTileUnits as Br, CollisionCircleLayoutArray as Bt, createStyleLayer as C, invert$2 as Ci, AJAXError as Cn, pick as Cr, renderColorRamp as Ct, isSymbolStyleLayer as D, rotateX$3 as Di, getReferrer as Dn, readImageUsingVideoFrame as Dr, polygonIntersectsPolygon as Dt, isBackgroundStyleLayer as E, perspective as Ei, getJSON as En, rayPlaneIntersection as Er, isCircleStyleLayer as Et, ImageAtlas as F, invert$5 as Fi, AbortError as Fn, translatePosition as Fr, UniformColorArray as Ft, isFillExtrusionStyleLayer as G, clone as Gn, sqrLen as Gr, RasterBoundsArray as Gt, isLineStyleLayer as H, arrayBufferToImageBitmap as Hn, create as Hr, Pos3dArray as Ht, ImagePosition as I, rotate$4 as Ii, isAbortError as In, uniqueId as Ir, UniformFloatArray as It, cameraDirectionFromPitchBearing as J, createMat4f64 as Jn, slerp as Jr, isRasterStyleLayer as Jt, FillExtrusionBucket as K, createIdentityMat4f32 as Kn, zero as Kr, TriangleIndexArray as Kt, potpack as L, isOffscreenCanvasDistorted as Li, throwIfAborted as Ln, warnOnce as Lr, UniformMatrix4f as Lt, evaluateSizeForZoom as M, create$6 as Mi, getProtocol as Mn, sphericalToCartesian as Mr, Uniform3f as Mt, WritingMode as N, fromRotation$2 as Ni, removeProtocol as Nn, subscribe as Nr, Uniform4f as Nt, SymbolBucket as O, rotateY$3 as Oi, getVideo as On, remapSaturate as Or, toEvaluationFeature as Ot, getAnchorAlignment as P, create$8 as Pi, config as Pn, threePlaneIntersection as Pr, UniformColor as Pt, projectToWorldCoordinates as Q, defaultEasing as Qn, add$4 as Qr, Transitionable as Qt, renderStyleImage as R, offscreenCanvasSupported as Ri, JSON_PREFIX as Rn, wrap$1 as Rr, SegmentVector as Rt, Actor as S, identity$2 as Si, Evented as Sn, parseCacheControl as Sr, isHeatmapStyleLayer as St, validateCustomStyleLayer as T, ortho as Ti, getArrayBuffer as Tn, radiansToDegrees as Tr, RGBAImage as Tt, LineBucket as U, bezier as Un, length as Ur, PosArray as Ut, collisionCircleLayout as V, arrayBufferToImage as Vn, EXTENT$1 as Vr, LineStripIndexArray as Vt, GeoJSONVT as W, clamp$2 as Wn, scale as Wr, QuadTriangleArray as Wt, getMercatorHorizon as X, createVec4f64 as Xn, scale$3 as Xr, Properties as Xt, cameraMercatorCoordinateFromCenterAndRotation as Y, createVec3f64 as Yn, mul$3 as Yr, DataConstantProperty as Yt, maxMercatorHorizonAngle as Z, deepEqual$1 as Zn, transformMat4$1 as Zr, TRANSITION_SUFFIX as Zt, OverscaledTileID as _, copy$5 as _i, groupByLayout as _n, isWorker as _r, isColorReliefStyleLayer as _t, clipLine as a, normalize$4 as ai, emitValidationErrors as an, filterObject as ar, mercatorXfromLng as at, compareTileId as b, exactEquals$5 as bi, ErrorEvent as bn, mod as br, isHillshadeStyleLayer as bt, FeatureIndex as c, rotateZ$2 as ci, validateStyleAndEmit as cn, getAngleDelta as cr, LngLat as ct, DictionaryCoder as d, sub$2 as di, ValidationError as dn, getRollPitchBearing as dr, isFillStyleLayer as dt, cross$2 as ei, rtlWorkerPlugin as en, differenceOfAnglesDegrees as er, unprojectFromWorldCoordinates as et, GEOJSON_TILE_LAYER_NAME as f, transformMat3$1 as fi, createExpression as fn, isImageBitmap as fr, FillBucket as ft, CanonicalTileID as g, clone$6 as gi, featureFilter as gn, isTouchableOrPointableType as gr, SubdivisionGranularitySetting as gt, Bounds as h, zero$2 as hi, emptyStyle as hn, isTouchableEvent as hr, SubdivisionGranularityExpression as ht, clipGeometry as i, negate$2 as ii, SPEC_SOURCE_TYPES as in, extend as ir, lngFromMercatorX as it, evaluateSizeForFeature as j, translate$2 as ji, addProtocol as jn, scaleZoom as jr, Uniform2f as jt, addDynamicAttributes as k, rotateZ$3 as ki, makeRequest as kn, rollPitchBearingEqual as kr, Uniform1f as kt, MLTVectorTile as l, scale$4 as li, Color as ln, getEdgeTiles as lr, earthRadius as lt, fromVectorTileJs as m, transformQuat$1 as mi, diff as mn, isSafari as mr, SOUTH_POLE_Y as mt, performSymbolLayout as n, len$4 as ni, ZoomHistory as nn, ensureError as nr, altitudeFromMercatorZ as nt, BoundedLRUCache as o, rotateX$2 as oi, validateAndEmit as on, findLineIntersection as or, mercatorYfromLat as ot, GeoJSONWrapper as p, transformMat4$2 as pi, derefLayers as pn, isPointableEvent as pr, NORTH_POLE_Y as pt, calculateTileMatrix as q, createIdentityMat4f64 as qn, fromEuler as qr, createLayout as qt, TextAnchorEnum as r, length$4 as ri, register as rn, evaluateZoomSnap as rr, latFromMercatorY as rt, TileCache as s, rotateY$2 as si, validateStyle as sn, getAABB as sr, mercatorZfromAltitude as st, getAnchorJustification as t, dot$5 as ti, codePointUsesLocalIdeographFontFamily as tn, distanceOfAnglesRadians as tr, MercatorCoordinate as tt, GeoJSONFeature as u, scaleAndAdd$2 as ui, ProjectionDefinition as un, getImageData as ur, VectorTile as ut, UnwrappedTileID as v, create$5 as vi, interpolateFactory as vn, lerp as vr, DEMData as vt, isCustomStyleLayer as w, multiply$5 as wi, GLOBAL_DISPATCHER_ID as wn, pointPlaneSignedDistance as wr, AlphaImage as wt, isInBoundsForZoomLngLat as x, fromScaling as xi, Event as xn, nextPowerOfTwo as xr, HEATMAP_FULL_RENDER_FBO_KEY as xt, calculateTileKey as y, equals$6 as yi, latest as yn, mapObject as yr, Texture as yt, parseGlyphPbf as z, Point as zi, MAX_VALID_LATITUDE as zn, zoomScale as zr, CollisionBoxArray as zt };
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