react-native-maps 1.21.0-alpha.13 → 1.21.0-alpha.130

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 (243) hide show
  1. package/android/build.gradle +73 -53
  2. package/android/gradlew +1 -2
  3. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  4. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  5. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  7. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  9. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  10. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  11. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +206 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +73 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +46 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +23 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  25. package/android/src/main/java/com/rnmaps/fabric/CalloutManager.java +77 -0
  26. package/android/src/main/java/com/rnmaps/fabric/CircleManager.java +94 -0
  27. package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
  28. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +619 -0
  29. package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +258 -0
  30. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +235 -2
  31. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +95 -0
  32. package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
  33. package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
  34. package/android/src/main/java/com/rnmaps/fabric/event/OnCalloutPressEvent.java +25 -0
  35. package/android/src/main/java/com/rnmaps/fabric/event/OnDeselectEvent.java +28 -0
  36. package/android/src/main/java/com/rnmaps/fabric/event/OnDoublePressEvent.java +27 -0
  37. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEndEvent.java +28 -0
  38. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEvent.java +28 -0
  39. package/android/src/main/java/com/rnmaps/fabric/event/OnDragStartEvent.java +28 -0
  40. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorBuildingFocusedEvent.java +28 -0
  41. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorLevelActivatedEvent.java +28 -0
  42. package/android/src/main/java/com/rnmaps/fabric/event/OnKmlReadyEvent.java +28 -0
  43. package/android/src/main/java/com/rnmaps/fabric/event/OnLongPressEvent.java +28 -0
  44. package/android/src/main/java/com/rnmaps/fabric/event/OnMapLoadedEvent.java +29 -0
  45. package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +29 -0
  46. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDeselectEvent.java +28 -0
  47. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEndEvent.java +28 -0
  48. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEvent.java +28 -0
  49. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragStartEvent.java +28 -0
  50. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +28 -0
  51. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerSelectEvent.java +28 -0
  52. package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
  53. package/android/src/main/java/com/rnmaps/fabric/event/OnPoiClickEvent.java +27 -0
  54. package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +27 -0
  55. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeCompleteEvent.java +30 -0
  56. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +48 -0
  57. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeStartEvent.java +33 -0
  58. package/android/src/main/java/com/rnmaps/fabric/event/OnSelectEvent.java +28 -0
  59. package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +28 -0
  60. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +40 -4
  61. package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
  62. package/android/src/main/java/com/rnmaps/maps/MapCircle.java +24 -0
  63. package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
  64. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +637 -556
  65. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  66. package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
  67. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +267 -151
  68. package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +31 -1
  69. package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +207 -141
  70. package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -16
  71. package/android/src/main/java/com/rnmaps/maps/MapView.java +1650 -1337
  72. package/android/src/main/jni/CMakeLists.txt +36 -0
  73. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  74. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  75. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  76. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +31 -0
  77. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +977 -0
  78. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +846 -0
  79. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +193 -0
  80. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1223 -0
  81. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  82. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  83. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +24 -0
  84. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +109 -0
  85. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  86. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +113 -0
  87. package/ios/AirGoogleMaps/AIRGoogleMap.h +10 -11
  88. package/ios/AirGoogleMaps/AIRGoogleMap.m +103 -69
  89. package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
  90. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +10 -9
  91. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +6 -3
  92. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  93. package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +3 -0
  94. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +0 -1
  95. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +0 -7
  96. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  97. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
  98. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +4 -4
  99. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +1 -1
  100. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +112 -43
  101. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  102. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
  103. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
  104. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +26 -0
  105. package/ios/AirMaps/AIRMap.h +8 -9
  106. package/ios/AirMaps/AIRMap.m +222 -239
  107. package/ios/AirMaps/AIRMapManager.m +10 -7
  108. package/ios/AirMaps/AIRMapMarker.h +1 -0
  109. package/ios/AirMaps/AIRMapMarker.m +165 -103
  110. package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
  111. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +28 -0
  112. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +68 -0
  113. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  114. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +43 -0
  115. package/ios/AirMaps/RNMapsAirModule.h +1 -1
  116. package/ios/AirMaps/RNMapsAirModule.mm +4 -3
  117. package/ios/AirMaps/RNMapsDefines.h +0 -0
  118. package/ios/AirMaps/RNMapsMapView.h +1 -1
  119. package/ios/AirMaps/RNMapsMapView.mm +119 -95
  120. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  121. package/ios/AirMaps/RNMapsMarkerView.h +24 -0
  122. package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
  123. package/ios/AirMaps/RNMapsMarkerViewManager.mm +28 -0
  124. package/ios/AirMaps.xcodeproj/project.pbxproj +20 -0
  125. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  126. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  127. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  128. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  129. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  130. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  131. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +2 -2
  132. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  133. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  134. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  135. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  136. package/ios/generated/RNMapsSpecs/Props.cpp +193 -0
  137. package/ios/generated/RNMapsSpecs/Props.h +1223 -0
  138. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  139. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  140. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  141. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  142. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  143. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  144. package/ios/generated/RNMapsSpecs/States.h +113 -0
  145. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  146. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  147. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  148. package/package.json +25 -18
  149. package/react-native-google-maps.podspec +26 -0
  150. package/react-native-maps-generated.podspec +31 -0
  151. package/react-native-maps.podspec +53 -15
  152. package/react-native.config.js +16 -0
  153. package/src/AnimatedRegion.ts +169 -0
  154. package/src/Geojson.tsx +541 -0
  155. package/src/MapCallout.tsx +77 -0
  156. package/src/MapCalloutSubview.tsx +64 -0
  157. package/src/MapCircle.tsx +162 -0
  158. package/src/MapHeatmap.tsx +125 -0
  159. package/src/MapLocalTile.tsx +60 -0
  160. package/src/MapMarker.tsx +531 -0
  161. package/src/MapMarkerNativeComponent.ts +51 -0
  162. package/src/MapOverlay.tsx +156 -0
  163. package/src/MapPolygon.tsx +188 -0
  164. package/src/MapPolygon.types.ts +25 -0
  165. package/src/MapPolyline.tsx +215 -0
  166. package/src/MapUrlTile.tsx +169 -0
  167. package/src/MapView.tsx +1223 -0
  168. package/src/MapView.types.ts +212 -0
  169. package/src/MapView.web.ts +2 -0
  170. package/src/MapViewNativeComponent.ts +86 -0
  171. package/src/MapWMSTile.tsx +148 -0
  172. package/src/ProviderConstants.ts +2 -0
  173. package/src/createFabricMap.tsx +253 -0
  174. package/src/decorateMapComponent.ts +219 -0
  175. package/src/fixImageProp.ts +17 -0
  176. package/src/index.ts +52 -0
  177. package/src/sharedTypes.ts +101 -0
  178. package/src/specs/NativeAirMapsModule.ts +36 -0
  179. package/src/specs/NativeComponentCallout.ts +63 -0
  180. package/src/specs/NativeComponentCircle.ts +93 -0
  181. package/src/specs/NativeComponentGoogleMapView.ts +913 -0
  182. package/src/specs/NativeComponentGooglePolygon.ts +94 -0
  183. package/src/specs/NativeComponentMapView.ts +1091 -0
  184. package/src/specs/NativeComponentMarker.ts +326 -0
  185. package/src/specs/NativeComponentOverlay.ts +89 -0
  186. package/src/specs/NativeComponentPolyline.ts +124 -0
  187. package/lib/AnimatedRegion.d.ts +0 -19
  188. package/lib/AnimatedRegion.js +0 -134
  189. package/lib/Geojson.d.ts +0 -204
  190. package/lib/Geojson.js +0 -166
  191. package/lib/MapCallout.d.ts +0 -40
  192. package/lib/MapCallout.js +0 -51
  193. package/lib/MapCalloutSubview.d.ts +0 -34
  194. package/lib/MapCalloutSubview.js +0 -48
  195. package/lib/MapCircle.d.ts +0 -117
  196. package/lib/MapCircle.js +0 -53
  197. package/lib/MapHeatmap.d.ts +0 -78
  198. package/lib/MapHeatmap.js +0 -59
  199. package/lib/MapLocalTile.d.ts +0 -35
  200. package/lib/MapLocalTile.js +0 -44
  201. package/lib/MapMarker.d.ts +0 -309
  202. package/lib/MapMarker.js +0 -116
  203. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  204. package/lib/MapMarkerNativeComponent.js +0 -17
  205. package/lib/MapOverlay.d.ts +0 -87
  206. package/lib/MapOverlay.js +0 -63
  207. package/lib/MapPolygon.d.ts +0 -140
  208. package/lib/MapPolygon.js +0 -53
  209. package/lib/MapPolygon.types.d.ts +0 -18
  210. package/lib/MapPolygon.types.js +0 -2
  211. package/lib/MapPolyline.d.ts +0 -156
  212. package/lib/MapPolyline.js +0 -53
  213. package/lib/MapUrlTile.d.ts +0 -134
  214. package/lib/MapUrlTile.js +0 -44
  215. package/lib/MapView.d.ts +0 -715
  216. package/lib/MapView.js +0 -447
  217. package/lib/MapView.types.d.ts +0 -161
  218. package/lib/MapView.types.js +0 -2
  219. package/lib/MapView.web.d.ts +0 -1
  220. package/lib/MapView.web.js +0 -9
  221. package/lib/MapViewNativeComponent.d.ts +0 -18
  222. package/lib/MapViewNativeComponent.js +0 -19
  223. package/lib/MapWMSTile.d.ts +0 -116
  224. package/lib/MapWMSTile.js +0 -44
  225. package/lib/ProviderConstants.d.ts +0 -2
  226. package/lib/ProviderConstants.js +0 -5
  227. package/lib/createFabricMap.d.ts +0 -23
  228. package/lib/createFabricMap.js +0 -175
  229. package/lib/decorateMapComponent.d.ts +0 -36
  230. package/lib/decorateMapComponent.js +0 -80
  231. package/lib/index.d.ts +0 -38
  232. package/lib/index.js +0 -81
  233. package/lib/sharedTypes.d.ts +0 -81
  234. package/lib/sharedTypes.js +0 -2
  235. package/lib/sharedTypesInternal.js +0 -2
  236. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  237. package/lib/specs/NativeAirMapsModule.js +0 -4
  238. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  239. package/lib/specs/NativeComponentGoogleMapView.js +0 -21
  240. package/lib/specs/NativeComponentMapView.d.ts +0 -855
  241. package/lib/specs/NativeComponentMapView.js +0 -21
  242. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  243. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
package/lib/MapCircle.js DELETED
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.MapCircle = void 0;
27
- const React = __importStar(require("react"));
28
- const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
29
- class MapCircle extends React.Component {
30
- getNativeComponent;
31
- getMapManagerCommand;
32
- getUIManagerCommand;
33
- circle;
34
- constructor(props) {
35
- super(props);
36
- this.circle = React.createRef();
37
- }
38
- setNativeProps(props) {
39
- this.circle.current?.setNativeProps(props);
40
- }
41
- render() {
42
- const { strokeColor = '#000', strokeWidth = 1 } = this.props;
43
- const AIRMapCircle = this.getNativeComponent();
44
- return (<AIRMapCircle {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.circle}/>);
45
- }
46
- }
47
- exports.MapCircle = MapCircle;
48
- exports.default = (0, decorateMapComponent_1.default)(MapCircle, 'Circle', {
49
- google: {
50
- ios: decorateMapComponent_1.SUPPORTED,
51
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
52
- },
53
- });
@@ -1,78 +0,0 @@
1
- import * as React from 'react';
2
- import { ProcessedColorValue, View, ViewProps } from 'react-native';
3
- import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
- import { LatLng } from './sharedTypes';
5
- import { Modify } from './sharedTypesInternal';
6
- export type MapHeatmapProps = ViewProps & {
7
- gradient?: {
8
- /**
9
- * Resolution of color map -- number corresponding to the number of steps colors are interpolated into.
10
- *
11
- * @default 256
12
- * @platform iOS: Google Maps only
13
- * @platform Android: Supported
14
- */
15
- colorMapSize: number;
16
- /**
17
- * Colors (one or more) to used for gradient.
18
- *
19
- * @platform iOS: Google Maps only
20
- * @platform Android: Supported
21
- */
22
- colors: string[];
23
- /**
24
- * Array of floating point values from 0 to 1 representing where each color starts.
25
- *
26
- * Array length must be equal to `colors` array length.
27
- *
28
- * @platform iOS: Google Maps only
29
- * @platform Android: Supported
30
- */
31
- startPoints: number[];
32
- };
33
- /**
34
- * The opacity of the heatmap.
35
- *
36
- * @default 0.7
37
- * @platform iOS: Google Maps only
38
- * @platform Android: Supported
39
- */
40
- opacity?: number;
41
- /**
42
- * Array of heatmap entries to apply towards density.
43
- *
44
- * @platform iOS: Google Maps only
45
- * @platform Android: Supported
46
- */
47
- points?: WeightedLatLng[];
48
- /**
49
- * The radius of the heatmap points in pixels, between 10 and 50.
50
- *
51
- * @default 20
52
- * @platform iOS: Google Maps only
53
- * @platform Android: Supported
54
- */
55
- radius?: number;
56
- };
57
- type NativeProps = Modify<MapHeatmapProps, {
58
- gradient?: Modify<MapHeatmapProps['gradient'], {
59
- colors: (ProcessedColorValue | null | undefined)[];
60
- }>;
61
- }> & {
62
- ref: React.RefObject<View>;
63
- };
64
- export declare class MapHeatmap extends React.Component<MapHeatmapProps> {
65
- context: React.ContextType<typeof ProviderContext>;
66
- getNativeComponent: () => NativeComponent<NativeProps>;
67
- getMapManagerCommand: (name: string) => MapManagerCommand;
68
- getUIManagerCommand: (name: string) => UIManagerCommand;
69
- private heatmap;
70
- constructor(props: MapHeatmapProps);
71
- setNativeProps(props: Partial<NativeProps>): void;
72
- render(): React.JSX.Element;
73
- }
74
- declare const _default: typeof MapHeatmap;
75
- export default _default;
76
- type WeightedLatLng = LatLng & {
77
- weight?: number;
78
- };
package/lib/MapHeatmap.js DELETED
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.MapHeatmap = void 0;
27
- const React = __importStar(require("react"));
28
- const react_native_1 = require("react-native");
29
- const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
30
- class MapHeatmap extends React.Component {
31
- getNativeComponent;
32
- getMapManagerCommand;
33
- getUIManagerCommand;
34
- heatmap;
35
- constructor(props) {
36
- super(props);
37
- this.heatmap = React.createRef();
38
- }
39
- setNativeProps(props) {
40
- this.heatmap.current?.setNativeProps(props);
41
- }
42
- render() {
43
- const AIRMapHeatmap = this.getNativeComponent();
44
- const propGradient = this.props.gradient;
45
- let gradient;
46
- if (propGradient) {
47
- const colors = propGradient.colors.map(c => (0, react_native_1.processColor)(c));
48
- gradient = { ...propGradient, colors };
49
- }
50
- return (<AIRMapHeatmap {...this.props} gradient={gradient} ref={this.heatmap}/>);
51
- }
52
- }
53
- exports.MapHeatmap = MapHeatmap;
54
- exports.default = (0, decorateMapComponent_1.default)(MapHeatmap, 'Heatmap', {
55
- google: {
56
- ios: decorateMapComponent_1.SUPPORTED,
57
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
58
- },
59
- });
@@ -1,35 +0,0 @@
1
- import * as React from 'react';
2
- import { ViewProps } from 'react-native';
3
- import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
4
- export type MapLocalTileProps = ViewProps & {
5
- /**
6
- * @platform iOS: Apple Maps only
7
- * @platform Android: Supported
8
- */
9
- pathTemplate: string;
10
- /**
11
- * @platform iOS: Apple Maps only
12
- * @platform Android: Supported
13
- */
14
- tileSize?: number;
15
- /**
16
- * Set to true to use pathTemplate to open files from Android's AssetManager. The default is false.
17
- * @platform android
18
- */
19
- useAssets?: boolean;
20
- /**
21
- * @platform iOS: Not supported
22
- * @platform Android: Supported
23
- */
24
- zIndex?: number;
25
- };
26
- type NativeProps = MapLocalTileProps;
27
- export declare class MapLocalTile extends React.Component<MapLocalTileProps> {
28
- context: React.ContextType<typeof ProviderContext>;
29
- getNativeComponent: () => NativeComponent<NativeProps>;
30
- getMapManagerCommand: (name: string) => MapManagerCommand;
31
- getUIManagerCommand: (name: string) => UIManagerCommand;
32
- render(): React.JSX.Element;
33
- }
34
- declare const _default: typeof MapLocalTile;
35
- export default _default;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.MapLocalTile = void 0;
27
- const React = __importStar(require("react"));
28
- const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
29
- class MapLocalTile extends React.Component {
30
- getNativeComponent;
31
- getMapManagerCommand;
32
- getUIManagerCommand;
33
- render() {
34
- const AIRMapLocalTile = this.getNativeComponent();
35
- return <AIRMapLocalTile {...this.props}/>;
36
- }
37
- }
38
- exports.MapLocalTile = MapLocalTile;
39
- exports.default = (0, decorateMapComponent_1.default)(MapLocalTile, 'LocalTile', {
40
- google: {
41
- ios: decorateMapComponent_1.SUPPORTED,
42
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
43
- },
44
- });
@@ -1,309 +0,0 @@
1
- import * as React from 'react';
2
- import { Animated, ViewProps, ImageURISource, ImageRequireSource } from 'react-native';
3
- import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
- import { MapMarkerNativeComponentType } from './MapMarkerNativeComponent';
5
- import { CalloutPressEvent, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point } from './sharedTypes';
6
- import { Modify } from './sharedTypesInternal';
7
- type AppleMarkerVisibility = 'hidden' | 'adaptive' | 'visible';
8
- export type MapMarkerProps = ViewProps & {
9
- /**
10
- * Sets the anchor point for the marker.
11
- * The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
12
- *
13
- * The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
14
- * where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
15
- *
16
- * The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding.
17
- * For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
18
- *
19
- * @default {x: 0.5, y: 1.0}
20
- * @platform iOS: Google Maps only. For Apple Maps, see the `centerOffset` prop
21
- * @platform Android: Supported
22
- */
23
- anchor?: Point;
24
- /**
25
- * Specifies the point in the marker image at which to anchor the callout when it is displayed.
26
- * This is specified in the same coordinate system as the anchor.
27
- *
28
- * See the `anchor` prop for more details.
29
- *
30
- * @default {x: 0.5, y: 0.0}
31
- * @platform iOS: Google Maps only. For Apple Maps, see the `calloutOffset` prop
32
- * @platform Android: Supported
33
- */
34
- calloutAnchor?: Point;
35
- /**
36
- * The offset (in points) at which to place the callout bubble.
37
- * When this property is set to (0, 0),
38
- * the anchor point of the callout bubble is placed on the top-center point of the marker view’s frame.
39
- *
40
- * Specifying positive offset values moves the callout bubble down and to the right,
41
- * while specifying negative values moves it up and to the left
42
- *
43
- * @default {x: 0.0, y: 0.0}
44
- * @platform iOS: Apple Maps only. For Google Maps, see the `calloutAnchor` prop
45
- * @platform Android: Not supported. See see the `calloutAnchor` prop
46
- */
47
- calloutOffset?: Point;
48
- /**
49
- * The offset (in points) at which to display the annotation view.
50
- *
51
- * By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
52
- *
53
- * Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
54
- *
55
- * @default {x: 0.0, y: 0.0}
56
- * @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
57
- * @platform Android: Not supported. See see the `anchor` prop
58
- */
59
- centerOffset?: Point;
60
- /**
61
- * The coordinate for the marker.
62
- *
63
- * @platform iOS: Supported
64
- * @platform Android: Supported
65
- */
66
- coordinate: LatLng;
67
- /**
68
- * The description of the marker.
69
- *
70
- * This is only used if the <Marker /> component has no children that are a `<Callout />`,
71
- * in which case the default callout behavior will be used,
72
- * which will show both the `title` and the `description`, if provided.
73
- *
74
- * @platform iOS: Supported
75
- * @platform Android: Supported
76
- */
77
- description?: string;
78
- /**
79
- * if `true` allows the marker to be draggable (re-positioned).
80
- *
81
- * @default false
82
- * @platform iOS: Supported
83
- * @platform Android: Supported
84
- */
85
- draggable?: boolean;
86
- /**
87
- * Sets whether this marker should be flat against the map true or a billboard facing the camera.
88
- *
89
- * @default false
90
- * @platform iOS: Google Maps only
91
- * @platform Android: Supported
92
- */
93
- flat?: boolean;
94
- /**
95
- * Marker icon to render (equivalent to `icon` property of GMSMarker Class).
96
- * Only local image resources are allowed to be used.
97
- *
98
- * @platform iOS: Google Maps only
99
- * @platform Android: Supported
100
- */
101
- icon?: ImageURISource | ImageRequireSource;
102
- /**
103
- * A string that can be used to identify this marker.
104
- *
105
- * @platform iOS: Supported
106
- * @platform Android: Supported
107
- */
108
- identifier?: string;
109
- /**
110
- * A custom image to be used as the marker's icon. Only local image resources are allowed to be used.
111
- *
112
- * @platform iOS: Supported
113
- * @platform Android: Supported
114
- */
115
- image?: ImageURISource | ImageRequireSource;
116
- /**
117
- * When true, the marker will be pre-selected.
118
- * Setting this to true allows the user to drag the marker without needing to tap on it first to focus it.
119
- *
120
- * @default false
121
- * @platform iOS: Apple Maps only
122
- * @platform Android: Not supported
123
- */
124
- isPreselected?: boolean;
125
- /**
126
- * Callback that is called when the user taps the callout view.
127
- *
128
- * @platform iOS: Apple Maps only
129
- * @platform Android: Supported
130
- */
131
- onCalloutPress?: (event: CalloutPressEvent) => void;
132
- /**
133
- * Callback that is called when the marker is deselected, before the callout is hidden.
134
- *
135
- * @platform iOS: Apple Maps only
136
- * @platform Android: Not supported
137
- */
138
- onDeselect?: (event: MarkerDeselectEvent) => void;
139
- /**
140
- * Callback called continuously as the marker is dragged
141
- *
142
- * @platform iOS: Apple Maps only
143
- * @platform Android: Supported
144
- */
145
- onDrag?: (event: MarkerDragEvent) => void;
146
- /**
147
- * Callback that is called when a drag on the marker finishes.
148
- * This is usually the point you will want to setState on the marker's coordinate again
149
- *
150
- * @platform iOS: Apple Maps only
151
- * @platform Android: Supported
152
- */
153
- onDragEnd?: (event: MarkerDragStartEndEvent) => void;
154
- /**
155
- * Callback that is called when the user initiates a drag on the marker (if it is draggable)
156
- *
157
- * @platform iOS: Apple Maps only
158
- * @platform Android: Supported
159
- */
160
- onDragStart?: (event: MarkerDragStartEndEvent) => void;
161
- /**
162
- * Callback that is called when the marker is tapped by the user.
163
- *
164
- * @platform iOS: Supported
165
- * @platform Android: Supported
166
- */
167
- onPress?: (event: MarkerPressEvent) => void;
168
- /**
169
- * Callback that is called when the marker becomes selected.
170
- * This will be called when the callout for that marker is about to be shown.
171
- *
172
- * @platform iOS: Supported.
173
- * @platform Android: Supported
174
- */
175
- onSelect?: (event: MarkerSelectEvent) => void;
176
- /**
177
- * The marker's opacity between 0.0 and 1.0.
178
- *
179
- * @default 1.0
180
- * @platform iOS: Supported
181
- * @platform Android: Supported
182
- */
183
- opacity?: number;
184
- /**
185
- * If no custom marker view or custom image is provided, the platform default pin will be used, which can be customized by this color.
186
- * Ignored if a custom marker is being used.<br/><br/>
187
- * For Android, the set of available colors is limited. Unsupported colors will fall back to red.
188
- * See [#887](https://github.com/react-community/react-native-maps/issues/887) for more information.
189
- *
190
- * @platform iOS: Supported
191
- * @platform Android: Supported
192
- */
193
- pinColor?: string;
194
- /**
195
- * A float number indicating marker's rotation angle, in degrees.
196
- *
197
- * @default 0
198
- * @platform iOS: Google Maps only
199
- * @platform Android: Supported
200
- */
201
- rotation?: number;
202
- /**
203
- * Sets whether this marker should propagate `onPress` events.
204
- * Enabling it will stop the parent `MapView`'s `onPress` from being called.
205
- *
206
- * Android does not propagate `onPress` events.
207
- *
208
- * See [#1132](https://github.com/react-community/react-native-maps/issues/1132) for more information.
209
- *
210
- * @default false
211
- * @platform iOS: Apple Maps only
212
- * @platform Android: Not supported
213
- */
214
- stopPropagation?: boolean;
215
- /**
216
- * Sets whether marker should be tappable.
217
- * If set to false, the marker will not have onPress events.
218
- *
219
- * @default true
220
- * @platform iOS: Google Maps only
221
- * @platform Android: Not supported
222
- */
223
- tappable?: boolean;
224
- /**
225
- * The title of the marker.
226
- * This is only used if the <Marker /> component has no `<Callout />` children.
227
- *
228
- * If the marker has <Callout /> children, default callout behavior will be used,
229
- * which will show both the `title` and the `description`, if provided.
230
- *
231
- * @platform iOS: Supported
232
- * @platform Android: Supported
233
- */
234
- title?: string;
235
- /**
236
- * Sets whether this marker should track view changes in info window.
237
- * Enabling it will let marker change content of info window after first render pass, but will lead to decreased performance,
238
- * so it's recommended to disable it whenever you don't need it.
239
- * **Note**: iOS Google Maps only.
240
- *
241
- * @default false
242
- * @platform iOS: Google Maps only
243
- * @platform Android: Not supported
244
- */
245
- tracksInfoWindowChanges?: boolean;
246
- /**
247
- * Sets whether this marker should track view changes.
248
- * It's recommended to turn it off whenever it's possible to improve custom marker performance.
249
- *
250
- * @default true
251
- * @platform iOS: Google Maps only
252
- * @platform Android: Supported
253
- */
254
- tracksViewChanges?: boolean;
255
- /**
256
- * The order in which this tile overlay is drawn with respect to other overlays.
257
- * An overlay with a larger z-index is drawn over overlays with smaller z-indices.
258
- * The order of overlays with the same z-index is arbitrary.
259
- *
260
- * @platform iOS: Supported
261
- * @platform Android: Supported
262
- */
263
- zIndex?: number;
264
- /**
265
- * Visibility of the title text rendered beneath Marker balloon
266
- * @platform iOS: Apple Maps only
267
- * @platform Android: Not supported
268
- */
269
- titleVisibility?: AppleMarkerVisibility;
270
- /**
271
- * Visibility of the subtitle text rendered beneath Marker balloon
272
- * @platform iOS: Apple Maps only
273
- * @platform Android: Not supported
274
- */
275
- subtitleVisibility?: AppleMarkerVisibility;
276
- /**
277
- * Indicate type of default markers if it's true MKPinAnnotationView will be used and MKMarkerAnnotationView if it's false
278
- * It doesn't change anything if you are using custom Markers
279
- * @platform iOS: Apple Maps only
280
- * @platform Android: Not supported
281
- */
282
- useLegacyPinView?: boolean;
283
- };
284
- type OmittedProps = Omit<MapMarkerProps, 'stopPropagation'>;
285
- export type NativeProps = Modify<OmittedProps, {
286
- icon?: string;
287
- image?: MapMarkerProps['image'] | string;
288
- }> & {
289
- ref: React.RefObject<MapMarkerNativeComponentType>;
290
- };
291
- export declare class MapMarker extends React.Component<MapMarkerProps> {
292
- context: React.ContextType<typeof ProviderContext>;
293
- getNativeComponent: () => NativeComponent<NativeProps>;
294
- getMapManagerCommand: (name: string) => MapManagerCommand;
295
- getUIManagerCommand: (name: string) => UIManagerCommand;
296
- static Animated: Animated.AnimatedComponent<typeof MapMarker>;
297
- private marker;
298
- constructor(props: MapMarkerProps);
299
- setNativeProps(props: Partial<NativeProps>): void;
300
- showCallout(): void;
301
- hideCallout(): void;
302
- setCoordinates(coordinate: LatLng): void;
303
- redrawCallout(): void;
304
- animateMarkerToCoordinate(coordinate: LatLng, duration?: number): void;
305
- redraw(): void;
306
- render(): React.JSX.Element;
307
- }
308
- declare const _default: typeof MapMarker;
309
- export default _default;