@lugg/maps 0.2.0-alpha.9 → 1.0.0-beta.0
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.
- package/README.md +20 -19
- package/android/src/main/java/com/luggmaps/LuggMapView.kt +290 -0
- package/android/src/main/java/com/luggmaps/{LuggGoogleMapViewManager.kt → LuggMapViewManager.kt} +99 -36
- package/android/src/main/java/com/luggmaps/LuggMapWrapperView.kt +13 -5
- package/android/src/main/java/com/luggmaps/LuggMarkerView.kt +157 -13
- package/android/src/main/java/com/luggmaps/LuggMarkerViewManager.kt +28 -0
- package/android/src/main/java/com/luggmaps/LuggPackage.kt +1 -4
- package/android/src/main/java/com/luggmaps/LuggPolygonView.kt +85 -0
- package/android/src/main/java/com/luggmaps/LuggPolygonViewManager.kt +100 -0
- package/android/src/main/java/com/luggmaps/LuggPolylineView.kt +16 -0
- package/android/src/main/java/com/luggmaps/LuggPolylineViewManager.kt +22 -0
- package/android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt +698 -0
- package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +60 -0
- package/android/src/main/java/com/luggmaps/core/PolylineAnimator.kt +89 -24
- package/android/src/main/java/com/luggmaps/events/LongPressEvent.kt +29 -0
- package/android/src/main/java/com/luggmaps/events/MarkerDragEvent.kt +41 -0
- package/android/src/main/java/com/luggmaps/events/MarkerPressEvent.kt +34 -0
- package/android/src/main/java/com/luggmaps/events/PolygonPressEvent.kt +12 -0
- package/android/src/main/java/com/luggmaps/events/PressEvent.kt +29 -0
- package/ios/LuggMapView.h +9 -0
- package/ios/LuggMapView.mm +343 -0
- package/ios/LuggMarkerView.h +13 -0
- package/ios/LuggMarkerView.mm +119 -0
- package/ios/LuggPolygonView.h +31 -0
- package/ios/LuggPolygonView.mm +151 -0
- package/ios/LuggPolylineView.h +4 -0
- package/ios/LuggPolylineView.mm +23 -0
- package/ios/core/AppleMapProvider.h +15 -0
- package/ios/core/AppleMapProvider.mm +1029 -0
- package/ios/core/GMSPolylineAnimator.h +3 -0
- package/ios/core/GMSPolylineAnimator.m +101 -15
- package/ios/core/GoogleMapProvider.h +13 -0
- package/ios/core/GoogleMapProvider.mm +689 -0
- package/ios/core/MKPolylineAnimator.h +4 -0
- package/ios/core/MKPolylineAnimator.m +167 -42
- package/ios/core/MapProviderDelegate.h +84 -0
- package/ios/core/PolylineAnimatorBase.h +24 -1
- package/ios/core/PolylineAnimatorBase.m +82 -19
- package/ios/events/LongPressEvent.h +29 -0
- package/ios/events/MarkerDragEvent.h +69 -0
- package/ios/events/MarkerPressEvent.h +29 -0
- package/ios/events/PolygonPressEvent.h +20 -0
- package/ios/events/PressEvent.h +29 -0
- package/ios/extensions/MKMapView+Zoom.h +2 -0
- package/ios/extensions/MKMapView+Zoom.m +14 -4
- package/lib/module/MapProvider.js +2 -4
- package/lib/module/MapProvider.js.map +1 -1
- package/lib/module/MapProvider.web.js +12 -7
- package/lib/module/MapProvider.web.js.map +1 -1
- package/lib/module/MapView.js +33 -16
- package/lib/module/MapView.js.map +1 -1
- package/lib/module/MapView.web.js +283 -181
- package/lib/module/MapView.web.js.map +1 -1
- package/lib/module/components/GeoJson.js +159 -0
- package/lib/module/components/GeoJson.js.map +1 -0
- package/lib/module/components/GeoJson.types.js +4 -0
- package/lib/module/components/GeoJson.types.js.map +1 -0
- package/lib/module/components/Marker.js +28 -4
- package/lib/module/components/Marker.js.map +1 -1
- package/lib/module/components/Marker.types.js +4 -0
- package/lib/module/components/Marker.types.js.map +1 -0
- package/lib/module/components/Marker.web.js +98 -27
- package/lib/module/components/Marker.web.js.map +1 -1
- package/lib/module/components/Polygon.js +46 -0
- package/lib/module/components/Polygon.js.map +1 -0
- package/lib/module/components/Polygon.types.js +4 -0
- package/lib/module/components/Polygon.types.js.map +1 -0
- package/lib/module/components/Polygon.web.js +87 -0
- package/lib/module/components/Polygon.web.js.map +1 -0
- package/lib/module/components/Polyline.js +17 -4
- package/lib/module/components/Polyline.js.map +1 -1
- package/lib/module/components/Polyline.types.js +4 -0
- package/lib/module/components/Polyline.types.js.map +1 -0
- package/lib/module/components/Polyline.web.js +108 -31
- package/lib/module/components/Polyline.web.js.map +1 -1
- package/lib/module/components/index.js +4 -2
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/index.web.js +2 -0
- package/lib/module/components/index.web.js.map +1 -1
- package/lib/module/fabric/{LuggGoogleMapViewNativeComponent.ts → LuggMapViewNativeComponent.ts} +43 -7
- package/lib/module/fabric/LuggMarkerViewNativeComponent.ts +49 -1
- package/lib/module/fabric/LuggPolygonViewNativeComponent.ts +25 -0
- package/lib/module/fabric/LuggPolylineViewNativeComponent.ts +8 -0
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +4 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/typescript/src/MapProvider.d.ts +1 -1
- package/lib/typescript/src/MapProvider.d.ts.map +1 -1
- package/lib/typescript/src/MapProvider.web.d.ts +17 -1
- package/lib/typescript/src/MapProvider.web.d.ts.map +1 -1
- package/lib/typescript/src/MapView.d.ts +4 -4
- package/lib/typescript/src/MapView.d.ts.map +1 -1
- package/lib/typescript/src/MapView.types.d.ts +35 -9
- package/lib/typescript/src/MapView.types.d.ts.map +1 -1
- package/lib/typescript/src/MapView.web.d.ts +2 -11
- package/lib/typescript/src/MapView.web.d.ts.map +1 -1
- package/lib/typescript/src/components/GeoJson.d.ts +4 -0
- package/lib/typescript/src/components/GeoJson.d.ts.map +1 -0
- package/lib/typescript/src/components/GeoJson.types.d.ts +79 -0
- package/lib/typescript/src/components/GeoJson.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.d.ts +6 -33
- package/lib/typescript/src/components/Marker.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.types.d.ts +74 -0
- package/lib/typescript/src/components/Marker.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Marker.web.d.ts +2 -5
- package/lib/typescript/src/components/Marker.web.d.ts.map +1 -1
- package/lib/typescript/src/components/Polygon.d.ts +10 -0
- package/lib/typescript/src/components/Polygon.d.ts.map +1 -0
- package/lib/typescript/src/components/Polygon.types.d.ts +33 -0
- package/lib/typescript/src/components/Polygon.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Polygon.web.d.ts +3 -0
- package/lib/typescript/src/components/Polygon.web.d.ts.map +1 -0
- package/lib/typescript/src/components/Polyline.d.ts +6 -21
- package/lib/typescript/src/components/Polyline.d.ts.map +1 -1
- package/lib/typescript/src/components/Polyline.types.d.ts +53 -0
- package/lib/typescript/src/components/Polyline.types.d.ts.map +1 -0
- package/lib/typescript/src/components/Polyline.web.d.ts +2 -5
- package/lib/typescript/src/components/Polyline.web.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +8 -2
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/index.web.d.ts +6 -2
- package/lib/typescript/src/components/index.web.d.ts.map +1 -1
- package/lib/typescript/src/fabric/{LuggGoogleMapViewNativeComponent.d.ts → LuggMapViewNativeComponent.d.ts} +30 -4
- package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts +45 -1
- package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/LuggPolygonViewNativeComponent.d.ts +18 -0
- package/lib/typescript/src/fabric/LuggPolygonViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts +7 -0
- package/lib/typescript/src/fabric/LuggPolylineViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +11 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +9 -1
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +11 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/MapProvider.tsx +1 -3
- package/src/MapProvider.web.tsx +12 -3
- package/src/MapView.tsx +32 -26
- package/src/MapView.types.ts +43 -9
- package/src/MapView.web.tsx +345 -211
- package/src/components/GeoJson.tsx +221 -0
- package/src/components/GeoJson.types.ts +107 -0
- package/src/components/Marker.tsx +45 -36
- package/src/components/Marker.types.ts +75 -0
- package/src/components/Marker.web.tsx +116 -28
- package/src/components/Polygon.tsx +52 -0
- package/src/components/Polygon.types.ts +33 -0
- package/src/components/Polygon.web.tsx +104 -0
- package/src/components/Polyline.tsx +23 -22
- package/src/components/Polyline.types.ts +55 -0
- package/src/components/Polyline.web.tsx +151 -37
- package/src/components/index.ts +16 -2
- package/src/components/index.web.ts +6 -2
- package/src/fabric/{LuggGoogleMapViewNativeComponent.ts → LuggMapViewNativeComponent.ts} +43 -7
- package/src/fabric/LuggMarkerViewNativeComponent.ts +49 -1
- package/src/fabric/LuggPolygonViewNativeComponent.ts +25 -0
- package/src/fabric/LuggPolylineViewNativeComponent.ts +8 -0
- package/src/index.ts +28 -1
- package/src/index.web.ts +15 -1
- package/src/types.ts +13 -0
- package/android/src/main/java/com/luggmaps/LuggGoogleMapView.kt +0 -511
- package/ios/LuggAppleMapView.h +0 -16
- package/ios/LuggAppleMapView.mm +0 -592
- package/ios/LuggGoogleMapView.h +0 -13
- package/ios/LuggGoogleMapView.mm +0 -455
- package/lib/module/fabric/LuggAppleMapViewNativeComponent.ts +0 -83
- package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts +0 -54
- package/lib/typescript/src/fabric/LuggAppleMapViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/fabric/LuggGoogleMapViewNativeComponent.d.ts.map +0 -1
- package/src/fabric/LuggAppleMapViewNativeComponent.ts +0 -83
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#import <react/renderer/components/RNMapsSpec/EventEmitters.h>
|
|
4
|
+
|
|
5
|
+
namespace luggmaps {
|
|
6
|
+
namespace events {
|
|
7
|
+
|
|
8
|
+
struct PolygonPressEvent {
|
|
9
|
+
template <typename Emitter>
|
|
10
|
+
static void emit(const facebook::react::SharedEventEmitter &eventEmitter) {
|
|
11
|
+
if (!eventEmitter)
|
|
12
|
+
return;
|
|
13
|
+
auto emitter = std::static_pointer_cast<Emitter const>(eventEmitter);
|
|
14
|
+
typename Emitter::OnPolygonPress event;
|
|
15
|
+
emitter->onPolygonPress(event);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
} // namespace events
|
|
20
|
+
} // namespace luggmaps
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#import <react/renderer/components/RNMapsSpec/EventEmitters.h>
|
|
4
|
+
|
|
5
|
+
namespace luggmaps {
|
|
6
|
+
namespace events {
|
|
7
|
+
|
|
8
|
+
struct PressEvent {
|
|
9
|
+
double latitude;
|
|
10
|
+
double longitude;
|
|
11
|
+
double x;
|
|
12
|
+
double y;
|
|
13
|
+
|
|
14
|
+
template <typename Emitter>
|
|
15
|
+
void emit(const facebook::react::SharedEventEmitter &eventEmitter) const {
|
|
16
|
+
if (!eventEmitter)
|
|
17
|
+
return;
|
|
18
|
+
auto emitter = std::static_pointer_cast<Emitter const>(eventEmitter);
|
|
19
|
+
typename Emitter::OnMapPress event;
|
|
20
|
+
event.coordinate.latitude = latitude;
|
|
21
|
+
event.coordinate.longitude = longitude;
|
|
22
|
+
event.point.x = x;
|
|
23
|
+
event.point.y = y;
|
|
24
|
+
emitter->onMapPress(event);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} // namespace events
|
|
29
|
+
} // namespace luggmaps
|
|
@@ -19,12 +19,21 @@
|
|
|
19
19
|
|
|
20
20
|
#pragma mark - Public Methods
|
|
21
21
|
|
|
22
|
+
// Constant for altitude/zoom conversion (meters at zoom level 0)
|
|
23
|
+
static const double kAltitudeAtZoomZero = 220000000.0;
|
|
24
|
+
|
|
22
25
|
- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate
|
|
23
26
|
zoomLevel:(double)zoomLevel
|
|
24
27
|
animated:(BOOL)animated
|
|
25
28
|
{
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
// Use camera API directly to avoid region/margin interaction
|
|
30
|
+
CLLocationDistance altitude = kAltitudeAtZoomZero / pow(2, zoomLevel);
|
|
31
|
+
MKMapCamera *camera = [MKMapCamera cameraLookingAtCenterCoordinate:centerCoordinate
|
|
32
|
+
fromEyeCoordinate:centerCoordinate
|
|
33
|
+
eyeAltitude:altitude];
|
|
34
|
+
camera.pitch = self.camera.pitch;
|
|
35
|
+
camera.heading = self.camera.heading;
|
|
36
|
+
[self setCamera:camera animated:animated];
|
|
28
37
|
}
|
|
29
38
|
|
|
30
39
|
- (MKCoordinateRegion)regionForCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate
|
|
@@ -37,8 +46,9 @@
|
|
|
37
46
|
|
|
38
47
|
- (double)zoomLevel
|
|
39
48
|
{
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
// Use camera altitude which isn't affected by layoutMargins
|
|
50
|
+
CLLocationDistance altitude = self.camera.altitude;
|
|
51
|
+
double zoomLevel = log2(kAltitudeAtZoomZero / altitude);
|
|
42
52
|
return zoomLevel;
|
|
43
53
|
}
|
|
44
54
|
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* On web, wraps children with Google Maps APIProvider.
|
|
6
6
|
* On native, passes children through.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export const MapProvider = ({
|
|
9
9
|
children
|
|
10
|
-
})
|
|
11
|
-
return children;
|
|
12
|
-
}
|
|
10
|
+
}) => children;
|
|
13
11
|
//# sourceMappingURL=MapProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MapProvider","children"],"sourceRoot":"../../src","sources":["MapProvider.tsx"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,
|
|
1
|
+
{"version":3,"names":["MapProvider","children"],"sourceRoot":"../../src","sources":["MapProvider.tsx"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAGA,CAAC;EAAEC;AAA2B,CAAC,KAAKA,QAAQ","ignoreList":[]}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
3
4
|
import { APIProvider } from '@vis.gl/react-google-maps';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export
|
|
6
|
+
export const MapContext = /*#__PURE__*/createContext({
|
|
7
|
+
map: null,
|
|
8
|
+
isDragging: false,
|
|
9
|
+
moveCamera: () => {}
|
|
10
|
+
});
|
|
11
|
+
export const useMapContext = () => useContext(MapContext);
|
|
12
|
+
export const MapProvider = ({
|
|
6
13
|
apiKey = '',
|
|
7
14
|
children
|
|
8
|
-
}) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
}
|
|
15
|
+
}) => /*#__PURE__*/_jsx(APIProvider, {
|
|
16
|
+
apiKey: apiKey,
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
14
19
|
//# sourceMappingURL=MapProvider.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["APIProvider","jsx","_jsx","MapProvider","apiKey","children"],"sourceRoot":"../../src","sources":["MapProvider.web.tsx"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,
|
|
1
|
+
{"version":3,"names":["createContext","useContext","APIProvider","jsx","_jsx","MapContext","map","isDragging","moveCamera","useMapContext","MapProvider","apiKey","children"],"sourceRoot":"../../src","sources":["MapProvider.web.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AACjD,SAASC,WAAW,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxD,OAAO,MAAMC,UAAU,gBAAGL,aAAa,CAIpC;EAAEM,GAAG,EAAE,IAAI;EAAEC,UAAU,EAAE,KAAK;EAAEC,UAAU,EAAEA,CAAA,KAAM,CAAC;AAAE,CAAC,CAAC;AAE1D,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAMR,UAAU,CAACI,UAAU,CAAC;AAEzD,OAAO,MAAMK,WAAW,GAAGA,CAAC;EAAEC,MAAM,GAAG,EAAE;EAAEC;AAA2B,CAAC,kBACrER,IAAA,CAACF,WAAW;EAACS,MAAM,EAAEA,MAAO;EAAAC,QAAA,EAAEA;AAAQ,CAAc,CACrD","ignoreList":[]}
|
package/lib/module/MapView.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Platform, StyleSheet } from 'react-native';
|
|
5
|
-
import
|
|
6
|
-
import LuggAppleMapViewNativeComponent, { Commands as AppleMapCommands } from './fabric/LuggAppleMapViewNativeComponent';
|
|
5
|
+
import LuggMapViewNativeComponent, { Commands } from './fabric/LuggMapViewNativeComponent';
|
|
7
6
|
import LuggMapWrapperViewNativeComponent from './fabric/LuggMapWrapperViewNativeComponent';
|
|
8
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
export class MapView extends React.Component {
|
|
@@ -13,22 +12,18 @@ export class MapView extends React.Component {
|
|
|
13
12
|
zoomEnabled: true,
|
|
14
13
|
scrollEnabled: true,
|
|
15
14
|
rotateEnabled: true,
|
|
16
|
-
pitchEnabled: true
|
|
15
|
+
pitchEnabled: true,
|
|
16
|
+
theme: 'system'
|
|
17
17
|
};
|
|
18
18
|
nativeRef = /*#__PURE__*/React.createRef();
|
|
19
|
-
get nativeCommands() {
|
|
20
|
-
const provider = this.props.provider ?? MapView.defaultProps.provider;
|
|
21
|
-
const isApple = Platform.OS === 'ios' && provider === 'apple';
|
|
22
|
-
return isApple ? AppleMapCommands : GoogleMapCommands;
|
|
23
|
-
}
|
|
24
19
|
moveCamera(coordinate, options) {
|
|
25
20
|
const ref = this.nativeRef.current;
|
|
26
21
|
if (!ref) return;
|
|
27
22
|
const {
|
|
28
|
-
zoom,
|
|
23
|
+
zoom = 0,
|
|
29
24
|
duration = -1
|
|
30
|
-
} = options;
|
|
31
|
-
|
|
25
|
+
} = options ?? {};
|
|
26
|
+
Commands.moveCamera(ref, coordinate.latitude, coordinate.longitude, zoom, duration);
|
|
32
27
|
}
|
|
33
28
|
fitCoordinates(coordinates, options) {
|
|
34
29
|
const ref = this.nativeRef.current;
|
|
@@ -52,7 +47,21 @@ export class MapView extends React.Component {
|
|
|
52
47
|
});
|
|
53
48
|
return;
|
|
54
49
|
}
|
|
55
|
-
|
|
50
|
+
Commands.fitCoordinates(ref, coordinates, top, left, bottom, right, duration);
|
|
51
|
+
}
|
|
52
|
+
setEdgeInsets(edgeInsets, options) {
|
|
53
|
+
const ref = this.nativeRef.current;
|
|
54
|
+
if (!ref) return;
|
|
55
|
+
const {
|
|
56
|
+
top = 0,
|
|
57
|
+
left = 0,
|
|
58
|
+
bottom = 0,
|
|
59
|
+
right = 0
|
|
60
|
+
} = edgeInsets;
|
|
61
|
+
const {
|
|
62
|
+
duration = -1
|
|
63
|
+
} = options ?? {};
|
|
64
|
+
Commands.setEdgeInsets(ref, top, left, bottom, right, duration);
|
|
56
65
|
}
|
|
57
66
|
render() {
|
|
58
67
|
const {
|
|
@@ -66,18 +75,22 @@ export class MapView extends React.Component {
|
|
|
66
75
|
scrollEnabled,
|
|
67
76
|
rotateEnabled,
|
|
68
77
|
pitchEnabled,
|
|
69
|
-
|
|
78
|
+
edgeInsets,
|
|
70
79
|
userLocationEnabled,
|
|
80
|
+
userLocationButtonEnabled,
|
|
81
|
+
theme,
|
|
82
|
+
onPress,
|
|
83
|
+
onLongPress,
|
|
71
84
|
onCameraMove,
|
|
72
85
|
onCameraIdle,
|
|
73
86
|
onReady,
|
|
74
87
|
children,
|
|
75
88
|
...rest
|
|
76
89
|
} = this.props;
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/_jsxs(NativeMapView, {
|
|
90
|
+
return /*#__PURE__*/_jsxs(LuggMapViewNativeComponent, {
|
|
79
91
|
ref: this.nativeRef,
|
|
80
92
|
...rest,
|
|
93
|
+
provider: provider,
|
|
81
94
|
mapId: mapId,
|
|
82
95
|
initialCoordinate: initialCoordinate,
|
|
83
96
|
initialZoom: initialZoom,
|
|
@@ -87,8 +100,12 @@ export class MapView extends React.Component {
|
|
|
87
100
|
scrollEnabled: scrollEnabled,
|
|
88
101
|
rotateEnabled: rotateEnabled,
|
|
89
102
|
pitchEnabled: pitchEnabled,
|
|
90
|
-
|
|
103
|
+
edgeInsets: edgeInsets,
|
|
91
104
|
userLocationEnabled: userLocationEnabled,
|
|
105
|
+
userLocationButtonEnabled: userLocationButtonEnabled,
|
|
106
|
+
theme: theme,
|
|
107
|
+
onMapPress: onPress,
|
|
108
|
+
onMapLongPress: onLongPress,
|
|
92
109
|
onCameraMove: onCameraMove,
|
|
93
110
|
onCameraIdle: onCameraIdle,
|
|
94
111
|
onReady: onReady,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","LuggMapViewNativeComponent","Commands","LuggMapWrapperViewNativeComponent","jsx","_jsx","jsxs","_jsxs","MapView","Component","defaultProps","provider","OS","initialZoom","zoomEnabled","scrollEnabled","rotateEnabled","pitchEnabled","theme","nativeRef","createRef","moveCamera","coordinate","options","ref","current","zoom","duration","latitude","longitude","fitCoordinates","coordinates","first","padding","top","left","bottom","right","length","props","setEdgeInsets","edgeInsets","render","mapId","initialCoordinate","minZoom","maxZoom","userLocationEnabled","userLocationButtonEnabled","onPress","onLongPress","onCameraMove","onCameraIdle","onReady","children","rest","onMapPress","onMapLongPress","style","abs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