VMVenueLayerStyle

@objcMembers
public class VMVenueLayerStyle : NSObject

This class represents all of the stylistics properties that can be configured for display of a map’s style

Since

1.1

Public Properties

  • The unique identifier for this layer, either with or without wildcards

    Declaration

    Swift

    public var layerId: String
  • The fill color for this layer, which only applies to polygon layers

    Declaration

    Swift

    public var fillColor: UIColor?
  • The name of the fill pattern to use for this layer, which only applies to polygon layers The fill pattern must exist by the same name in your map’s icon url

    Declaration

    Swift

    public var fillPattern: String?
  • The outline color for this layer, which only applies to polygon layers

    Since

    1.2

    Declaration

    Swift

    public var outlineColor: UIColor?
  • The zoom level corresponding to outlineMinWidth for the outline, which only applies to polygon layers

    Since

    1.2

    Declaration

    Swift

    public var outlineMinZoom: Float?
  • The zoom level corresponding to outlineMaxWidth for the outline, which only applies to polygon layers

    Since

    1.2

    Declaration

    Swift

    public var outlineMaxZoom: Float?
  • The minimum width for the outline, which only applies to polygon layers

    Since

    1.2

    Declaration

    Swift

    public var outlineMinWidth: Float?
  • The maximum width for the outline, which only applies to polygon layers

    Since

    1.2

    Declaration

    Swift

    public var outlineMaxWidth: Float?
  • The line color for this layer, which only applies to line layers

    Declaration

    Swift

    public var lineColor: UIColor?
  • The text value of the layer, which can come directly from your map tile or geojson properties Just set the value to {property_name}

    Declaration

    Swift

    public var textValue: String?
  • The name of the font to use for this layer, which only applies to text/icon layers The font must exist by the same name in your mapview’s font url

    Declaration

    Swift

    public var fontName: String?
  • The size of the font

    Declaration

    Swift

    public var fontSize: Double?
  • The color of the font

    Declaration

    Swift

    public var fontColor: UIColor?
  • The stroke color of the font

    Declaration

    Swift

    public var fontStrokeColor: UIColor?
  • The stroke width of the font

    Declaration

    Swift

    public var fontStrokeWidth: Double?
  • The max width a label can be before it wraps to another line

    Declaration

    Swift

    public var maxTextWidth: Double?
  • Hides the given layer from the mapview

    Declaration

    Swift

    public var hidden: Bool
  • The name of an image to use for the icon, which only applies to icon layers This icon must exist by the same name in your mapview’s icon url This icon name can come directly from your map tile or geojson properties. Just set the value to {property_name}

    Declaration

    Swift

    public var iconName: String?

Initializers

  • Default initializer

    Declaration

    Swift

    public init(_ id: String)

    Parameters

    id

    the id of the layer style

  • Convenience initializer

    Since

    1.2

    Declaration

    Swift

    public override convenience init()
  • Convenience initializer for fill layers

    Since

    1.2

    Declaration

    Swift

    public convenience init(fillColor: UIColor)

    Parameters

    fillColor

    the fill color for this style

  • Convenience initializer for line layers

    Since

    1.2

    Declaration

    Swift

    public convenience init(lineColor: UIColor)

    Parameters

    lineColor

    the line color for this style

  • Convenience initializer for text layers, using the default font name

    Since

    1.2

    Declaration

    Swift

    public convenience init(textValue: String, fontSize: Double, fontColor: UIColor, fontStrokeColor: UIColor, maxTextWidth: Double)

    Parameters

    textValue

    the text value for this style

    fontSize

    the font size for this style

    fontColor

    the font color for this style

    fontStrokeColor

    the font stroke color for this style

    maxTextWidth

    the max text width for this style

  • Convenience initializer for icon layers

    Since

    1.2

    Declaration

    Swift

    public convenience init(iconName: String)

    Parameters

    iconName

    the icon name value for this details

  • Convenience initializer for layers that are hidden by default

    Since

    1.2

    Declaration

    Swift

    public convenience init(hidden: Bool)

    Parameters

    hidden

    true to set this layer to hidden

Public Methods

  • This is a convenience setter for objc clients since the optional fontStrokeWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setFontStrokeWidth(_ number: NSNumber)

    Parameters

    number

    the font stroke width

  • This is a convenience getter for objc clients since the optional fontStrokeWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    @objc(fontStrokeWidth)
    public func getFontStrokeWidth() -> NSNumber?

    Return Value

    The width of the font stroke, or nil if it isn’t set

  • This is a convenience setter for objc clients since the optional fontSize is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setFontSize(_ number: NSNumber)

    Parameters

    number

    the font size

  • This is a convenience getter for objc clients since the optional fontSize is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    @objc(fontSize)
    public func getFontSize() -> NSNumber?

    Return Value

    The font size, or nil if it isn’t set

  • This is a convenience setter for objc clients since the optional maxTextWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setMaxTextWidth(_ number: NSNumber)

    Parameters

    number

    the max text width

  • This is a convenience getter for objc clients since the optional maxTextWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    @objc(maxTextWidth)
    public func getMaxTextWidth() -> NSNumber?

    Return Value

    The max width for labeks, or nil if it isn’t set

  • This is a convenience setter for objc clients since the optional outlineMinZoom is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setOutlineMinZoom(_ number: NSNumber)

    Parameters

    number

    the min zoom for the outline

  • This is a convenience setter for objc clients since the optional outlineMaxZoom is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setOutlineMaxZoom(_ number: NSNumber)

    Parameters

    number

    the max zoom for the outline

  • This is a convenience setter for objc clients since the optional outlineMinWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setOutlineMinWidth(_ number: NSNumber)

    Parameters

    number

    the min width of the outline, which corresponds to the outlineMinZoom. (i.e. at the outlineMinZoom level, the width of the outline will be outlineMinWidth)

  • This is a convenience setter for objc clients since the optional outlineMaxWidth is not exposed to objc

    Since

    1.2

    Declaration

    Swift

    public func setOutlineMaxWidth(_ number: NSNumber)

    Parameters

    number

    the max width of the outline, which corresponds to the outlineMaxZoom. (i.e at the outlineMaxZoom level, the width of the outline will be outlineMaxWidth)