Cylinder
A vertical cylinder that can be displayed in the MapView. This can be used
to indicate a object of intrest, or a person in the map.
- Example: This will create an Cylinder and place it in the center of the map
// initialize this element, and set it to the origin
let cylinder = Cylinder(
position: Vector3(0, 0, 0),
diameter: 4,
height: 4,
color: UIColor(red: 1.0, green: 0.29, blue: 0.03, alpha: 1.0)
)
// Add the element to the current Map View
myMapView.add(cylinder)
The results in:

-
The current diameter of the
Cylinder, in MetersDeclaration
Swift
public fileprivate(set) var diameter: Float { get } -
The current height of the
Cylinder, in MetersDeclaration
Swift
public fileprivate(set) var height: Float { get } -
The current color of the
CylinderDeclaration
Swift
public fileprivate(set) var color: UIColor { get } -
The position vector of the Overlay
Declaration
Swift
public var vector: Vector3 { get } -
Which Map this Overlay belongs to, this will only exist if the ImageOverlay’s position was set using a
CoordinateDeclaration
Swift
public var map: Map? { get } -
Only exists if the Overlay position was set with a
CoordinateDeclaration
Swift
public var coordinate: Coordinate? { get } -
Initialize a Cylinder
Declaration
Swift
public init<PositionType: Position>(position: PositionType, diameter: Float, height: Float, color: UIColor)Parameters
positionThe location in a Map or Venue where this cylinder is. This may be a
Vector3or aCoordinatediameterThe diameter of the
Cylinderin metersheightThe height of the
Cylinderin meterscolorWhat color the
Cylinderwill be draw with -
Set one or more of the
Cylinderparameter’s The parameter’s will be set in a single animationIntervalDeclaration
Swift
public func set(diameter: Float? = nil, height: Float? = nil, color: UIColor? = nil, over animationInterval: TimeInterval)Parameters
diameterThe desired diameter of the
Cylinderin MetersheightThe desired height of the
Cylinderin MeterscolorThe desired color of the
CylinderoverThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set one or more of the
Cylinderparameter’s The parameter’s will be set in a single animationIntervalDeclaration
Swift
public func set(position: Vector3, diameter: Float? = nil, height: Float? = nil, color: UIColor? = nil, over animationInterval: TimeInterval)Parameters
positionThe desired position of the
Cylinderin map space This will exist in every map use aCoordinatefor the position to make this show up on only one specific map.diameterThe desired diameter of the
Cylinderin MetersheightThe desired height of the
Cylinderin MeterscolorThe desired color of the
CylinderoverThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set one or more of the
Cylinderparameter’s The parameter’s will be set in a single animationIntervalDeclaration
Swift
public func set(position: Coordinate, diameter: Float? = nil, height: Float? = nil, color: UIColor? = nil, over animationInterval: TimeInterval)Parameters
positionThe desired position of the
CylinderThis makes it appear in this spot only on the map associated with the Coordinate.diameterThe desired diameter of the
Cylinderin MetersheightThe desired height of the
Cylinderin MeterscolorThe desired color of the
CylinderoverThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set the position to a locations
Deprecated:
Use
setas it is functionally equivalent but also follows Apple’s named conventions.Declaration
Swift
@available(*, deprecated, message: "Functionally equivalent to the `Cylinder.set` function, and does not\nconform to the Apple's standard named conventions.") public func setPosition(to position: Vector3, over animationInterval: TimeInterval)Parameters
toThe desired position of the
CylinderThis will exist in every map use aCoordinatefor the position to make this show up on only one specific map.overThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set the position to a locations
Deprecated:
Use
setas it is functionally equivalent but also follows Apple’s named conventions.Declaration
Swift
@available(*, deprecated, message: "Functionally equivalent to the `Cylinder.set` function, and does not\nconform to the Apple's standard named conventions.") public func setPosition(to position: Coordinate, over animationInterval: TimeInterval)Parameters
toThe desired position of the
Cylinder, This makes it appear in this spot only on the map associated with the Coordinate.overThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set the diameter of the
CylinderDeprecated:
Use
setas it is functionally equivalent but also follows Apple’s named conventions.Declaration
Swift
@available(*, deprecated, message: "Functionally equivalent to the `Cylinder.set` function, and does not\nconform to the Apple's standard named conventions.") public func setDiameter(to diameter: Float, over animationInterval: TimeInterval)Parameters
diameterThe desired diameter of the
Cylinderin MetersoverThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set the height of the
Cylinder, animated over a time frame.Deprecated:
Use
setas it is functionally equivalent but also follows Apple’s named conventions.Declaration
Swift
@available(*, deprecated, message: "Functionally equivalent to the `Cylinder.set` function, and does not\nconform to the Apple's standard named conventions.") public func setHeight(to height: Float, over animationInterval: TimeInterval)Parameters
heightThe height of the
Cylinderin metersoverThe time interval used to animate between the current look of the
Cylinderto the one set here -
Set the color of the
Cylinder, animated over a time frame.Deprecated:
Use
setas it is functionally equivalent but also follows Apple’s named conventions.Declaration
Swift
@available(*, deprecated, message: "Functionally equivalent to the `Cylinder.set` function, and does not\nconform to the Apple's standard named conventions.") public func setColor(to color: UIColor, over animationInterval: TimeInterval)Parameters
colorWhat color the
Cylinderwill be draw withoverThe time interval used to animate between the current look of the
Cylinderto the one set here
View on GitHub
Cylinder Class Reference