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
Cylinder
Declaration
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
Coordinate
Declaration
Swift
public var map: Map? { get }
-
Only exists if the Overlay position was set with a
Coordinate
Declaration
Swift
public var coordinate: Coordinate? { get }
-
Initialize a Cylinder
Declaration
Swift
public init<PositionType: Position>(position: PositionType, diameter: Float, height: Float, color: UIColor)
Parameters
position
The location in a Map or Venue where this cylinder is. This may be a
Vector3
or aCoordinate
diameter
The diameter of the
Cylinder
in metersheight
The height of the
Cylinder
in meterscolor
What color the
Cylinder
will be draw with -
Set one or more of the
Cylinder
parameter’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
diameter
The desired diameter of the
Cylinder
in Metersheight
The desired height of the
Cylinder
in Meterscolor
The desired color of the
Cylinder
over
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set one or more of the
Cylinder
parameter’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
position
The desired position of the
Cylinder
in map space This will exist in every map use aCoordinate
for the position to make this show up on only one specific map.diameter
The desired diameter of the
Cylinder
in Metersheight
The desired height of the
Cylinder
in Meterscolor
The desired color of the
Cylinder
over
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set one or more of the
Cylinder
parameter’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
position
The desired position of the
Cylinder
This makes it appear in this spot only on the map associated with the Coordinate.diameter
The desired diameter of the
Cylinder
in Metersheight
The desired height of the
Cylinder
in Meterscolor
The desired color of the
Cylinder
over
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set the position to a locations
Deprecated:
Use
set
as 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
to
The desired position of the
Cylinder
This will exist in every map use aCoordinate
for the position to make this show up on only one specific map.over
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set the position to a locations
Deprecated:
Use
set
as 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
to
The desired position of the
Cylinder
, This makes it appear in this spot only on the map associated with the Coordinate.over
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set the diameter of the
Cylinder
Deprecated:
Use
set
as 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
diameter
The desired diameter of the
Cylinder
in Metersover
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set the height of the
Cylinder
, animated over a time frame.Deprecated:
Use
set
as 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
height
The height of the
Cylinder
in metersover
The time interval used to animate between the current look of the
Cylinder
to the one set here -
Set the color of the
Cylinder
, animated over a time frame.Deprecated:
Use
set
as 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
color
What color the
Cylinder
will be draw withover
The time interval used to animate between the current look of the
Cylinder
to the one set here