SLDStyleSet
Objective-C
@interface SLDStyleSet : NSObject <MaplyVectorStyleDelegate>
Swift
class SLDStyleSet : NSObject, MaplyVectorStyleDelegate
@brief Class corresponding to the sld:StyledLayerDescriptor element
The sld:StyledLayerDescriptor element is the root element of the Styled Layer Descriptor document.
Implements the MaplyVectorStyleDelegate protocol for matching and applying styles to vector objects.
See
http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd for SLD v1.1.0See
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd for SLD v1.0.0See
MaplyVectorStyleDelegate-
Undocumented
Declaration
Objective-C
@property (nonatomic) BOOL useLayerNames
Swift
var useLayerNames: Bool { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, weak, nullable) NSObject<MaplyRenderControllerProtocol> *viewC
Swift
weak var viewC: (NSObjectProtocol & MaplyRenderControllerProtocol)? { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong, nullable) MaplyVectorStyleSettings *tileStyleSettings
Swift
var tileStyleSettings: MaplyVectorStyleSettings? { get set }
-
Constructs a SLDStyleSet object.
After constructing the SLDStyleSet object, call loadSldURL: or loadSldData:baseURL: to parse the desired SLD document tree and create the corresponding symbolizers.
Declaration
Objective-C
- (id _Nullable)initWithViewC: (NSObject<MaplyRenderControllerProtocol> *_Nonnull)viewC useLayerNames:(BOOL)useLayerNames relativeDrawPriority:(int)relativeDrawPriority;
Swift
init?(viewC: NSObjectProtocol & MaplyRenderControllerProtocol, useLayerNames: Bool, relativeDrawPriority: Int32)
Parameters
viewC
The map or globe view controller.
useLayerNames
Whether to use names of NamedLayer elements as a criteria in matching styles.
relativeDrawPriority
The z-order relative to other vector features. This will be incremented internally for each style rule, so if you have multiple SLDStyleSets, leave some space between the relativeDrawPriority of each.
-
Undocumented
Declaration
Objective-C
- (void)loadSldURL:(NSURL *__nullable)url;
Swift
func loadSldURL(_ url: URL?)
-
Undocumented
Declaration
Objective-C
- (void)loadSldData:(NSData *__nonnull)sldData baseURL:(NSURL *__nonnull)baseURL;
Swift
func loadSldData(_ sldData: Data, baseURL: URL)