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
|
+
// RNMDummyView.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 10/4/16.
|
|
6
6
|
//
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
#ifdef HAVE_GOOGLE_MAPS
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
|
-
#import "
|
|
11
|
+
#import "RNMDummyView.h"
|
|
12
12
|
|
|
13
|
-
@implementation
|
|
13
|
+
@implementation RNMDummyView
|
|
14
14
|
- (instancetype)initWithView:(UIView*)view
|
|
15
15
|
{
|
|
16
16
|
if ((self = [super init])) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSMarker.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/5/16.
|
|
6
6
|
//
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/UIView+React.h>
|
|
12
12
|
|
|
13
|
-
@class
|
|
13
|
+
@class RNMGoogleMapMarker;
|
|
14
14
|
|
|
15
|
-
@interface
|
|
15
|
+
@interface RNMGMSMarker : GMSMarker
|
|
16
16
|
@property (nonatomic, strong) NSString *identifier;
|
|
17
|
-
@property (nonatomic, weak)
|
|
17
|
+
@property (nonatomic, weak) RNMGoogleMapMarker *fakeMarker;
|
|
18
18
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
19
19
|
@end
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
@protocol
|
|
22
|
+
@protocol RNMGMSMarkerDelegate <NSObject>
|
|
23
23
|
@required
|
|
24
24
|
-(void)didTapMarker;
|
|
25
25
|
@end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSMarker.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/5/16.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#ifdef HAVE_GOOGLE_MAPS
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMGMSMarker.h"
|
|
11
11
|
|
|
12
|
-
@implementation
|
|
12
|
+
@implementation RNMGMSMarker
|
|
13
13
|
|
|
14
14
|
@end
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSPolygon.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gerardo Pacheco 02/05/2017.
|
|
6
6
|
//
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/UIView+React.h>
|
|
12
12
|
|
|
13
|
-
@class
|
|
13
|
+
@class RNMGoogleMapPolygon;
|
|
14
14
|
|
|
15
|
-
@interface
|
|
15
|
+
@interface RNMGMSPolygon : GMSPolygon
|
|
16
16
|
@property (nonatomic, strong) NSString *identifier;
|
|
17
17
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
18
18
|
@end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSPolygon.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gerardo Pacheco 02/05/2017.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#ifdef HAVE_GOOGLE_MAPS
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMGMSPolygon.h"
|
|
11
11
|
|
|
12
|
-
@implementation
|
|
12
|
+
@implementation RNMGMSPolygon
|
|
13
13
|
|
|
14
14
|
@end
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSPolyline.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Guilherme Pontes 04/05/2017.
|
|
6
6
|
//
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
#import <GoogleMaps/GoogleMaps.h>
|
|
11
11
|
#import <React/UIView+React.h>
|
|
12
12
|
|
|
13
|
-
@class
|
|
13
|
+
@class RNMGoogleMapPolyline;
|
|
14
14
|
|
|
15
|
-
@interface
|
|
15
|
+
@interface RNMGMSPolyline : GMSPolyline
|
|
16
16
|
@property (nonatomic, strong) NSString *identifier;
|
|
17
17
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
18
18
|
@end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGMSPolyline.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Guilherme Pontes 04/05/2017.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#ifdef HAVE_GOOGLE_MAPS
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMGMSPolyline.h"
|
|
11
11
|
|
|
12
|
-
@implementation
|
|
12
|
+
@implementation RNMGMSPolyline
|
|
13
13
|
@end
|
|
14
14
|
|
|
15
15
|
#endif
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMap.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/1/16.
|
|
6
6
|
//
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
#import <React/RCTBridge.h>
|
|
13
13
|
#import <GoogleMaps/GoogleMaps.h>
|
|
14
14
|
#import <MapKit/MapKit.h>
|
|
15
|
-
#import "
|
|
16
|
-
#import "RCTConvert+
|
|
15
|
+
#import "RNMGMSMarker.h"
|
|
16
|
+
#import "RCTConvert+RNMMap.h"
|
|
17
17
|
|
|
18
|
-
@interface
|
|
18
|
+
@interface RNMGoogleMap : GMSMapView
|
|
19
19
|
|
|
20
20
|
// TODO: don't use MK region?
|
|
21
21
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMap.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/1/16.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#ifdef HAVE_GOOGLE_MAPS
|
|
9
9
|
|
|
10
|
-
#import "
|
|
11
|
-
#import "
|
|
12
|
-
#import "
|
|
13
|
-
#import "
|
|
14
|
-
#import "
|
|
15
|
-
#import "
|
|
16
|
-
#import "
|
|
17
|
-
#import "
|
|
18
|
-
#import "
|
|
19
|
-
#import "
|
|
10
|
+
#import "RNMGoogleMap.h"
|
|
11
|
+
#import "RNMGoogleMapMarker.h"
|
|
12
|
+
#import "RNMGoogleMapMarkerManager.h"
|
|
13
|
+
#import "RNMGoogleMapPolygon.h"
|
|
14
|
+
#import "RNMGoogleMapPolyline.h"
|
|
15
|
+
#import "RNMGoogleMapCircle.h"
|
|
16
|
+
#import "RNMGoogleMapHeatmap.h"
|
|
17
|
+
#import "RNMGoogleMapUrlTile.h"
|
|
18
|
+
#import "RNMGoogleMapWMSTile.h"
|
|
19
|
+
#import "RNMGoogleMapOverlay.h"
|
|
20
20
|
#import <GoogleMaps/GoogleMaps.h>
|
|
21
21
|
#import <MapKit/MapKit.h>
|
|
22
22
|
#import <React/UIView+React.h>
|
|
23
23
|
#import <React/RCTBridge.h>
|
|
24
|
-
#import "RCTConvert+
|
|
24
|
+
#import "RCTConvert+RNMMap.h"
|
|
25
25
|
#import <objc/runtime.h>
|
|
26
26
|
|
|
27
27
|
#ifdef HAVE_GOOGLE_MAPS_UTILS
|
|
@@ -49,7 +49,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@interface
|
|
52
|
+
@interface RNMGoogleMap () <GMSIndoorDisplayDelegate>
|
|
53
53
|
|
|
54
54
|
- (id)eventFromCoordinate:(CLLocationCoordinate2D)coordinate;
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
57
57
|
|
|
58
58
|
@end
|
|
59
59
|
|
|
60
|
-
@implementation
|
|
60
|
+
@implementation RNMGoogleMap
|
|
61
61
|
{
|
|
62
62
|
NSMutableArray<UIView *> *_reactSubviews;
|
|
63
63
|
MKCoordinateRegion _initialRegion;
|
|
@@ -132,36 +132,36 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
132
132
|
- (void)insertReactSubview:(id<RCTComponent>)subview atIndex:(NSInteger)atIndex {
|
|
133
133
|
// Our desired API is to pass up markers/overlays as children to the mapview component.
|
|
134
134
|
// This is where we intercept them and do the appropriate underlying mapview action.
|
|
135
|
-
if ([subview isKindOfClass:[
|
|
136
|
-
|
|
135
|
+
if ([subview isKindOfClass:[RNMGoogleMapMarker class]]) {
|
|
136
|
+
RNMGoogleMapMarker *marker = (RNMGoogleMapMarker*)subview;
|
|
137
137
|
marker.realMarker.map = self;
|
|
138
138
|
[self.markers addObject:marker];
|
|
139
|
-
} else if ([subview isKindOfClass:[
|
|
140
|
-
|
|
139
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapPolygon class]]) {
|
|
140
|
+
RNMGoogleMapPolygon *polygon = (RNMGoogleMapPolygon*)subview;
|
|
141
141
|
polygon.polygon.map = self;
|
|
142
142
|
[self.polygons addObject:polygon];
|
|
143
|
-
} else if ([subview isKindOfClass:[
|
|
144
|
-
|
|
143
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapPolyline class]]) {
|
|
144
|
+
RNMGoogleMapPolyline *polyline = (RNMGoogleMapPolyline*)subview;
|
|
145
145
|
polyline.polyline.map = self;
|
|
146
146
|
[self.polylines addObject:polyline];
|
|
147
|
-
} else if ([subview isKindOfClass:[
|
|
148
|
-
|
|
147
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapCircle class]]) {
|
|
148
|
+
RNMGoogleMapCircle *circle = (RNMGoogleMapCircle*)subview;
|
|
149
149
|
circle.circle.map = self;
|
|
150
150
|
[self.circles addObject:circle];
|
|
151
|
-
} else if ([subview isKindOfClass:[
|
|
152
|
-
|
|
151
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapUrlTile class]]) {
|
|
152
|
+
RNMGoogleMapUrlTile *tile = (RNMGoogleMapUrlTile*)subview;
|
|
153
153
|
tile.tileLayer.map = self;
|
|
154
154
|
[self.tiles addObject:tile];
|
|
155
|
-
} else if ([subview isKindOfClass:[
|
|
156
|
-
|
|
155
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapWMSTile class]]) {
|
|
156
|
+
RNMGoogleMapWMSTile *tile = (RNMGoogleMapWMSTile*)subview;
|
|
157
157
|
tile.tileLayer.map = self;
|
|
158
158
|
[self.tiles addObject:tile];
|
|
159
|
-
} else if ([subview isKindOfClass:[
|
|
160
|
-
|
|
159
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapOverlay class]]) {
|
|
160
|
+
RNMGoogleMapOverlay *overlay = (RNMGoogleMapOverlay*)subview;
|
|
161
161
|
overlay.overlay.map = self;
|
|
162
162
|
[self.overlays addObject:overlay];
|
|
163
|
-
} else if ([subview isKindOfClass:[
|
|
164
|
-
|
|
163
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapHeatmap class]]){
|
|
164
|
+
RNMGoogleMapHeatmap *heatmap = (RNMGoogleMapHeatmap*)subview;
|
|
165
165
|
heatmap.heatmap.map = self;
|
|
166
166
|
[self.heatmaps addObject:heatmap];
|
|
167
167
|
} else {
|
|
@@ -180,36 +180,36 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
180
180
|
- (void)removeReactSubview:(id<RCTComponent>)subview {
|
|
181
181
|
// similarly, when the children are being removed we have to do the appropriate
|
|
182
182
|
// underlying mapview action here.
|
|
183
|
-
if ([subview isKindOfClass:[
|
|
184
|
-
|
|
183
|
+
if ([subview isKindOfClass:[RNMGoogleMapMarker class]]) {
|
|
184
|
+
RNMGoogleMapMarker *marker = (RNMGoogleMapMarker*)subview;
|
|
185
185
|
marker.realMarker.map = nil;
|
|
186
186
|
[self.markers removeObject:marker];
|
|
187
|
-
} else if ([subview isKindOfClass:[
|
|
188
|
-
|
|
187
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapPolygon class]]) {
|
|
188
|
+
RNMGoogleMapPolygon *polygon = (RNMGoogleMapPolygon*)subview;
|
|
189
189
|
polygon.polygon.map = nil;
|
|
190
190
|
[self.polygons removeObject:polygon];
|
|
191
|
-
} else if ([subview isKindOfClass:[
|
|
192
|
-
|
|
191
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapPolyline class]]) {
|
|
192
|
+
RNMGoogleMapPolyline *polyline = (RNMGoogleMapPolyline*)subview;
|
|
193
193
|
polyline.polyline.map = nil;
|
|
194
194
|
[self.polylines removeObject:polyline];
|
|
195
|
-
} else if ([subview isKindOfClass:[
|
|
196
|
-
|
|
195
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapCircle class]]) {
|
|
196
|
+
RNMGoogleMapCircle *circle = (RNMGoogleMapCircle*)subview;
|
|
197
197
|
circle.circle.map = nil;
|
|
198
198
|
[self.circles removeObject:circle];
|
|
199
|
-
} else if ([subview isKindOfClass:[
|
|
200
|
-
|
|
199
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapUrlTile class]]) {
|
|
200
|
+
RNMGoogleMapUrlTile *tile = (RNMGoogleMapUrlTile*)subview;
|
|
201
201
|
tile.tileLayer.map = nil;
|
|
202
202
|
[self.tiles removeObject:tile];
|
|
203
|
-
} else if ([subview isKindOfClass:[
|
|
204
|
-
|
|
203
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapWMSTile class]]) {
|
|
204
|
+
RNMGoogleMapWMSTile *tile = (RNMGoogleMapWMSTile*)subview;
|
|
205
205
|
tile.tileLayer.map = nil;
|
|
206
206
|
[self.tiles removeObject:tile];
|
|
207
|
-
} else if ([subview isKindOfClass:[
|
|
208
|
-
|
|
207
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapOverlay class]]) {
|
|
208
|
+
RNMGoogleMapOverlay *overlay = (RNMGoogleMapOverlay*)subview;
|
|
209
209
|
overlay.overlay.map = nil;
|
|
210
210
|
[self.overlays removeObject:overlay];
|
|
211
|
-
} else if ([subview isKindOfClass:[
|
|
212
|
-
|
|
211
|
+
} else if ([subview isKindOfClass:[RNMGoogleMapHeatmap class]]){
|
|
212
|
+
RNMGoogleMapHeatmap *heatmap = (RNMGoogleMapHeatmap*)subview;
|
|
213
213
|
heatmap.heatmap.map = nil;
|
|
214
214
|
[self.heatmaps removeObject:heatmap];
|
|
215
215
|
} else {
|
|
@@ -260,18 +260,18 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
260
260
|
}
|
|
261
261
|
else if (_initialRegion.span.latitudeDelta != 0.0 &&
|
|
262
262
|
_initialRegion.span.longitudeDelta != 0.0) {
|
|
263
|
-
self.camera = [
|
|
263
|
+
self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_initialRegion];
|
|
264
264
|
_initialRegionSet = true;
|
|
265
265
|
} else if (_region.span.latitudeDelta != 0.0 &&
|
|
266
266
|
_region.span.longitudeDelta != 0.0) {
|
|
267
|
-
self.camera = [
|
|
267
|
+
self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:_region];
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
- (void)setInitialRegion:(MKCoordinateRegion)initialRegion {
|
|
272
272
|
_initialRegion = initialRegion;
|
|
273
273
|
if(!_initialRegionSet && _didLayoutSubviews){
|
|
274
|
-
self.camera = [
|
|
274
|
+
self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:initialRegion];
|
|
275
275
|
_initialRegionSet = true;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -288,7 +288,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
288
288
|
// TODO: The JS component is repeatedly setting region unnecessarily. We might want to deal with that in here.
|
|
289
289
|
_region = region;
|
|
290
290
|
if(_didLayoutSubviews) {
|
|
291
|
-
self.camera = [
|
|
291
|
+
self.camera = [RNMGoogleMap makeGMSCameraPositionFromMap:self andMKCoordinateRegion:region];
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -321,17 +321,17 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
- (BOOL)didTapMarker:(GMSMarker *)marker {
|
|
324
|
-
|
|
324
|
+
RNMGMSMarker *rnmMarker = (RNMGMSMarker *)marker;
|
|
325
325
|
|
|
326
326
|
id event = @{@"action": @"marker-press",
|
|
327
|
-
@"id":
|
|
327
|
+
@"id": rnmMarker.identifier ?: @"unknown",
|
|
328
328
|
@"coordinate": @{
|
|
329
|
-
@"latitude": @(
|
|
330
|
-
@"longitude": @(
|
|
329
|
+
@"latitude": @(rnmMarker.position.latitude),
|
|
330
|
+
@"longitude": @(rnmMarker.position.longitude)
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
|
|
334
|
-
if (
|
|
334
|
+
if (rnmMarker.onPress) rnmMarker.onPress(event);
|
|
335
335
|
if (self.onMarkerPress) self.onMarkerPress(event);
|
|
336
336
|
|
|
337
337
|
// TODO: not sure why this is necessary
|
|
@@ -340,23 +340,23 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
- (void)didTapPolyline:(GMSOverlay *)polyline {
|
|
343
|
-
|
|
343
|
+
RNMGMSPolyline *rnmPolyline = (RNMGMSPolyline *)polyline;
|
|
344
344
|
|
|
345
345
|
id event = @{@"action": @"polyline-press",
|
|
346
|
-
@"id":
|
|
346
|
+
@"id": rnmPolyline.identifier ?: @"unknown",
|
|
347
347
|
};
|
|
348
348
|
|
|
349
|
-
if (
|
|
349
|
+
if (rnmPolyline.onPress) rnmPolyline.onPress(event);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
- (void)didTapPolygon:(GMSOverlay *)polygon {
|
|
353
|
-
|
|
353
|
+
RNMGMSPolygon *rnmPolygon = (RNMGMSPolygon *)polygon;
|
|
354
354
|
|
|
355
355
|
id event = @{@"action": @"polygon-press",
|
|
356
|
-
@"id":
|
|
356
|
+
@"id": rnmPolygon.identifier ?: @"unknown",
|
|
357
357
|
};
|
|
358
358
|
|
|
359
|
-
if (
|
|
359
|
+
if (rnmPolygon.onPress) rnmPolygon.onPress(event);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
- (void)didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {
|
|
@@ -371,7 +371,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
371
371
|
|
|
372
372
|
- (void)didChangeCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture{
|
|
373
373
|
id event = @{@"continuous": @YES,
|
|
374
|
-
@"region": regionAsJSON([
|
|
374
|
+
@"region": regionAsJSON([RNMGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
|
|
375
375
|
@"isGesture": [NSNumber numberWithBool:isGesture],
|
|
376
376
|
};
|
|
377
377
|
|
|
@@ -394,7 +394,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
394
394
|
|
|
395
395
|
- (void)idleAtCameraPosition:(GMSCameraPosition *)position isGesture:(BOOL)isGesture{
|
|
396
396
|
id event = @{@"continuous": @NO,
|
|
397
|
-
@"region": regionAsJSON([
|
|
397
|
+
@"region": regionAsJSON([RNMGoogleMap makeGMSCameraPositionFromMap:self andGMSCameraPosition:position]),
|
|
398
398
|
@"isGesture": [NSNumber numberWithBool:isGesture],
|
|
399
399
|
};
|
|
400
400
|
if (self.onChange) self.onChange(event); // complete
|
|
@@ -601,7 +601,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
601
601
|
|
|
602
602
|
#pragma mark - Utils
|
|
603
603
|
|
|
604
|
-
- (CGRect) frameForMarker:(
|
|
604
|
+
- (CGRect) frameForMarker:(RNMGoogleMapMarker*) mrkView {
|
|
605
605
|
CGPoint mrkAnchor = mrkView.realMarker.groundAnchor;
|
|
606
606
|
CGPoint mrkPoint = [self.projection pointForCoordinate:mrkView.coordinate];
|
|
607
607
|
CGSize mrkSize = mrkView.realMarker.iconView ? mrkView.realMarker.iconView.bounds.size : CGSizeMake(20, 30);
|
|
@@ -613,7 +613,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
613
613
|
|
|
614
614
|
- (NSDictionary*) getMarkersFramesWithOnlyVisible:(BOOL)onlyVisible {
|
|
615
615
|
NSMutableDictionary* markersFrames = [NSMutableDictionary new];
|
|
616
|
-
for (
|
|
616
|
+
for (RNMGoogleMapMarker* mrkView in self.markers) {
|
|
617
617
|
CGRect frame = [self frameForMarker:mrkView];
|
|
618
618
|
CGPoint point = [self.projection pointForCoordinate:mrkView.coordinate];
|
|
619
619
|
NSDictionary* frameDict = @{
|
|
@@ -635,9 +635,9 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
635
635
|
return markersFrames;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
- (
|
|
639
|
-
|
|
640
|
-
for (
|
|
638
|
+
- (RNMGoogleMapMarker*) markerAtPoint:(CGPoint)point {
|
|
639
|
+
RNMGoogleMapMarker* mrk = nil;
|
|
640
|
+
for (RNMGoogleMapMarker* mrkView in self.markers) {
|
|
641
641
|
CGRect frame = [self frameForMarker:mrkView];
|
|
642
642
|
if (CGRectContainsPoint(frame, point)) {
|
|
643
643
|
mrk = mrkView;
|
|
@@ -739,9 +739,9 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
739
739
|
}
|
|
740
740
|
if (isTapInsideBubble) {
|
|
741
741
|
//find bubble's marker
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
for (
|
|
742
|
+
RNMGoogleMapMarker* markerView = nil;
|
|
743
|
+
RNMGMSMarker* marker = nil;
|
|
744
|
+
for (RNMGoogleMapMarker* mrk in self.markers) {
|
|
745
745
|
if ([mrk.calloutView isEqual:bubbleView]) {
|
|
746
746
|
markerView = mrk;
|
|
747
747
|
marker = markerView.realMarker;
|
|
@@ -751,12 +751,12 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
751
751
|
|
|
752
752
|
//find real tap target subview
|
|
753
753
|
UIView* realSubview = [(RCTView*)bubbleView hitTest:tapPointInBubble withEvent:nil];
|
|
754
|
-
|
|
754
|
+
RNMGoogleMapCalloutSubview* realPressableSubview = nil;
|
|
755
755
|
if (realSubview) {
|
|
756
756
|
UIView* tmp = realSubview;
|
|
757
757
|
while (tmp && tmp != win && tmp != bubbleView) {
|
|
758
758
|
if ([tmp respondsToSelector:@selector(onPress)]) {
|
|
759
|
-
realPressableSubview = (
|
|
759
|
+
realPressableSubview = (RNMGoogleMapCalloutSubview*) tmp;
|
|
760
760
|
break;
|
|
761
761
|
}
|
|
762
762
|
tmp = tmp.superview;
|
|
@@ -768,7 +768,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
768
768
|
if (isInsideCallout) {
|
|
769
769
|
[markerView didTapInfoWindowOfMarker:marker subview:realPressableSubview point:tapPointInBubble frame:bubbleFrame];
|
|
770
770
|
} else {
|
|
771
|
-
|
|
771
|
+
RNMGoogleMapMarker* markerAtTapPoint = [self markerAtPoint:tapPoint];
|
|
772
772
|
if (markerAtTapPoint != nil) {
|
|
773
773
|
[self didTapMarker:markerAtTapPoint.realMarker];
|
|
774
774
|
} else {
|
|
@@ -874,7 +874,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
874
874
|
|
|
875
875
|
CLLocationCoordinate2D location =((GMUPoint *) place.geometry).coordinate;
|
|
876
876
|
|
|
877
|
-
|
|
877
|
+
RNMGoogleMapMarker *marker = (RNMGoogleMapMarker *)[[RNMGoogleMapMarkerManager alloc] view];
|
|
878
878
|
if (!marker.bridge) {
|
|
879
879
|
marker.bridge = _bridge;
|
|
880
880
|
}
|
|
@@ -883,7 +883,7 @@ id regionAsJSON(MKCoordinateRegion region) {
|
|
|
883
883
|
marker.title = place.title;
|
|
884
884
|
marker.subtitle = place.snippet;
|
|
885
885
|
marker.pinColor = place.style.fillColor;
|
|
886
|
-
marker.imageSrc = [
|
|
886
|
+
marker.imageSrc = [RNMGoogleMap GetIconUrl:place parser:parser];
|
|
887
887
|
marker.layer.backgroundColor = [UIColor clearColor].CGColor;
|
|
888
888
|
marker.layer.position = CGPointZero;
|
|
889
889
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCallout.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/6/16.
|
|
6
6
|
//
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#import <UIKit/UIKit.h>
|
|
12
12
|
#import <React/RCTView.h>
|
|
13
13
|
|
|
14
|
-
@interface
|
|
14
|
+
@interface RNMGoogleMapCallout : UIView
|
|
15
15
|
@property (nonatomic, assign) BOOL tooltip;
|
|
16
16
|
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
|
|
17
17
|
@property (nonatomic, assign) BOOL alphaHitTest;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCallout.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/6/16.
|
|
6
6
|
//
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
#ifdef HAVE_GOOGLE_MAPS
|
|
10
10
|
|
|
11
|
-
#import "
|
|
11
|
+
#import "RNMGoogleMapCallout.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 RNMGoogleMapCallout
|
|
17
17
|
|
|
18
18
|
- (BOOL) isPointInside:(CGPoint)pointInCallout {
|
|
19
19
|
if (!self.alphaHitTest)
|
package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.h → GoogleMaps/RNMGoogleMapCalloutManager.h}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCalloutManager.h
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/6/16.
|
|
6
6
|
//
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
#import <React/RCTViewManager.h>
|
|
12
12
|
|
|
13
|
-
@interface
|
|
13
|
+
@interface RNMGoogleMapCalloutManager : RCTViewManager
|
|
14
14
|
|
|
15
15
|
@end
|
|
16
16
|
|
package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.m → GoogleMaps/RNMGoogleMapCalloutManager.m}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// RNMGoogleMapCalloutManager.m
|
|
3
|
+
// RNMaps
|
|
4
4
|
//
|
|
5
5
|
// Created by Gil Birman on 9/6/16.
|
|
6
6
|
//
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
#ifdef HAVE_GOOGLE_MAPS
|
|
10
10
|
|
|
11
|
-
#import "
|
|
12
|
-
#import "
|
|
11
|
+
#import "RNMGoogleMapCalloutManager.h"
|
|
12
|
+
#import "RNMGoogleMapCallout.h"
|
|
13
13
|
#import <React/RCTView.h>
|
|
14
14
|
|
|
15
|
-
@implementation
|
|
16
|
-
RCT_EXPORT_MODULE()
|
|
15
|
+
@implementation RNMGoogleMapCalloutManager
|
|
16
|
+
RCT_EXPORT_MODULE(RNMGoogleMapCallout)
|
|
17
17
|
|
|
18
18
|
- (UIView *)view
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
RNMGoogleMapCallout *callout = [RNMGoogleMapCallout new];
|
|
21
21
|
return callout;
|
|
22
22
|
}
|
|
23
23
|
|
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
|