MaplyWMSCapabilities

Objective-C

@interface MaplyWMSCapabilities : NSObject

Swift

class MaplyWMSCapabilities : NSObject

Encapsulates the capabilities coming back from a WMS server. We can query this to see what layers and coordinate systems are available. Part of the Web Map Service parser.

  • We can fetch the capabilities from this URL

    Declaration

    Objective-C

    + (nonnull NSString *)CapabilitiesURLFor:(NSString *_Nonnull)baseURL;

    Swift

    class func capabilitiesURL(for baseURL: String) -> String
  • The name as returned by the service

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *name;

    Swift

    var name: String? { get set }
  • The title as returned by the service

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *title;

    Swift

    var title: String? { get set }
  • Available formats (strings)

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray *formats;

    Swift

    var formats: [Any]? { get set }
  • Layers we can fetch from

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray *layers;

    Swift

    var layers: [Any]? { get set }
  • This constructor will initialize with an XML document that we’ve fetched from the server, presumably.

    Declaration

    Objective-C

    - (nullable instancetype)initWithXML:(DDXMLDocument *_Nonnull)xmlDoc;

    Swift

    init?(xml xmlDoc: DDXMLDocument)
  • Look for a layer with the given name.

    Declaration

    Objective-C

    - (nullable MaplyWMSLayer *)findLayer:(NSString *_Nonnull)name;

    Swift

    func findLayer(_ name: String) -> MaplyWMSLayer?