react-native-maps 2.0.0-beta.1 → 2.0.0-beta.11
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 +34 -11
- package/android/build.gradle +41 -10
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- 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 +9 -83
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +2 -2
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +10 -27
- 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 +7 -5
- package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapView.java +66 -157
- 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 → GoogleMaps}/RCTConvert+GMSMapViewType.m +8 -0
- 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} +90 -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 +223 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.h → GoogleMaps/RNMGoogleMapMarker.h} +15 -15
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.m → GoogleMaps/RNMGoogleMapMarker.m} +23 -23
- 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 +385 -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} +25 -8
- package/ios/{AirMaps/AIRMap.h → Maps/RNMMap.h} +8 -8
- package/ios/{AirMaps/AIRMap.m → Maps/RNMMap.m} +60 -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 +830 -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 +465 -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/Geojson.d.ts +1 -1
- 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.d.ts +2 -3
- package/lib/MapMarker.js +2 -4
- package/lib/MapOverlay.d.ts +1 -2
- package/lib/MapOverlay.js +2 -4
- package/lib/MapPolygon.js +2 -2
- package/lib/MapPolyline.js +2 -2
- package/lib/MapUrlTile.js +2 -2
- package/lib/MapView.d.ts +21 -16
- package/lib/MapView.js +92 -118
- package/lib/MapView.types.d.ts +8 -3
- package/lib/MapViewNativeComponent.d.ts +0 -15
- package/lib/MapViewNativeComponent.js +0 -17
- 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/lib/index.d.ts +14 -21
- package/lib/index.js +10 -38
- package/package.json +6 -6
- package/react-native-google-maps.podspec +1 -1
- package/react-native-maps.podspec +2 -2
- 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/{AirMaps → Maps}/Callout/SMCalloutView.m +0 -0
package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.h → GoogleMaps/RNMGoogleMapCalloutSubview.h}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCalloutSubview.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Denis Oblogin on 10/8/18.
|
|
6
6
|
//
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#import <UIKit/UIKit.h>
|
|
12
12
|
#import <React/RCTView.h>
|
|
13
13
|
|
|
14
|
-
@interface
|
|
14
|
+
@interface RNMGoogleMapCalloutSubview : UIView
|
|
15
15
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
16
16
|
@end
|
|
17
17
|
|
package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.m → GoogleMaps/RNMGoogleMapCalloutSubview.m}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCalloutSubview.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Denis Oblogin on 10/8/18.
|
|
6
6
|
//
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
#ifdef HAVE_GOOGLE_MAPS
|
|
10
10
|
|
|
11
|
-
#import "
|
|
11
|
+
#import "RNMGoogleMapCalloutSubview.h"
|
|
12
12
|
#import <React/RCTUtils.h>
|
|
13
13
|
#import <React/RCTView.h>
|
|
14
14
|
#import <React/RCTBridge.h>
|
|
15
15
|
|
|
16
|
-
@implementation
|
|
16
|
+
@implementation RNMGoogleMapCalloutSubview
|
|
17
17
|
@end
|
|
18
18
|
|
|
19
19
|
#endif
|
|
@@ -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,223 @@
|
|
|
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(boundary, GMSCoordinateBounds*)
|
|
69
|
+
RCT_EXPORT_VIEW_PROPERTY(customMapStyleString, NSString)
|
|
70
|
+
RCT_EXPORT_VIEW_PROPERTY(indoorActiveLevelIndex, NSInteger)
|
|
71
|
+
RCT_EXPORT_VIEW_PROPERTY(initialCamera, GMSCameraPosition)
|
|
72
|
+
RCT_EXPORT_VIEW_PROPERTY(initialRegion, MKCoordinateRegion)
|
|
73
|
+
RCT_EXPORT_VIEW_PROPERTY(isAccessibilityElement, BOOL)
|
|
74
|
+
RCT_EXPORT_VIEW_PROPERTY(kmlSrc, NSString)
|
|
75
|
+
RCT_EXPORT_VIEW_PROPERTY(mapPadding, UIEdgeInsets)
|
|
76
|
+
RCT_EXPORT_VIEW_PROPERTY(mapType, GMSMapViewType)
|
|
77
|
+
RCT_EXPORT_VIEW_PROPERTY(maxZoomLevel, CGFloat)
|
|
78
|
+
RCT_EXPORT_VIEW_PROPERTY(minZoomLevel, CGFloat)
|
|
79
|
+
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
|
|
80
|
+
RCT_EXPORT_VIEW_PROPERTY(onIndoorBuildingFocused, RCTDirectEventBlock)
|
|
81
|
+
RCT_EXPORT_VIEW_PROPERTY(onIndoorLevelActivated, RCTDirectEventBlock)
|
|
82
|
+
RCT_EXPORT_VIEW_PROPERTY(onKmlReady, RCTBubblingEventBlock)
|
|
83
|
+
RCT_EXPORT_VIEW_PROPERTY(onLongPress, RCTBubblingEventBlock)
|
|
84
|
+
RCT_EXPORT_VIEW_PROPERTY(onMapLoaded, RCTBubblingEventBlock)
|
|
85
|
+
RCT_EXPORT_VIEW_PROPERTY(onMapReady, RCTBubblingEventBlock)
|
|
86
|
+
RCT_EXPORT_VIEW_PROPERTY(onMarkerPress, RCTDirectEventBlock)
|
|
87
|
+
RCT_EXPORT_VIEW_PROPERTY(onPanDrag, RCTBubblingEventBlock)
|
|
88
|
+
RCT_EXPORT_VIEW_PROPERTY(onPoiClick, RCTDirectEventBlock)
|
|
89
|
+
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
90
|
+
RCT_EXPORT_VIEW_PROPERTY(onRegionChange, RCTDirectEventBlock)
|
|
91
|
+
RCT_EXPORT_VIEW_PROPERTY(onRegionChangeComplete, RCTDirectEventBlock)
|
|
92
|
+
RCT_EXPORT_VIEW_PROPERTY(onUserLocationChange, RCTBubblingEventBlock)
|
|
93
|
+
RCT_EXPORT_VIEW_PROPERTY(pitchEnabled, BOOL)
|
|
94
|
+
RCT_EXPORT_VIEW_PROPERTY(region, MKCoordinateRegion)
|
|
95
|
+
RCT_EXPORT_VIEW_PROPERTY(rotateEnabled, BOOL)
|
|
96
|
+
RCT_EXPORT_VIEW_PROPERTY(scrollDuringRotateOrZoomEnabled, BOOL)
|
|
97
|
+
RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL)
|
|
98
|
+
RCT_EXPORT_VIEW_PROPERTY(showsBuildings, BOOL)
|
|
99
|
+
RCT_EXPORT_VIEW_PROPERTY(showsCompass, BOOL)
|
|
100
|
+
RCT_EXPORT_VIEW_PROPERTY(showsIndoorLevelPicker, BOOL)
|
|
101
|
+
RCT_EXPORT_VIEW_PROPERTY(showsIndoors, BOOL)
|
|
102
|
+
RCT_EXPORT_VIEW_PROPERTY(showsMyLocationButton, BOOL)
|
|
103
|
+
RCT_EXPORT_VIEW_PROPERTY(showsTraffic, BOOL)
|
|
104
|
+
RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL)
|
|
105
|
+
RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
|
|
106
|
+
RCT_EXPORT_VIEW_PROPERTY(zoomTapEnabled, BOOL)
|
|
107
|
+
RCT_REMAP_VIEW_PROPERTY(camera, cameraProp, GMSCameraPosition)
|
|
108
|
+
RCT_REMAP_VIEW_PROPERTY(paddingAdjustmentBehavior, paddingAdjustmentBehaviorString, NSString)
|
|
109
|
+
RCT_REMAP_VIEW_PROPERTY(testID, accessibilityIdentifier, NSString)
|
|
110
|
+
|
|
111
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
112
|
+
return YES;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
- (NSDictionary *)constantsToExport {
|
|
116
|
+
return @{ @"legalNotice": [GMSServices openSourceLicenseInfo] };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
- (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture{
|
|
120
|
+
self.isGesture = gesture;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (void)mapViewDidStartTileRendering:(GMSMapView *)mapView {
|
|
124
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
125
|
+
[googleMapView didPrepareMap];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
- (void)mapViewDidFinishTileRendering:(GMSMapView *)mapView {
|
|
129
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
130
|
+
[googleMapView mapViewDidFinishTileRendering];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
- (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker {
|
|
134
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
135
|
+
return [googleMapView didTapMarker:marker];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
- (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSPolygon *)polygon {
|
|
139
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
140
|
+
[googleMapView didTapPolygon:polygon];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
- (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
144
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
145
|
+
[googleMapView didTapAtCoordinate:coordinate];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
- (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
149
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
150
|
+
[googleMapView didLongPressAtCoordinate:coordinate];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
- (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position {
|
|
154
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
155
|
+
[googleMapView didChangeCameraPosition:position isGesture:self.isGesture];
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
- (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)position {
|
|
159
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
160
|
+
[googleMapView idleAtCameraPosition:position isGesture:self.isGesture];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {
|
|
164
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
165
|
+
return [aMarker.fakeMarker markerInfoWindow];}
|
|
166
|
+
|
|
167
|
+
- (UIView *)mapView:(GMSMapView *)mapView markerInfoContents:(GMSMarker *)marker {
|
|
168
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
169
|
+
return [aMarker.fakeMarker markerInfoContents];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
- (void)mapView:(GMSMapView *)mapView didTapInfoWindowOfMarker:(GMSMarker *)marker {
|
|
173
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
174
|
+
[aMarker.fakeMarker didTapInfoWindowOfMarker:aMarker];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
- (void)mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker {
|
|
178
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
179
|
+
[aMarker.fakeMarker didBeginDraggingMarker:aMarker];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
- (void)mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker {
|
|
183
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
184
|
+
[aMarker.fakeMarker didEndDraggingMarker:aMarker];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
- (void)mapView:(GMSMapView *)mapView didDragMarker:(GMSMarker *)marker {
|
|
188
|
+
RNMGMSMarker *aMarker = (RNMGMSMarker *)marker;
|
|
189
|
+
[aMarker.fakeMarker didDragMarker:aMarker];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
- (void)mapView:(GMSMapView *)mapView
|
|
193
|
+
didTapPOIWithPlaceID:(NSString *)placeID
|
|
194
|
+
name:(NSString *)name
|
|
195
|
+
location:(CLLocationCoordinate2D)location {
|
|
196
|
+
RNMGoogleMap *googleMapView = (RNMGoogleMap *)mapView;
|
|
197
|
+
[googleMapView didTapPOIWithPlaceID:placeID name:name location:location];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#pragma mark Gesture Recognizer Handlers
|
|
201
|
+
|
|
202
|
+
- (void)handleMapDrag:(UIPanGestureRecognizer*)recognizer {
|
|
203
|
+
RNMGoogleMap *map = (RNMGoogleMap *)recognizer.view;
|
|
204
|
+
if (!map.onPanDrag) return;
|
|
205
|
+
|
|
206
|
+
CGPoint touchPoint = [recognizer locationInView:map];
|
|
207
|
+
CLLocationCoordinate2D coord = [map.projection coordinateForPoint:touchPoint];
|
|
208
|
+
map.onPanDrag(@{
|
|
209
|
+
@"coordinate": @{
|
|
210
|
+
@"latitude": @(coord.latitude),
|
|
211
|
+
@"longitude": @(coord.longitude),
|
|
212
|
+
},
|
|
213
|
+
@"position": @{
|
|
214
|
+
@"x": @(touchPoint.x),
|
|
215
|
+
@"y": @(touchPoint.y),
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@end
|
|
222
|
+
|
|
223
|
+
#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
|