From 52f4d958b1e768e8d2ad7ee7b6bd54c6b980bfd7 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Wed, 28 Oct 2015 10:51:23 -0700 Subject: [PATCH 1/3] [MOD-2152] Support new iOS9 mapTypes --- ios/Classes/TiMapModule.h | 5 +++++ ios/Classes/TiMapModule.m | 5 ++++- ios/documentation/changelog.md | 1 + ios/manifest | 2 +- ios/titanium.xcconfig | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ios/Classes/TiMapModule.h b/ios/Classes/TiMapModule.h index 4d204002..b3198425 100644 --- a/ios/Classes/TiMapModule.h +++ b/ios/Classes/TiMapModule.h @@ -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; diff --git a/ios/Classes/TiMapModule.m b/ios/Classes/TiMapModule.m index 1e20f1d8..33df5fa3 100644 --- a/ios/Classes/TiMapModule.m +++ b/ios/Classes/TiMapModule.m @@ -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. diff --git a/ios/documentation/changelog.md b/ios/documentation/changelog.md index 395974b7..ae53769d 100644 --- a/ios/documentation/changelog.md +++ b/ios/documentation/changelog.md @@ -1,5 +1,6 @@ # Change Log
+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]
diff --git a/ios/manifest b/ios/manifest
index e05d875c..5de2820a 100644
--- a/ios/manifest
+++ b/ios/manifest
@@ -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
diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig
index effcb3bc..a965b4c6 100644
--- a/ios/titanium.xcconfig
+++ b/ios/titanium.xcconfig
@@ -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
 
 
 // 

From b079091f7b349f7a75adcab40f01f72e330bf823 Mon Sep 17 00:00:00 2001
From: Hans Knoechel 
Date: Wed, 28 Oct 2015 15:30:42 -0700
Subject: [PATCH 2/3] [MOD-2152] Update documentation

---
 apidoc/View.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/apidoc/View.yml b/apidoc/View.yml
index 9f07e56d..1e42eefc 100644
--- a/apidoc/View.yml
+++ b/apidoc/View.yml
@@ -126,7 +126,8 @@ methods:
       - name: mapType
         summary: |
             Map type constant, either , ,
-             or .
+            , ,  or
+            .
         type: Number
 
   - name: setLocation
@@ -463,8 +464,9 @@ properties:
 
   - name: mapType
     summary: |
-        Map type, either: , , 
-        or 
+        Map type constant, either , ,
+        , ,  or 
+        .
     type: Number
     default: NORMAL_TYPE
 

From 46aa6c0888aa93dcbf70c014ca460672771270b3 Mon Sep 17 00:00:00 2001
From: Hans Knoechel 
Date: Wed, 28 Oct 2015 15:41:32 -0700
Subject: [PATCH 3/3] [MOD-2152] Add flyover constants

---
 apidoc/Map.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/apidoc/Map.yml b/apidoc/Map.yml
index 3e5851ed..49787bad 100644
--- a/apidoc/Map.yml
+++ b/apidoc/Map.yml
@@ -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
@@ -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 . Google Play services is available, and the connection is successful.
     type: Number