diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-05-22 11:17:44 -0700 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-23 11:51:05 +0300 |
commit | 2865e7d35c92acc247937242821f7823599f623c (patch) | |
tree | 4bbccd7c8c6608756ab9319e92de55a89b33759d /platform/ios/src | |
parent | 7143408f69618828bb37b8f38d719d3ceeeec9c2 (diff) | |
download | qtlocation-mapboxgl-2865e7d35c92acc247937242821f7823599f623c.tar.gz |
[ios, osx] Added wireframe debugging mask
Added an option to MGLMapDebugMaskOptions for the new wireframe debugging mode and UI in the demo applications for toggling it.
Diffstat (limited to 'platform/ios/src')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 3 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index b6fd1c4ffd..3f54b07f41 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -42,6 +42,9 @@ typedef NS_OPTIONS(NSUInteger, MGLMapDebugMaskOptions) { /** Edges of glyphs and symbols are shown as faint, green lines to help diagnose collision and label placement issues. */ MGLMapDebugCollisionBoxesMask = 1 << 4, + /** Line widths, backgrounds, and fill colors are ignored to create a + wireframe effect. */ + MGLMapDebugWireframesMask = 1 << 5, }; /** diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 1b33e379af..dffc1add46 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -1820,6 +1820,10 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { mask |= MGLMapDebugCollisionBoxesMask; } + if (options & mbgl::MapDebugOptions::Wireframe) + { + mask |= MGLMapDebugWireframesMask; + } return mask; } @@ -1842,6 +1846,10 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) { options |= mbgl::MapDebugOptions::Collision; } + if (debugMask & MGLMapDebugWireframesMask) + { + options |= mbgl::MapDebugOptions::Wireframe; + } _mbglMap->setDebug(options); } |