MTRendering
@MainActor
public protocol MTRendering
Defines methods for adjusting rendering parameters.
-
getPixelRatio()AsynchronousReturns the pixel ratio currently used by the map.
Declaration
Swift
@MainActor func getPixelRatio() async -> Double -
setPixelRatio(_:Asynchronous) Sets the pixel ratio to use when rendering the map.
Declaration
Swift
@MainActor func setPixelRatio(_ pixelRatio: Double) asyncParameters
pixelRatioPixel ratio value to apply.
-
triggerRepaint()AsynchronousTrigger the rendering of a single frame. Use this method with custom layers to repaint the map when the layer changes. Calling this multiple times before the next frame is rendered will still result in only a single frame being rendered.
Declaration
Swift
@MainActor func triggerRepaint() async -
setShowTileBoundaries(_:Asynchronous) Displays tile boundaries on the map.
Declaration
Swift
@MainActor func setShowTileBoundaries(_ show: Bool) asyncParameters
showA boolean value indicating whether to show tile boundaries.
-
setShowPadding(_:Asynchronous) Displays padding on the map.
Declaration
Swift
@MainActor func setShowPadding(_ show: Bool) asyncParameters
showA boolean value indicating whether to show padding.
-
setShowOverdrawInspector(_:Asynchronous) Displays the overdraw inspector on the map.
Declaration
Swift
@MainActor func setShowOverdrawInspector(_ show: Bool) asyncParameters
showA boolean value indicating whether to show the overdraw inspector.
-
setShowCollisionBoxes(_:Asynchronous) Displays collision boxes on the map.
Declaration
Swift
@MainActor func setShowCollisionBoxes(_ show: Bool) asyncParameters
showA boolean value indicating whether to show collision boxes.
-
setMaxParallelImageRequests(_:Asynchronous) Sets the maximum number of images loaded in parallel.
Declaration
Swift
@MainActor func setMaxParallelImageRequests(_ maxParallelImageRequests: Int) asyncParameters
maxParallelImageRequestsThe maximum number of images.
-
setRTLTextPlugin(pluginURL:Asynchronousdeferred: ) Sets the map’s RTL text plugin.
Declaration
Swift
@MainActor func setRTLTextPlugin(pluginURL: String, deferred: Bool) asyncParameters
pluginURLURL pointing to the Mapbox RTL text plugin source.
deferredA boolean indicating if the plugin evaluation should be deferred.