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/MapMarker.js DELETED
@@ -1,116 +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.MapMarker = void 0;
27
- const React = __importStar(require("react"));
28
- const react_native_1 = require("react-native");
29
- const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
30
- const MapMarkerNativeComponent_1 = require("./MapMarkerNativeComponent");
31
- class MapMarker extends React.Component {
32
- getNativeComponent;
33
- getMapManagerCommand;
34
- getUIManagerCommand;
35
- static Animated;
36
- marker;
37
- constructor(props) {
38
- super(props);
39
- this.marker = React.createRef();
40
- this.showCallout = this.showCallout.bind(this);
41
- this.hideCallout = this.hideCallout.bind(this);
42
- this.setCoordinates = this.setCoordinates.bind(this);
43
- this.redrawCallout = this.redrawCallout.bind(this);
44
- this.animateMarkerToCoordinate = this.animateMarkerToCoordinate.bind(this);
45
- }
46
- setNativeProps(props) {
47
- // @ts-ignore
48
- this.marker.current?.setNativeProps(props);
49
- }
50
- showCallout() {
51
- if (this.marker.current) {
52
- MapMarkerNativeComponent_1.Commands.showCallout(this.marker.current);
53
- }
54
- }
55
- hideCallout() {
56
- if (this.marker.current) {
57
- MapMarkerNativeComponent_1.Commands.hideCallout(this.marker.current);
58
- }
59
- }
60
- setCoordinates(coordinate) {
61
- if (this.marker.current) {
62
- MapMarkerNativeComponent_1.Commands.setCoordinates(this.marker.current, coordinate);
63
- }
64
- }
65
- redrawCallout() {
66
- if (this.marker.current) {
67
- MapMarkerNativeComponent_1.Commands.redrawCallout(this.marker.current);
68
- }
69
- }
70
- animateMarkerToCoordinate(coordinate, duration = 500) {
71
- if (this.marker.current) {
72
- MapMarkerNativeComponent_1.Commands.animateMarkerToCoordinate(this.marker.current, coordinate, duration);
73
- }
74
- }
75
- redraw() {
76
- if (this.marker.current) {
77
- MapMarkerNativeComponent_1.Commands.redraw(this.marker.current);
78
- }
79
- }
80
- render() {
81
- const { stopPropagation = false } = this.props;
82
- let image;
83
- if (this.props.image) {
84
- image = react_native_1.Image.resolveAssetSource(this.props.image) || {};
85
- image = image.uri || this.props.image;
86
- }
87
- let icon;
88
- if (this.props.icon) {
89
- icon = react_native_1.Image.resolveAssetSource(this.props.icon) || {};
90
- icon = icon.uri;
91
- }
92
- const AIRMapMarker = this.getNativeComponent();
93
- return (<AIRMapMarker {...this.props} ref={this.marker} image={image} icon={icon} style={[styles.marker, this.props.style]} onPress={event => {
94
- if (stopPropagation) {
95
- event.stopPropagation();
96
- }
97
- if (this.props.onPress) {
98
- this.props.onPress(event);
99
- }
100
- }}/>);
101
- }
102
- }
103
- exports.MapMarker = MapMarker;
104
- const styles = react_native_1.StyleSheet.create({
105
- marker: {
106
- position: 'absolute',
107
- backgroundColor: 'transparent',
108
- },
109
- });
110
- MapMarker.Animated = react_native_1.Animated.createAnimatedComponent(MapMarker);
111
- exports.default = (0, decorateMapComponent_1.default)(MapMarker, 'Marker', {
112
- google: {
113
- ios: decorateMapComponent_1.SUPPORTED,
114
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
115
- },
116
- });
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import type { HostComponent } from 'react-native';
3
- import { NativeProps } from './MapMarker';
4
- import { LatLng } from './sharedTypes';
5
- export type MapMarkerNativeComponentType = HostComponent<NativeProps>;
6
- interface NativeCommands {
7
- showCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
8
- hideCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
9
- setCoordinates: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>, coordinate: LatLng) => void;
10
- redrawCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
11
- animateMarkerToCoordinate: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>, coordinate: LatLng, duration: number) => void;
12
- redraw: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
13
- }
14
- export declare const Commands: NativeCommands;
15
- export {};
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Commands = void 0;
7
- const codegenNativeCommands_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
8
- exports.Commands = (0, codegenNativeCommands_1.default)({
9
- supportedCommands: [
10
- 'showCallout',
11
- 'hideCallout',
12
- 'redrawCallout',
13
- 'animateMarkerToCoordinate',
14
- 'redraw',
15
- 'setCoordinates',
16
- ],
17
- });
@@ -1,87 +0,0 @@
1
- import * as React from 'react';
2
- import { Animated, ViewProps, ImageURISource, ImageRequireSource, NativeSyntheticEvent } from 'react-native';
3
- import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
- import { LatLng, Point } from './sharedTypes';
5
- import { Modify } from './sharedTypesInternal';
6
- export type MapOverlayProps = ViewProps & {
7
- /**
8
- * The bearing in degrees clockwise from north. Values outside the range [0, 360) will be normalized.
9
- *
10
- * @default 0
11
- * @platform iOS: Google Maps only
12
- * @platform Android: Supported
13
- */
14
- bearing?: number;
15
- /**
16
- * The coordinates for the image (left-top corner, right-bottom corner). ie.```[[lat, long], [lat, long]]```
17
- *
18
- * @platform iOS: Supported
19
- * @platform Android: Supported
20
- */
21
- bounds: [Coordinate, Coordinate];
22
- /**
23
- * A custom image to be used as the overlay.
24
- * Only required local image resources and uri (as for images located in the net) are allowed to be used.
25
- *
26
- * @platform iOS: Supported
27
- * @platform Android: Supported
28
- */
29
- image: ImageURISource | ImageRequireSource;
30
- /**
31
- * Callback that is called when the user presses on the overlay
32
- *
33
- * @platform iOS: Apple Maps only
34
- * @platform Android: Supported
35
- */
36
- onPress?: (event: OverlayPressEvent) => void;
37
- /**
38
- * The opacity of the overlay.
39
- *
40
- * @default 1
41
- * @platform iOS: Google Maps only
42
- * @platform Android: Supported
43
- */
44
- opacity?: number;
45
- /**
46
- * Boolean to allow an overlay to be tappable and use the onPress function.
47
- *
48
- * @default false
49
- * @platform iOS: Not supported
50
- * @platform Android: Supported
51
- */
52
- tappable?: boolean;
53
- };
54
- type NativeProps = Modify<MapOverlayProps, {
55
- image?: string;
56
- }>;
57
- export declare class MapOverlay extends React.Component<MapOverlayProps> {
58
- context: React.ContextType<typeof ProviderContext>;
59
- getNativeComponent: () => NativeComponent<NativeProps>;
60
- getMapManagerCommand: (name: string) => MapManagerCommand;
61
- getUIManagerCommand: (name: string) => UIManagerCommand;
62
- static Animated: Animated.AnimatedComponent<typeof MapOverlay>;
63
- render(): React.JSX.Element;
64
- }
65
- type Coordinate = [number, number];
66
- type OverlayPressEvent = NativeSyntheticEvent<{
67
- /**
68
- * @platform iOS: Apple Maps: `image-overlay-press`
69
- * @platform Android: `overlay-press`
70
- */
71
- action: 'overlay-press' | 'image-overlay-press';
72
- /**
73
- * @platform iOS: Apple Maps
74
- */
75
- name?: string;
76
- /**
77
- * @platform iOS: Apple Maps
78
- * @platform Android
79
- */
80
- coordinate?: LatLng;
81
- /**
82
- * @platform Android
83
- */
84
- position?: Point;
85
- }>;
86
- declare const _default: typeof MapOverlay;
87
- export default _default;
package/lib/MapOverlay.js DELETED
@@ -1,63 +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.MapOverlay = 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 MapOverlay extends React.Component {
31
- getNativeComponent;
32
- getMapManagerCommand;
33
- getUIManagerCommand;
34
- static Animated;
35
- render() {
36
- const { opacity = 1.0 } = this.props;
37
- let image;
38
- if (typeof this.props.image !== 'number' &&
39
- this.props.image.uri?.startsWith('http')) {
40
- image = this.props.image.uri;
41
- }
42
- else {
43
- const sourceAsset = react_native_1.Image.resolveAssetSource(this.props.image) || {};
44
- image = sourceAsset.uri;
45
- }
46
- const AIRMapOverlay = this.getNativeComponent();
47
- return (<AIRMapOverlay {...this.props} opacity={opacity} image={image} style={[styles.overlay, this.props.style]}/>);
48
- }
49
- }
50
- exports.MapOverlay = MapOverlay;
51
- const styles = react_native_1.StyleSheet.create({
52
- overlay: {
53
- position: 'absolute',
54
- backgroundColor: 'transparent',
55
- },
56
- });
57
- MapOverlay.Animated = react_native_1.Animated.createAnimatedComponent(MapOverlay);
58
- exports.default = (0, decorateMapComponent_1.default)(MapOverlay, 'Overlay', {
59
- google: {
60
- ios: decorateMapComponent_1.SUPPORTED,
61
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
62
- },
63
- });
@@ -1,140 +0,0 @@
1
- import * as React from 'react';
2
- import { View, ViewProps } from 'react-native';
3
- import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
4
- import { PolygonPressEvent } from './MapPolygon.types';
5
- import { LatLng, LineCapType, LineJoinType } from './sharedTypes';
6
- export type MapPolygonProps = ViewProps & {
7
- /**
8
- * An array of coordinates to describe the polygon
9
- *
10
- * @platform iOS: Supported
11
- * @platform Android: Supported
12
- */
13
- coordinates: LatLng[];
14
- /**
15
- * The fill color to use for the path.
16
- *
17
- * @default `#000`, `rgba(r,g,b,0.5)`
18
- * @platform iOS: Supported
19
- * @platform Android: Supported
20
- */
21
- fillColor?: string;
22
- /**
23
- * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
24
- * A geodesic is the shortest path between two points on the Earth's surface.
25
- * The geodesic curve is constructed assuming the Earth is a sphere.
26
- *
27
- * @platform iOS: Google Maps only
28
- * @platform Android: Supported
29
- */
30
- geodesic?: boolean;
31
- /**
32
- * A 2d array of coordinates to describe holes of the polygon where each hole has at least 3 points.
33
- *
34
- * @platform iOS: Supported
35
- * @platform Android: Supported
36
- */
37
- holes?: LatLng[][];
38
- /**
39
- * The line cap style to apply to the open ends of the path
40
- *
41
- * @default `round`
42
- * @platform iOS: Apple Maps only
43
- * @platform Android: Not supported
44
- */
45
- lineCap?: LineCapType;
46
- /**
47
- * An array of numbers specifying the dash pattern to use for the path.
48
- * The array contains one or more numbers that indicate the lengths (measured in points)
49
- * of the line segments and gaps in the pattern.
50
- * The values in the array alternate, starting with the first line segment length,
51
- * followed by the first gap length, followed by the second line segment length, and so on.
52
- *
53
- * @platform iOS: Apple Maps only
54
- * @platform Android: Supported
55
- */
56
- lineDashPattern?: number[];
57
- /**
58
- * The offset (in points) at which to start drawing the dash pattern.
59
- * Use this property to start drawing a dashed line partway through a segment or gap.
60
- * For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap.
61
- *
62
- * @default 0
63
- * @platform iOS: Apple Maps only
64
- * @platform Android: Not supported
65
- */
66
- lineDashPhase?: number;
67
- /**
68
- * The line join style to apply to corners of the path.
69
- *
70
- * @platform iOS: Apple Maps only
71
- * @platform Android: Not supported
72
- */
73
- lineJoin?: LineJoinType;
74
- /**
75
- * The limiting value that helps avoid spikes at junctions between connected line segments.
76
- * The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style.
77
- * If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit,
78
- * the joint is converted to a bevel join.
79
- * The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees.
80
- *
81
- * @default 10
82
- * @platform iOS: Apple Maps only
83
- * @platform Android: Not supported
84
- */
85
- miterLimit?: number;
86
- /**
87
- * Callback that is called when the user presses on the polygon
88
- *
89
- * @platform iOS: Supported
90
- * @platform Android: Supported
91
- */
92
- onPress?: (event: PolygonPressEvent) => void;
93
- /**
94
- * The stroke color to use for the path.
95
- *
96
- * @default `#000`, `rgba(r,g,b,0.5)`
97
- * @platform iOS: Supported
98
- * @platform Android: Supported
99
- */
100
- strokeColor?: string;
101
- /**
102
- * The stroke width to use for the path.
103
- *
104
- * @default 1
105
- * @platform iOS: Supported
106
- * @platform Android: Supported
107
- */
108
- strokeWidth?: number;
109
- /**
110
- * Boolean to allow a polygon to be tappable and use the onPress function.
111
- *
112
- * @platform iOS: Google Maps only
113
- * @platform Android: Supported
114
- */
115
- tappable?: boolean;
116
- /**
117
- * The order in which this tile overlay is drawn with respect to other overlays.
118
- * An overlay with a larger z-index is drawn over overlays with smaller z-indices.
119
- * The order of overlays with the same z-index is arbitrary.
120
- *
121
- * @platform iOS: Google Maps only
122
- * @platform Android: Supported
123
- */
124
- zIndex?: number;
125
- };
126
- type NativeProps = MapPolygonProps & {
127
- ref: React.RefObject<View>;
128
- };
129
- export declare class MapPolygon extends React.Component<MapPolygonProps> {
130
- context: React.ContextType<typeof ProviderContext>;
131
- getNativeComponent: () => NativeComponent<NativeProps>;
132
- getMapManagerCommand: (name: string) => MapManagerCommand;
133
- getUIManagerCommand: (name: string) => UIManagerCommand;
134
- private polygon;
135
- constructor(props: MapPolygonProps);
136
- setNativeProps(props: Partial<MapPolygonProps>): void;
137
- render(): React.JSX.Element;
138
- }
139
- declare const _default: typeof MapPolygon;
140
- export default _default;
package/lib/MapPolygon.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.MapPolygon = void 0;
27
- const React = __importStar(require("react"));
28
- const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
29
- class MapPolygon extends React.Component {
30
- getNativeComponent;
31
- getMapManagerCommand;
32
- getUIManagerCommand;
33
- polygon;
34
- constructor(props) {
35
- super(props);
36
- this.polygon = React.createRef();
37
- }
38
- setNativeProps(props) {
39
- this.polygon.current?.setNativeProps(props);
40
- }
41
- render() {
42
- const { strokeColor = '#000', strokeWidth = 1 } = this.props;
43
- const AIRMapPolygon = this.getNativeComponent();
44
- return (<AIRMapPolygon {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.polygon}/>);
45
- }
46
- }
47
- exports.MapPolygon = MapPolygon;
48
- exports.default = (0, decorateMapComponent_1.default)(MapPolygon, 'Polygon', {
49
- google: {
50
- ios: decorateMapComponent_1.SUPPORTED,
51
- android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
52
- },
53
- });
@@ -1,18 +0,0 @@
1
- import { NativeSyntheticEvent } from 'react-native';
2
- import { LatLng, Point } from './sharedTypes';
3
- export type PolygonPressEvent = NativeSyntheticEvent<{
4
- action: 'polygon-press';
5
- /**
6
- * @platform iOS: Google Maps
7
- */
8
- id?: string;
9
- /**
10
- * @platform iOS: Apple Maps
11
- * @platform Android
12
- */
13
- coordinate?: LatLng;
14
- /**
15
- * @platform Android
16
- */
17
- position?: Point;
18
- }>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,156 +0,0 @@
1
- import * as React from 'react';
2
- import { NativeSyntheticEvent, View, ViewProps } from 'react-native';
3
- import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
4
- import { LatLng, LineCapType, LineJoinType, Point } from './sharedTypes';
5
- export type MapPolylineProps = ViewProps & {
6
- /**
7
- * An array of coordinates to describe the polyline
8
- *
9
- * @platform iOS: Supported
10
- * @platform Android: Supported
11
- */
12
- coordinates: LatLng[];
13
- /**
14
- * The fill color to use for the path.
15
- *
16
- * @default `#000`, `rgba(r,g,b,0.5)`
17
- * @platform iOS: Supported
18
- * @platform Android: Not supported
19
- */
20
- fillColor?: string;
21
- /**
22
- * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
23
- * A geodesic is the shortest path between two points on the Earth's surface.
24
- * The geodesic curve is constructed assuming the Earth is a sphere.
25
- *
26
- * @platform iOS: Google Maps only
27
- * @platform Android: Supported
28
- */
29
- geodesic?: boolean;
30
- /**
31
- * The line cap style to apply to the open ends of the path
32
- *
33
- * @default `round`
34
- * @platform iOS: Apple Maps only
35
- * @platform Android: Supported
36
- */
37
- lineCap?: LineCapType;
38
- /**
39
- * An array of numbers specifying the dash pattern to use for the path.
40
- * The array contains one or more numbers that indicate the lengths (measured in points)
41
- * of the line segments and gaps in the pattern.
42
- * The values in the array alternate, starting with the first line segment length,
43
- * followed by the first gap length, followed by the second line segment length, and so on.
44
- *
45
- * @platform iOS: Supported
46
- * @platform Android: Supported
47
- */
48
- lineDashPattern?: number[];
49
- /**
50
- * The offset (in points) at which to start drawing the dash pattern.
51
- * Use this property to start drawing a dashed line partway through a segment or gap.
52
- * For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap.
53
- *
54
- * @default 0
55
- * @platform iOS: Apple Maps only
56
- * @platform Android: Not supported
57
- */
58
- lineDashPhase?: number;
59
- /**
60
- * The line join style to apply to corners of the path.
61
- *
62
- * @platform iOS: Apple Maps only
63
- * @platform Android: Not supported
64
- */
65
- lineJoin?: LineJoinType;
66
- /**
67
- * The limiting value that helps avoid spikes at junctions between connected line segments.
68
- * The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style.
69
- * If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit,
70
- * the joint is converted to a bevel join.
71
- * The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees.
72
- *
73
- * @default 10
74
- * @platform iOS: Apple Maps only
75
- * @platform Android: Not supported
76
- */
77
- miterLimit?: number;
78
- /**
79
- * Callback that is called when the user presses on the polyline
80
- *
81
- * @platform iOS: Supported
82
- * @platform Android: Supported
83
- */
84
- onPress?: (event: PolylinePressEvent) => void;
85
- /**
86
- * The stroke color to use for the path.
87
- *
88
- * @default `#000`, `rgba(r,g,b,0.5)`
89
- * @platform iOS: Supported
90
- * @platform Android: Supported
91
- */
92
- strokeColor?: string;
93
- /**
94
- * The stroke colors to use for the path.
95
- *
96
- * Must be the same length as `coordinates`
97
- *
98
- * @platform iOS: Supported
99
- * @platform Android: Supported
100
- */
101
- strokeColors?: string[];
102
- /**
103
- * The stroke width to use for the path.
104
- *
105
- * @default 1
106
- * @platform iOS: Supported
107
- * @platform Android: Supported
108
- */
109
- strokeWidth?: number;
110
- /**
111
- * Boolean to allow the polyline to be tappable and use the onPress function.
112
- *
113
- * @platform iOS: Google Maps only
114
- * @platform Android: Supported
115
- */
116
- tappable?: boolean;
117
- /**
118
- * The order in which this tile overlay is drawn with respect to other overlays.
119
- * An overlay with a larger z-index is drawn over overlays with smaller z-indices.
120
- * The order of overlays with the same z-index is arbitrary.
121
- *
122
- * @platform iOS: Google Maps only
123
- * @platform Android: Supported
124
- */
125
- zIndex?: number;
126
- };
127
- type NativeProps = MapPolylineProps & {
128
- ref: React.RefObject<View>;
129
- };
130
- export declare class MapPolyline extends React.Component<MapPolylineProps> {
131
- context: React.ContextType<typeof ProviderContext>;
132
- getNativeComponent: () => NativeComponent<NativeProps>;
133
- getMapManagerCommand: (name: string) => MapManagerCommand;
134
- getUIManagerCommand: (name: string) => UIManagerCommand;
135
- private polyline;
136
- constructor(props: MapPolylineProps);
137
- setNativeProps(props: Partial<NativeProps>): void;
138
- render(): React.JSX.Element;
139
- }
140
- declare const _default: typeof MapPolyline;
141
- export default _default;
142
- export type PolylinePressEvent = NativeSyntheticEvent<{
143
- action: 'polyline-press';
144
- /**
145
- * @platform iOS: Google Maps
146
- */
147
- id?: string;
148
- /**
149
- * @platform Android
150
- */
151
- coordinate?: LatLng;
152
- /**
153
- * @platform Android
154
- */
155
- position?: Point;
156
- }>;