react-native-maps 2.0.0-beta.5 → 2.0.0-beta.7
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/android/src/main/java/com/rnmaps/maps/MapCalloutManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapCircleManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapGradientPolyline.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapGradientPolylineManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapHeatmapManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapLiteManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapLocalTile.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapLocalTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +1 -56
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +9 -26
- package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolygonManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapTileProvider.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapView.java +24 -131
- package/android/src/main/java/com/rnmaps/maps/MapViewModule.java +598 -0
- package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +6 -6
- package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/SizeReportingShadowNode.java +1 -1
- package/ios/{AirGoogleMaps/AIRDummyView.h → GoogleMaps/RNMDummyView.h} +3 -3
- package/ios/{AirGoogleMaps/AIRDummyView.m → GoogleMaps/RNMDummyView.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSMarker.h → GoogleMaps/RNMGMSMarker.h} +6 -6
- package/ios/{AirGoogleMaps/AIRGMSMarker.m → GoogleMaps/RNMGMSMarker.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolygon.h → GoogleMaps/RNMGMSPolygon.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolygon.m → GoogleMaps/RNMGMSPolygon.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolyline.h → GoogleMaps/RNMGMSPolyline.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolyline.m → GoogleMaps/RNMGMSPolyline.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMap.h → GoogleMaps/RNMGoogleMap.h} +5 -5
- package/ios/{AirGoogleMaps/AIRGoogleMap.m → GoogleMaps/RNMGoogleMap.m} +77 -77
- package/ios/{AirGoogleMaps/AIRGoogleMapCallout.h → GoogleMaps/RNMGoogleMapCallout.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCallout.m → GoogleMaps/RNMGoogleMapCallout.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.h → GoogleMaps/RNMGoogleMapCalloutManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.m → GoogleMaps/RNMGoogleMapCalloutManager.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.h → GoogleMaps/RNMGoogleMapCalloutSubview.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.m → GoogleMaps/RNMGoogleMapCalloutSubview.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.h → GoogleMaps/RNMGoogleMapCalloutSubviewManager.h} +3 -3
- package/ios/GoogleMaps/RNMGoogleMapCalloutSubviewManager.m +28 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapCircle.h → GoogleMaps/RNMGoogleMapCircle.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCircle.m → GoogleMaps/RNMGoogleMapCircle.m} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.h → GoogleMaps/RNMGoogleMapCircleManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.m → GoogleMaps/RNMGoogleMapCircleManager.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.h → GoogleMaps/RNMGoogleMapHeatmap.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.m → GoogleMaps/RNMGoogleMapHeatmap.m} +4 -4
- package/ios/GoogleMaps/RNMGoogleMapHeatmapManager.h +11 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmapManager.m → GoogleMaps/RNMGoogleMapHeatmapManager.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapManager.h → GoogleMaps/RNMGoogleMapManager.h} +3 -3
- package/ios/GoogleMaps/RNMGoogleMapManager.m +274 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.h → GoogleMaps/RNMGoogleMapMarker.h} +15 -15
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.m → GoogleMaps/RNMGoogleMapMarker.m} +22 -22
- package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.h → GoogleMaps/RNMGoogleMapMarkerManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.m → GoogleMaps/RNMGoogleMapMarkerManager.m} +20 -20
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.h → GoogleMaps/RNMGoogleMapOverlay.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.m → GoogleMaps/RNMGoogleMapOverlay.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.h → GoogleMaps/RNMGoogleMapOverlayManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.m → GoogleMaps/RNMGoogleMapOverlayManager.m} +6 -6
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.h → GoogleMaps/RNMGoogleMapPolygon.h} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.m → GoogleMaps/RNMGoogleMapPolygon.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.h → GoogleMaps/RNMGoogleMapPolygonManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.m → GoogleMaps/RNMGoogleMapPolygonManager.m} +10 -10
- package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.h → GoogleMaps/RNMGoogleMapPolyline.h} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.m → GoogleMaps/RNMGoogleMapPolyline.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.h → GoogleMaps/RNMGoogleMapPolylineManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.m → GoogleMaps/RNMGoogleMapPolylineManager.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.h → GoogleMaps/RNMGoogleMapUrlTile.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.m → GoogleMaps/RNMGoogleMapUrlTile.m} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTileManager.h → GoogleMaps/RNMGoogleMapUrlTileManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapURLTileManager.m → GoogleMaps/RNMGoogleMapUrlTileManager.m} +7 -7
- package/ios/GoogleMaps/RNMGoogleMapViewModule.h +5 -0
- package/ios/GoogleMaps/RNMGoogleMapViewModule.m +380 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.h → GoogleMaps/RNMGoogleMapWMSTile.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.m → GoogleMaps/RNMGoogleMapWMSTile.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.h → GoogleMaps/RNMGoogleMapWMSTileManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.m → GoogleMaps/RNMGoogleMapWMSTileManager.m} +8 -8
- package/ios/{AirMaps → Maps}/Callout/SMCalloutView.h +4 -4
- package/ios/{AirMaps/RCTConvert+AirMap.h → Maps/RCTConvert+RNMMap.h} +1 -1
- package/ios/{AirMaps/RCTConvert+AirMap.m → Maps/RCTConvert+RNMMap.m} +8 -8
- package/ios/{AirMaps/AIRMap.h → Maps/RNMMap.h} +8 -8
- package/ios/{AirMaps/AIRMap.m → Maps/RNMMap.m} +56 -56
- package/ios/{AirMaps/AIRMapCallout.h → Maps/RNMMapCallout.h} +1 -1
- package/ios/{AirMaps/AIRMapCallout.m → Maps/RNMMapCallout.m} +2 -2
- package/ios/{AirMaps/AIRMapCircleManager.h → Maps/RNMMapCalloutManager.h} +2 -2
- package/ios/{AirMaps/AIRMapCalloutManager.m → Maps/RNMMapCalloutManager.m} +7 -7
- package/ios/{AirMaps/AIRMapCalloutSubview.h → Maps/RNMMapCalloutSubview.h} +3 -3
- package/ios/{AirMaps/AIRMapCalloutSubview.m → Maps/RNMMapCalloutSubview.m} +4 -4
- package/ios/Maps/RNMMapCalloutSubviewManager.h +14 -0
- package/ios/Maps/RNMMapCalloutSubviewManager.m +24 -0
- package/ios/{AirMaps/AIRMapCircle.h → Maps/RNMMapCircle.h} +5 -5
- package/ios/{AirMaps/AIRMapCircle.m → Maps/RNMMapCircle.m} +3 -3
- package/ios/{AirMaps/AIRMapCalloutManager.h → Maps/RNMMapCircleManager.h} +2 -2
- package/ios/{AirMaps/AIRMapCircleManager.m → Maps/RNMMapCircleManager.m} +7 -7
- package/ios/{AirMaps/AIRMapCoordinate.h → Maps/RNMMapCoordinate.h} +2 -2
- package/ios/{AirMaps/AIRMapCoordinate.m → Maps/RNMMapCoordinate.m} +3 -3
- package/ios/{AirMaps/AIRMapLocalTile.h → Maps/RNMMapLocalTile.h} +7 -7
- package/ios/{AirMaps/AIRMapLocalTile.m → Maps/RNMMapLocalTile.m} +6 -6
- package/ios/{AirMaps/AIRMapLocalTileManager.h → Maps/RNMMapLocalTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapLocalTileManager.m → Maps/RNMMapLocalTileManager.m} +9 -9
- package/ios/{AirMaps/AIRMapLocalTileOverlay.h → Maps/RNMMapLocalTileOverlay.h} +2 -2
- package/ios/{AirMaps/AIRMapLocalTileOverlay.m → Maps/RNMMapLocalTileOverlay.m} +5 -5
- package/ios/{AirMaps/AIRMapManager.h → Maps/RNMMapManager.h} +6 -6
- package/ios/Maps/RNMMapManager.m +857 -0
- package/ios/{AirMaps/AIRMapMarker.h → Maps/RNMMapMarker.h} +8 -8
- package/ios/{AirMaps/AIRMapMarker.m → Maps/RNMMapMarker.m} +13 -13
- package/ios/{AirMaps/AIRMapMarkerManager.h → Maps/RNMMapMarkerManager.h} +1 -1
- package/ios/{AirMaps/AIRMapMarkerManager.m → Maps/RNMMapMarkerManager.m} +14 -14
- package/ios/{AirMaps/AIRMapOverlay.h → Maps/RNMMapOverlay.h} +7 -7
- package/ios/{AirMaps/AIRMapOverlay.m → Maps/RNMMapOverlay.m} +4 -4
- package/ios/Maps/RNMMapOverlayManager.h +5 -0
- package/ios/{AirMaps/AIRMapOverlayManager.m → Maps/RNMMapOverlayManager.m} +6 -6
- package/ios/{AirMaps/AIRMapOverlayRenderer.h → Maps/RNMMapOverlayRenderer.h} +1 -1
- package/ios/{AirMaps/AIRMapOverlayRenderer.m → Maps/RNMMapOverlayRenderer.m} +5 -5
- package/ios/{AirMaps/AIRMapPolygon.h → Maps/RNMMapPolygon.h} +7 -7
- package/ios/{AirMaps/AIRMapPolygon.m → Maps/RNMMapPolygon.m} +4 -4
- package/ios/{AirMaps/AIRMapPolygonManager.h → Maps/RNMMapPolygonManager.h} +2 -2
- package/ios/{AirMaps/AIRMapPolygonManager.m → Maps/RNMMapPolygonManager.m} +10 -10
- package/ios/{AirMaps/AIRMapPolyline.h → Maps/RNMMapPolyline.h} +6 -6
- package/ios/{AirMaps/AIRMapPolyline.m → Maps/RNMMapPolyline.m} +11 -11
- package/ios/{AirMaps/AIRMapPolylineManager.h → Maps/RNMMapPolylineManager.h} +2 -2
- package/ios/{AirMaps/AIRMapPolylineManager.m → Maps/RNMMapPolylineManager.m} +9 -9
- package/ios/{AirMaps/AIRMapPolylineRenderer.h → Maps/RNMMapPolylineRenderer.h} +2 -2
- package/ios/{AirMaps/AIRMapPolylineRenderer.m → Maps/RNMMapPolylineRenderer.m} +10 -10
- package/ios/{AirMaps/AIRMapSnapshot.h → Maps/RNMMapSnapshot.h} +6 -6
- package/ios/{AirMaps/AIRMapUrlTile.h → Maps/RNMMapUrlTile.h} +18 -18
- package/ios/{AirMaps/AIRMapUrlTile.m → Maps/RNMMapUrlTile.m} +7 -7
- package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.h → Maps/RNMMapUrlTileCachedOverlay.h} +3 -3
- package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.m → Maps/RNMMapUrlTileCachedOverlay.m} +10 -10
- package/ios/{AirMaps/AIRMapUrlTileManager.h → Maps/RNMMapUrlTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapUrlTileManager.m → Maps/RNMMapUrlTileManager.m} +9 -9
- package/ios/Maps/RNMMapViewModule.h +5 -0
- package/ios/Maps/RNMMapViewModule.m +459 -0
- package/ios/{AirMaps/AIRMapWMSTile.h → Maps/RNMMapWMSTile.h} +11 -11
- package/ios/{AirMaps/AIRMapWMSTile.m → Maps/RNMMapWMSTile.m} +15 -15
- package/ios/{AirMaps/AIRMapWMSTileManager.h → Maps/RNMMapWMSTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapWMSTileManager.m → Maps/RNMMapWMSTileManager.m} +9 -9
- package/ios/RNMaps.xcodeproj/project.pbxproj +647 -0
- package/lib/MapCallout.js +2 -2
- package/lib/MapCalloutSubview.js +2 -2
- package/lib/MapCircle.js +2 -2
- package/lib/MapHeatmap.js +2 -2
- package/lib/MapLocalTile.js +2 -2
- package/lib/MapMarker.js +2 -2
- package/lib/MapOverlay.js +2 -2
- package/lib/MapPolygon.js +2 -2
- package/lib/MapPolyline.js +2 -2
- package/lib/MapUrlTile.js +2 -2
- package/lib/MapView.d.ts +7 -8
- package/lib/MapView.js +89 -97
- package/lib/MapView.types.d.ts +8 -2
- package/lib/MapViewNativeComponent.d.ts +2 -7
- package/lib/MapViewNativeComponent.js +0 -5
- package/lib/MapWMSTile.js +2 -2
- package/lib/NativeGoogleMapViewModule.d.ts +25 -0
- package/lib/NativeGoogleMapViewModule.js +4 -0
- package/lib/NativeMapViewModule.d.ts +29 -0
- package/lib/NativeMapViewModule.js +4 -0
- package/lib/decorateMapComponent.d.ts +1 -1
- package/lib/decorateMapComponent.js +3 -3
- package/package.json +1 -1
- package/react-native-google-maps.podspec +1 -1
- package/react-native-maps.podspec +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapModule.java +0 -380
- package/ios/AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.m +0 -28
- package/ios/AirGoogleMaps/AIRGoogleMapHeatmapManager.h +0 -11
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -597
- package/ios/AirMaps/AIRMapCalloutSubviewManager.h +0 -14
- package/ios/AirMaps/AIRMapCalloutSubviewManager.m +0 -24
- package/ios/AirMaps/AIRMapManager.m +0 -1253
- package/ios/AirMaps/AIRMapOverlayManager.h +0 -5
- package/ios/AirMaps/AIRWeakMapReference.h +0 -24
- package/ios/AirMaps/AIRWeakMapReference.m +0 -23
- package/ios/AirMaps/AIRWeakTimerReference.h +0 -21
- package/ios/AirMaps/AIRWeakTimerReference.m +0 -42
- package/ios/AirMaps.xcodeproj/project.pbxproj +0 -587
- /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.h +0 -0
- /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.m +0 -0
- /package/ios/{AirMaps → Maps}/Callout/SMCalloutView.m +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCalloutSubviewManager.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Denis Oblogin on 10/8/18.
|
|
6
6
|
//
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#import <React/RCTViewManager.h>
|
|
12
12
|
|
|
13
|
-
@interface
|
|
13
|
+
@interface RNMGoogleMapCalloutSubviewManager : RCTViewManager
|
|
14
14
|
|
|
15
15
|
@end
|
|
16
16
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNMGoogleMapCalloutSubviewManager.m
|
|
3
|
+
// RNMaps
|
|
4
|
+
//
|
|
5
|
+
// Created by Denis Oblogin on 10/8/18.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifdef HAVE_GOOGLE_MAPS
|
|
10
|
+
|
|
11
|
+
#import "RNMGoogleMapCalloutSubviewManager.h"
|
|
12
|
+
#import "RNMGoogleMapCalloutSubview.h"
|
|
13
|
+
#import <React/RCTView.h>
|
|
14
|
+
|
|
15
|
+
@implementation RNMGoogleMapCalloutSubviewManager
|
|
16
|
+
RCT_EXPORT_MODULE(RNMGoogleMapCalloutSubview)
|
|
17
|
+
|
|
18
|
+
- (UIView *)view
|
|
19
|
+
{
|
|
20
|
+
RNMGoogleMapCalloutSubview *calloutSubview = [RNMGoogleMapCalloutSubview new];
|
|
21
|
+
return calloutSubview;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
25
|
+
|
|
26
|
+
@end
|
|
27
|
+
|
|
28
|
+
#endif
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapsCircle.h
|
|
3
3
|
//
|
|
4
4
|
// Created by Nick Italiano on 10/24/16.
|
|
5
5
|
//
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
#ifdef HAVE_GOOGLE_MAPS
|
|
8
8
|
|
|
9
9
|
#import <GoogleMaps/GoogleMaps.h>
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMMapCoordinate.h"
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface RNMGoogleMapCircle : UIView
|
|
13
13
|
|
|
14
14
|
@property (nonatomic, strong) GMSCircle *circle;
|
|
15
15
|
@property (nonatomic, assign) double radius;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapsCircle.m
|
|
3
3
|
//
|
|
4
4
|
// Created by Nick Italiano on 10/24/16.
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
#ifdef HAVE_GOOGLE_MAPS
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
|
-
#import "
|
|
9
|
+
#import "RNMGoogleMapCircle.h"
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/RCTUtils.h>
|
|
12
12
|
|
|
13
|
-
@implementation
|
|
13
|
+
@implementation RNMGoogleMapCircle
|
|
14
14
|
{
|
|
15
15
|
BOOL _didMoveToWindow;
|
|
16
16
|
}
|
package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.h → GoogleMaps/RNMGoogleMapCircleManager.h}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapCircleManager.h
|
|
3
3
|
//
|
|
4
4
|
// Created by Nick Italiano on 10/24/16.
|
|
5
5
|
//
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
#import <React/RCTViewManager.h>
|
|
10
10
|
|
|
11
|
-
@interface
|
|
11
|
+
@interface RNMGoogleMapCircleManager : RCTViewManager
|
|
12
12
|
|
|
13
13
|
@end
|
|
14
14
|
|
package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.m → GoogleMaps/RNMGoogleMapCircleManager.m}
RENAMED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapCircleManager.m
|
|
3
3
|
//
|
|
4
4
|
// Created by Nick Italiano on 10/24/16.
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
#ifdef HAVE_GOOGLE_MAPS
|
|
8
8
|
|
|
9
|
-
#import "
|
|
10
|
-
#import "
|
|
9
|
+
#import "RNMGoogleMapCircleManager.h"
|
|
10
|
+
#import "RNMGoogleMapCircle.h"
|
|
11
11
|
#import <React/RCTBridge.h>
|
|
12
12
|
#import <React/UIView+React.h>
|
|
13
13
|
|
|
14
|
-
@interface
|
|
14
|
+
@interface RNMGoogleMapCircleManager()
|
|
15
15
|
|
|
16
16
|
@end
|
|
17
17
|
|
|
18
|
-
@implementation
|
|
18
|
+
@implementation RNMGoogleMapCircleManager
|
|
19
19
|
|
|
20
|
-
RCT_EXPORT_MODULE()
|
|
20
|
+
RCT_EXPORT_MODULE(RNMGoogleMapCircle)
|
|
21
21
|
|
|
22
22
|
- (UIView *)view
|
|
23
23
|
{
|
|
24
|
-
|
|
24
|
+
RNMGoogleMapCircle *circle = [RNMGoogleMapCircle new];
|
|
25
25
|
return circle;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapHeatmap.h
|
|
3
3
|
//
|
|
4
4
|
// Created by David Cako on 29 April 2018.
|
|
5
5
|
//
|
|
6
6
|
|
|
7
7
|
#import "GMUHeatmapTileLayer.h"
|
|
8
8
|
|
|
9
|
-
@interface
|
|
9
|
+
@interface RNMGoogleMapHeatmap : UIView
|
|
10
10
|
|
|
11
11
|
@property (nonatomic, strong) GMUHeatmapTileLayer *heatmap;
|
|
12
12
|
@property (nonatomic, strong) NSMutableArray<GMUWeightedLatLng *> *points;
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
@property (nonatomic, assign) float opacity;
|
|
15
15
|
@property (nonatomic, assign) GMUGradient *gradient;
|
|
16
16
|
|
|
17
|
-
@end
|
|
17
|
+
@end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapHeatmap.m
|
|
3
3
|
//
|
|
4
4
|
// Created by David Cako on 29 April 2018.
|
|
5
5
|
//
|
|
6
6
|
#import <UIKit/UIKit.h>
|
|
7
|
-
#import "
|
|
7
|
+
#import "RNMGoogleMapHeatmap.h"
|
|
8
8
|
#import <GoogleMaps/GoogleMaps.h>
|
|
9
9
|
#import <React/RCTConvert.h>
|
|
10
10
|
#import <React/RCTConvert+CoreLocation.h>
|
|
11
11
|
|
|
12
|
-
@implementation
|
|
12
|
+
@implementation RNMGoogleMapHeatmap
|
|
13
13
|
|
|
14
14
|
- (instancetype)init
|
|
15
15
|
{
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
[self.heatmap setGradient:gmuGradient];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
@end
|
|
64
|
+
@end
|
package/ios/{AirGoogleMaps/AIRGoogleMapHeatmapManager.m → GoogleMaps/RNMGoogleMapHeatmapManager.m}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMGoogleMapHeatmapManager.m
|
|
3
3
|
//
|
|
4
4
|
// Created by David Cako on 29 April 2018.
|
|
5
5
|
//
|
|
6
6
|
|
|
7
|
-
#import "
|
|
8
|
-
#import "
|
|
9
|
-
#import "
|
|
7
|
+
#import "RNMGoogleMapHeatmapManager.h"
|
|
8
|
+
#import "RNMGoogleMapHeatmap.h"
|
|
9
|
+
#import "RNMGoogleMap.h"
|
|
10
10
|
#import <React/RCTBridge.h>
|
|
11
11
|
#import <React/UIView+React.h>
|
|
12
12
|
|
|
13
|
-
@interface
|
|
13
|
+
@interface RNMGoogleMapHeatmapManager()
|
|
14
14
|
|
|
15
15
|
@end
|
|
16
16
|
|
|
17
|
-
@implementation
|
|
17
|
+
@implementation RNMGoogleMapHeatmapManager
|
|
18
18
|
|
|
19
|
-
RCT_EXPORT_MODULE()
|
|
19
|
+
RCT_EXPORT_MODULE(RNMGoogleMapHeatmap)
|
|
20
20
|
|
|
21
21
|
- (UIView *)view
|
|
22
22
|
{
|
|
23
|
-
|
|
23
|
+
RNMGoogleMapHeatmap *heatmap = [RNMGoogleMapHeatmap new];
|
|
24
24
|
return heatmap;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -29,4 +29,4 @@ RCT_EXPORT_VIEW_PROPERTY(radius, NSUInteger)
|
|
|
29
29
|
RCT_EXPORT_VIEW_PROPERTY(opacity, float)
|
|
30
30
|
RCT_EXPORT_VIEW_PROPERTY(gradient, NSDictionary *)
|
|
31
31
|
|
|
32
|
-
@end
|
|
32
|
+
@end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapManager.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/1/16.
|
|
6
6
|
//
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#import <React/RCTViewManager.h>
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface RNMGoogleMapManager : RCTViewManager
|
|
13
13
|
@property (nonatomic) BOOL isGesture;
|
|
14
14
|
|
|
15
15
|
@end
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNMGoogleMapManager.m
|
|
3
|
+
// RNMaps
|
|
4
|
+
//
|
|
5
|
+
// Created by Gil Birman on 9/1/16.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifdef HAVE_GOOGLE_MAPS
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
#import "RNMGoogleMapManager.h"
|
|
12
|
+
#import <React/RCTViewManager.h>
|
|
13
|
+
#import <React/RCTBridge.h>
|
|
14
|
+
#import <React/RCTUIManager.h>
|
|
15
|
+
#import <React/RCTConvert+CoreLocation.h>
|
|
16
|
+
#import <React/RCTEventDispatcher.h>
|
|
17
|
+
#import <React/RCTViewManager.h>
|
|
18
|
+
#import <React/RCTConvert.h>
|
|
19
|
+
#import <React/UIView+React.h>
|
|
20
|
+
#import "RCTConvert+GMSMapViewType.h"
|
|
21
|
+
#import "RNMGoogleMap.h"
|
|
22
|
+
#import "RNMMapMarker.h"
|
|
23
|
+
#import "RNMMapPolyline.h"
|
|
24
|
+
#import "RNMMapPolygon.h"
|
|
25
|
+
#import "RNMMapCircle.h"
|
|
26
|
+
#import "SMCalloutView.h"
|
|
27
|
+
#import "RNMGoogleMapMarker.h"
|
|
28
|
+
#import "RCTConvert+RNMMap.h"
|
|
29
|
+
|
|
30
|
+
#import <MapKit/MapKit.h>
|
|
31
|
+
#import <QuartzCore/QuartzCore.h>
|
|
32
|
+
|
|
33
|
+
static NSString *const RCTMapViewKey = @"MapView";
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@interface RNMGoogleMapManager() <GMSMapViewDelegate>
|
|
37
|
+
{
|
|
38
|
+
BOOL didCallOnMapReady;
|
|
39
|
+
}
|
|
40
|
+
@end
|
|
41
|
+
|
|
42
|
+
@implementation RNMGoogleMapManager
|
|
43
|
+
|
|
44
|
+
RCT_EXPORT_MODULE(RNMGoogleMap)
|
|
45
|
+
|
|
46
|
+
- (UIView *)view
|
|
47
|
+
{
|
|
48
|
+
[GMSServices setMetalRendererEnabled:YES];
|
|
49
|
+
|
|
50
|
+
RNMGoogleMap *map = [RNMGoogleMap new];
|
|
51
|
+
map.bridge = self.bridge;
|
|
52
|
+
map.delegate = self;
|
|
53
|
+
map.isAccessibilityElement = NO;
|
|
54
|
+
map.accessibilityElementsHidden = NO;
|
|
55
|
+
map.settings.consumesGesturesInView = NO;
|
|
56
|
+
|
|
57
|
+
UIPanGestureRecognizer *drag = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleMapDrag:)];
|
|
58
|
+
[drag setMinimumNumberOfTouches:1];
|
|
59
|
+
[drag setMaximumNumberOfTouches:1];
|
|
60
|
+
[map addGestureRecognizer:drag];
|
|
61
|
+
|
|
62
|
+
UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleMapDrag:)];
|
|
63
|
+
[map addGestureRecognizer:pinch];
|
|
64
|
+
|
|
65
|
+
return map;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
RCT_EXPORT_VIEW_PROPERTY(isAccessibilityElement, BOOL)
|
|
69
|
+
RCT_REMAP_VIEW_PROPERTY(testID, accessibilityIdentifier, NSString)
|
|
70
|
+
RCT_EXPORT_VIEW_PROPERTY(initialCamera, GMSCameraPosition)
|
|
71
|
+
RCT_REMAP_VIEW_PROPERTY(camera, cameraProp, GMSCameraPosition)
|
|
72
|
+
RCT_EXPORT_VIEW_PROPERTY(initialRegion, MKCoordinateRegion)
|
|
73
|
+
RCT_EXPORT_VIEW_PROPERTY(region, MKCoordinateRegion)
|
|
74
|
+
RCT_EXPORT_VIEW_PROPERTY(showsBuildings, BOOL)
|
|
75
|
+
RCT_EXPORT_VIEW_PROPERTY(showsCompass, BOOL)
|
|
76
|
+
//RCT_EXPORT_VIEW_PROPERTY(showsScale, BOOL) // Not supported by GoogleMaps
|
|
77
|
+
RCT_EXPORT_VIEW_PROPERTY(showsTraffic, BOOL)
|
|
78
|
+
RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
|
|
79
|
+
RCT_EXPORT_VIEW_PROPERTY(rotateEnabled, BOOL)
|
|
80
|
+
RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL)
|
|
81
|
+
RCT_EXPORT_VIEW_PROPERTY(scrollDuringRotateOrZoomEnabled, BOOL)
|
|
82
|
+
RCT_EXPORT_VIEW_PROPERTY(pitchEnabled, BOOL)
|
|
83
|
+
RCT_EXPORT_VIEW_PROPERTY(zoomTapEnabled, BOOL)
|
|
84
|
+
RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL)
|
|
85
|
+
RCT_EXPORT_VIEW_PROPERTY(showsMyLocationButton, BOOL)
|
|
86
|
+
RCT_EXPORT_VIEW_PROPERTY(showsIndoors, BOOL)
|
|
87
|
+
RCT_EXPORT_VIEW_PROPERTY(showsIndoorLevelPicker, BOOL)
|
|
88
|
+
RCT_EXPORT_VIEW_PROPERTY(customMapStyleString, NSString)
|
|
89
|
+
RCT_EXPORT_VIEW_PROPERTY(mapPadding, UIEdgeInsets)
|
|
90
|
+
RCT_REMAP_VIEW_PROPERTY(paddingAdjustmentBehavior, paddingAdjustmentBehaviorString, NSString)
|
|
91
|
+
RCT_EXPORT_VIEW_PROPERTY(onMapReady, RCTBubblingEventBlock)
|
|
92
|
+
RCT_EXPORT_VIEW_PROPERTY(onMapLoaded, RCTBubblingEventBlock)
|
|
93
|
+
RCT_EXPORT_VIEW_PROPERTY(onKmlReady, RCTBubblingEventBlock)
|
|
94
|
+
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
95
|
+
RCT_EXPORT_VIEW_PROPERTY(onLongPress, RCTBubblingEventBlock)
|
|
96
|
+
RCT_EXPORT_VIEW_PROPERTY(onPanDrag, RCTBubblingEventBlock)
|
|
97
|
+
RCT_EXPORT_VIEW_PROPERTY(onUserLocationChange, RCTBubblingEventBlock)
|
|
98
|
+
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
|
|
99
|
+
RCT_EXPORT_VIEW_PROPERTY(onMarkerPress, RCTDirectEventBlock)
|
|
100
|
+
RCT_EXPORT_VIEW_PROPERTY(onRegionChange, RCTDirectEventBlock)
|
|
101
|
+
RCT_EXPORT_VIEW_PROPERTY(onRegionChangeComplete, RCTDirectEventBlock)
|
|
102
|
+
RCT_EXPORT_VIEW_PROPERTY(onPoiClick, RCTDirectEventBlock)
|
|
103
|
+
RCT_EXPORT_VIEW_PROPERTY(onIndoorLevelActivated, RCTDirectEventBlock)
|
|
104
|
+
RCT_EXPORT_VIEW_PROPERTY(onIndoorBuildingFocused, RCTDirectEventBlock)
|
|
105
|
+
RCT_EXPORT_VIEW_PROPERTY(mapType, GMSMapViewType)
|
|
106
|
+
RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, CGFloat)
|
|
107
|
+
RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, CGFloat)
|
|
108
|
+
RCT_EXPORT_VIEW_PROPERTY(kmlSrc, NSString)
|
|
109
|
+
|
|
110
|
+
RCT_EXPORT_METHOD(setCamera:(nonnull NSNumber *)reactTag
|
|
111
|
+
camera:(id)json)
|
|
112
|
+
{
|
|
113
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
114
|
+
id view = viewRegistry[reactTag];
|
|
115
|
+
if (![view isKindOfClass:[RNMGoogleMap class]]) {
|
|
116
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMGoogleMap, got: %@", view);
|
|
117
|
+
} else {
|
|
118
|
+
RNMGoogleMap *mapView = (RNMGoogleMap *)view;
|
|
119
|
+
GMSCameraPosition *camera = [RCTConvert GMSCameraPositionWithDefaults:json existingCamera:[mapView camera]];
|
|
120
|
+
[mapView setCamera:camera];
|
|
121
|
+
}
|
|
122
|
+
}];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
RCT_EXPORT_METHOD(setMapBoundaries:(nonnull NSNumber *)reactTag
|
|
126
|
+
northEast:(CLLocationCoordinate2D)northEast
|
|
127
|
+
southWest:(CLLocationCoordinate2D)southWest)
|
|
128
|
+
{
|
|
129
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
130
|
+
id view = viewRegistry[reactTag];
|
|
131
|
+
if (![view isKindOfClass:[RNMGoogleMap class]]) {
|
|
132
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMGoogleMap, got: %@", view);
|
|
133
|
+
} else {
|
|
134
|
+
RNMGoogleMap *mapView = (RNMGoogleMap *)view;
|
|
135
|
+
|
|
136
|
+
GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithCoordinate:northEast coordinate:southWest];
|
|
137
|
+
|
|
138
|
+
mapView.cameraTargetBounds = bounds;
|
|
139
|
+
}
|
|
140
|
+
}];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
RCT_EXPORT_METHOD(setIndoorActiveLevelIndex:(nonnull NSNumber *)reactTag
|
|
144
|
+
levelIndex:(NSInteger) levelIndex)
|
|
145
|
+
{
|
|
146
|
+
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
147
|
+
id view = viewRegistry[reactTag];
|
|
148
|
+
if (![view isKindOfClass:[RNMGoogleMap class]]) {
|
|
149
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMGoogleMap, got: %@", view);
|
|
150
|
+
} else {
|
|
151
|
+
RNMGoogleMap *mapView = (RNMGoogleMap *)view;
|
|
152
|
+
if (!mapView.indoorDisplay) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if ( levelIndex < [mapView.indoorDisplay.activeBuilding.levels count]) {
|
|
156
|
+
mapView.indoorDisplay.activeLevel = mapView.indoorDisplay.activeBuilding.levels[levelIndex];
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
163
|
+
return YES;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
- (NSDictionary *)constantsToExport {
|
|
167
|
+
return @{ @"legalNotice": [GMSServices openSourceLicenseInfo] };
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
- (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture{
|
|
171
|
+
self.isGesture = gesture;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
- (void)mapViewDidStartTileRendering:(GMSMapView *)mapView {
|
|
175
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
176
|
+
[googleMapView didPrepareMap];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
- (void)mapViewDidFinishTileRendering:(GMSMapView *)mapView {
|
|
180
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
181
|
+
[googleMapView mapViewDidFinishTileRendering];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
- (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker {
|
|
185
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
186
|
+
return [googleMapView didTapMarker:marker];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
- (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSPolygon *)polygon {
|
|
190
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
191
|
+
[googleMapView didTapPolygon:polygon];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
- (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
195
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
196
|
+
[googleMapView didTapAtCoordinate:coordinate];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
- (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
200
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
201
|
+
[googleMapView didLongPressAtCoordinate:coordinate];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
- (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position {
|
|
205
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
206
|
+
[googleMapView didChangeCameraPosition:position isGesture:self.isGesture];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
- (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)position {
|
|
210
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
211
|
+
[googleMapView idleAtCameraPosition:position isGesture:self.isGesture];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {
|
|
215
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
216
|
+
return [aMarker.fakeMarker markerInfoWindow];}
|
|
217
|
+
|
|
218
|
+
- (UIView *)mapView:(GMSMapView *)mapView markerInfoContents:(GMSMarker *)marker {
|
|
219
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
220
|
+
return [aMarker.fakeMarker markerInfoContents];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
- (void)mapView:(GMSMapView *)mapView didTapInfoWindowOfMarker:(GMSMarker *)marker {
|
|
224
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
225
|
+
[aMarker.fakeMarker didTapInfoWindowOfMarker:aMarker];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
- (void)mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker {
|
|
229
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
230
|
+
[aMarker.fakeMarker didBeginDraggingMarker:aMarker];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
- (void)mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker {
|
|
234
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
235
|
+
[aMarker.fakeMarker didEndDraggingMarker:aMarker];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
- (void)mapView:(GMSMapView *)mapView didDragMarker:(GMSMarker *)marker {
|
|
239
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
240
|
+
[aMarker.fakeMarker didDragMarker:aMarker];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
- (void)mapView:(GMSMapView *)mapView
|
|
244
|
+
didTapPOIWithPlaceID:(NSString *)placeID
|
|
245
|
+
name:(NSString *)name
|
|
246
|
+
location:(CLLocationCoordinate2D)location {
|
|
247
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
248
|
+
[googleMapView didTapPOIWithPlaceID:placeID name:name location:location];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
#pragma mark Gesture Recognizer Handlers
|
|
252
|
+
|
|
253
|
+
- (void)handleMapDrag:(UIPanGestureRecognizer*)recognizer {
|
|
254
|
+
RNMGoogleMap *map = (RNMGoogleMap *)recognizer.view;
|
|
255
|
+
if (!map.onPanDrag) return;
|
|
256
|
+
|
|
257
|
+
CGPoint touchPoint = [recognizer locationInView:map];
|
|
258
|
+
CLLocationCoordinate2D coord = [map.projection coordinateForPoint:touchPoint];
|
|
259
|
+
map.onPanDrag(@{
|
|
260
|
+
@"coordinate": @{
|
|
261
|
+
@"latitude": @(coord.latitude),
|
|
262
|
+
@"longitude": @(coord.longitude),
|
|
263
|
+
},
|
|
264
|
+
@"position": @{
|
|
265
|
+
@"x": @(touchPoint.x),
|
|
266
|
+
@"y": @(touchPoint.y),
|
|
267
|
+
},
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@end
|
|
273
|
+
|
|
274
|
+
#endif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapMarker.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/2/16.
|
|
6
6
|
//
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/RCTBridge.h>
|
|
12
|
-
#import "
|
|
13
|
-
#import "
|
|
14
|
-
#import "
|
|
15
|
-
#import "
|
|
12
|
+
#import "RNMGMSMarker.h"
|
|
13
|
+
#import "RNMGoogleMap.h"
|
|
14
|
+
#import "RNMGoogleMapCallout.h"
|
|
15
|
+
#import "RNMGoogleMapCalloutSubview.h"
|
|
16
16
|
|
|
17
|
-
@interface
|
|
17
|
+
@interface RNMGoogleMapMarker : UIView
|
|
18
18
|
|
|
19
19
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
20
|
-
@property (nonatomic, strong)
|
|
20
|
+
@property (nonatomic, strong) RNMGoogleMapCallout *calloutView;
|
|
21
21
|
@property (nonatomic, strong) NSString *identifier;
|
|
22
22
|
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
|
|
23
23
|
@property (nonatomic, assign) CLLocationDegrees rotation;
|
|
24
|
-
@property (nonatomic, strong)
|
|
24
|
+
@property (nonatomic, strong) RNMGMSMarker* realMarker;
|
|
25
25
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
26
26
|
@property (nonatomic, copy) RCTDirectEventBlock onDragStart;
|
|
27
27
|
@property (nonatomic, copy) RCTDirectEventBlock onDrag;
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
- (void)redraw;
|
|
46
46
|
- (UIView *)markerInfoContents;
|
|
47
47
|
- (UIView *)markerInfoWindow;
|
|
48
|
-
- (void)didTapInfoWindowOfMarker:(
|
|
49
|
-
- (void)didTapInfoWindowOfMarker:(
|
|
50
|
-
- (void)didTapInfoWindowOfMarker:(
|
|
51
|
-
- (void)didBeginDraggingMarker:(
|
|
52
|
-
- (void)didEndDraggingMarker:(
|
|
53
|
-
- (void)didDragMarker:(
|
|
48
|
+
- (void)didTapInfoWindowOfMarker:(RNMGMSMarker *)marker;
|
|
49
|
+
- (void)didTapInfoWindowOfMarker:(RNMGMSMarker *)marker point:(CGPoint)point frame:(CGRect)frame;
|
|
50
|
+
- (void)didTapInfoWindowOfMarker:(RNMGMSMarker *)marker subview:(RNMGoogleMapCalloutSubview*)subview point:(CGPoint)point frame:(CGRect)frame;
|
|
51
|
+
- (void)didBeginDraggingMarker:(RNMGMSMarker *)marker;
|
|
52
|
+
- (void)didEndDraggingMarker:(RNMGMSMarker *)marker;
|
|
53
|
+
- (void)didDragMarker:(RNMGMSMarker *)marker;
|
|
54
54
|
@end
|
|
55
55
|
|
|
56
56
|
#endif
|