Map Debug Options
The Mapbox Maps SDK offers some debug options which can be toggled on and off during development to troubleshoot visual map errors. These debug tools can be used to identify issues with camera orientation, tile loading, glyph and symbol collision, and more.
These debug options may cause performance or visual issues. They are for debugging purposes only and should not be used in any production environment.
mapView.debugOptions = [.camera, .collision, .parseStatus, .modelBounds, .padding]
The following debug can be enabled or disabled at runtime and can be used together to identify issues with symbol placement, camera settings, 3D models, or other visual features.
|Shows a debug
UIView with information about the
CameraState including latitude, longitude, zoom, pitch, and bearing.
|Draws the padding frame of the camera.
|Draws the edges of tile boundaries as thick, red lines to help diagnose tile clipping issues.
|Each tile shows its tile coordinate (x/y/z) in the upper-left corner.
|Each tile shows a timestamp indicating when it was loaded.
|Shows the edges of glyphs and symbols as faint lines to help diagnose collision and label placement issues.
|Replaces each drawing operation with a translucent fill. Overlapping drawing operations appear more prominent to help diagnose overdrawing.
|Shows the stencil buffer instead of the color buffer.
|Shows the depth buffer instead of the color buffer.
|Shows 3D model bounding boxes.
|Each tile shows its local lighting conditions in the upper-left corner. (If
lights properties are used, otherwise they show zero.)
Enable and disabled debug options on a map.