diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-28 22:08:53 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-28 22:23:07 -0800 |
commit | 6b3b3f3ff640e880c01aa5ac8a80eda4a309914b (patch) | |
tree | 03a1a7b625a2673bd6718179a0bd1a80ce3e625a /include | |
parent | 8cdd02bc8fac9f6bd63b8b943119ebdb6f480ac9 (diff) | |
download | qtlocation-mapboxgl-6b3b3f3ff640e880c01aa5ac8a80eda4a309914b.tar.gz |
[ios] Debug mask
Ported MGLMapDebugMaskOptions from the OS X SDK. Deprecated debugActive and -cycleDebugOptions.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index bd4b048d64..46383ed137 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -29,6 +29,20 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) { MGLAnnotationVerticalAlignmentBottom, }; +/** Options for enabling debugging features in an MGLMapView instance. */ +typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { + /** Edges of tile boundaries are shown as thick, red lines to help diagnose + tile clipping issues. */ + MGLMapDebugTileBoundariesMask = 1 << 1, + /** Each tile shows its tile coordinate (x/y/z) in the upper-left corner. */ + MGLMapDebugTileInfoMask = 1 << 2, + /** Each tile shows a timestamp indicating when it was loaded. */ + MGLMapDebugTimestampsMask = 1 << 3, + /** Edges of glyphs and symbols are shown as faint, green lines to help + diagnose collision and label placement issues. */ + MGLMapDebugCollisionBoxesMask = 1 << 4, +}; + /** An interactive, customizable map view with an interface similar to the one provided by Apple's MapKit. @@ -930,23 +944,19 @@ IB_DESIGNABLE */ - (void)removeOverlays:(NS_ARRAY_OF(id <MGLOverlay>) *)overlays; -#pragma mark Debugging +#pragma mark Debugging the Map /** - A Boolean value that determines whether map debugging information is shown. - - The default value of this property is `NO`. - */ -@property (nonatomic, getter=isDebugActive) BOOL debugActive; - -/** - Cycle through the options that determine which debugging aids are shown on the - map. + The options that determine which debugging aids are shown on the map. These options are all disabled by default and should remain disabled in - released software. + released software for performance and aesthetic reasons. */ -- (void)cycleDebugOptions; +@property (nonatomic) MGLMapDebugMaskOptions debugMask; + +@property (nonatomic, getter=isDebugActive) BOOL debugActive __attribute__((deprecated("Use -debugMask and -setDebugMask:."))); + +- (void)cycleDebugOptions __attribute__((deprecated("Use -setDebugMask:."))); /** Empties the in-memory tile cache. |