@rnmapbox/maps 10.0.0-beta.74 → 10.0.0-beta.76

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 (196) hide show
  1. package/README.md +3 -3
  2. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +61 -46
  3. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/images/RCTMGLImagesManager.kt +5 -5
  4. package/ios/RCTMGL-v10/RCMTGLImage.swift +2 -1
  5. package/ios/RCTMGL-v10/RCTMGLImages.swift +57 -17
  6. package/ios/RCTMGL-v10/RCTMGLMapView.swift +11 -1
  7. package/ios/RCTMGL-v10/RCTMGLUtils.swift +14 -5
  8. package/javascript/MGLModule.ts +54 -0
  9. package/javascript/Mapbox.ts +97 -0
  10. package/javascript/classes/index.d.ts +20 -1
  11. package/javascript/components/Annotation.tsx +141 -0
  12. package/javascript/components/Callout.d.ts +35 -0
  13. package/javascript/components/ImageSource.tsx +81 -0
  14. package/javascript/components/Images.tsx +58 -6
  15. package/javascript/components/{MapView.js → MapView.tsx} +456 -383
  16. package/javascript/components/MarkerView.tsx +3 -2
  17. package/javascript/components/NativeBridgeComponent.tsx +1 -1
  18. package/javascript/components/PointAnnotation.tsx +4 -3
  19. package/javascript/components/RasterDemSource.tsx +105 -0
  20. package/javascript/components/RasterSource.tsx +124 -0
  21. package/javascript/components/ShapeSource.tsx +1 -1
  22. package/javascript/components/{Style.js → Style.tsx} +117 -35
  23. package/javascript/components/Terrain.tsx +8 -7
  24. package/javascript/components/{UserLocation.js → UserLocation.tsx} +105 -94
  25. package/javascript/components/VectorSource.tsx +1 -1
  26. package/javascript/index.ts +4 -0
  27. package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +21 -6
  28. package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +19 -4
  29. package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +81 -21
  30. package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +27 -3
  31. package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +2 -1
  32. package/javascript/types/Position.ts +1 -0
  33. package/javascript/utils/Logger.ts +1 -1
  34. package/javascript/utils/geoUtils.ts +56 -0
  35. package/javascript/utils/{index.js → index.ts} +41 -19
  36. package/lib/commonjs/MGLModule.js +37 -0
  37. package/lib/commonjs/MGLModule.js.map +1 -0
  38. package/lib/commonjs/Mapbox.js +372 -0
  39. package/lib/commonjs/Mapbox.js.map +1 -0
  40. package/lib/commonjs/classes/index.d.js +2 -0
  41. package/lib/commonjs/classes/index.d.js.map +1 -1
  42. package/lib/commonjs/components/{annotations/Annotation.js → Annotation.js} +26 -27
  43. package/lib/commonjs/components/Annotation.js.map +1 -0
  44. package/lib/commonjs/components/Callout.d.js +9 -0
  45. package/lib/commonjs/components/Callout.d.js.map +1 -0
  46. package/lib/commonjs/components/ImageSource.js +8 -25
  47. package/lib/commonjs/components/ImageSource.js.map +1 -1
  48. package/lib/commonjs/components/Images.js +17 -1
  49. package/lib/commonjs/components/Images.js.map +1 -1
  50. package/lib/commonjs/components/MapView.js +30 -289
  51. package/lib/commonjs/components/MapView.js.map +1 -1
  52. package/lib/commonjs/components/MarkerView.js.map +1 -1
  53. package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
  54. package/lib/commonjs/components/PointAnnotation.js.map +1 -1
  55. package/lib/commonjs/components/RasterDemSource.js +3 -37
  56. package/lib/commonjs/components/RasterDemSource.js.map +1 -1
  57. package/lib/commonjs/components/RasterSource.js +2 -46
  58. package/lib/commonjs/components/RasterSource.js.map +1 -1
  59. package/lib/commonjs/components/Style.js +11 -15
  60. package/lib/commonjs/components/Style.js.map +1 -1
  61. package/lib/commonjs/components/Terrain.js.map +1 -1
  62. package/lib/commonjs/components/UserLocation.js +26 -77
  63. package/lib/commonjs/components/UserLocation.js.map +1 -1
  64. package/lib/commonjs/index.js +16 -339
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -4
  67. package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  68. package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
  69. package/lib/commonjs/modules/offline/offlineManager.js +7 -2
  70. package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
  71. package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
  72. package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
  73. package/lib/commonjs/types/Position.js +2 -0
  74. package/lib/commonjs/{utils/index.d.js.map → types/Position.js.map} +1 -1
  75. package/lib/commonjs/utils/animated/Animated.js.map +1 -1
  76. package/lib/commonjs/utils/geoUtils.js +12 -38
  77. package/lib/commonjs/utils/geoUtils.js.map +1 -1
  78. package/lib/commonjs/utils/index.js +3 -6
  79. package/lib/commonjs/utils/index.js.map +1 -1
  80. package/lib/module/MGLModule.js +19 -0
  81. package/lib/module/MGLModule.js.map +1 -0
  82. package/lib/module/Mapbox.js +59 -0
  83. package/lib/module/Mapbox.js.map +1 -0
  84. package/lib/module/classes/index.d.js +2 -0
  85. package/lib/module/classes/index.d.js.map +1 -1
  86. package/lib/module/components/{annotations/Annotation.js → Annotation.js} +26 -27
  87. package/lib/module/components/Annotation.js.map +1 -0
  88. package/lib/module/components/Callout.d.js +2 -0
  89. package/lib/module/components/Callout.d.js.map +1 -0
  90. package/lib/module/components/ImageSource.js +8 -25
  91. package/lib/module/components/ImageSource.js.map +1 -1
  92. package/lib/module/components/Images.js +17 -1
  93. package/lib/module/components/Images.js.map +1 -1
  94. package/lib/module/components/MapView.js +31 -290
  95. package/lib/module/components/MapView.js.map +1 -1
  96. package/lib/module/components/MarkerView.js.map +1 -1
  97. package/lib/module/components/NativeBridgeComponent.js.map +1 -1
  98. package/lib/module/components/PointAnnotation.js.map +1 -1
  99. package/lib/module/components/RasterDemSource.js +4 -38
  100. package/lib/module/components/RasterDemSource.js.map +1 -1
  101. package/lib/module/components/RasterSource.js +3 -47
  102. package/lib/module/components/RasterSource.js.map +1 -1
  103. package/lib/module/components/Style.js +11 -15
  104. package/lib/module/components/Style.js.map +1 -1
  105. package/lib/module/components/Terrain.js.map +1 -1
  106. package/lib/module/components/UserLocation.js +25 -76
  107. package/lib/module/components/UserLocation.js.map +1 -1
  108. package/lib/module/index.js +3 -108
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/modules/offline/OfflineCreatePackOptions.js +2 -4
  111. package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
  112. package/lib/module/modules/offline/OfflinePack.js.map +1 -1
  113. package/lib/module/modules/offline/offlineManager.js +1 -1
  114. package/lib/module/modules/offline/offlineManager.js.map +1 -1
  115. package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
  116. package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
  117. package/lib/module/types/Position.js +2 -0
  118. package/lib/module/{utils/index.d.js.map → types/Position.js.map} +1 -1
  119. package/lib/module/utils/animated/Animated.js.map +1 -1
  120. package/lib/module/utils/geoUtils.js +5 -32
  121. package/lib/module/utils/geoUtils.js.map +1 -1
  122. package/lib/module/utils/index.js +3 -5
  123. package/lib/module/utils/index.js.map +1 -1
  124. package/lib/typescript/MGLModule.d.ts +22 -0
  125. package/lib/typescript/MGLModule.d.ts.map +1 -0
  126. package/lib/typescript/Mapbox.d.ts +54 -0
  127. package/lib/typescript/Mapbox.d.ts.map +1 -0
  128. package/lib/typescript/components/Annotation.d.ts +34 -0
  129. package/lib/typescript/components/Annotation.d.ts.map +1 -0
  130. package/lib/typescript/components/ImageSource.d.ts +32 -0
  131. package/lib/typescript/components/ImageSource.d.ts.map +1 -0
  132. package/lib/typescript/components/Images.d.ts +24 -2
  133. package/lib/typescript/components/Images.d.ts.map +1 -1
  134. package/lib/typescript/components/MapView.d.ts +469 -0
  135. package/lib/typescript/components/MapView.d.ts.map +1 -0
  136. package/lib/typescript/components/MarkerView.d.ts +3 -2
  137. package/lib/typescript/components/MarkerView.d.ts.map +1 -1
  138. package/lib/typescript/components/NativeBridgeComponent.d.ts +1 -1
  139. package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
  140. package/lib/typescript/components/PointAnnotation.d.ts +10 -4
  141. package/lib/typescript/components/PointAnnotation.d.ts.map +1 -1
  142. package/lib/typescript/components/RasterDemSource.d.ts +46 -0
  143. package/lib/typescript/components/RasterDemSource.d.ts.map +1 -0
  144. package/lib/typescript/components/RasterSource.d.ts +59 -0
  145. package/lib/typescript/components/RasterSource.d.ts.map +1 -0
  146. package/lib/typescript/components/ShapeSource.d.ts +2 -2
  147. package/lib/typescript/components/ShapeSource.d.ts.map +1 -1
  148. package/lib/typescript/components/Style.d.ts +74 -0
  149. package/lib/typescript/components/Style.d.ts.map +1 -0
  150. package/lib/typescript/components/Terrain.d.ts +2 -2
  151. package/lib/typescript/components/Terrain.d.ts.map +1 -1
  152. package/lib/typescript/components/UserLocation.d.ts +102 -0
  153. package/lib/typescript/components/UserLocation.d.ts.map +1 -0
  154. package/lib/typescript/components/VectorSource.d.ts +2 -2
  155. package/lib/typescript/components/VectorSource.d.ts.map +1 -1
  156. package/lib/typescript/index.d.ts +4 -0
  157. package/lib/typescript/index.d.ts.map +1 -0
  158. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts +22 -0
  159. package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
  160. package/lib/typescript/modules/offline/OfflinePack.d.ts +24 -0
  161. package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -0
  162. package/lib/typescript/modules/offline/offlineManager.d.ts +220 -0
  163. package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -0
  164. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts +41 -0
  165. package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
  166. package/lib/typescript/modules/snapshot/snapshotManager.d.ts +52 -0
  167. package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -0
  168. package/lib/typescript/types/Position.d.ts +2 -0
  169. package/lib/typescript/types/Position.d.ts.map +1 -0
  170. package/lib/typescript/utils/Logger.d.ts +1 -1
  171. package/lib/typescript/utils/Logger.d.ts.map +1 -1
  172. package/lib/typescript/utils/animated/Animated.d.ts +23 -0
  173. package/lib/typescript/utils/animated/Animated.d.ts.map +1 -0
  174. package/lib/typescript/utils/geoUtils.d.ts +15 -0
  175. package/lib/typescript/utils/geoUtils.d.ts.map +1 -0
  176. package/lib/typescript/utils/index.d.ts +48 -0
  177. package/lib/typescript/utils/index.d.ts.map +1 -0
  178. package/package.json +4 -4
  179. package/index.d.ts +0 -745
  180. package/javascript/components/ImageSource.js +0 -82
  181. package/javascript/components/RasterDemSource.js +0 -106
  182. package/javascript/components/RasterSource.js +0 -124
  183. package/javascript/components/annotations/Annotation.js +0 -122
  184. package/javascript/index.js +0 -162
  185. package/javascript/utils/geoUtils.d.ts +0 -10
  186. package/javascript/utils/geoUtils.js +0 -73
  187. package/javascript/utils/index.d.ts +0 -27
  188. package/lib/commonjs/components/annotations/Annotation.js.map +0 -1
  189. package/lib/commonjs/utils/geoUtils.d.js +0 -2
  190. package/lib/commonjs/utils/geoUtils.d.js.map +0 -1
  191. package/lib/commonjs/utils/index.d.js +0 -2
  192. package/lib/module/components/annotations/Annotation.js.map +0 -1
  193. package/lib/module/utils/geoUtils.d.js +0 -2
  194. package/lib/module/utils/geoUtils.d.js.map +0 -1
  195. package/lib/module/utils/index.d.js +0 -2
  196. /package/javascript/utils/animated/{Animated.js → Animated.ts} +0 -0
@@ -14,7 +14,29 @@ declare type NativeImage = string | {
14
14
  sdf?: boolean;
15
15
  stretchX?: [number, number][];
16
16
  stretchY?: [number, number][];
17
+ content?: [number, number, number, number];
18
+ scale?: number;
17
19
  };
20
+ export declare type ImageEntryData = {
21
+ url?: string;
22
+ image?: ImageSourcePropType;
23
+ resolvedImage?: ImageResolvedAssetSource;
24
+ sdf?: boolean;
25
+ stretchX?: [number, number][];
26
+ stretchY?: [number, number][];
27
+ content?: [number, number, number, number];
28
+ scale?: number;
29
+ };
30
+ declare type ResolvedImageEntryData = {
31
+ url?: string;
32
+ resolvedImage?: ImageResolvedAssetSource;
33
+ sdf?: boolean;
34
+ stretchX?: [number, number][];
35
+ stretchY?: [number, number][];
36
+ content?: [number, number, number, number];
37
+ scale?: number;
38
+ };
39
+ export declare type ImageEntry = string | ImageSourcePropType | ImageEntryData;
18
40
  interface Props {
19
41
  /**
20
42
  * Specifies the external images in key-value pairs required for the shape source.
@@ -22,7 +44,7 @@ interface Props {
22
44
  * with format {uri: 'http://...'}` or `require('image.png')` or `import 'image.png'`
23
45
  */
24
46
  images?: {
25
- [key: string]: ImageSourcePropType;
47
+ [key: string]: ImageEntry;
26
48
  };
27
49
  /**
28
50
  * If you have an asset under Image.xcassets on iOS and the drawables directory on android
@@ -48,7 +70,7 @@ declare class Images extends React.PureComponent<Props> {
48
70
  nativeImages?: undefined;
49
71
  } | {
50
72
  images: {
51
- [key: string]: string | ImageResolvedAssetSource;
73
+ [key: string]: string | ImageResolvedAssetSource | ResolvedImageEntryData;
52
74
  };
53
75
  nativeImages: NativeImage[];
54
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Images.d.ts","sourceRoot":"","sources":["../../../javascript/components/Images.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAG7E,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,oBAAY,SAAS,CAAC,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,IAAI;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAcF,aAAK,cAAc,C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AC;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,UAAU,GAAG,MAAM,GAAG,mBAAmB,GAAG,cAAc,CAAC;AAQvE,UAAU,KAAK;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IAEvC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC;IAElC;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE5C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,cAAM,MAAO,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IAC7C,MAAM,CAAC,iBAAiB,SAAY;IAEpC,UAAU;;;;;;;;;IAiEV,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC;IAM/D,MAAM;CAUP;AAaD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,469 @@
1
+ import React, { Component } from 'react';
2
+ import { ViewProps, NativeSyntheticEvent, NativeMethods, LayoutChangeEvent } from 'react-native';
3
+ import { type NativeArg, type OrnamentPositonProp } from '../utils';
4
+ import Logger from '../utils/Logger';
5
+ import { FilterExpression } from '../utils/MapboxStyles';
6
+ import { type Position } from '../types/Position';
7
+ export declare const NATIVE_MODULE_NAME = "RCTMGLMapView";
8
+ export declare const ANDROID_TEXTURE_NATIVE_MODULE_NAME = "RCTMGLAndroidTextureMapView";
9
+ export declare type Point = {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ declare type BBox = [number, number, number, number];
14
+ export declare type RegionPayload = {
15
+ zoomLevel: number;
16
+ heading: number;
17
+ animated: boolean;
18
+ isUserInteraction: boolean;
19
+ visibleBounds: GeoJSON.Position[];
20
+ pitch: number;
21
+ };
22
+ /**
23
+ * v10 only - experimental
24
+ */
25
+ export declare type MapState = {
26
+ properties: {
27
+ center: GeoJSON.Position;
28
+ bounds: {
29
+ ne: GeoJSON.Position;
30
+ sw: GeoJSON.Position;
31
+ };
32
+ zoom: number;
33
+ heading: number;
34
+ pitch: number;
35
+ };
36
+ gestures: {
37
+ isGestureActive: boolean;
38
+ isAnimatingFromGesture: boolean;
39
+ };
40
+ };
41
+ declare type Props = ViewProps & {
42
+ /**
43
+ * The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.
44
+ */
45
+ contentInset?: number | number[];
46
+ /**
47
+ * The projection used when rendering the map
48
+ */
49
+ projection?: 'mercator' | 'globe';
50
+ /**
51
+ * Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street`
52
+ */
53
+ styleURL?: string;
54
+ /**
55
+ * StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec
56
+ */
57
+ styleJSON?: string;
58
+ /**
59
+ * iOS: The preferred frame rate at which the map view is rendered.
60
+ * The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,
61
+ * which will adaptively set the preferred frame rate based on the capability of
62
+ * the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.
63
+ *
64
+ * Android: The maximum frame rate at which the map view is rendered, but it can't exceed the ability of device hardware.
65
+ * This property can be set to arbitrary integer values.
66
+ */
67
+ preferredFramesPerSecond?: number;
68
+ /**
69
+ * Automatically change the language of the map labels to the system’s preferred language,
70
+ * this is not something that can be toggled on/off
71
+ */
72
+ localizeLabels?: boolean;
73
+ /**
74
+ * Enable/Disable zoom on the map
75
+ */
76
+ zoomEnabled?: boolean;
77
+ /**
78
+ * Enable/Disable scroll on the map
79
+ */
80
+ scrollEnabled?: boolean;
81
+ /**
82
+ * Enable/Disable pitch on map
83
+ */
84
+ pitchEnabled?: boolean;
85
+ /**
86
+ * Enable/Disable rotation on map
87
+ */
88
+ rotateEnabled?: boolean;
89
+ /**
90
+ * The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles,
91
+ * [requires](https://www.mapbox.com/help/how-attribution-works/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data.
92
+ * If that applies to this map view, do not hide this view or remove any notices from it.
93
+ *
94
+ * You are additionally [required](https://www.mapbox.com/help/how-mobile-apps-work/#telemetry) to provide users with the option to disable anonymous usage and location sharing (telemetry).
95
+ * If this view is hidden, you must implement this setting elsewhere in your app. See our website for [Android](https://www.mapbox.com/android-docs/map-sdk/overview/#telemetry-opt-out) and [iOS](https://www.mapbox.com/ios-sdk/#telemetry_opt_out) for implementation details.
96
+ *
97
+ * Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabledSettingShownInApp=YES
98
+ * to your Info.plist
99
+ */
100
+ attributionEnabled?: boolean;
101
+ /**
102
+ * Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map. By default on Android, the attribution with information icon (i) will be on the bottom left, while on iOS the mapbox logo will be on bottom left with information icon (i) on bottom right. Read more about mapbox attribution [here](https://docs.mapbox.com/help/getting-started/attribution/)
103
+ */
104
+ attributionPosition?: OrnamentPositonProp;
105
+ /**
106
+ * MapView's tintColor
107
+ */
108
+ tintColor?: string | number[];
109
+ /**
110
+ * Enable/Disable the logo on the map.
111
+ */
112
+ logoEnabled?: boolean;
113
+ /**
114
+ * Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map
115
+ */
116
+ logoPosition?: OrnamentPositonProp;
117
+ /**
118
+ * Enable/Disable the compass from appearing on the map
119
+ */
120
+ compassEnabled: boolean;
121
+ /**
122
+ * [`mapbox` (v10) implementation only] Enable/Disable if the compass should fade out when the map is pointing north
123
+ */
124
+ compassFadeWhenNorth?: boolean;
125
+ /**
126
+ * [`mapbox` (v10) implementation only] Adds compass offset, e.g. `{top: 8, left: 8}` will put the compass in top-left corner of the map
127
+ */
128
+ compassPosition?: OrnamentPositonProp;
129
+ /**
130
+ * Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight
131
+ */
132
+ compassViewPosition?: number;
133
+ /**
134
+ * Add margins to the compass with x and y values
135
+ */
136
+ compassViewMargins?: Point;
137
+ /**
138
+ * [iOS, `mapbox` (v10) implementation only] A string referencing an image key. Requires an `Images` component.
139
+ */
140
+ compassImage?: string;
141
+ /**
142
+ * [`mapbox` (v10) implementation only] Enable/Disable the scale bar from appearing on the map
143
+ */
144
+ scaleBarEnabled?: boolean;
145
+ /**
146
+ * [`mapbox` (v10) implementation only] Adds scale bar offset, e.g. `{top: 8, left: 8}` will put the scale bar in top-left corner of the map
147
+ */
148
+ scaleBarPosition?: OrnamentPositonProp;
149
+ /**
150
+ * [Android only] Enable/Disable use of GLSurfaceView instead of TextureView.
151
+ */
152
+ surfaceView?: boolean;
153
+ /**
154
+ * Map press listener, gets called when a user presses the map
155
+ */
156
+ onPress?: (feature: GeoJSON.Feature) => void;
157
+ /**
158
+ * Map long press listener, gets called when a user long presses the map
159
+ */
160
+ onLongPress?: (feature: GeoJSON.Feature) => void;
161
+ /**
162
+ * <v10 only
163
+ *
164
+ * This event is triggered whenever the currently displayed map region is about to change.
165
+ *
166
+ * @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
167
+ */
168
+ onRegionWillChange?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
169
+ /**
170
+ *
171
+ * This event is triggered whenever the currently displayed map region is changing.
172
+ *
173
+ * @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
174
+ */
175
+ onRegionIsChanging?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
176
+ /**
177
+ *
178
+ * This event is triggered whenever the currently displayed map region finished changing.
179
+ *
180
+ * @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
181
+ */
182
+ onRegionDidChange?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
183
+ /**
184
+ * iOS, v10 only, deprecated will be removed in next version - please use onRegionIsChanging.
185
+ */
186
+ onCameraChanged?: (state: MapState) => void;
187
+ /**
188
+ * iOS, v10 only, deprecated will be removed in next version - please use onRegionDidChange
189
+ */
190
+ onMapIdle?: (state: MapState) => void;
191
+ /**
192
+ * This event is triggered when the map is about to start loading a new map style.
193
+ */
194
+ onWillStartLoadingMap?: () => void;
195
+ /**
196
+ * This is triggered when the map has successfully loaded a new map style.
197
+ */
198
+ onDidFinishLoadingMap?: () => void;
199
+ /**
200
+ * This event is triggered when the map has failed to load a new map style. On v10 it's deprecated and replaced by onMapLoadingError
201
+ * @deprecated use onMapLoadingError
202
+ */
203
+ onDidFailLoadingMap?: () => void;
204
+ /**
205
+ * This event is tiggered when there is an error during map load. V10 only, replaces onDidFailLoadingMap, might be called multiple times and not exclusive with onDidFinishLoadingMap.
206
+ */
207
+ onMapLoadingError?: () => void;
208
+ /**
209
+ * This event is triggered when the map will start rendering a frame.
210
+ */
211
+ onWillStartRenderingFrame?: () => void;
212
+ /**
213
+ * This event is triggered when the map finished rendering a frame.
214
+ */
215
+ onDidFinishRenderingFrame?: () => void;
216
+ /**
217
+ * This event is triggered when the map fully finished rendering a frame.
218
+ */
219
+ onDidFinishRenderingFrameFully?: () => void;
220
+ /**
221
+ * This event is triggered when the map will start rendering the map.
222
+ */
223
+ onWillStartRenderingMap?: () => void;
224
+ /**
225
+ * This event is triggered when the map finished rendering the map.
226
+ */
227
+ onDidFinishRenderingMap?: () => void;
228
+ /**
229
+ * This event is triggered when the map fully finished rendering the map.
230
+ */
231
+ onDidFinishRenderingMapFully?: () => void;
232
+ /**
233
+ * This event is triggered when the user location is updated.
234
+ */
235
+ onUserLocationUpdate?: (feature: Location) => void;
236
+ /**
237
+ * This event is triggered when a style has finished loading.
238
+ */
239
+ onDidFinishLoadingStyle?: () => void;
240
+ /**
241
+ * The emitted frequency of regionwillchange events
242
+ */
243
+ regionWillChangeDebounceTime?: number;
244
+ /**
245
+ * The emitted frequency of regiondidchange events
246
+ */
247
+ regionDidChangeDebounceTime?: number;
248
+ };
249
+ declare type CallbablePropKeys = 'onRegionWillChange' | 'onRegionIsChanging' | 'onRegionDidChange' | 'onUserLocationUpdate' | 'onWillStartLoadingMap' | 'onMapLoadingError' | 'onDidFinishLoadingMap' | 'onDidFailLoadingMap' | 'onWillStartRenderingFrame' | 'onDidFinishRenderingFrame' | 'onDidFinishRenderingFrameFully' | 'onWillStartRenderingMap' | 'onDidFinishRenderingMap' | 'onDidFinishRenderingMapFully' | 'onDidFinishLoadingStyle' | 'onMapIdle' | 'onCameraChanged';
250
+ declare type Debounced<F> = F & {
251
+ clear(): void;
252
+ flush(): void;
253
+ };
254
+ declare const MapView_base: {
255
+ new (...args: any[]): {
256
+ _nativeModuleName: string;
257
+ _onAndroidCallback: (e: any) => void;
258
+ _callbackMap: Map<string, any>;
259
+ _preRefMapMethodQueue: {
260
+ method: {
261
+ name: string;
262
+ args: NativeArg[];
263
+ };
264
+ resolver: (value: NativeArg) => void;
265
+ }[];
266
+ _addAddAndroidCallback<ReturnType_1>(id: string, resolve: (value: ReturnType_1) => void, reject: (error: Error) => void): void;
267
+ _removeAndroidCallback(id: string): void;
268
+ _onAndroidCallbackO(e: React.SyntheticEvent<Element, import("./NativeBridgeComponent").RNMBEvent<{
269
+ [key: string]: string;
270
+ }>>): void;
271
+ _runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
272
+ _runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: NativeArg[]): Promise<ReturnType_2>;
273
+ context: unknown;
274
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
275
+ forceUpdate(callback?: (() => void) | undefined): void;
276
+ render(): React.ReactNode;
277
+ readonly props: object;
278
+ state: Readonly<{}>;
279
+ refs: {
280
+ [key: string]: React.ReactInstance;
281
+ };
282
+ componentDidMount?(): void;
283
+ shouldComponentUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): boolean;
284
+ componentWillUnmount?(): void;
285
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
286
+ getSnapshotBeforeUpdate?(prevProps: object, prevState: Readonly<{}>): any;
287
+ componentDidUpdate?(prevProps: object, prevState: Readonly<{}>, snapshot?: any): void;
288
+ componentWillMount?(): void;
289
+ UNSAFE_componentWillMount?(): void;
290
+ componentWillReceiveProps?(nextProps: object, nextContext: any): void;
291
+ UNSAFE_componentWillReceiveProps?(nextProps: object, nextContext: any): void;
292
+ componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
293
+ UNSAFE_componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
294
+ };
295
+ } & {
296
+ new (props: Props | Readonly<Props>): React.PureComponent<Props, {}, any>;
297
+ new (props: Props, context: any): React.PureComponent<Props, {}, any>;
298
+ contextType?: React.Context<any> | undefined;
299
+ };
300
+ /**
301
+ * MapView backed by Mapbox Native GL
302
+ */
303
+ declare class MapView extends MapView_base {
304
+ static defaultProps: Props;
305
+ logger: Logger;
306
+ _onDebouncedRegionWillChange: Debounced<(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
307
+ isAnimatingFromUserInteraction: boolean;
308
+ }>) => void>;
309
+ _onDebouncedRegionDidChange: Debounced<(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
310
+ isAnimatingFromUserInteraction: boolean;
311
+ }>) => void>;
312
+ _nativeRef?: RCTMGLMapViewRefType;
313
+ state: {
314
+ isReady: boolean | null;
315
+ region: null;
316
+ width: number;
317
+ height: number;
318
+ isUserInteraction: boolean;
319
+ };
320
+ constructor(props: Props);
321
+ componentDidMount(): void;
322
+ componentWillUnmount(): void;
323
+ UNSAFE_componentWillReceiveProps(nextProps: Props): void;
324
+ _setHandledMapChangedEvents(props: Props): void;
325
+ /**
326
+ * Converts a geographic coordinate to a point in the given view’s coordinate system.
327
+ *
328
+ * @example
329
+ * const pointInView = await this._map.getPointInView([-37.817070, 144.949901]);
330
+ *
331
+ * @param {Array<number>} coordinate - A point expressed in the map view's coordinate system.
332
+ * @return {Array}
333
+ */
334
+ getPointInView(coordinate: Position): Promise<Position>;
335
+ /**
336
+ * Converts a point in the given view’s coordinate system to a geographic coordinate.
337
+ *
338
+ * @example
339
+ * const coordinate = await this._map.getCoordinateFromView([100, 100]);
340
+ *
341
+ * @param {Array<number>} point - A point expressed in the given view’s coordinate system.
342
+ * @return {Array}
343
+ */
344
+ getCoordinateFromView(point: Position): Promise<Position>;
345
+ /**
346
+ * The coordinate bounds (ne, sw) visible in the user’s viewport.
347
+ *
348
+ * @example
349
+ * const visibleBounds = await this._map.getVisibleBounds();
350
+ *
351
+ * @return {Array}
352
+ */
353
+ getVisibleBounds(): Promise<[Position, Position]>;
354
+ /**
355
+ * Returns an array of rendered map features that intersect with a given point.
356
+ *
357
+ * @example
358
+ * this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2'])
359
+ *
360
+ * @param {Array<Number>} coordinate - A point expressed in the map view’s coordinate system.
361
+ * @param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
362
+ * @param {Array=} layerIDs - A array of layer id's to filter the features by
363
+ * @return {FeatureCollection}
364
+ */
365
+ queryRenderedFeaturesAtPoint(coordinate: Position, filter?: FilterExpression | [], layerIDs?: string[]): Promise<GeoJSON.FeatureCollection | undefined>;
366
+ /**
367
+ * Returns an array of rendered map features that intersect with the given rectangle,
368
+ * restricted to the given style layers and filtered by the given predicate. In v10,
369
+ * passing an empty array will query the entire visible bounds of the map.
370
+ *
371
+ * @example
372
+ * this._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2'])
373
+ *
374
+ * @param {Array<Number>} bbox - A rectangle expressed in the map view’s coordinate system. For v10, this can be an empty array to query the visible map area.
375
+ * @param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
376
+ * @param {Array=} layerIDs - A array of layer id's to filter the features by
377
+ * @return {FeatureCollection}
378
+ */
379
+ queryRenderedFeaturesInRect(bbox: BBox | [], filter?: FilterExpression | [], layerIDs?: string[] | null): Promise<GeoJSON.FeatureCollection | undefined>;
380
+ /**
381
+ * Map camera will perform updates based on provided config. Deprecated use Camera#setCamera.
382
+ * @deprecated use Camera#setCamera
383
+ */
384
+ setCamera(): void;
385
+ _runNative<ReturnType>(methodName: string, args?: NativeArg[]): Promise<ReturnType>;
386
+ /**
387
+ * Takes snapshot of map with current tiles and returns a URI to the image
388
+ * @param {Boolean} writeToDisk If true will create a temp file, otherwise it is in base64
389
+ * @return {String}
390
+ */
391
+ takeSnap(writeToDisk?: boolean): Promise<string>;
392
+ /**
393
+ * Returns the current zoom of the map view.
394
+ *
395
+ * @example
396
+ * const zoom = await this._map.getZoom();
397
+ *
398
+ * @return {Number}
399
+ */
400
+ getZoom(): Promise<number>;
401
+ /**
402
+ * Returns the map's geographical centerpoint
403
+ *
404
+ * @example
405
+ * const center = await this._map.getCenter();
406
+ *
407
+ * @return {Array<Number>} Coordinates
408
+ */
409
+ getCenter(): Promise<Position>;
410
+ /**
411
+ * Queries the currently loaded data for elevation at a geographical location.
412
+ * The elevation is returned in meters relative to mean sea-level.
413
+ * Returns null if terrain is disabled or if terrain data for the location hasn't been loaded yet.
414
+ *
415
+ * @param {Array<Number>} coordinate - the coordinates to query elevation at
416
+ * @return {Number}
417
+ */
418
+ queryTerrainElevation(coordinate: Position): Promise<number>;
419
+ /**
420
+ * Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
421
+ *
422
+ * @example
423
+ * await this._map.setSourceVisibility(false, 'composite', 'building')
424
+ *
425
+ * @param {boolean} visible - Visibility of the layers
426
+ * @param {String} sourceId - Identifier of the target source (e.g. 'composite')
427
+ * @param {String=} sourceLayerId - Identifier of the target source-layer (e.g. 'building')
428
+ */
429
+ setSourceVisibility(visible: boolean, sourceId: string, sourceLayerId?: string | null): void;
430
+ /**
431
+ * Show the attribution and telemetry action sheet.
432
+ * If you implement a custom attribution button, you should add this action to the button.
433
+ */
434
+ showAttribution(): Promise<NativeArg>;
435
+ _onPress(e: NativeSyntheticEvent<{
436
+ payload: GeoJSON.Feature;
437
+ }>): void;
438
+ _onLongPress(e: NativeSyntheticEvent<{
439
+ payload: GeoJSON.Feature;
440
+ }>): void;
441
+ _onRegionWillChange(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
442
+ isAnimatingFromUserInteraction: boolean;
443
+ }>): void;
444
+ _onRegionDidChange(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload>): void;
445
+ _onChange(e: NativeSyntheticEvent<{
446
+ type: string;
447
+ payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
448
+ isAnimatingFromUserInteraction: boolean;
449
+ }>;
450
+ }>): void;
451
+ _onLayout(e: LayoutChangeEvent): void;
452
+ _handleOnChange<T>(propName: CallbablePropKeys, payload: object): void;
453
+ _getContentInset(): number[] | undefined;
454
+ _setNativeRef(nativeRef: RCTMGLMapViewRefType): void;
455
+ setNativeProps(props: NativeProps): void;
456
+ _setStyleURL(props: Props): void;
457
+ render(): JSX.Element;
458
+ }
459
+ declare type NativeProps = Omit<Props, 'onPress' | 'onLongPress'> & {
460
+ onPress(event: NativeSyntheticEvent<{
461
+ payload: GeoJSON.Feature;
462
+ }>): void;
463
+ onLongPress(event: NativeSyntheticEvent<{
464
+ payload: GeoJSON.Feature;
465
+ }>): void;
466
+ };
467
+ declare type RCTMGLMapViewRefType = Component<NativeProps> & Readonly<NativeMethods>;
468
+ export default MapView;
469
+ //# sourceMappingURL=MapView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../javascript/components/MapView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAKL,SAAS,EACT,oBAAoB,EACpB,aAAa,EAEb,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAWlD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,eAAO,MAAM,kCAAkC,gCAAgC,CAAC;AAQhF,oBAAY,KAAK,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,aAAK,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C,oBAAY,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB,UAAU,EAAE;QACV,MAAM,EAAE,OAAO,CAAC,QAAQ,CA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EAAE,aAAa,CAAC;IAOzE,SAAS,CACP,CAAC,EAAE,oBAAoB,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,OAAO,CAAC,OAAO,CACtB,OAAO,CAAC,KAAK,EACb,aAAa,GAAG;YAAE,8BAA8B,EAAE,OAAO,CAAA;SAAE,CAC5D,CAAC;KACH,CAAC;IAiFJ,SAAS,CAAC,CAAC,EAAE,iBAAiB;IAQ9B,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;IAO/D,gBAAgB;IAYhB,aAAa,CAAC,SAAS,EAAE,oBAAoB;IAK7C,cAAc,CAAC,KAAK,EAAE,WAAW;IAMjC,YAAY,CAAC,KAAK,EAAE,KAAK;IAkBzB,MAAM;CA0CP;AAED,aAAK,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC,GAAG;IAC1D,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACzE,WAAW,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CAC9E,CAAC;AAEF,aAAK,oBAAoB,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAU7E,eAAe,OAAO,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import { type ViewProps } from 'react-native';
3
+ import { type Position } from '../types/Position';
3
4
  export declare const NATIVE_MODULE_NAME = "RCTMGLMarkerView";
4
5
  declare type Props = ViewProps & {
5
6
  /**
6
7
  * The center point (specified as a map coordinate) of the marker.
7
8
  */
8
- coordinate: [number, number];
9
+ coordinate: Position;
9
10
  /**
10
11
  * Any coordinate between (0, 0) and (1, 1), where (0, 0) is the top-left corner of
11
12
  * the view, and (1, 1) is the bottom-right corner. Defaults to the center at (0.5, 0.5).
@@ -45,7 +46,7 @@ declare class MarkerView extends React.PureComponent<Props> {
45
46
  static lastId: number;
46
47
  __idForPointAnnotation?: string;
47
48
  _idForPointAnnotation(): string;
48
- _getCoordinate(coordinate: [number, number]): string | undefined;
49
+ _getCoordinate(coordinate: Position): string | undefined;
49
50
  render(): JSX.Element;
50
51
  }
51
52
  export default MarkerView;
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerView.d.ts","sourceRoot":"","sources":["../../../javascript/components/MarkerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAStB,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,aAAK,KAAK,GAAG,SAAS,GAAG;IACvB;;OAEG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B;;;OAGG;IACH,MAAM,EAAE;QACN,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IAEF;;;;;OAKG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,cAAM,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACjD,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,CAIjC;IAEF,MAAM,CAAC,MAAM,SAAK;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,qBAAqB,IAAI,MAAM;IAQ/B,cAAc,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS;IAOhE,MAAM;CAmDP;AAYD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"MarkerView.d.ts","sourceRoot":"","sources":["../../../javascript/components/MarkerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAMlD,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAErD,aAAK,KAAK,GAAG,SAAS,GAAG;IACvB;;OAEG;IACH,UAAU,EAAE,QAAQ,CAAC;IAErB;;;OAGG;IACH,MAAM,EAAE;QACN,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IAEF;;;;;OAKG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,cAAM,UAAW,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACjD,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,CAIjC;IAEF,MAAM,CAAC,MAAM,SAAK;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,qBAAqB,IAAI,MAAM;IAQ/B,cAAc,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS;IAOxD,MAAM;CAmDP;AAYD,eAAe,UAAU,CAAC"}
@@ -22,7 +22,7 @@ declare const NativeBridgeComponent: <Props extends object, BaseComponent extend
22
22
  _removeAndroidCallback(id: string): void;
23
23
  _onAndroidCallbackO(e: React.SyntheticEvent<Element, RNMBEvent>): void;
24
24
  _runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
25
- _runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1, args?: NativeArg[]): Promise<ReturnType_2>;
25
+ _runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: NativeArg[]): Promise<ReturnType_2>;
26
26
  context: unknown;
27
27
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
28
28
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeBridgeComponent.d.ts","sourceRoot":"","sources":["../../../javascript/components/NativeBridgeComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,UAAU,CAAC;AAIvE,oBAAY,SAAS,CAAC,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,IAAI;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,qBAAqB,4DAEU,GAAG,EAAE,6EAGtB,MAAM;kBAWD,GAAG,EAAE;2BARP,MAAM;gCACD,GAAG,KAAK,IAAI;sBACtB,IAAI,MAAM,EAAE,GAAG,CAAC;;oBAEpB;gBAAE,MAAM,MAAM,CAAC;gBAAC,IAAI,EAAE,SAAS,EAAE,CAAA;aAAE;8BACzB,SAAS,KAAK,IAAI;;iDAahC,MAAM,oCACsB,IAAI,kBACpB,KAAK,KAAK,IAAI;mCAKL,MAAM;+BAIV,MAAM,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC;;2EAmCjD,MAAM,+BAEZ,SAAS,EAAE;;;;;;;;;;;;;;;;;;;;;;;iBA2BpB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"NativeBridgeComponent.d.ts","sourceRoot":"","sources":["../../../javascript/components/NativeBridgeComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,UAAU,CAAC;AAIvE,oBAAY,SAAS,CAAC,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,IAAI;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,qBAAqB,4DAEU,GAAG,EAAE,6EAGtB,MAAM;kBAWD,GAAG,EAAE;2BARP,MAAM;gCACD,GAAG,KAAK,IAAI;sBACtB,IAAI,MAAM,EAAE,GAAG,CAAC;;oBAEpB;gBAAE,MAAM,MAAM,CAAC;gBAAC,IAAI,EAAE,SAAS,EAAE,CAAA;aAAE;8BACzB,SAAS,KAAK,IAAI;;iDAahC,MAAM,oCACsB,IAAI,kBACpB,KAAK,KAAK,IAAI;mCAKL,MAAM;+BAIV,MAAM,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC;;2EAmCjD,MAAM,2CAEZ,SAAS,EAAE;;;;;;;;;;;;;;;;;;;;;;;iBA2BpB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
@@ -2,10 +2,13 @@ import React, { SyntheticEvent, type Component } from 'react';
2
2
  import { type ViewProps } from 'react-native';
3
3
  import { type Feature } from 'geojson';
4
4
  import { type BaseProps } from '../types/BaseProps';
5
+ import { Position } from '../types/Position';
5
6
  import { type RNMBEvent } from './NativeBridgeComponent';
6
7
  export declare const NATIVE_MODULE_NAME = "RCTMGLPointAnnotation";
7
8
  declare type FeaturePayload = {
8
- feature: Feature;
9
+ feature: Feature<GeoJSON.Point, {
10
+ id: string;
11
+ }>;
9
12
  };
10
13
  declare type Props = BaseProps & {
11
14
  /**
@@ -31,7 +34,7 @@ declare type Props = BaseProps & {
31
34
  /**
32
35
  * The center point (specified as a map coordinate) of the annotation.
33
36
  */
34
- coordinate: [number, number];
37
+ coordinate: Position;
35
38
  /**
36
39
  * Specifies the anchor being set on a particular point of the annotation.
37
40
  * The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
@@ -72,7 +75,7 @@ declare type Props = BaseProps & {
72
75
  /**
73
76
  * Expects one child, and an optional callout can be added as well
74
77
  */
75
- children: React.ReactElement;
78
+ children: React.ReactElement | [React.ReactElement, React.ReactElement];
76
79
  style?: ViewProps['style'];
77
80
  };
78
81
  declare const PointAnnotation_base: {
@@ -89,11 +92,14 @@ declare const PointAnnotation_base: {
89
92
  }[];
90
93
  _addAddAndroidCallback<ReturnType_1>(id: string, resolve: (value: ReturnType_1) => void, reject: (error: Error) => void): void;
91
94
  _removeAndroidCallback(id: string): void;
95
+ /**
96
+ * Enable or disable dragging. Defaults to false.
97
+ */
92
98
  _onAndroidCallbackO(e: React.SyntheticEvent<Element, RNMBEvent<{
93
99
  [key: string]: string;
94
100
  }>>): void;
95
101
  _runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
96
- _runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
102
+ _runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
97
103
  context: unknown;
98
104
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
99
105
  forceUpdate(callback?: (() => void) | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"PointAnnotation.d.ts","sourceRoot":"","sources":["../../../javascript/components/PointAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,SA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