Represents a generic overlay that draws its contents using a CGPath
data type.
SDKs
- iOS 4.0–13.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
Framework
- Map
Kit
Declaration
class MKOverlayPathView : MKOverlay View
Overview
You can use this class to implement simple path-based overlay views or subclass it to define additional drawing behaviors. The default drawing behavior of this class is to apply the object’s current fill attributes, fill the path, apply the current stroke attributes, and then stroke the path.
If you subclass, you should override the create
method and use that method to build the appropriate path for the overlay. You can invalidate this path as needed and force the path to be recreated using whatever new data your subclass has obtained.
Important
In iOS 5.1 and earlier, the Map Kit framework uses the Google Mobile Maps (GMM) service to provide map data. Use of specific classes of this framework (and their associated interfaces) is subject to the Google Mobile Maps terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.
In iOS 7 and later, use the MKOverlay
class to display path-based overlays instead.