Skip to content

Commit

Permalink
Merge pull request #114 from hansemannn/update-gms
Browse files Browse the repository at this point in the history
Update Google Maps SDK's tp 2.5.0, support iPhone X configuration
  • Loading branch information
hansemannn authored Oct 28, 2017
2 parents 0a11a27 + beef508 commit fbfa657
Show file tree
Hide file tree
Showing 282 changed files with 286 additions and 90 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ var mapView = maps.createView({
});
```

#### Safe Area / iPhone X
The GoogleMaps SDK supports configuring the map-view for the iPhone X. Use the `paddingAdjustmentBehavior` to get
or set the padding-adjustment-behavior and use one of the following constants:
```
/** 1. Always include the safe area insets in the padding. */
PADDING_ADJUSTMENT_BEHAVIOR_ALWAYS
/**
* 2. When the padding value is smaller than the safe area inset for a particular edge, use the safe
* area value for layout, else use padding.
*/
PADDING_ADJUSTMENT_BEHAVIOR_AUTOMATIC
/**
* 3. Never include the safe area insets in the padding. This was the behavior prior to version 2.5.
*/
PADDING_ADJUSTMENT_BEHAVIOR_NEVER
```

#### Map Events
The module supports all native delegates - exposed as events. These are:

Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/TiGooglemapsHeatmapLayerProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ - (GMUHeatmapTileLayer *)heatmapLayer
- (void)setGradient:(NSDictionary *)gradient
{
NSArray *proxyColors = (NSArray *)[gradient objectForKey:@"colors"];
NSMutableArray *colors = [NSMutableArray arrayWithCapacity:proxyColors];
NSMutableArray *colors = [NSMutableArray arrayWithCapacity:[proxyColors count]];

for (id color in proxyColors) {
[colors addObject:[[TiUtils colorValue:color] color]];
Expand Down
4 changes: 4 additions & 0 deletions ios/Classes/TiGooglemapsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,8 @@ - (NSArray *)arrayFromAddresses:(NSArray<GMSAddress *> *)addresses
MAKE_SYSTEM_PROP(APPEAR_ANIMATION_NONE, kGMSMarkerAnimationNone);
MAKE_SYSTEM_PROP(APPEAR_ANIMATION_POP, kGMSMarkerAnimationPop);

MAKE_SYSTEM_PROP(PADDING_ADJUSTMENT_BEHAVIOR_ALWAYS, kGMSMapViewPaddingAdjustmentBehaviorAlways);
MAKE_SYSTEM_PROP(PADDING_ADJUSTMENT_BEHAVIOR_AUTOMATIC, kGMSMapViewPaddingAdjustmentBehaviorAutomatic);
MAKE_SYSTEM_PROP(PADDING_ADJUSTMENT_BEHAVIOR_NEVER, kGMSMapViewPaddingAdjustmentBehaviorNever);

@end
2 changes: 1 addition & 1 deletion ios/Classes/TiGooglemapsRendererProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ - (GMUGeometryRenderer *)renderer

if (url == nil) {
[self throwException:@"Invalid file provided" subreason:@"The file provided could not be found." location:CODELOCATION];
return;
return nil;
}

GMUKMLParser *parser = [[GMUKMLParser alloc] initWithURL:url];
Expand Down
17 changes: 16 additions & 1 deletion ios/Classes/TiGooglemapsViewProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
* @return The selected annotation.
* @since 2.2.0
*/
- (id)getSelectedAnnotation:(id)unused;
- (id)selectedAnnotation:(id)unused;

/**
* Selects a annotation.
Expand Down Expand Up @@ -223,6 +223,21 @@
*/
- (void)setRegion:(id)args;

/**
* Sets the padding adjustment behavior.
*
* @param value The padding adjustment behavior.
* @since 3.11.0
*/
- (void)setPaddingAdjustmentBehavior:(id)paddingAdjustmentBehavior;

/**
* Returns the padding adjustment behavior.
*
* @since 3.11.0
*/
- (void)paddingAdjustmentBehavior;

/**
* Sets the JSOn-based map style.
*
Expand Down
18 changes: 16 additions & 2 deletions ios/Classes/TiGooglemapsViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,20 @@ - (void)setRegion:(id)args
[self replaceValue:args forKey:@"region" notification:NO];
}


- (void)setPaddingAdjustmentBehavior:(id)paddingAdjustmentBehavior
{
ENSURE_UI_THREAD(setPaddingAdjustmentBehavior, paddingAdjustmentBehavior);
ENSURE_TYPE(paddingAdjustmentBehavior, NSNumber);

[[[self mapView] mapView] setPaddingAdjustmentBehavior:[TiUtils intValue:paddingAdjustmentBehavior]];
}

- (void)paddingAdjustmentBehavior
{
return @([[[self mapView] mapView] paddingAdjustmentBehavior]);
}

- (void)setMapStyle:(id)value
{
ENSURE_UI_THREAD(setMapStyle, value);
Expand Down Expand Up @@ -523,9 +537,9 @@ - (void)removeHeatmapLayer:(id)args
[[heatmapLayerProxy heatmapLayer] setMap:nil];
}

- (id)getSelectedAnnotation:(id)unused
- (id)selectedAnnotation:(id)unused
{
ENSURE_UI_THREAD(getSelectedAnnotation, unused);
ENSURE_UI_THREAD(selectedAnnotation, unused);
GMSMarker *selectedMarker = [[[self mapView] mapView] selectedMarker];

if (selectedMarker == nil) {
Expand Down
Binary file modified ios/Resources/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.mom
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ios/Resources/GoogleMaps.bundle/Info.plist
Binary file not shown.
Binary file not shown.
Binary file modified ios/Resources/GoogleMaps.bundle/oss_licenses_maps.txt.gz
Binary file not shown.
Binary file added ios/Resources/GooglePlacePicker.bundle/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ios/Resources/GooglePlaces.bundle/Info.plist
Binary file not shown.
Binary file modified ios/Resources/GooglePlaces.bundle/ca.lproj/GooglePlaces.strings
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ios/Resources/GooglePlaces.bundle/oss_licenses_places.txt.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 3.10.0
version: 3.11.0
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: ti.googlemaps
Expand Down
Binary file modified ios/platform/GoogleMaps.framework/GoogleMaps
Binary file not shown.
9 changes: 7 additions & 2 deletions ios/platform/GoogleMaps.framework/Headers/GMSGeocoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ NS_ASSUME_NONNULL_BEGIN;

@class GMSReverseGeocodeResponse;

/**
* \defgroup GeocoderErrorCode GMSGeocoderErrorCode
* @{
*/

/**
* GMSGeocoder error codes, embedded in NSError.
*
* @related GMSGeocoder
*/
typedef NS_ENUM(NSInteger, GMSGeocoderErrorCode) {
kGMSGeocoderErrorInvalidCoordinate = 1,
kGMSGeocoderErrorInternal,
};

/**@}*/

/**
* Handler that reports a reverse geocoding response, or error.
*
Expand Down
2 changes: 1 addition & 1 deletion ios/platform/GoogleMaps.framework/Headers/GMSMapLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

NS_ASSUME_NONNULL_BEGIN;

/**
/*
* The following layer properties and constants describe the camera properties that may be animated
* on the custom model layer of a GMSMapView with Core Animation. For simple camera control and
* animation, please see the helper methods in GMSMapView+Animation.h, and the camera object
Expand Down
53 changes: 49 additions & 4 deletions ios/platform/GoogleMaps.framework/Headers/GMSMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ NS_ASSUME_NONNULL_BEGIN;

@end

/**
* \defgroup MapViewType GMSMapViewType
* @{
*/

/**
* Display types for GMSMapView.
*
* @related GMSMapView
*/
typedef NS_ENUM(NSUInteger, GMSMapViewType) {
/** Basic maps. The default. */
Expand All @@ -224,10 +227,15 @@ typedef NS_ENUM(NSUInteger, GMSMapViewType) {

};

/**@}*/

/**
* \defgroup FrameRate GMSFrameRate
* @{
*/

/**
* Rendering frame rates for GMSMapView.
*
* @related GMSMapView
*/
typedef NS_ENUM(NSUInteger, GMSFrameRate) {
/** Use the minimum frame rate to conserve battery usage. */
Expand All @@ -245,6 +253,34 @@ typedef NS_ENUM(NSUInteger, GMSFrameRate) {
kGMSFrameRateMaximum,
};

/**@}*/

/**
* \defgroup MapViewPaddingAdjustmentBehavior GMSMapViewPaddingAdjustmentBehavior
* @{
*/

/**
* Constants indicating how safe area insets are added to padding.
*/
typedef NS_ENUM(NSUInteger, GMSMapViewPaddingAdjustmentBehavior) {
/** Always include the safe area insets in the padding. */
kGMSMapViewPaddingAdjustmentBehaviorAlways,

/**
* When the padding value is smaller than the safe area inset for a particular edge, use the safe
* area value for layout, else use padding.
*/
kGMSMapViewPaddingAdjustmentBehaviorAutomatic,

/**
* Never include the safe area insets in the padding. This was the behavior prior to version 2.5.
*/
kGMSMapViewPaddingAdjustmentBehaviorNever,
};

/**@}*/

/**
* This is the main class of the Google Maps SDK for iOS and is the entry point for all methods
* related to the map.
Expand Down Expand Up @@ -366,6 +402,15 @@ typedef NS_ENUM(NSUInteger, GMSFrameRate) {
*/
@property(nonatomic, assign) UIEdgeInsets padding;

/**
* Controls how safe area insets are added to the padding values. Like padding, safe area insets
* position map controls such as the compass, my location button and floor picker within the device
* safe area.
*
* Defaults to kGMSMapViewPaddingAdjustmentBehaviorAlways.
*/
@property(nonatomic, assign) GMSMapViewPaddingAdjustmentBehavior paddingAdjustmentBehavior;

/**
* Defaults to YES. If set to NO, GMSMapView will generate accessibility elements for overlay
* objects, such as GMSMarker and GMSPolyline.
Expand Down
9 changes: 7 additions & 2 deletions ios/platform/GoogleMaps.framework/Headers/GMSMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@

NS_ASSUME_NONNULL_BEGIN;

/**
* \defgroup MarkerAnimation GMSMarkerAnimation
* @{
*/

/**
* Animation types for GMSMarker.
*
* @related GMSMarker
*/
typedef NS_ENUM(NSUInteger, GMSMarkerAnimation) {
/** No animation (default). */
Expand All @@ -31,6 +34,8 @@ typedef NS_ENUM(NSUInteger, GMSMarkerAnimation) {
kGMSMarkerAnimationPop,
};

/**@}*/

/**
* A marker is an icon placed at a particular point on the map's surface. A marker's icon is drawn
* oriented against the device's screen rather than the map's surface; i.e., it will not necessarily
Expand Down
9 changes: 7 additions & 2 deletions ios/platform/GoogleMaps.framework/Headers/GMSPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ NS_ASSUME_NONNULL_BEGIN;
*/
extern const double kGMSEquatorProjectedMeter;

/**
* \defgroup LengthKind GMSLengthKind
* @{
*/

/**
* GMSLengthKind indicates the type of a length value, which can be geodesic (in meters), rhumb
* length (in meters) and projected length (in GMSMapPoint units).
*
* @related GMSPath
*/
typedef NS_ENUM(NSUInteger, GMSLengthKind) {
/*
Expand Down Expand Up @@ -89,6 +92,8 @@ typedef NS_ENUM(NSUInteger, GMSLengthKind) {
kGMSLengthProjected
};

/**@}*/

@interface GMSPath (GMSPathLength)

/**
Expand Down
10 changes: 0 additions & 10 deletions ios/platform/GoogleMaps.framework/Headers/GoogleMaps.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
//
// GoogleMaps.h
// Google Maps SDK for iOS
//
// Copyright 2017 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//

#import "GMSIndoorBuilding.h"
#import "GMSIndoorLevel.h"
#import "GMSAddress.h"
Expand Down
3 changes: 1 addition & 2 deletions ios/platform/GoogleMaps.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ framework module GoogleMaps {
link framework "QuartzCore"
link framework "Security"
link framework "SystemConfiguration"
link framework "UIKit"
}
link framework "UIKit"}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ios/platform/GoogleMapsBase.framework/GoogleMapsBase
Binary file not shown.
10 changes: 0 additions & 10 deletions ios/platform/GoogleMapsBase.framework/Headers/GoogleMapsBase.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
//
// GoogleMapsBase.h
// Google Maps SDK for iOS
//
// Copyright 2017 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//

#import "GMSCompatabilityMacros.h"
#import "GMSCoordinateBounds.h"
#import "GMSDeprecationMacros.h"
Loading

0 comments on commit fbfa657

Please sign in to comment.