MapView
public class MapView : UIView
                MapView is a custom view designed to handle displaying Maps for a Venue.
call setMap(Map) to display the first map.
- 
                  
                  
the
MapViewDelegatethat will be sent events from the MapView.Declaration
Swift
public var delegate: MapViewDelegate? - 
                  
                  
The map that should be currently displayed
Declaration
Swift
public var activeMap: Map? { get set } - 
                  
                  
When set the store labels will be drawn over top of venues. The store labels will always be rendered using
storeLabelDefaultFont.This property does not override any per-
Polygonsettings of store labels.Defaults to:
falseDeclaration
Swift
public var storeLabelsEnable: Bool { get set } - 
                  
                  
Specific the font to be used by default (ignoring any per-
polygonoverrides).Defaults to: UIFontTextStyle.body
Declaration
Swift
public var storeLabelsDefaultFont: UIFontDescriptor { get set } - 
                  
                  
Specify the color to use for store label text. This will be used if no other color has been selected for a polygon.
Defaults to: UIColor.black
Declaration
Swift
public var storeLablesDefaultColor: UIColor { get set } - 
                  
                  
defines a camera constraint that is applied when a user drags the camera
Declaration
Swift
public var cameraBounds: CameraBounds - 
                  
                  
Add an element to be rendered into the MapView
Declaration
Swift
public func add(_ element: Element) - 
                  
                  
Remove an element from being rendered by the MapeView
Declaration
Swift
public func remove(_ element: Element) - 
                  
                  
Changes the mapview background color
Declaration
Swift
public func setBackgroundColor(color: UIColor)Parameters
colorColor to be set for the background
 - 
                  
                  
Changes the polygon color, animated over some time. Use this to highlight polygons.
Declaration
Swift
public func setColor(of polygon: Polygon, to color: UIColor, over animationInterval: TimeInterval)Parameters
polygonPolygon to have its color changed
colorColor to be set for the polygon
animationIntervalAnimation time in seconds
 - 
                  
                  
Changes the polygon height over time. Can be useful as part of setColor to highlight a polygon.
Declaration
Swift
public func setHeight(of polygon: Polygon, to height: Float, over animationInterval: TimeInterval)Parameters
polygonPolygon to have its height changed
heightHeight to be set for the polygon
animationIntervalAnimation time in seconds.
 - 
                  
                  
set the color of a an polygon,
Declaration
Swift
public func setStoreLabelColor(of polygon: Polygon, to: UIColor) - 
                  
                  
resets the color of a polygon back to the default color
Declaration
Swift
public func resetStoreLabelColor(of polygon: Polygon) - 
                  
                  
Sets the MapView to display a specific map associated with the current venue.
This will also display any Element objects that fall onto the new map.
Note: Any Elements that existed that were not map specific will be present after a new map is loaded.
Declaration
Swift
public func setMap(_ map: Map)Parameters
mapThe map to display
 - 
                  
                  
Returns a set of polygons currently in view of the camera
Declaration
Swift
public func polygonsInView() -> Set<Polygon> - 
                  
                  
Returns a set of locations that have polygons currently in view of the camera
Declaration
Swift
public func locationsInView() -> Set<Location> - 
                  
                  
Returns true if polygon is currently in view of the camera
Declaration
Swift
public func isInView(polygon: Polygon) -> BoolParameters
polygonthe polygon to test against the camera.
 - 
                  
                  
Returns true if location has polygons currently in view of the camera
Declaration
Swift
public func isInView(location: Location) -> BoolParameters
locationthe location to test against the camera.
 - 
                  
                  
What direction, in Radians, is the Camera looking. From a bird eye view, A value of 0 would be North, and value of Pi / 2 would be east. 2 * Pi would be North again.
Declaration
Swift
public var cameraHeading: Radians { get } - 
                  
                  
How the Camera is tilted down to see the Map view
Declaration
Swift
public var cameraTilt: Radians { get } - 
                  
                  
Given the following object that is conforms to the
Focusableprotocol frame that object in the current Camera view.Note
The animation will stack if applied with other animation, so calling this function back to back will cause multiple animations
Declaration
Swift
public func frame(_ focusable: Focusable, padding: Float = 0, heading: Radians, tilt: Radians, over animationInterval: TimeInterval, minimumSize: Float = 25)Parameters
focusableAn object that implemented the
Focusableprotocol This will be used to frame the bounds of the CamerapaddingAmount of visual space around what is being fitted into the camera
headingWhat direction in Radians the camera should be pointed at the focusable object.
0Being from the North andPi / 2would be east.tiltWhat direction the camera should be tilted down toward the map.
0Would be level, andPi / 2would be directly overhead.overA duration in which to animate the transition between the current Camera position and the target camera position.
minimumSizeSome small objects will be too small to see on the map if you were to frame a single point for example. This parameter will control how tightly the camera is allowed to zoom into said point. If the point is smaller then the size, this API will treat it as an object that is at least a
minimumSizesized object in all axies. Defaults to 25. - 
                  
                  
Given the following objects that is conforms to the
Focusableprotocol frame that object in the current Camera view.Note
The animation will stack if applied with other animation, so calling this function back to back will cause multiple animations
Declaration
Swift
public func frame(_ focusable: [Focusable], padding: Float = 0, heading: Radians, tilt: Radians, over animationInterval: TimeInterval, minimumSize: Float = 25)Parameters
focusableAn array of object that implemented the
Focusableprotocol This will be used to frame the bounds of the CamerapaddingAmount of visual space around what is being fitted into the camera
headingWhat direction in Radians the camera should be pointed at the focusable object.
0Being from the North andPi / 2would be east.tiltWhat direction the camera should be tilted down toward the map.
0Would be level, andPi / 2would be directly overhead.overA duration in which to animate the transition between the current Camera position and the target camera position.
minimumSizeSome small objects will be too small to see on the map if you were to frame a single point for example. This parameter will control how tightly the camera is allowed to zoom into said point. If the point is smaller then the size, this API will treat it as an object that is at least a
minimumSizesized object in all axis. Defaults to 25. - 
                  
                  
Grab the CLLocationCoordinate2D from a tap on the map *
Declaration
Swift
func clLocationCoordinate2DFromTap(_ touches: Set<UITouch>) -> CLLocationCoordinate2D? 
View on GitHub
        MapView Class Reference