@maptiler/sdk 1.0.0 → 1.0.1

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 (158) hide show
  1. package/package.json +1 -1
  2. package/readme.md +11 -11
  3. package/docs/.nojekyll +0 -1
  4. package/docs/assets/custom.css +0 -118
  5. package/docs/assets/highlight.css +0 -134
  6. package/docs/assets/main.js +0 -54
  7. package/docs/assets/search.js +0 -1
  8. package/docs/assets/style.css +0 -1257
  9. package/docs/classes/Map.html +0 -273
  10. package/docs/classes/Point.html +0 -549
  11. package/docs/classes/SdkConfig.html +0 -188
  12. package/docs/demos/maptiler-sdk.css +0 -147
  13. package/docs/demos/maptiler-sdk.umd.js +0 -3287
  14. package/docs/demos/simple.html +0 -63
  15. package/docs/functions/addProtocol.html +0 -146
  16. package/docs/functions/clearPrewarmedResources.html +0 -92
  17. package/docs/functions/clearStorage.html +0 -124
  18. package/docs/functions/getRTLTextPluginStatus.html +0 -92
  19. package/docs/functions/prewarm.html +0 -92
  20. package/docs/functions/removeProtocol.html +0 -106
  21. package/docs/functions/setRTLTextPlugin.html +0 -112
  22. package/docs/functions/supported.html +0 -97
  23. package/docs/images/JS-logo.svg +0 -4
  24. package/docs/images/TS-logo.svg +0 -6
  25. package/docs/images/maptiler-logo.svg +0 -19
  26. package/docs/images/maptiler-sdk-logo.afdesign +0 -0
  27. package/docs/images/maptiler-sdk-logo.svg +0 -66
  28. package/docs/images/screenshots/alps.gif +0 -0
  29. package/docs/images/screenshots/grandcanyon.gif +0 -0
  30. package/docs/images/screenshots/lang-arabic.png +0 -0
  31. package/docs/images/screenshots/lang-hebrew.png +0 -0
  32. package/docs/images/screenshots/multilang.gif +0 -0
  33. package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
  34. package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
  35. package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  36. package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  37. package/docs/images/screenshots/static-with-path.png +0 -0
  38. package/docs/images/screenshots/style-basic-v2.png +0 -0
  39. package/docs/images/screenshots/style-bright.png +0 -0
  40. package/docs/images/screenshots/style-dataviz-dark.png +0 -0
  41. package/docs/images/screenshots/style-hybrid.png +0 -0
  42. package/docs/images/screenshots/style-osm.png +0 -0
  43. package/docs/images/screenshots/style-outdoor.png +0 -0
  44. package/docs/images/screenshots/style-pastel.png +0 -0
  45. package/docs/images/screenshots/style-satellite.png +0 -0
  46. package/docs/images/screenshots/style-streets-v2-dark.png +0 -0
  47. package/docs/images/screenshots/style-streets-v2-light.png +0 -0
  48. package/docs/images/screenshots/style-streets-v2.png +0 -0
  49. package/docs/images/screenshots/style-toner.png +0 -0
  50. package/docs/images/screenshots/style-topo.png +0 -0
  51. package/docs/images/screenshots/style-topographique.png +0 -0
  52. package/docs/images/screenshots/style-voyager.png +0 -0
  53. package/docs/images/screenshots/style-winter.png +0 -0
  54. package/docs/index.html +0 -601
  55. package/docs/modules.html +0 -142
  56. package/docs/types/LanguageKey.html +0 -90
  57. package/docs/types/LanguageString.html +0 -90
  58. package/docs/types/MapOptions.html +0 -90
  59. package/docs/types/Matrix2.html +0 -90
  60. package/docs/types/Unit.html +0 -88
  61. package/docs/variables/AJAXError.html +0 -88
  62. package/docs/variables/AttributionControl.html +0 -88
  63. package/docs/variables/CanvasSource.html +0 -88
  64. package/docs/variables/Evented.html +0 -88
  65. package/docs/variables/FullscreenControl.html +0 -88
  66. package/docs/variables/GeoJSONSource.html +0 -88
  67. package/docs/variables/GeolocateControl.html +0 -88
  68. package/docs/variables/GeolocationType.html +0 -95
  69. package/docs/variables/ImageSource.html +0 -88
  70. package/docs/variables/Language.html +0 -249
  71. package/docs/variables/LngLat.html +0 -88
  72. package/docs/variables/LngLatBounds.html +0 -88
  73. package/docs/variables/LogoControl.html +0 -88
  74. package/docs/variables/Marker.html +0 -88
  75. package/docs/variables/MercatorCoordinate.html +0 -88
  76. package/docs/variables/NavigationControl.html +0 -88
  77. package/docs/variables/Popup.html +0 -88
  78. package/docs/variables/RasterDEMTileSource.html +0 -88
  79. package/docs/variables/RasterTileSource.html +0 -88
  80. package/docs/variables/ScaleControl.html +0 -88
  81. package/docs/variables/Style.html +0 -88
  82. package/docs/variables/TerrainControl.html +0 -88
  83. package/docs/variables/VectorTileSource.html +0 -88
  84. package/docs/variables/VideoSource.html +0 -88
  85. package/docs/variables/config.html +0 -88
  86. package/docs/variables/maxParallelImageRequests.html +0 -88
  87. package/docs/variables/version.html +0 -88
  88. package/docs/variables/workerCount.html +0 -88
  89. package/docs/variables/workerUrl.html +0 -88
  90. package/docsmd/.nojekyll +0 -1
  91. package/docsmd/README.md +0 -710
  92. package/docsmd/assets/custom.css +0 -118
  93. package/docsmd/classes/Map.md +0 -292
  94. package/docsmd/classes/Point.md +0 -603
  95. package/docsmd/classes/SdkConfig.md +0 -186
  96. package/docsmd/images/JS-logo.svg +0 -4
  97. package/docsmd/images/TS-logo.svg +0 -6
  98. package/docsmd/images/maptiler-logo.svg +0 -19
  99. package/docsmd/images/maptiler-sdk-logo.afdesign +0 -0
  100. package/docsmd/images/maptiler-sdk-logo.svg +0 -66
  101. package/docsmd/images/screenshots/alps.gif +0 -0
  102. package/docsmd/images/screenshots/grandcanyon.gif +0 -0
  103. package/docsmd/images/screenshots/lang-arabic.png +0 -0
  104. package/docsmd/images/screenshots/lang-hebrew.png +0 -0
  105. package/docsmd/images/screenshots/multilang.gif +0 -0
  106. package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
  107. package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
  108. package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  109. package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  110. package/docsmd/images/screenshots/static-with-path.png +0 -0
  111. package/docsmd/images/screenshots/style-basic-v2.png +0 -0
  112. package/docsmd/images/screenshots/style-bright.png +0 -0
  113. package/docsmd/images/screenshots/style-dataviz-dark.png +0 -0
  114. package/docsmd/images/screenshots/style-hybrid.png +0 -0
  115. package/docsmd/images/screenshots/style-osm.png +0 -0
  116. package/docsmd/images/screenshots/style-outdoor.png +0 -0
  117. package/docsmd/images/screenshots/style-pastel.png +0 -0
  118. package/docsmd/images/screenshots/style-satellite.png +0 -0
  119. package/docsmd/images/screenshots/style-streets-v2-dark.png +0 -0
  120. package/docsmd/images/screenshots/style-streets-v2-light.png +0 -0
  121. package/docsmd/images/screenshots/style-streets-v2.png +0 -0
  122. package/docsmd/images/screenshots/style-toner.png +0 -0
  123. package/docsmd/images/screenshots/style-topo.png +0 -0
  124. package/docsmd/images/screenshots/style-topographique.png +0 -0
  125. package/docsmd/images/screenshots/style-voyager.png +0 -0
  126. package/docsmd/images/screenshots/style-winter.png +0 -0
  127. package/images/JS-logo.svg +0 -4
  128. package/images/TS-logo.svg +0 -6
  129. package/images/maptiler-logo.svg +0 -19
  130. package/images/maptiler-sdk-logo.afdesign +0 -0
  131. package/images/maptiler-sdk-logo.svg +0 -66
  132. package/images/screenshots/alps.gif +0 -0
  133. package/images/screenshots/grandcanyon.gif +0 -0
  134. package/images/screenshots/lang-arabic.png +0 -0
  135. package/images/screenshots/lang-hebrew.png +0 -0
  136. package/images/screenshots/multilang.gif +0 -0
  137. package/images/screenshots/static-bounded-europe-1024.png +0 -0
  138. package/images/screenshots/static-bounded-europe-2048.png +0 -0
  139. package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
  140. package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
  141. package/images/screenshots/static-with-path.png +0 -0
  142. package/images/screenshots/style-basic-v2.png +0 -0
  143. package/images/screenshots/style-bright.png +0 -0
  144. package/images/screenshots/style-dataviz-dark.png +0 -0
  145. package/images/screenshots/style-hybrid.png +0 -0
  146. package/images/screenshots/style-osm.png +0 -0
  147. package/images/screenshots/style-outdoor.png +0 -0
  148. package/images/screenshots/style-pastel.png +0 -0
  149. package/images/screenshots/style-satellite.png +0 -0
  150. package/images/screenshots/style-streets-v2-dark.png +0 -0
  151. package/images/screenshots/style-streets-v2-light.png +0 -0
  152. package/images/screenshots/style-streets-v2.png +0 -0
  153. package/images/screenshots/style-toner.png +0 -0
  154. package/images/screenshots/style-topo.png +0 -0
  155. package/images/screenshots/style-topographique.png +0 -0
  156. package/images/screenshots/style-voyager.png +0 -0
  157. package/images/screenshots/style-winter.png +0 -0
  158. package/scripts/replace-path-with-content.js +0 -51
@@ -1,603 +0,0 @@
1
- [MapTiler SDK - v1.0.0](../README.md) / Point
2
-
3
- # Class: Point
4
-
5
- a point
6
-
7
- **`Param`**
8
-
9
- **`Param`**
10
-
11
- ## Table of contents
12
-
13
- ### Constructors
14
-
15
- - [constructor](Point.md#constructor)
16
-
17
- ### Properties
18
-
19
- - [x](Point.md#x)
20
- - [y](Point.md#y)
21
-
22
- ### Methods
23
-
24
- - [add](Point.md#add)
25
- - [angle](Point.md#angle)
26
- - [angleTo](Point.md#angleto)
27
- - [angleWith](Point.md#anglewith)
28
- - [angleWithSep](Point.md#anglewithsep)
29
- - [clone](Point.md#clone)
30
- - [dist](Point.md#dist)
31
- - [distSqr](Point.md#distsqr)
32
- - [div](Point.md#div)
33
- - [divByPoint](Point.md#divbypoint)
34
- - [equals](Point.md#equals)
35
- - [mag](Point.md#mag)
36
- - [matMult](Point.md#matmult)
37
- - [mult](Point.md#mult)
38
- - [multByPoint](Point.md#multbypoint)
39
- - [perp](Point.md#perp)
40
- - [rotate](Point.md#rotate)
41
- - [rotateAround](Point.md#rotatearound)
42
- - [round](Point.md#round)
43
- - [sub](Point.md#sub)
44
- - [unit](Point.md#unit)
45
- - [convert](Point.md#convert)
46
-
47
- ## Constructors
48
-
49
- ### constructor
50
-
51
- • **new Point**(`x`, `y`)
52
-
53
- #### Parameters
54
-
55
- | Name | Type |
56
- | :------ | :------ |
57
- | `x` | `number` |
58
- | `y` | `number` |
59
-
60
- #### Defined in
61
-
62
- [src/Point.ts:20](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L20)
63
-
64
- ## Properties
65
-
66
- ### x
67
-
68
- • **x**: `number`
69
-
70
- #### Defined in
71
-
72
- [src/Point.ts:17](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L17)
73
-
74
- ___
75
-
76
- ### y
77
-
78
- • **y**: `number`
79
-
80
- #### Defined in
81
-
82
- [src/Point.ts:18](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L18)
83
-
84
- ## Methods
85
-
86
- ### add
87
-
88
- ▸ **add**(`p`): [`Point`](Point.md)
89
-
90
- Add this point's x & y coordinates to another point,
91
- yielding a new point.
92
-
93
- #### Parameters
94
-
95
- | Name | Type | Description |
96
- | :------ | :------ | :------ |
97
- | `p` | [`Point`](Point.md) | the other point |
98
-
99
- #### Returns
100
-
101
- [`Point`](Point.md)
102
-
103
- output point
104
-
105
- #### Defined in
106
-
107
- [src/Point.ts:122](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L122)
108
-
109
- ___
110
-
111
- ### angle
112
-
113
- ▸ **angle**(): `number`
114
-
115
- Get the angle from the 0, 0 coordinate to this point, in radians
116
- coordinates.
117
-
118
- #### Returns
119
-
120
- `number`
121
-
122
- angle
123
-
124
- #### Defined in
125
-
126
- [src/Point.ts:283](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L283)
127
-
128
- ___
129
-
130
- ### angleTo
131
-
132
- ▸ **angleTo**(`b`): `number`
133
-
134
- Get the angle from this point to another point, in radians
135
-
136
- #### Parameters
137
-
138
- | Name | Type | Description |
139
- | :------ | :------ | :------ |
140
- | `b` | [`Point`](Point.md) | the other point |
141
-
142
- #### Returns
143
-
144
- `number`
145
-
146
- angle
147
-
148
- #### Defined in
149
-
150
- [src/Point.ts:292](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L292)
151
-
152
- ___
153
-
154
- ### angleWith
155
-
156
- ▸ **angleWith**(`b`): `number`
157
-
158
- Get the angle between this point and another point, in radians
159
-
160
- #### Parameters
161
-
162
- | Name | Type | Description |
163
- | :------ | :------ | :------ |
164
- | `b` | [`Point`](Point.md) | the other point |
165
-
166
- #### Returns
167
-
168
- `number`
169
-
170
- angle
171
-
172
- #### Defined in
173
-
174
- [src/Point.ts:301](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L301)
175
-
176
- ___
177
-
178
- ### angleWithSep
179
-
180
- ▸ **angleWithSep**(`x`, `y`): `number`
181
-
182
- #### Parameters
183
-
184
- | Name | Type |
185
- | :------ | :------ |
186
- | `x` | `number` |
187
- | `y` | `number` |
188
-
189
- #### Returns
190
-
191
- `number`
192
-
193
- #### Defined in
194
-
195
- [src/Point.ts:312](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L312)
196
-
197
- ___
198
-
199
- ### clone
200
-
201
- ▸ **clone**(): [`Point`](Point.md)
202
-
203
- Clone this point, returning a new point that can be modified
204
- without affecting the old one.
205
-
206
- #### Returns
207
-
208
- [`Point`](Point.md)
209
-
210
- the clone
211
-
212
- #### Defined in
213
-
214
- [src/Point.ts:112](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L112)
215
-
216
- ___
217
-
218
- ### dist
219
-
220
- ▸ **dist**(`p`): `number`
221
-
222
- Calculate the distance from this point to another point
223
-
224
- #### Parameters
225
-
226
- | Name | Type | Description |
227
- | :------ | :------ | :------ |
228
- | `p` | `any` | the other point |
229
-
230
- #### Returns
231
-
232
- `number`
233
-
234
- distance
235
-
236
- #### Defined in
237
-
238
- [src/Point.ts:261](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L261)
239
-
240
- ___
241
-
242
- ### distSqr
243
-
244
- ▸ **distSqr**(`p`): `number`
245
-
246
- Calculate the distance from this point to another point,
247
- without the square root step. Useful if you're comparing
248
- relative distances.
249
-
250
- #### Parameters
251
-
252
- | Name | Type | Description |
253
- | :------ | :------ | :------ |
254
- | `p` | `any` | the other point |
255
-
256
- #### Returns
257
-
258
- `number`
259
-
260
- distance
261
-
262
- #### Defined in
263
-
264
- [src/Point.ts:272](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L272)
265
-
266
- ___
267
-
268
- ### div
269
-
270
- ▸ **div**(`k`): [`Point`](Point.md)
271
-
272
- Divide this point's x & y coordinates by a factor,
273
- yielding a new point.
274
-
275
- #### Parameters
276
-
277
- | Name | Type | Description |
278
- | :------ | :------ | :------ |
279
- | `k` | `number` | factor |
280
-
281
- #### Returns
282
-
283
- [`Point`](Point.md)
284
-
285
- output point
286
-
287
- #### Defined in
288
-
289
- [src/Point.ts:172](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L172)
290
-
291
- ___
292
-
293
- ### divByPoint
294
-
295
- ▸ **divByPoint**(`p`): [`Point`](Point.md)
296
-
297
- Divide this point's x & y coordinates by point,
298
- yielding a new point.
299
-
300
- #### Parameters
301
-
302
- | Name | Type | Description |
303
- | :------ | :------ | :------ |
304
- | `p` | [`Point`](Point.md) | the other point |
305
-
306
- #### Returns
307
-
308
- [`Point`](Point.md)
309
-
310
- output point
311
-
312
- #### Defined in
313
-
314
- [src/Point.ts:152](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L152)
315
-
316
- ___
317
-
318
- ### equals
319
-
320
- ▸ **equals**(`other`): `boolean`
321
-
322
- Judge whether this point is equal to another point, returning
323
- true or false.
324
-
325
- #### Parameters
326
-
327
- | Name | Type | Description |
328
- | :------ | :------ | :------ |
329
- | `other` | `any` | the other point |
330
-
331
- #### Returns
332
-
333
- `boolean`
334
-
335
- whether the points are equal
336
-
337
- #### Defined in
338
-
339
- [src/Point.ts:252](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L252)
340
-
341
- ___
342
-
343
- ### mag
344
-
345
- ▸ **mag**(): `number`
346
-
347
- Return the magnitude of this point: this is the Euclidean
348
- distance from the 0, 0 coordinate to this point's x and y
349
- coordinates.
350
-
351
- #### Returns
352
-
353
- `number`
354
-
355
- magnitude
356
-
357
- #### Defined in
358
-
359
- [src/Point.ts:242](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L242)
360
-
361
- ___
362
-
363
- ### matMult
364
-
365
- ▸ **matMult**(`m`): [`Point`](Point.md)
366
-
367
- Multiply this point by a 4x1 transformation matrix
368
-
369
- #### Parameters
370
-
371
- | Name | Type | Description |
372
- | :------ | :------ | :------ |
373
- | `m` | [`Matrix2`](../README.md#matrix2) | transformation matrix |
374
-
375
- #### Returns
376
-
377
- [`Point`](Point.md)
378
-
379
- output point
380
-
381
- #### Defined in
382
-
383
- [src/Point.ts:202](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L202)
384
-
385
- ___
386
-
387
- ### mult
388
-
389
- ▸ **mult**(`k`): [`Point`](Point.md)
390
-
391
- Multiply this point's x & y coordinates by a factor,
392
- yielding a new point.
393
-
394
- #### Parameters
395
-
396
- | Name | Type | Description |
397
- | :------ | :------ | :------ |
398
- | `k` | `number` | factor |
399
-
400
- #### Returns
401
-
402
- [`Point`](Point.md)
403
-
404
- output point
405
-
406
- #### Defined in
407
-
408
- [src/Point.ts:162](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L162)
409
-
410
- ___
411
-
412
- ### multByPoint
413
-
414
- ▸ **multByPoint**(`p`): [`Point`](Point.md)
415
-
416
- Multiply this point's x & y coordinates by point,
417
- yielding a new point.
418
-
419
- #### Parameters
420
-
421
- | Name | Type | Description |
422
- | :------ | :------ | :------ |
423
- | `p` | [`Point`](Point.md) | the other point |
424
-
425
- #### Returns
426
-
427
- [`Point`](Point.md)
428
-
429
- output point
430
-
431
- #### Defined in
432
-
433
- [src/Point.ts:142](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L142)
434
-
435
- ___
436
-
437
- ### perp
438
-
439
- ▸ **perp**(): [`Point`](Point.md)
440
-
441
- Compute a perpendicular point, where the new y coordinate
442
- is the old x coordinate and the new x coordinate is the old y
443
- coordinate multiplied by -1
444
-
445
- #### Returns
446
-
447
- [`Point`](Point.md)
448
-
449
- perpendicular point
450
-
451
- #### Defined in
452
-
453
- [src/Point.ts:223](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L223)
454
-
455
- ___
456
-
457
- ### rotate
458
-
459
- ▸ **rotate**(`a`): [`Point`](Point.md)
460
-
461
- Rotate this point around the 0, 0 origin by an angle a,
462
- given in radians
463
-
464
- #### Parameters
465
-
466
- | Name | Type | Description |
467
- | :------ | :------ | :------ |
468
- | `a` | `number` | angle to rotate around, in radians |
469
-
470
- #### Returns
471
-
472
- [`Point`](Point.md)
473
-
474
- output point
475
-
476
- #### Defined in
477
-
478
- [src/Point.ts:182](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L182)
479
-
480
- ___
481
-
482
- ### rotateAround
483
-
484
- ▸ **rotateAround**(`a`, `p`): [`Point`](Point.md)
485
-
486
- Rotate this point around p point by an angle a,
487
- given in radians
488
-
489
- #### Parameters
490
-
491
- | Name | Type | Description |
492
- | :------ | :------ | :------ |
493
- | `a` | `number` | angle to rotate around, in radians |
494
- | `p` | [`Point`](Point.md) | Point to rotate around |
495
-
496
- #### Returns
497
-
498
- [`Point`](Point.md)
499
-
500
- output point
501
-
502
- #### Defined in
503
-
504
- [src/Point.ts:193](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L193)
505
-
506
- ___
507
-
508
- ### round
509
-
510
- ▸ **round**(): [`Point`](Point.md)
511
-
512
- Return a version of this point with the x & y coordinates
513
- rounded to integers.
514
-
515
- #### Returns
516
-
517
- [`Point`](Point.md)
518
-
519
- rounded point
520
-
521
- #### Defined in
522
-
523
- [src/Point.ts:232](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L232)
524
-
525
- ___
526
-
527
- ### sub
528
-
529
- ▸ **sub**(`p`): [`Point`](Point.md)
530
-
531
- Subtract this point's x & y coordinates to from point,
532
- yielding a new point.
533
-
534
- #### Parameters
535
-
536
- | Name | Type | Description |
537
- | :------ | :------ | :------ |
538
- | `p` | [`Point`](Point.md) | the other point |
539
-
540
- #### Returns
541
-
542
- [`Point`](Point.md)
543
-
544
- output point
545
-
546
- #### Defined in
547
-
548
- [src/Point.ts:132](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L132)
549
-
550
- ___
551
-
552
- ### unit
553
-
554
- ▸ **unit**(): [`Point`](Point.md)
555
-
556
- Calculate this point but as a unit vector from 0, 0, meaning
557
- that the distance from the resulting point to the 0, 0
558
- coordinate will be equal to 1 and the angle from the resulting
559
- point to the 0, 0 coordinate will be the same as before.
560
-
561
- #### Returns
562
-
563
- [`Point`](Point.md)
564
-
565
- unit vector point
566
-
567
- #### Defined in
568
-
569
- [src/Point.ts:213](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L213)
570
-
571
- ___
572
-
573
- ### convert
574
-
575
- ▸ `Static` **convert**(`a`): [`Point`](Point.md)
576
-
577
- Construct a point from an array if necessary, otherwise if the input
578
- is already a Point, or an unknown type, return it unchanged
579
-
580
- **`Example`**
581
-
582
- ```ts
583
- // this
584
- var point = Point.convert([0, 1]);
585
- // is equivalent to
586
- var point = new Point(0, 1);
587
- ```
588
-
589
- #### Parameters
590
-
591
- | Name | Type | Description |
592
- | :------ | :------ | :------ |
593
- | `a` | `number`[] \| [`Point`](Point.md) | any kind of input value |
594
-
595
- #### Returns
596
-
597
- [`Point`](Point.md)
598
-
599
- constructed point, or passed-through value.
600
-
601
- #### Defined in
602
-
603
- [src/Point.ts:327](https://github.com/maptiler/maptiler-sdk-js/blob/638970c/src/Point.ts#L327)