The scale factor used to draw the overlay’s content.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.2+
Framework
- Map
Kit
Declaration
var contentScaleFactor: CGFloat { get }
Discussion
The scale factor determines how content is mapped from the logical coordinate space (measured in points) to the device coordinate space (measured in pixels). This value is typically either 1
or 2
. Higher scale factors indicate that each point is represented by more than one pixel on the screen. For example, if the scale factor is 2
and the drawing rectangle size is 50 x 50 points, the size of the underlying area is 100 x 100 pixels.
When drawing the content for your overlays, you can use this value to determine how best to render your content.