Skip to content

Commit

Permalink
Merge pull request #133 from hansemannn/MOD-2152
Browse files Browse the repository at this point in the history
[MOD-2152] Support new iOS9 mapTypes
  • Loading branch information
pec1985 committed Oct 28, 2015
2 parents 27d3a27 + 46aa6c0 commit a33e706
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
12 changes: 12 additions & 0 deletions apidoc/Map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ properties:
type: Number
permission: read-only

- name: SATELLITE_FLYOVER_TYPE
summary: Used with [mapType](Modules.Map.View.mapType) to display satellite flyover imagery of the area. Available in iOS 9.0 and later.
type: Number
permission: read-only
platforms: [iphone, ipad]

- name: NORMAL_TYPE
summary: Used with [mapType](Modules.Map.View.mapType) to display a street map that shows the position of all roads and some road names.
type: Number
Expand All @@ -241,6 +247,12 @@ properties:
type: Number
permission: read-only

- name: HYBRID_FLYOVER_TYPE
summary: Used with [mapType](Modules.Map.View.mapType) to display a satellite flyover image of the area with road and road name information layered on top. Available in iOS 9.0 and later.
type: Number
permission: read-only
platforms: [iphone, ipad]

- name: SUCCESS
summary: Code returned from <Modules.Map.isGooglePlayServicesAvailable>. Google Play services is available, and the connection is successful.
type: Number
Expand Down
8 changes: 5 additions & 3 deletions apidoc/View.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ methods:
- name: mapType
summary: |
Map type constant, either <Modules.Map.NORMAL_TYPE>, <Modules.Map.SATELLITE_TYPE>,
<Modules.Map.TERRAIN_TYPE> or <Modules.Map.HYBRID_TYPE>.
<Modules.Map.TERRAIN_TYPE>, <Modules.Map.HYBRID_TYPE>, <Modules.Map.HYBRID_FLYOVER_TYPE> or
<Modules.Map.SATELLITE_FLYOVER_TYPE>.
type: Number

- name: setLocation
Expand Down Expand Up @@ -463,8 +464,9 @@ properties:

- name: mapType
summary: |
Map type, either: <Modules.Map.NORMAL_TYPE>, <Modules.Map.SATELLITE_TYPE>, <Modules.Map.TERRAIN_TYPE>
or <Modules.Map.HYBRID_TYPE>
Map type constant, either <Modules.Map.NORMAL_TYPE>, <Modules.Map.SATELLITE_TYPE>,
<Modules.Map.TERRAIN_TYPE>, <Modules.Map.HYBRID_TYPE>, <Modules.Map.HYBRID_FLYOVER_TYPE> or
<Modules.Map.SATELLITE_FLYOVER_TYPE>.
type: Number
default: NORMAL_TYPE

Expand Down
5 changes: 5 additions & 0 deletions ios/Classes/TiMapModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ return [NSNumber numberWithInt:map];\
@property(nonatomic,readonly) NSNumber *NORMAL_TYPE; // For parity with Android
@property(nonatomic,readonly) NSNumber *SATELLITE_TYPE;
@property(nonatomic,readonly) NSNumber *HYBRID_TYPE;
#ifdef __IPHONE_9_0
@property(nonatomic,readonly) NSNumber *HYBRID_FLYOVER_TYPE;
@property(nonatomic,readonly) NSNumber *SATELLITE_FLYOVER_TYPE;
#endif

@property(nonatomic,readonly) NSNumber *ANNOTATION_RED;
@property(nonatomic,readonly) NSNumber *ANNOTATION_GREEN;
@property(nonatomic,readonly) NSNumber *ANNOTATION_PURPLE;
Expand Down
5 changes: 4 additions & 1 deletion ios/Classes/TiMapModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ -(TiMapCameraProxy*)createCamera:(id)args
MAKE_SYSTEM_PROP(NORMAL_TYPE,MKMapTypeStandard); // For parity with Android
MAKE_SYSTEM_PROP(SATELLITE_TYPE,MKMapTypeSatellite);
MAKE_SYSTEM_PROP(HYBRID_TYPE,MKMapTypeHybrid);

#ifdef __IPHONE_9_0
MAKE_SYSTEM_PROP(HYBRID_FLYOVER_TYPE, MKMapTypeHybridFlyover);
MAKE_SYSTEM_PROP(SATELLITE_FLYOVER_TYPE, MKMapTypeSatelliteFlyover);
#endif
/*
* TODO: Replace with the constants [MKPinAnnotationView redPinColor], [MKPinAnnotationView redPinColor] and [MKPinAnnotationView redPinColor]
* as soon as we make iOS9 as the minimum SDK.
Expand Down
1 change: 1 addition & 0 deletions ios/documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Change Log
<pre>
v2.5.0 Add iOS9 mapTypes 'HYBRID_FLYOVER_TYPE' and 'SATELLITE_FLYOVER_TYPE'. [MOD-2152]
v2.4.1 Fixed an issue where pins have not been draggable anymore. [MOD-2131]
v2.4.0 iOS9: Upgrade map module to support bitcode. [TIMOB-19385]
v2.3.2 Fixed map crash with polygons when not setting mapType. [TIMOB-19102]
Expand Down
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: 2.4.2
version: 2.5.0
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: External version of Map module
Expand Down
2 changes: 1 addition & 1 deletion ios/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 4.0.0.GA
TITANIUM_SDK_VERSION = 5.0.2.GA


//
Expand Down

0 comments on commit a33e706

Please sign in to comment.