Skip to content

Commit 9db5828

Browse files
committed
Fix issue with polygon/polyline map callout disappearing
1 parent bd16084 commit 9db5828

File tree

9 files changed

+64
-127
lines changed

9 files changed

+64
-127
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
33
Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
6+
## 2.1.2
7+
8+
##### Release Notes
9+
10+
##### Features
11+
12+
##### Bug Fixes
13+
* Pull in new mage-ios-sdk to fix crash when translating feed fields to strings.
14+
* Fix bug showing polygon/polyline map callout.
15+
616
## 2.1.1
717

818
##### Release Notes

MAGE.xcodeproj/project.pbxproj

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
2F3826B01D9C252D007E0D75 /* ObservationImportantTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F3826AF1D9C252D007E0D75 /* ObservationImportantTableViewCell.m */; };
5656
2F38DF1722B942C800485DA4 /* LdapLoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F38DF1622B942C800485DA4 /* LdapLoginView.m */; };
5757
2F38DF1E22B957C300485DA4 /* ldap-authView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2F38DF1D22B957C300485DA4 /* ldap-authView.xib */; };
58-
2F4551861BA33ABE00EE3DA6 /* NSDate+display.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4551851BA33ABE00EE3DA6 /* NSDate+display.m */; };
5958
2F4E109A220CA195001C9F12 /* AttributionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2F4E1099220CA195001C9F12 /* AttributionCell.xib */; };
6059
2F4E109C220CAC6A001C9F12 /* Disclaimer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2F4E109B220CAC6A001C9F12 /* Disclaimer.xib */; };
6160
2F4E10A4220CCF39001C9F12 /* UITableViewCell+Setting.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4E10A3220CCF39001C9F12 /* UITableViewCell+Setting.m */; };
@@ -444,8 +443,6 @@
444443
2F38DF1522B942C800485DA4 /* LdapLoginView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LdapLoginView.h; sourceTree = "<group>"; };
445444
2F38DF1622B942C800485DA4 /* LdapLoginView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LdapLoginView.m; sourceTree = "<group>"; };
446445
2F38DF1D22B957C300485DA4 /* ldap-authView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ldap-authView.xib"; sourceTree = "<group>"; };
447-
2F4551841BA33ABE00EE3DA6 /* NSDate+display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+display.h"; sourceTree = "<group>"; };
448-
2F4551851BA33ABE00EE3DA6 /* NSDate+display.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+display.m"; sourceTree = "<group>"; };
449446
2F4E1099220CA195001C9F12 /* AttributionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AttributionCell.xib; sourceTree = "<group>"; };
450447
2F4E109B220CAC6A001C9F12 /* Disclaimer.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Disclaimer.xib; sourceTree = "<group>"; };
451448
2F4E10A2220CCF39001C9F12 /* UITableViewCell+Setting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITableViewCell+Setting.h"; sourceTree = "<group>"; };
@@ -1034,15 +1031,6 @@
10341031
name = Views;
10351032
sourceTree = "<group>";
10361033
};
1037-
2F4551831BA33A7700EE3DA6 /* Date */ = {
1038-
isa = PBXGroup;
1039-
children = (
1040-
2F4551841BA33ABE00EE3DA6 /* NSDate+display.h */,
1041-
2F4551851BA33ABE00EE3DA6 /* NSDate+display.m */,
1042-
);
1043-
name = Date;
1044-
sourceTree = "<group>";
1045-
};
10461034
2F4E10BA220E388A001C9F12 /* Cells */ = {
10471035
isa = PBXGroup;
10481036
children = (
@@ -1691,7 +1679,6 @@
16911679
F714D5ED1A5C831B00B096A7 /* AudioRecorder */,
16921680
F7FC59281F3CEDEB0010351A /* Form */,
16931681
2FD853701BDAAB2300602CEA /* Authentication */,
1694-
2F4551831BA33A7700EE3DA6 /* Date */,
16951682
F76949131AA6434A00CB680B /* Event */,
16961683
2FF467091A12794000BA8357 /* Categories */,
16971684
F727516B19C888A3006C63CB /* Fetch */,
@@ -2193,7 +2180,7 @@
21932180
);
21942181
runOnlyForDeploymentPostprocessing = 1;
21952182
shellPath = /bin/sh;
2196-
shellScript = "$SRCROOT/Scripts/set_build_number.sh";
2183+
shellScript = $SRCROOT/Scripts/set_build_number.sh;
21972184
};
21982185
7DDC4C252A7737ED0BB25ECE /* [CP] Check Pods Manifest.lock */ = {
21992186
isa = PBXShellScriptBuildPhase;
@@ -2220,23 +2207,23 @@
22202207
);
22212208
inputPaths = (
22222209
"${PODS_ROOT}/Target Support Files/Pods-MAGE/Pods-MAGE-resources.sh",
2223-
"${PODS_ROOT}/mage-ios-sdk/MAGE/mage-ios-sdk.xcdatamodeld",
2224-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model10To15.xcmappingmodel",
2225-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model11To15.xcmappingmodel",
2226-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model12To15.xcmappingmodel",
2227-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model13To15.xcmappingmodel",
2228-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model14To15.xcmappingmodel",
2229-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model14To16.xcmappingmodel",
2230-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model15To16.xcmappingmodel",
2231-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model1To15.xcmappingmodel",
2232-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model2To15.xcmappingmodel",
2233-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model3To15.xcmappingmodel",
2234-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model4To15.xcmappingmodel",
2235-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model5To15.xcmappingmodel",
2236-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model6To15.xcmappingmodel",
2237-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model7To15.xcmappingmodel",
2238-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model8To15.xcmappingmodel",
2239-
"${PODS_ROOT}/mage-ios-sdk/MAGE/Model9To15.xcmappingmodel",
2210+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/mage-ios-sdk.momd",
2211+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model10To15.cdm",
2212+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model11To15.cdm",
2213+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model12To15.cdm",
2214+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model13To15.cdm",
2215+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model14To15.cdm",
2216+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model14To16.cdm",
2217+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model15To16.cdm",
2218+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model1To15.cdm",
2219+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model2To15.cdm",
2220+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model3To15.cdm",
2221+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model4To15.cdm",
2222+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model5To15.cdm",
2223+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model6To15.cdm",
2224+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model7To15.cdm",
2225+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model8To15.cdm",
2226+
"${BUILT_PRODUCTS_DIR}/mage-ios-sdk/mage_ios_sdk.framework/Model9To15.cdm",
22402227
"${PODS_CONFIGURATION_BUILD_DIR}/mage-ios-sdk/MageSDK.bundle",
22412228
"${PODS_ROOT}/tuneup_js/assertions.js",
22422229
"${PODS_ROOT}/tuneup_js/image_assertion.js",
@@ -2470,7 +2457,6 @@
24702457
F7FD4DFC1A810EA900DAABA6 /* AreaAnnotation.m in Sources */,
24712458
2FB46F9B1D02180200D1E5E7 /* ObservationMultiSelectTableViewCell.m in Sources */,
24722459
04ED963F1EB7AB8700B6AD8D /* MapObservation.m in Sources */,
2473-
2F4551861BA33ABE00EE3DA6 /* NSDate+display.m in Sources */,
24742460
043FF1261C22F875000CA07F /* CacheOverlayTypes.m in Sources */,
24752461
F7FD972423D104C7003C8DF7 /* DataSynchronizationSettingsTableViewController.m in Sources */,
24762462
F76A15CA1A962ED700F2BDF1 /* ObservationMapTableViewCell.m in Sources */,
@@ -2689,7 +2675,7 @@
26892675
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
26902676
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
26912677
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
2692-
MARKETING_VERSION = 2.1.1;
2678+
MARKETING_VERSION = 2.1.2;
26932679
OTHER_LDFLAGS = "$(inherited)";
26942680
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
26952681
PRODUCT_NAME = MAGE;
@@ -2723,7 +2709,7 @@
27232709
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
27242710
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
27252711
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
2726-
MARKETING_VERSION = 2.1.1;
2712+
MARKETING_VERSION = 2.1.2;
27272713
OTHER_LDFLAGS = "$(inherited)";
27282714
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
27292715
PRODUCT_NAME = MAGE;

Mage/Map/MapObservations.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ -(void) setShapeAnnotation: (MapAnnotation *) shapeAnnotation withShapeObservati
9898
[self clearShapeAnnotation];
9999
if ([shapeAnnotation isKindOfClass:[ObservationAnnotation class]]) {
100100
ObservationAnnotation *annotation = (ObservationAnnotation *) shapeAnnotation;
101-
annotation.selected = YES;
101+
[_mapView selectAnnotation:annotation animated:YES];
102102
}
103103
_shapeAnnotation = shapeAnnotation;
104104
_shapeObservation = shapeObservation;

Mage/MapViewController.m

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#import "MapSettingsCoordinator.h"
4242
#import "FeatureDetailCoordinator.h"
4343

44-
@interface MapViewController ()<UserTrackingModeChanged, LocationAuthorizationStatusChanged, CacheOverlayDelegate, ObservationEditDelegate, MapSettingsCoordinatorDelegate, FeatureDetailDelegate, UIViewControllerPreviewingDelegate, AttachmentViewDelegate>
44+
@interface MapViewController ()<UserTrackingModeChanged, LocationAuthorizationStatusChanged, CacheOverlayDelegate, ObservationEditDelegate, MapSettingsCoordinatorDelegate, FeatureDetailDelegate, UIViewControllerPreviewingDelegate, AttachmentViewDelegate, UIGestureRecognizerDelegate>
4545
@property (weak, nonatomic) IBOutlet UIButton *trackingButton;
4646
@property (weak, nonatomic) IBOutlet UIButton *reportLocationButton;
4747
@property (weak, nonatomic) IBOutlet UIView *toastView;
@@ -53,8 +53,7 @@ @interface MapViewController ()<UserTrackingModeChanged, LocationAuthorizationSt
5353
@property (strong, nonatomic) Observations *observationResultsController;
5454
@property (nonatomic, strong) NSTimer* mapAnnotationsUpdateTimer;
5555
@property (weak, nonatomic) IBOutlet UILabel *eventNameLabel;
56-
@property (nonatomic, strong) id previewingContext;
57-
56+
@property (nonatomic, strong) id previewingContext;
5857
@end
5958

6059
@implementation MapViewController
@@ -103,12 +102,14 @@ - (void) viewDidLoad {
103102
//self.mapDelegate.previewDelegate = self;
104103
}
105104

106-
UITapGestureRecognizer * singleTapGesture = [[UITapGestureRecognizer alloc]
107-
initWithTarget:self action:@selector(singleTapGesture:)];
105+
UITapGestureRecognizer *singleTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGesture:)];
108106
singleTapGesture.numberOfTapsRequired = 1;
107+
singleTapGesture.delaysTouchesBegan = YES;
108+
singleTapGesture.cancelsTouchesInView = YES;
109+
singleTapGesture.delegate = self;
109110
[self.mapView addGestureRecognizer:singleTapGesture];
110-
UITapGestureRecognizer * doubleTapGesture = [[UITapGestureRecognizer alloc]
111-
initWithTarget:self action:@selector(doubleTapGesture:)];
111+
112+
UITapGestureRecognizer * doubleTapGesture = [[UITapGestureRecognizer alloc] init];
112113
doubleTapGesture.numberOfTapsRequired = 2;
113114
[self.mapView addGestureRecognizer:doubleTapGesture];
114115
[singleTapGesture requireGestureRecognizerToFail:doubleTapGesture];
@@ -574,18 +575,13 @@ - (void) onCacheOverlayTapped:(NSString *)message {
574575
[self.childCoordinators addObject:detailCoordinator];
575576
}
576577

577-
-(void) singleTapGesture:(UITapGestureRecognizer *) tapGestureRecognizer{
578-
579-
if(tapGestureRecognizer.state == UIGestureRecognizerStateEnded){
578+
-(void) singleTapGesture:(UITapGestureRecognizer *) tapGestureRecognizer {
579+
if (tapGestureRecognizer.state == UIGestureRecognizerStateEnded){
580580
CGPoint cgPoint = [tapGestureRecognizer locationInView:self.mapView];
581581
[self.mapDelegate mapClickAtPoint:cgPoint];
582582
}
583583
}
584584

585-
-(void) doubleTapGesture:(UITapGestureRecognizer *) tapGestureRecognizer{
586-
587-
}
588-
589585
#pragma mark - Observation Edit Coordinator Delegate
590586

591587
- (void) editCancel:(NSObject *) coordinator {
@@ -612,4 +608,17 @@ - (void) mapSettingsComplete:(NSObject *) coordinator {
612608
[self.childCoordinators removeObject:coordinator];
613609
}
614610

611+
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
612+
CGPoint point = [gestureRecognizer locationInView:self.mapView];
613+
if ([otherGestureRecognizer isKindOfClass:[UITapGestureRecognizer class]] && ((UITapGestureRecognizer *) otherGestureRecognizer).numberOfTapsRequired == 1) {
614+
CLLocationCoordinate2D location = [self.mapView convertPoint:point toCoordinateFromView:self.mapView];
615+
MapShapeObservation *mapShapeObservation = [self.mapDelegate.mapObservations clickedShapeAtLocation:location];
616+
if (mapShapeObservation != nil) {
617+
return YES;
618+
}
619+
}
620+
621+
return NO;
622+
}
623+
615624
@end

Mage/NSDate+display.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

Mage/NSDate+display.m

Lines changed: 0 additions & 55 deletions
This file was deleted.

Mage/ObservationAnnotation.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ - (id)initWithObservation:(Observation *) observation andEventForms: (NSArray *)
4040
[self setCoordinate:location];
4141
[self setTitle:[observation primaryFeedFieldText]];
4242

43-
if (self.title == nil) {
43+
if ([self.title length] == 0) {
4444
[self setTitle:@"Observation"];
4545
}
4646
[self setSubtitle:observation.timestamp.timeAgoSinceNow];
@@ -74,6 +74,7 @@ -(MKAnnotationView *) viewForAnnotationOnMapView: (MKMapView *) mapView withDrag
7474
annotationView.centerOffset = CGPointMake(0, -(annotationView.image.size.height/2.0f));
7575
} else {
7676
annotationView.image = nil;
77+
annotationView.frame = CGRectMake(0, 0, 0, 0);
7778
annotationView.centerOffset = CGPointMake(0, 0);
7879
}
7980

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use_frameworks!
99
target 'MAGE' do
1010
pod 'UIImage-Categories', '~> 0.0.1'
1111
pod 'HexColors', '~> 2.2.1'
12-
pod 'mage-ios-sdk', :git => 'https://github.com/ngageoint/mage-ios-sdk.git', :tag=> '3.1.1'
12+
pod 'mage-ios-sdk', :git => 'https://github.com/ngageoint/mage-ios-sdk.git', :tag=> '3.1.2'
1313
#pod 'mage-ios-sdk', :git => 'https://github.com/ngageoint/mage-ios-sdk.git', :branch=> 'develop'
1414
#pod 'mage-ios-sdk', :path => '../mage-ios-sdk'
1515
pod 'mgrs', '~>0.1.0'

Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PODS:
2727
- Kingfisher/Core (5.14.0)
2828
- KTCenterFlowLayout (1.3.1)
2929
- libPhoneNumber-iOS (0.9.15)
30-
- mage-ios-sdk (3.1.1):
30+
- mage-ios-sdk (3.1.2):
3131
- AFNetworking (~> 4.0.1)
3232
- DateTools (~> 2.0.0)
3333
- geopackage-ios (~> 4.0.1)
@@ -76,7 +76,7 @@ DEPENDENCIES:
7676
- Kingfisher (~> 5.0)
7777
- KTCenterFlowLayout
7878
- libPhoneNumber-iOS (~> 0.8)
79-
- mage-ios-sdk (from `https://github.com/ngageoint/mage-ios-sdk.git`, tag `3.1.1`)
79+
- mage-ios-sdk (from `https://github.com/ngageoint/mage-ios-sdk.git`, tag `3.1.2`)
8080
- mgrs (~> 0.1.0)
8181
- OCMock
8282
- OHHTTPStubs
@@ -115,12 +115,12 @@ SPEC REPOS:
115115
EXTERNAL SOURCES:
116116
mage-ios-sdk:
117117
:git: https://github.com/ngageoint/mage-ios-sdk.git
118-
:tag: 3.1.1
118+
:tag: 3.1.2
119119

120120
CHECKOUT OPTIONS:
121121
mage-ios-sdk:
122122
:git: https://github.com/ngageoint/mage-ios-sdk.git
123-
:tag: 3.1.1
123+
:tag: 3.1.2
124124

125125
SPEC CHECKSUMS:
126126
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
@@ -131,7 +131,7 @@ SPEC CHECKSUMS:
131131
Kingfisher: 7b64389a43139c903ec434788344c288217c792d
132132
KTCenterFlowLayout: 6e02b50ab2bd865025ae82fe266ed13b6d9eaf97
133133
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
134-
mage-ios-sdk: 572b78557d5e48bd88d39b8bb6da4b2ab1a23dd2
134+
mage-ios-sdk: c3e330b1d88f562ad3919955de330683000c7876
135135
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
136136
mgrs: c4b57f8c27ee1f4939be117f4a683e680c127326
137137
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
@@ -149,6 +149,6 @@ SPEC CHECKSUMS:
149149
UIImage-Categories: 5103b772ae91894f4d650eb696b006f4a2487ec3
150150
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
151151

152-
PODFILE CHECKSUM: b700f3f753c420f71d4cd44a145a29cfe68b46fe
152+
PODFILE CHECKSUM: 727a6544668fa9f9ec4f88cf46a5410c52803acc
153153

154-
COCOAPODS: 1.9.3
154+
COCOAPODS: 1.10.1

0 commit comments

Comments
 (0)