Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] Reverts "Enable customize positions of mapview ornaments (#13556)…
Browse files Browse the repository at this point in the history
…" (#13870)

This reverts commit e22d28c.
  • Loading branch information
julianrex authored Feb 5, 2019
1 parent 47852b6 commit 5ba4a6a
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 583 deletions.
4 changes: 0 additions & 4 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* `MGLMapSnapshotter` now respects the `MGLIdeographicFontFamilyName` key in Info.plist, which reduces bandwidth consumption when snapshotting regions that contain Chinese or Japanese characters. ([#13427](https://github.com/mapbox/mapbox-gl-native/pull/13427))
* Fixed a sporadic crash when using `MGLMapSnapshotter`. ([#13300](https://github.com/mapbox/mapbox-gl-native/pull/13300))

### User interaction

* Added options to customize position of scale bar, compass, logo and attribution. ([#13556](https://github.com/mapbox/mapbox-gl-native/pull/13556))

### Other changes

* Modified the behavior of the map view so that programmatic camera transitions can no longer be interrupted by user interaction when `MGLMapView.zoomEnabled`, `MGLMapView.rotateEnabled`, `MGLMapView.scrollEnabled`, and `MGLMapView.pitchEnabled` are set to false. ([#13362](https://github.com/mapbox/mapbox-gl-native/pull/13362))
Expand Down
5 changes: 0 additions & 5 deletions platform/ios/app/MBXOrnamentsViewController.h

This file was deleted.

93 changes: 0 additions & 93 deletions platform/ios/app/MBXOrnamentsViewController.m

This file was deleted.

11 changes: 1 addition & 10 deletions platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#import "MBXUserLocationAnnotationView.h"
#import "LimeGreenStyleLayer.h"
#import "MBXEmbeddedMapViewController.h"
#import "MBXOrnamentsViewController.h"

#import "MBXFrameTimeGraphView.h"

Expand Down Expand Up @@ -105,9 +104,8 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
MBXSettingsMiscellaneousShowSnapshots,
MBXSettingsMiscellaneousShouldLimitCameraChanges,
MBXSettingsMiscellaneousShowCustomLocationManager,
MBXSettingsMiscellaneousOrnamentsPlacement,
MBXSettingsMiscellaneousPrintLogFile,
MBXSettingsMiscellaneousDeleteLogFile
MBXSettingsMiscellaneousDeleteLogFile,
};

// Utility methods
Expand Down Expand Up @@ -501,7 +499,6 @@ - (void)dismissSettings:(__unused id)sender
@"Show Snapshots",
[NSString stringWithFormat:@"%@ Camera Changes", (_shouldLimitCameraChanges ? @"Unlimit" : @"Limit")],
@"View Route Simulation",
@"Ornaments Placement",
]];

if (self.debugLoggingEnabled)
Expand Down Expand Up @@ -759,12 +756,6 @@ - (void)performActionForSettingAtIndexPath:(NSIndexPath *)indexPath
}
break;
}
case MBXSettingsMiscellaneousOrnamentsPlacement:
{
MBXOrnamentsViewController *ornamentsViewController = [[MBXOrnamentsViewController alloc] init];
[self.navigationController pushViewController:ornamentsViewController animated:YES];
break;
}
default:
NSAssert(NO, @"All miscellaneous setting rows should be implemented");
break;
Expand Down
18 changes: 0 additions & 18 deletions platform/ios/ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,6 @@
55E5666D21C2A2080008B8B5 /* NSData+MMEGZIP.h in Headers */ = {isa = PBXBuildFile; fileRef = 40834BCF1FE05D7100C1BD0D /* NSData+MMEGZIP.h */; };
632281DF1E6F855900D75A5D /* MBXEmbeddedMapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 632281DE1E6F855900D75A5D /* MBXEmbeddedMapViewController.m */; };
6407D6701E0085FD00F6A9C3 /* MGLDocumentationExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6407D66F1E0085FD00F6A9C3 /* MGLDocumentationExampleTests.swift */; };
6F018BAE220031B8003E7269 /* UIView+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAFA29B220023840088709E /* UIView+MGLAdditions.m */; };
6F018BAF220031BF003E7269 /* UIView+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FAFA29A220023840088709E /* UIView+MGLAdditions.h */; };
6F018BB0220031BF003E7269 /* UIView+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FAFA29A220023840088709E /* UIView+MGLAdditions.h */; };
6F018BB1220031C1003E7269 /* UIView+MGLAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FAFA29B220023840088709E /* UIView+MGLAdditions.m */; };
6FA9341721EF372100AA9CA8 /* MBXOrnamentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FA9341521EF372100AA9CA8 /* MBXOrnamentsViewController.m */; };
74CB5EB1219B252C00102936 /* MGLStyleLayerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CB5EAF219B252C00102936 /* MGLStyleLayerManager.h */; };
74CB5EB2219B252C00102936 /* MGLStyleLayerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 74CB5EAF219B252C00102936 /* MGLStyleLayerManager.h */; };
74CB5EB3219B252C00102936 /* MGLStyleLayerManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 74CB5EB0219B252C00102936 /* MGLStyleLayerManager.mm */; };
Expand Down Expand Up @@ -1077,10 +1072,6 @@
632281DD1E6F855900D75A5D /* MBXEmbeddedMapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBXEmbeddedMapViewController.h; sourceTree = "<group>"; };
632281DE1E6F855900D75A5D /* MBXEmbeddedMapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBXEmbeddedMapViewController.m; sourceTree = "<group>"; };
6407D66F1E0085FD00F6A9C3 /* MGLDocumentationExampleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MGLDocumentationExampleTests.swift; path = ../../darwin/test/MGLDocumentationExampleTests.swift; sourceTree = "<group>"; };
6FA9341521EF372100AA9CA8 /* MBXOrnamentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBXOrnamentsViewController.m; sourceTree = "<group>"; };
6FA9341621EF372100AA9CA8 /* MBXOrnamentsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBXOrnamentsViewController.h; sourceTree = "<group>"; };
6FAFA29A220023840088709E /* UIView+MGLAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+MGLAdditions.h"; sourceTree = "<group>"; };
6FAFA29B220023840088709E /* UIView+MGLAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+MGLAdditions.m"; sourceTree = "<group>"; };
74CB5EAF219B252C00102936 /* MGLStyleLayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleLayerManager.h; sourceTree = "<group>"; };
74CB5EB0219B252C00102936 /* MGLStyleLayerManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleLayerManager.mm; sourceTree = "<group>"; };
74CB5EB5219B280300102936 /* MGLHillshadeStyleLayer_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLHillshadeStyleLayer_Private.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1680,8 +1671,6 @@
30E578121DAA7D690050F07E /* UIImage+MGLAdditions.mm */,
DD9BE4F51EB263C50079A3AF /* UIViewController+MGLAdditions.h */,
DD9BE4F61EB263C50079A3AF /* UIViewController+MGLAdditions.m */,
6FAFA29A220023840088709E /* UIView+MGLAdditions.h */,
6FAFA29B220023840088709E /* UIView+MGLAdditions.m */,
);
name = Categories;
sourceTree = "<group>";
Expand Down Expand Up @@ -1953,8 +1942,6 @@
965DF51020F9430500438AAC /* MBXFrameTimeGraphView.m */,
632281DD1E6F855900D75A5D /* MBXEmbeddedMapViewController.h */,
632281DE1E6F855900D75A5D /* MBXEmbeddedMapViewController.m */,
6FA9341621EF372100AA9CA8 /* MBXOrnamentsViewController.h */,
6FA9341521EF372100AA9CA8 /* MBXOrnamentsViewController.m */,
DA821D051CCC6D59007508D4 /* Main.storyboard */,
DA821D041CCC6D59007508D4 /* LaunchScreen.storyboard */,
DA1DC99E1CB6E088006E619F /* Assets.xcassets */,
Expand Down Expand Up @@ -2426,7 +2413,6 @@
35E79F201D41266300957B9E /* MGLStyleLayer_Private.h in Headers */,
FA68F14A1E9D656600F9F6C2 /* MGLFillExtrusionStyleLayer.h in Headers */,
353933FB1D3FB7C0003F57D7 /* MGLRasterStyleLayer.h in Headers */,
6F018BB0220031BF003E7269 /* UIView+MGLAdditions.h in Headers */,
1FCAE2A820B88B3800C577DD /* MGLLocationManager_Private.h in Headers */,
DA8847EF1CBAFA5100AB86E3 /* MGLAccountManager.h in Headers */,
DA35A2C91CCAAAD200E826B2 /* NSValue+MGLAdditions.h in Headers */,
Expand Down Expand Up @@ -2634,7 +2620,6 @@
3510FFEB1D6D9C7A00F413B2 /* NSComparisonPredicate+MGLAdditions.h in Headers */,
35E1A4D91D74336F007AA97F /* MGLValueEvaluator.h in Headers */,
DABFB8701CBE9A0F00D62B32 /* MGLMapView+IBAdditions.h in Headers */,
6F018BAF220031BF003E7269 /* UIView+MGLAdditions.h in Headers */,
96E516EA2000560B00A02306 /* MGLAnnotationView_Private.h in Headers */,
96E516FB20005A4000A02306 /* MGLUserLocationHeadingBeamLayer.h in Headers */,
96E516DC2000547000A02306 /* MGLPolyline_Private.h in Headers */,
Expand Down Expand Up @@ -3088,7 +3073,6 @@
354B839C1D2E9B48005D9406 /* MBXUserLocationAnnotationView.m in Sources */,
965DF51120F9430500438AAC /* MBXFrameTimeGraphView.m in Sources */,
DA1DC9991CB6E054006E619F /* MBXAppDelegate.m in Sources */,
6FA9341721EF372100AA9CA8 /* MBXOrnamentsViewController.m in Sources */,
DA1DC96B1CB6C6B7006E619F /* MBXOfflinePacksTableViewController.m in Sources */,
DA1DC96A1CB6C6B7006E619F /* MBXCustomCalloutView.m in Sources */,
927FBCFC1F4DAA8300F8BF1F /* MBXSnapshotsViewController.m in Sources */,
Expand Down Expand Up @@ -3188,7 +3172,6 @@
40834C4A1FE05F7500C1BD0D /* TSKPinningValidator.m in Sources */,
967C864D210A9D3C004DF794 /* UIDevice+MGLAdditions.m in Sources */,
400533021DB0862B0069F638 /* NSArray+MGLAdditions.mm in Sources */,
6F018BAE220031B8003E7269 /* UIView+MGLAdditions.m in Sources */,
96036A03200565C700510F3D /* NSOrthography+MGLAdditions.m in Sources */,
ACA65F592140697200537748 /* MMEDispatchManager.m in Sources */,
40834BF31FE05E1800C1BD0D /* MMETimerManager.m in Sources */,
Expand Down Expand Up @@ -3324,7 +3307,6 @@
35136D431D42274500C20EFD /* MGLRasterStyleLayer.mm in Sources */,
967C864E210A9D3C004DF794 /* UIDevice+MGLAdditions.m in Sources */,
96036A04200565C700510F3D /* NSOrthography+MGLAdditions.m in Sources */,
6F018BB1220031C1003E7269 /* UIView+MGLAdditions.m in Sources */,
40834C071FE05E1800C1BD0D /* MMETimerManager.m in Sources */,
ACA65F5A2140697200537748 /* MMEDispatchManager.m in Sources */,
3538AA201D542239008EC33D /* MGLForegroundStyleLayer.mm in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions platform/ios/sdk-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"platform/ios/vendor/mapbox-events-ios/vendor/TrustKit/TSKPinningValidator.m",
"platform/ios/src/UIDevice+MGLAdditions.m",
"platform/darwin/src/NSArray+MGLAdditions.mm",
"platform/ios/src/UIView+MGLAdditions.m",
"platform/ios/src/NSOrthography+MGLAdditions.m",
"platform/ios/vendor/mapbox-events-ios/MapboxMobileEvents/MMEDispatchManager.m",
"platform/ios/vendor/mapbox-events-ios/MapboxMobileEvents/MMETimerManager.m",
Expand Down Expand Up @@ -233,7 +232,6 @@
"MGLShape_Private.h": "platform/darwin/src/MGLShape_Private.h",
"MGLPolygon_Private.h": "platform/darwin/src/MGLPolygon_Private.h",
"MGLStyleLayer_Private.h": "platform/darwin/src/MGLStyleLayer_Private.h",
"UIView+MGLAdditions.h": "platform/ios/src/UIView+MGLAdditions.h",
"MGLLocationManager_Private.h": "platform/darwin/src/MGLLocationManager_Private.h",
"MGLLoggingConfiguration_Private.h": "platform/darwin/src/MGLLoggingConfiguration_Private.h",
"NSComparisonPredicate+MGLAdditions.h": "platform/darwin/src/NSComparisonPredicate+MGLAdditions.h",
Expand Down
59 changes: 0 additions & 59 deletions platform/ios/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,6 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) {
MGLAnnotationVerticalAlignmentBottom,
};

/**
The position of scale bar, compass, logo and attribution in a map view. Used with
`MGLMapView.scaleBarPosition`,
`MGLMapView.compassViewPosition`,
`MGLMapView.logoViewPosition`,
`MGLMapView.attributionButtonPosition`.
*/
typedef NS_ENUM(NSUInteger, MGLOrnamentPosition) {
/** Place the ornament in the top left of the map view. */
MGLOrnamentPositionTopLeft = 0,
/** Place the ornament in the top right of the map view. */
MGLOrnamentPositionTopRight,
/** Place the ornament in the bottom left of the map view. */
MGLOrnamentPositionBottomLeft,
/** Place the ornament in the bottom right of the map view. */
MGLOrnamentPositionBottomRight,
};

/**
The mode used to track the user location on the map. Used with
`MGLMapView.userTrackingMode`.
Expand Down Expand Up @@ -304,32 +286,12 @@ MGL_EXPORT IB_DESIGNABLE
*/
@property (nonatomic, readonly) UIView *scaleBar;

/**
The postion of the scale bar. The default value is `MGLOrnamentPositionTopLeft`.
*/
@property (nonatomic, assign) MGLOrnamentPosition scaleBarPosition;

/**
A `CGPoint` indicating the position offset of the scale bar.
*/
@property (nonatomic, assign) CGPoint scaleBarOffset;

/**
A control indicating the map’s direction and allowing the user to manipulate
the direction, positioned in the upper-right corner.
*/
@property (nonatomic, readonly) UIImageView *compassView;

/**
The postion of the compass view. The default value is `MGLOrnamentPositionTopRight`.
*/
@property (nonatomic, assign) MGLOrnamentPosition compassViewPosition;

/**
A `CGPoint` indicating the position offset of the compass.
*/
@property (nonatomic, assign) CGPoint compassViewOffset;

/**
The Mapbox logo, positioned in the lower-left corner.
Expand All @@ -341,17 +303,6 @@ MGL_EXPORT IB_DESIGNABLE
*/
@property (nonatomic, readonly) UIImageView *logoView;

/**
The postion of the logo view. The default value is `MGLOrnamentPositionBottomLeft`.
*/
@property (nonatomic, assign) MGLOrnamentPosition logoViewPosition;

/**
A `CGPoint` indicating the position offset of the logo.
*/
@property (nonatomic, assign) CGPoint logoViewOffset;


/**
A view showing legally required copyright notices and telemetry settings,
positioned at the bottom-right of the map view.
Expand All @@ -377,16 +328,6 @@ MGL_EXPORT IB_DESIGNABLE
*/
@property (nonatomic, readonly) UIButton *attributionButton;

/**
The postion of the attribution button. The default value is `MGLOrnamentPositionBottomRight`.
*/
@property (nonatomic, assign) MGLOrnamentPosition attributionButtonPosition;

/**
A `CGPoint` indicating the position offset of the attribution.
*/
@property (nonatomic, assign) CGPoint attributionButtonOffset;

/**
Show the attribution and telemetry action sheet.
Expand Down
Loading

0 comments on commit 5ba4a6a

Please sign in to comment.