Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React Native Maps to 0.22.1 for critical bugfix #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRDummyView.h
Expand Up @@ -5,14 +5,10 @@
// Created by Gil Birman on 10/4/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <UIKit/UIKit.h>


@interface AIRDummyView : UIView
@property (nonatomic, weak) UIView *view;
- (instancetype)initWithView:(UIView*)view;
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRDummyView.m
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 10/4/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <Foundation/Foundation.h>
#import "AIRDummyView.h"

Expand All @@ -19,5 +17,3 @@ - (instancetype)initWithView:(UIView*)view
return self;
}
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSMarker.h
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 9/5/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <GoogleMaps/GoogleMaps.h>
#import <React/UIView+React.h>

Expand All @@ -23,5 +21,3 @@
@required
-(void)didTapMarker;
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSMarker.m
Expand Up @@ -5,12 +5,8 @@
// Created by Gil Birman on 9/5/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGMSMarker.h"

@implementation AIRGMSMarker

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSPolygon.h
Expand Up @@ -5,8 +5,6 @@
// Created by Gerardo Pacheco 02/05/2017.
//

#ifdef HAVE_GOOGLE_MAPS

#import <GoogleMaps/GoogleMaps.h>
#import <React/UIView+React.h>

Expand All @@ -16,5 +14,3 @@
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSPolygon.m
Expand Up @@ -5,12 +5,8 @@
// Created by Gerardo Pacheco 02/05/2017.
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGMSPolygon.h"

@implementation AIRGMSPolygon

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSPolyline.h
Expand Up @@ -5,8 +5,6 @@
// Created by Guilherme Pontes 04/05/2017.
//

#ifdef HAVE_GOOGLE_MAPS

#import <GoogleMaps/GoogleMaps.h>
#import <React/UIView+React.h>

Expand All @@ -16,5 +14,3 @@
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGMSPolyline.m
Expand Up @@ -5,11 +5,7 @@
// Created by Guilherme Pontes 04/05/2017.
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGMSPolyline.h"

@implementation AIRGMSPolyline
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMap.h
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 9/1/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <UIKit/UIKit.h>
#import <React/RCTComponent.h>
#import <React/RCTBridge.h>
Expand Down Expand Up @@ -70,5 +68,3 @@
+ (GMSCameraPosition*)makeGMSCameraPositionFromMap:(GMSMapView *)map andMKCoordinateRegion:(MKCoordinateRegion)region;

@end

#endif
23 changes: 1 addition & 22 deletions lib/ios/AirGoogleMaps/AIRGoogleMap.m
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 9/1/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGoogleMap.h"
#import "AIRGoogleMapMarker.h"
#import "AIRGoogleMapMarkerManager.h"
Expand All @@ -21,20 +19,11 @@
#import <React/RCTBridge.h>
#import "RCTConvert+AirMap.h"

#ifdef HAVE_GOOGLE_MAPS_UTILS
#import <Google-Maps-iOS-Utils/GMUKMLParser.h>
#import <Google-Maps-iOS-Utils/GMUPlacemark.h>
#import <Google-Maps-iOS-Utils/GMUPoint.h>
#import <Google-Maps-iOS-Utils/GMUGeometryRenderer.h>
#define REQUIRES_GOOGLE_MAPS_UTILS(feature) do {} while (0)
#else
#define GMUKMLParser void
#define GMUPlacemark void
#define REQUIRES_GOOGLE_MAPS_UTILS(feature) do { \
[NSException raise:@"ReactNativeMapsDependencyMissing" \
format:@"Use of " feature "requires Google-Maps-iOS-Utils, you must install via CocoaPods to use this feature"]; \
} while (0)
#endif


id regionAsJSON(MKCoordinateRegion region) {
Expand Down Expand Up @@ -341,7 +330,7 @@ - (NSString *)paddingAdjustmentBehaviorString
return @"automatic";
case kGMSMapViewPaddingAdjustmentBehaviorAlways:
return @"always";

default:
return @"unknown";
}
Expand Down Expand Up @@ -518,7 +507,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
}

+ (NSString *)GetIconUrl:(GMUPlacemark *) marker parser:(GMUKMLParser *) parser {
#ifdef HAVE_GOOGLE_MAPS_UTILS
if (marker.style.styleID != nil) {
for (GMUStyle *style in parser.styles) {
if (style.styleID == marker.style.styleID) {
Expand All @@ -528,17 +516,13 @@ + (NSString *)GetIconUrl:(GMUPlacemark *) marker parser:(GMUKMLParser *) parser
}

return marker.style.iconUrl;
#else
REQUIRES_GOOGLE_MAPS_UTILS("GetIconUrl:parser:"); return @"";
#endif
}

- (NSString *)KmlSrc {
return _kmlSrc;
}

- (void)setKmlSrc:(NSString *)kmlUrl {
#ifdef HAVE_GOOGLE_MAPS_UTILS

_kmlSrc = kmlUrl;

Expand Down Expand Up @@ -590,11 +574,6 @@ - (void)setKmlSrc:(NSString *)kmlUrl {

id event = @{@"markers": markers};
if (self.onKmlReady) self.onKmlReady(event);
#else
REQUIRES_GOOGLE_MAPS_UTILS();
#endif
}

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCallout.h
Expand Up @@ -6,14 +6,10 @@
//
//

#ifdef HAVE_GOOGLE_MAPS

#import <UIKit/UIKit.h>
#import <React/RCTView.h>

@interface AIRGoogleMapCallout : UIView
@property (nonatomic, assign) BOOL tooltip;
@property (nonatomic, copy) RCTBubblingEventBlock onPress;
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCallout.m
Expand Up @@ -6,14 +6,10 @@
//
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGoogleMapCallout.h"
#import <React/RCTUtils.h>
#import <React/RCTView.h>
#import <React/RCTBridge.h>

@implementation AIRGoogleMapCallout
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCalloutManager.h
Expand Up @@ -6,12 +6,8 @@
//
//

#ifdef HAVE_GOOGLE_MAPS

#import <React/RCTViewManager.h>

@interface AIRGoogleMapCalloutManager : RCTViewManager

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCalloutManager.m
Expand Up @@ -6,8 +6,6 @@
//
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGoogleMapCalloutManager.h"
#import "AIRGoogleMapCallout.h"
#import <React/RCTView.h>
Expand All @@ -25,5 +23,3 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCircle.h
Expand Up @@ -4,8 +4,6 @@
// Created by Nick Italiano on 10/24/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <GoogleMaps/GoogleMaps.h>
#import "AIRMapCoordinate.h"

Expand All @@ -20,5 +18,3 @@
@property (nonatomic, assign) int zIndex;

@end

#endif
3 changes: 0 additions & 3 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCircle.m
Expand Up @@ -4,7 +4,6 @@
// Created by Nick Italiano on 10/24/16.
//

#ifdef HAVE_GOOGLE_MAPS
#import <UIKit/UIKit.h>
#import "AIRGoogleMapCircle.h"
#import <GoogleMaps/GoogleMaps.h>
Expand Down Expand Up @@ -57,5 +56,3 @@ -(void)setZIndex:(int)zIndex
}

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCircleManager.h
Expand Up @@ -4,12 +4,8 @@
// Created by Nick Italiano on 10/24/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <React/RCTViewManager.h>

@interface AIRGoogleMapCircleManager : RCTViewManager

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapCircleManager.m
Expand Up @@ -4,8 +4,6 @@
// Created by Nick Italiano on 10/24/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import "AIRGoogleMapCircleManager.h"
#import "AIRGoogleMapCircle.h"
#import <React/RCTBridge.h>
Expand Down Expand Up @@ -33,5 +31,3 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(zIndex, int)

@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapManager.h
Expand Up @@ -5,14 +5,10 @@
// Created by Gil Birman on 9/1/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <React/RCTViewManager.h>
#import "AIRGoogleMap.h"

@interface AIRGoogleMapManager : RCTViewManager
@property (nonatomic, assign) AIRGoogleMap *map;

@end

#endif
8 changes: 2 additions & 6 deletions lib/ios/AirGoogleMaps/AIRGoogleMapManager.m
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 9/1/16.
//

#ifdef HAVE_GOOGLE_MAPS


#import "AIRGoogleMapManager.h"
#import <React/RCTViewManager.h>
Expand Down Expand Up @@ -355,7 +353,7 @@ - (UIView *)view
AIRGoogleMap *mapView = (AIRGoogleMap *)view;

CGPoint touchPoint = [mapView.projection pointForCoordinate:coord];

resolve(@{
@"x": @(touchPoint.x),
@"y": @(touchPoint.y),
Expand All @@ -382,7 +380,7 @@ - (UIView *)view
AIRGoogleMap *mapView = (AIRGoogleMap *)view;

CLLocationCoordinate2D coordinate = [mapView.projection coordinateForPoint:pt];

resolve(@{
@"latitude": @(coordinate.latitude),
@"longitude": @(coordinate.longitude),
Expand Down Expand Up @@ -565,5 +563,3 @@ - (void)mapView:(GMSMapView *)mapView
[googleMapView didTapPOIWithPlaceID:placeID name:name location:location];
}
@end

#endif
4 changes: 0 additions & 4 deletions lib/ios/AirGoogleMaps/AIRGoogleMapMarker.h
Expand Up @@ -5,8 +5,6 @@
// Created by Gil Birman on 9/2/16.
//

#ifdef HAVE_GOOGLE_MAPS

#import <GoogleMaps/GoogleMaps.h>
#import <React/RCTBridge.h>
#import "AIRGMSMarker.h"
Expand Down Expand Up @@ -47,5 +45,3 @@
- (void)didEndDraggingMarker:(AIRGMSMarker *)marker;
- (void)didDragMarker:(AIRGMSMarker *)marker;
@end

#endif