maplibre-gl 2.0.1 → 2.0.5

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 (105) hide show
  1. package/build/generate-struct-arrays.ts +4 -4
  2. package/build/post-ts-build.js +1 -0
  3. package/build/release-notes.js +7 -32
  4. package/dist/maplibre-gl.d.ts +76 -192
  5. package/dist/maplibre-gl.js +4 -4
  6. package/dist/maplibre-gl.js.map +1 -1
  7. package/package.json +22 -27
  8. package/src/data/array_types.ts +21 -21
  9. package/src/data/bucket/circle_bucket.ts +1 -1
  10. package/src/data/bucket/fill_bucket.test.ts +2 -2
  11. package/src/data/bucket/fill_bucket.ts +1 -1
  12. package/src/data/bucket/fill_extrusion_bucket.ts +1 -1
  13. package/src/data/bucket/line_bucket.test.ts +2 -2
  14. package/src/data/bucket/line_bucket.ts +1 -1
  15. package/src/data/bucket/symbol_bucket.ts +1 -1
  16. package/src/data/bucket.ts +1 -1
  17. package/src/data/evaluation_feature.ts +1 -1
  18. package/src/data/feature_index.ts +3 -3
  19. package/src/data/load_geometry.ts +1 -1
  20. package/src/geo/edge_insets.ts +1 -1
  21. package/src/geo/transform.test.ts +1 -1
  22. package/src/geo/transform.ts +1 -1
  23. package/src/index.ts +1 -2
  24. package/src/render/draw_symbol.ts +1 -1
  25. package/src/source/geojson_source.test.ts +27 -0
  26. package/src/source/geojson_source.ts +1 -3
  27. package/src/source/geojson_wrapper.ts +1 -1
  28. package/src/source/image_source.test.ts +153 -0
  29. package/src/source/query_features.test.ts +1 -1
  30. package/src/source/query_features.ts +1 -1
  31. package/src/source/source.ts +2 -2
  32. package/src/source/source_cache.test.ts +3 -3
  33. package/src/source/source_cache.ts +1 -1
  34. package/src/source/tile.ts +1 -1
  35. package/src/source/tile_id.ts +1 -1
  36. package/src/source/vector_tile_worker_source.test.ts +306 -0
  37. package/src/source/worker_tile.test.ts +2 -1
  38. package/src/style/query_utils.ts +1 -1
  39. package/src/style/style.ts +1 -1
  40. package/src/style/style_layer/circle_style_layer.ts +1 -1
  41. package/src/style/style_layer/fill_extrusion_style_layer.ts +1 -1
  42. package/src/style/style_layer/fill_style_layer.ts +1 -1
  43. package/src/style/style_layer/line_style_layer.ts +1 -1
  44. package/src/style/style_layer.ts +13 -16
  45. package/src/style-spec/expression/index.ts +1 -1
  46. package/src/style-spec/feature_filter/feature_filter.test.ts +1 -1
  47. package/src/style-spec/migrate.test.ts +112 -0
  48. package/src/style-spec/style-spec.ts +0 -3
  49. package/src/style-spec/validate_spec.test.ts +29 -0
  50. package/src/symbol/anchor.ts +1 -1
  51. package/src/symbol/check_max_angle.test.ts +1 -1
  52. package/src/symbol/check_max_angle.ts +1 -1
  53. package/src/symbol/clip_line.test.ts +1 -1
  54. package/src/symbol/clip_line.ts +1 -1
  55. package/src/symbol/collision_feature.test.ts +1 -1
  56. package/src/symbol/collision_feature.ts +1 -1
  57. package/src/symbol/collision_index.ts +1 -1
  58. package/src/symbol/get_anchors.test.ts +1 -1
  59. package/src/symbol/get_anchors.ts +1 -1
  60. package/src/symbol/mergelines.test.ts +1 -1
  61. package/src/symbol/path_interpolator.test.ts +1 -1
  62. package/src/symbol/path_interpolator.ts +1 -1
  63. package/src/symbol/placement.ts +1 -1
  64. package/src/symbol/projection.ts +1 -1
  65. package/src/symbol/quads.ts +1 -1
  66. package/src/symbol/symbol_layout.ts +1 -1
  67. package/src/ui/camera.test.ts +0 -8
  68. package/src/ui/camera.ts +13 -3
  69. package/src/ui/control/navigation_control.ts +1 -1
  70. package/src/ui/events.ts +1 -1
  71. package/src/ui/handler/box_zoom.ts +1 -1
  72. package/src/ui/handler/click_zoom.ts +1 -1
  73. package/src/ui/handler/handler_util.ts +1 -1
  74. package/src/ui/handler/map_event.ts +1 -1
  75. package/src/ui/handler/mouse.ts +1 -1
  76. package/src/ui/handler/scroll_zoom.ts +1 -1
  77. package/src/ui/handler/tap_drag_zoom.ts +1 -1
  78. package/src/ui/handler/tap_recognizer.ts +1 -1
  79. package/src/ui/handler/tap_zoom.ts +1 -1
  80. package/src/ui/handler/touch_pan.ts +1 -1
  81. package/src/ui/handler/touch_zoom_rotate.ts +1 -1
  82. package/src/ui/handler_inertia.ts +1 -1
  83. package/src/ui/handler_manager.ts +1 -1
  84. package/src/ui/map.ts +4 -4
  85. package/src/ui/marker.test.ts +1 -1
  86. package/src/ui/marker.ts +2 -1
  87. package/src/ui/popup.test.ts +1 -1
  88. package/src/ui/popup.ts +2 -2
  89. package/src/util/ajax.test.ts +206 -0
  90. package/src/util/classify_rings.test.ts +1 -1
  91. package/src/util/classify_rings.ts +1 -1
  92. package/src/util/dom.ts +1 -1
  93. package/src/util/find_pole_of_inaccessibility.test.ts +1 -1
  94. package/src/util/find_pole_of_inaccessibility.ts +1 -1
  95. package/src/util/intersection_tests.ts +1 -1
  96. package/src/util/smart_wrap.ts +1 -1
  97. package/src/util/test/util.ts +14 -0
  98. package/src/util/transferable_grid_index.test.ts +56 -0
  99. package/src/util/transferable_grid_index.ts +216 -0
  100. package/src/util/util.test.ts +1 -1
  101. package/src/util/util.ts +1 -1
  102. package/src/util/web_worker_transfer.ts +1 -17
  103. package/CHANGELOG.md +0 -2578
  104. package/src/types/non-typed-modules.d.ts +0 -47
  105. package/src/util/point.ts +0 -349
@@ -87,7 +87,7 @@ function createStructArrayType(name: string, layout: StructArrayLayout, includeS
87
87
  includeStructAccessors
88
88
  });
89
89
  } else {
90
- arrayTypeEntries.add(`${layoutClass} as ${arrayClass}`);
90
+ arrayTypeEntries.add(`export class ${arrayClass} extends ${layoutClass} {}`);
91
91
  }
92
92
  }
93
93
 
@@ -428,12 +428,12 @@ fs.writeFileSync('src/data/array_types.ts',
428
428
  import assert from 'assert';
429
429
  import {Struct, StructArray} from '../util/struct_array';
430
430
  import {register} from '../util/web_worker_transfer';
431
- import Point from '../util/point';
431
+ import Point from '@mapbox/point-geometry';
432
432
 
433
433
  ${layouts.map(emitStructArrayLayout).join('\n')}
434
434
  ${arraysWithStructAccessors.map(emitStructArray).join('\n')}
435
+ ${[...arrayTypeEntries].join('\n')}
435
436
  export {
436
- ${layouts.map(layout => layout.className).join(',\n ')},
437
- ${[...arrayTypeEntries].join(',\n ')}
437
+ ${layouts.map(layout => layout.className).join(',\n ')}
438
438
  };
439
439
  `);
@@ -35,6 +35,7 @@ console.log(`Starting bundling types`);
35
35
  const outputFile = "./dist/maplibre-gl.d.ts";
36
36
  child_process.execSync(`dts-bundle-generator --no-check --umd-module-name=maplibregl -o ${outputFile} ./src/index.ts`);
37
37
  let types = fs.readFileSync(outputFile, 'utf8');
38
+ // Classes are not exported but should be since this is exported as UMD - fixing...
38
39
  types = types.replace(/declare class/g, "export declare class");
39
40
  fs.writeFileSync(outputFile, types);
40
41
  console.log(`Finished bundling types`);
@@ -1,28 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import * as fs from 'fs';
4
- import {execSync} from 'child_process';
5
4
  import * as ejs from 'ejs';
6
- import _ from 'lodash';
7
5
  import semver from 'semver';
8
6
 
9
7
  const changelogPath = 'CHANGELOG.md';
10
8
  const changelog = fs.readFileSync(changelogPath, 'utf8');
11
9
 
12
- let currentVersion = execSync('git describe --tags --match=v*.*.* --abbrev=0')
13
- .toString()
14
- .trim()
15
- .replace('v', '');
16
-
17
- let gitTags = execSync('git tag --list v*.*.*')
18
- .toString()
19
- .split('\n')
20
- .map(function(tag) {
21
- tag = tag.replace('v', '').trim();
22
- return semver.clean(tag);
23
- });
24
- let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion, { includePrerelease: false });
25
-
26
10
  /*
27
11
  Parse the raw changelog text and split it into individual releases.
28
12
 
@@ -33,7 +17,7 @@ let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion, { incl
33
17
  - Groups the changelog content.
34
18
  - Ends when another "## x.x.x" is found.
35
19
  */
36
- const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;
20
+ const regex = /^## (\d+\.\d+\.\d+.*?)\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;
37
21
 
38
22
  let releaseNotes = [];
39
23
  let match;
@@ -45,17 +29,8 @@ while (match = regex.exec(changelog)) {
45
29
  });
46
30
  }
47
31
 
48
- /*
49
- Match the current tag with the most appropriate release notes.
50
- */
51
- const versionsInReleaseNotes = _.map(releaseNotes, 'version');
52
- const bestReleaseNotesForCurrentVersion = semver.minSatisfying(versionsInReleaseNotes, ">=" + currentVersion);
53
- const currentReleaseNotes = _.find(releaseNotes, { version: bestReleaseNotesForCurrentVersion });
54
-
55
- if (!currentReleaseNotes) {
56
- console.error('Could not find a release section satisfying %s in %s — did you forget to rename the "main" section to %s?', currentVersion, changelogPath, currentVersion.split("-")[0]);
57
- process.exit(1); // eslint-disable-line no-process-exit
58
- }
32
+ const latest = releaseNotes[0];
33
+ const previous = releaseNotes[1];
59
34
 
60
35
  /*
61
36
  Fill and print the release notes template.
@@ -63,10 +38,10 @@ if (!currentReleaseNotes) {
63
38
  let templatedReleaseNotes;
64
39
 
65
40
  templatedReleaseNotes = ejs.render(fs.readFileSync('build/release-notes.md.ejs', 'utf8'), {
66
- 'CURRENTVERSION': currentVersion,
67
- 'PREVIOUSVERSION': previousVersion,
68
- 'CHANGELOG': currentReleaseNotes.changelog,
69
- 'isPrerelease': semver.prerelease(currentVersion)
41
+ 'CURRENTVERSION': latest.version,
42
+ 'PREVIOUSVERSION': previous.version,
43
+ 'CHANGELOG': latest.changelog,
44
+ 'isPrerelease': semver.prerelease(latest.version)
70
45
  });
71
46
  templatedReleaseNotes = templatedReleaseNotes.trimEnd();
72
47
 
@@ -1,190 +1,11 @@
1
- // Generated by dts-bundle-generator v6.1.0
1
+ // Generated by dts-bundle-generator v6.4.0
2
2
 
3
+ import Point from '@mapbox/point-geometry';
3
4
  import TinySDF from '@mapbox/tiny-sdf';
5
+ import { VectorTileFeature, VectorTileLayer } from '@mapbox/vector-tile';
4
6
  import { mat2, mat4 } from 'gl-matrix';
5
7
  import { PotpackBox } from 'potpack';
6
8
 
7
- /**
8
- * A {@link Point} or an array of two numbers representing `x` and `y` screen coordinates in pixels.
9
- *
10
- * @typedef {(Point | [number, number])} PointLike
11
- * @example
12
- * var p1 = new maplibregl.Point(-77, 38); // a PointLike which is a Point
13
- * var p2 = [-77, 38]; // a PointLike which is an array of two numbers
14
- */
15
- export declare type PointLike = Point | [
16
- number,
17
- number
18
- ];
19
- export declare class Point {
20
- x: number;
21
- y: number;
22
- constructor(x: number, y: number);
23
- /**
24
- * Clone this point, returning a new point that can be modified
25
- * without affecting the old one.
26
- * @returns {Point} the clone
27
- */
28
- clone(): Point;
29
- /**
30
- * Add this point's x & y coordinates to another point,
31
- * yielding a new point.
32
- * @param {Point} p the other point
33
- * @returns {Point} output point
34
- */
35
- add(p: any): Point;
36
- /**
37
- * Subtract this point's x & y coordinates to from point,
38
- * yielding a new point.
39
- * @param {Point} p the other point
40
- * @returns {Point} output point
41
- */
42
- sub(p: any): Point;
43
- /**
44
- * Multiply this point's x & y coordinates by point,
45
- * yielding a new point.
46
- * @param {Point} p the other point
47
- * @returns {Point} output point
48
- */
49
- multByPoint(p: any): Point;
50
- /**
51
- * Divide this point's x & y coordinates by point,
52
- * yielding a new point.
53
- * @param {Point} p the other point
54
- * @returns {Point} output point
55
- */
56
- divByPoint(p: any): Point;
57
- /**
58
- * Multiply this point's x & y coordinates by a factor,
59
- * yielding a new point.
60
- * @param {Point} k factor
61
- * @returns {Point} output point
62
- */
63
- mult(k: any): Point;
64
- /**
65
- * Divide this point's x & y coordinates by a factor,
66
- * yielding a new point.
67
- * @param {Point} k factor
68
- * @returns {Point} output point
69
- */
70
- div(k: any): Point;
71
- /**
72
- * Rotate this point around the 0, 0 origin by an angle a,
73
- * given in radians
74
- * @param {Number} a angle to rotate around, in radians
75
- * @returns {Point} output point
76
- */
77
- rotate(a: any): Point;
78
- /**
79
- * Rotate this point around p point by an angle a,
80
- * given in radians
81
- * @param {Number} a angle to rotate around, in radians
82
- * @param {Point} p Point to rotate around
83
- * @returns {Point} output point
84
- */
85
- rotateAround(a: any, p: any): Point;
86
- /**
87
- * Multiply this point by a 4x1 transformation matrix
88
- * @param {Array<Number>} m transformation matrix
89
- * @returns {Point} output point
90
- */
91
- matMult(m: any): Point;
92
- /**
93
- * Calculate this point but as a unit vector from 0, 0, meaning
94
- * that the distance from the resulting point to the 0, 0
95
- * coordinate will be equal to 1 and the angle from the resulting
96
- * point to the 0, 0 coordinate will be the same as before.
97
- * @returns {Point} unit vector point
98
- */
99
- unit(): Point;
100
- /**
101
- * Compute a perpendicular point, where the new y coordinate
102
- * is the old x coordinate and the new x coordinate is the old y
103
- * coordinate multiplied by -1
104
- * @returns {Point} perpendicular point
105
- */
106
- perp(): Point;
107
- /**
108
- * Return a version of this point with the x & y coordinates
109
- * rounded to integers.
110
- * @returns {Point} rounded point
111
- */
112
- round(): Point;
113
- /**
114
- * Return the magitude of this point: this is the Euclidean
115
- * distance from the 0, 0 coordinate to this point's x and y
116
- * coordinates.
117
- * @returns {Number} magnitude
118
- */
119
- mag(): number;
120
- /**
121
- * Judge whether this point is equal to another point, returning
122
- * true or false.
123
- * @param {Point} other the other point
124
- * @returns {boolean} whether the points are equal
125
- */
126
- equals(other: any): boolean;
127
- /**
128
- * Calculate the distance from this point to another point
129
- * @param {Point} p the other point
130
- * @returns {Number} distance
131
- */
132
- dist(p: any): number;
133
- /**
134
- * Calculate the distance from this point to another point,
135
- * without the square root step. Useful if you're comparing
136
- * relative distances.
137
- * @param {Point} p the other point
138
- * @returns {Number} distance
139
- */
140
- distSqr(p: any): number;
141
- /**
142
- * Get the angle from the 0, 0 coordinate to this point, in radians
143
- * coordinates.
144
- * @returns {Number} angle
145
- */
146
- angle(): number;
147
- /**
148
- * Get the angle from this point to another point, in radians
149
- * @param {Point} b the other point
150
- * @returns {Number} angle
151
- */
152
- angleTo(b: any): number;
153
- /**
154
- * Get the angle between this point and another point, in radians
155
- * @param {Point} b the other point
156
- * @returns {Number} angle
157
- */
158
- angleWith(b: any): number;
159
- angleWithSep(x: any, y: any): number;
160
- _matMult(m: any): this;
161
- _add(p: any): this;
162
- _sub(p: any): this;
163
- _mult(k: any): this;
164
- _div(k: any): this;
165
- _multByPoint(p: any): this;
166
- _divByPoint(p: any): this;
167
- _unit(): this;
168
- _perp(): this;
169
- _rotate(angle: any): this;
170
- _rotateAround(angle: any, p: any): this;
171
- _round(): this;
172
- /**
173
- * Construct a point from an array if necessary, otherwise if the input
174
- * is already a Point, or an unknown type, return it unchanged
175
- * @param {Array<Number>|Point|*} a any kind of input value
176
- * @returns {Point} constructed point, or passed-through value.
177
- * @example
178
- * // this
179
- * var point = Point.convert([0, 1]);
180
- * // is equivalent to
181
- * var point = new Point(0, 1);
182
- */
183
- static convert(a: PointLike | {
184
- x: number;
185
- y: number;
186
- }): Point;
187
- }
188
9
  export declare type Callback<T> = (error?: Error | null, result?: T | null) => void;
189
10
  export declare type Cancelable = {
190
11
  cancel: () => void;
@@ -1995,6 +1816,30 @@ export declare class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
1995
1816
  */
1996
1817
  get(index: number): FeatureIndexStruct;
1997
1818
  }
1819
+ export declare class CircleLayoutArray extends StructArrayLayout2i4 {
1820
+ }
1821
+ export declare class FillLayoutArray extends StructArrayLayout2i4 {
1822
+ }
1823
+ export declare class FillExtrusionLayoutArray extends StructArrayLayout2i4i12 {
1824
+ }
1825
+ export declare class LineLayoutArray extends StructArrayLayout2i4ub8 {
1826
+ }
1827
+ export declare class LineExtLayoutArray extends StructArrayLayout2f8 {
1828
+ }
1829
+ export declare class SymbolLayoutArray extends StructArrayLayout4i4ui4i24 {
1830
+ }
1831
+ export declare class SymbolDynamicLayoutArray extends StructArrayLayout3f12 {
1832
+ }
1833
+ export declare class SymbolOpacityArray extends StructArrayLayout1ul4 {
1834
+ }
1835
+ export declare class CollisionVertexArray extends StructArrayLayout2ub2f12 {
1836
+ }
1837
+ export declare class TriangleIndexArray extends StructArrayLayout3ui6 {
1838
+ }
1839
+ export declare class LineIndexArray extends StructArrayLayout2ui4 {
1840
+ }
1841
+ export declare class LineStripIndexArray extends StructArrayLayout1ui2 {
1842
+ }
1998
1843
  export declare type SerializedFeaturePositionMap = {
1999
1844
  ids: Float64Array;
2000
1845
  positions: Uint32Array;
@@ -2732,6 +2577,35 @@ export declare class ImageAtlas {
2732
2577
  patchUpdatedImages(imageManager: ImageManager, texture: Texture): void;
2733
2578
  patchUpdatedImage(position: ImagePosition, image: StyleImage, texture: Texture): void;
2734
2579
  }
2580
+ export declare type SerializedGrid = {
2581
+ buffer: ArrayBuffer;
2582
+ };
2583
+ export declare class TransferableGridIndex {
2584
+ cells: number[][];
2585
+ arrayBuffer: ArrayBuffer;
2586
+ d: number;
2587
+ keys: number[];
2588
+ bboxes: number[];
2589
+ n: number;
2590
+ extent: number;
2591
+ padding: number;
2592
+ scale: any;
2593
+ uid: number;
2594
+ min: number;
2595
+ max: number;
2596
+ constructor(extent: number | ArrayBuffer, n?: number, padding?: number);
2597
+ insert(key: number, x1: number, y1: number, x2: number, y2: number): void;
2598
+ _insertReadonly(): void;
2599
+ _insertCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, uid: number): void;
2600
+ query(x1: number, y1: number, x2: number, y2: number, intersectionTest?: Function): number[];
2601
+ _queryCell(x1: number, y1: number, x2: number, y2: number, cellIndex: number, result: any, seenUids: any, intersectionTest: Function): void;
2602
+ _forEachCell(x1: number, y1: number, x2: number, y2: number, fn: Function, arg1: any, arg2: any, intersectionTest: any): void;
2603
+ _convertFromCellCoord(x: any): number;
2604
+ _convertToCellCoord(x: any): number;
2605
+ toArrayBuffer(): ArrayBuffer;
2606
+ static serialize(grid: TransferableGridIndex, transferables?: Array<Transferable>): SerializedGrid;
2607
+ static deserialize(serialized: SerializedGrid): TransferableGridIndex;
2608
+ }
2735
2609
  export declare class DictionaryCoder {
2736
2610
  _stringToNumber: {
2737
2611
  [_: string]: number;
@@ -4489,10 +4363,6 @@ export interface CustomLayerInterface {
4489
4363
  */
4490
4364
  onRemove(map: Map, gl: WebGLRenderingContext): void;
4491
4365
  }
4492
- export interface StyleLayer {
4493
- queryRadius?(bucket: Bucket): number;
4494
- queryIntersectsFeature?(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number, pixelPosMatrix: mat4): boolean | number;
4495
- }
4496
4366
  declare abstract class StyleLayer extends Evented {
4497
4367
  id: string;
4498
4368
  metadata: unknown;
@@ -4512,6 +4382,8 @@ declare abstract class StyleLayer extends Evented {
4512
4382
  _featureFilter: FeatureFilter;
4513
4383
  readonly onAdd: ((map: Map) => void);
4514
4384
  readonly onRemove: ((map: Map) => void);
4385
+ queryRadius?(bucket: Bucket): number;
4386
+ queryIntersectsFeature?(queryGeometry: Array<Point>, feature: VectorTileFeature, featureState: FeatureState, geometry: Array<Array<Point>>, zoom: number, transform: Transform, pixelsToTileUnits: number, pixelPosMatrix: mat4): boolean | number;
4515
4387
  constructor(layer: LayerSpecification | CustomLayerInterface, properties: Readonly<{
4516
4388
  layout?: Properties<any>;
4517
4389
  paint?: Properties<any>;
@@ -5953,8 +5825,8 @@ export declare type SourceStatics = {
5953
5825
  export declare type SourceClass = {
5954
5826
  new (...args: any): Source;
5955
5827
  } & SourceStatics;
5956
- declare const getType: (name: string) => any;
5957
- declare const setType: (name: string, type: new (...args: any) => Source) => void;
5828
+ declare const getSourceType: (name: string) => any;
5829
+ declare const setSourceType: (name: string, type: new (...args: any) => Source) => void;
5958
5830
  export declare class TileCache {
5959
5831
  max: number;
5960
5832
  data: {
@@ -7121,6 +6993,18 @@ export declare class TaskQueue {
7121
6993
  run(timeStamp?: number): void;
7122
6994
  clear(): void;
7123
6995
  }
6996
+ /**
6997
+ * A [Point](https://github.com/mapbox/point-geometry) or an array of two numbers representing `x` and `y` screen coordinates in pixels.
6998
+ *
6999
+ * @typedef {(Point | [number, number])} PointLike
7000
+ * @example
7001
+ * var p1 = new Point(-77, 38); // a PointLike which is a Point
7002
+ * var p2 = [-77, 38]; // a PointLike which is an array of two numbers
7003
+ */
7004
+ export declare type PointLike = Point | [
7005
+ number,
7006
+ number
7007
+ ];
7124
7008
  export declare type RequireAtLeastOne<T> = {
7125
7009
  [K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>>;
7126
7010
  }[keyof T];
@@ -7542,7 +7426,7 @@ declare abstract class Camera extends Evented {
7542
7426
  * @memberof Map#
7543
7427
  * @param bounds Center these bounds in the viewport and use the highest
7544
7428
  * zoom level up to and including `Map#getMaxZoom()` that fits them in the viewport.
7545
- * @param {Object} [options] Options supports all properties from {@link AnimationOptions} and {@link CameraOptions} in addition to the fields below.
7429
+ * @param {FitBoundsOptions} [options] Options supports all properties from {@link AnimationOptions} and {@link CameraOptions} in addition to the fields below.
7546
7430
  * @param {number | PaddingOptions} [options.padding] The amount of padding in pixels to add to the given bounds.
7547
7431
  * @param {boolean} [options.linear=false] If `true`, the map transitions using
7548
7432
  * {@link Map#easeTo}. If `false`, the map transitions using {@link Map#flyTo}. See
@@ -7669,7 +7553,7 @@ declare abstract class Camera extends Evented {
7669
7553
  * unless 'options' includes `essential: true`.
7670
7554
  *
7671
7555
  * @memberof Map#
7672
- * @param {Object} options Options describing the destination and animation of the transition.
7556
+ * @param {FlyToOptions} options Options describing the destination and animation of the transition.
7673
7557
  * Accepts {@link CameraOptions}, {@link AnimationOptions},
7674
7558
  * and the following additional options.
7675
7559
  * @param {number} [options.curve=1.42] The zooming "curve" that will occur along the
@@ -8666,11 +8550,11 @@ export declare class Map extends Camera {
8666
8550
  */
8667
8551
  setRenderWorldCopies(renderWorldCopies?: boolean | null): this;
8668
8552
  /**
8669
- * Returns a {@link Point} representing pixel coordinates, relative to the map's `container`,
8553
+ * Returns a [Point](https://github.com/mapbox/point-geometry) representing pixel coordinates, relative to the map's `container`,
8670
8554
  * that correspond to the specified geographical location.
8671
8555
  *
8672
8556
  * @param {LngLatLike} lnglat The geographical location to project.
8673
- * @returns {Point} The {@link Point} corresponding to `lnglat`, relative to the map's `container`.
8557
+ * @returns {Point} The [Point](https://github.com/mapbox/point-geometry) corresponding to `lnglat`, relative to the map's `container`.
8674
8558
  * @example
8675
8559
  * var coordinate = [-122.420679, 37.772537];
8676
8560
  * var point = map.project(coordinate);