Classes
The following classes are available globally.
-
An
APIRequestis a class that is used to capture an asynchronous result from a HTTP request. This class will be called by the SDK when the result has completed, and acts as a way to communicate the data back to the client logic.Note
Internally
APIRequestwill capture the state of the request if the SDK client did not install a callback in-time. This avoid any race with the asynchronous request.See moreNote
All callbacks will always be invoked on the
mainapplication thread.Declaration
Swift
public class APIRequest<DataType> -
A Category is a collection of similar Locations, which may have parent or child categories. For example, you may have a Fashion category, which has a Men’s Fashion and Women’s Fashion category. A Men’s clothing store would belong to the Men’s Fashion category, but not necessarily be present in the Fashion category’s list of Locations.
See moreDeclaration
Swift
public class Category : Deserializable -
A Connection links two or more
See moreCoordinatetogether. For example, Stairs or an elevator.Declaration
Swift
public class Connection : Location, Indexed -
A coordinate represents a 3-dimensional position that is in reference to a a specific Map’s origin. A Coordinate is different from just a vector in the way that it is tagged to only pertain to a single map.
See moreDeclaration
Swift
public class Coordinate : Navigatable, Focusable, Indexed, Deserializableextension Coordinate: Hashableextension Coordinate: Position -
A location is something like a store or washroom on a map.
A location can also belong to zero or more Categories (Store, Jewelery Store, etc), and will be linked to zero or more Nodes and Polygons.
A location’s nodes can be on multiple maps, or in multiple non-adjacent places on the same map. For example, all washrooms at a given venue could belong to one Location, or a department store could live on multiple floors.
See moreDeclaration
Swift
open class Location : Deserializableextension Location: Navigatableextension Location: Equatableextension Location: Hashable -
A Map belonging to a given venue. Typically represents a certain floor. Give this to MapView to display to the user. The floor property can be used to determine the order of the floors (first, second, third, etc)
See moreDeclaration
-
MapView is a custom view designed to handle displaying Maps for a Venue. call
See moresetMap(Map)to display the first map.Declaration
Swift
public class MapView : UIView -
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:
See more
-
A pseudo class marker to identify what is or isn’t an
Element.This protocol should not be used as a 3rd party, as the actual mechanics of how
Elementinteract with the MapView is internal the SDK. This is added as a way to identify what is or isn’t anElementin the type system.Declaration
Swift
public class Element -
A
ImageOverlaywill overlay aUIImageon top of a Map. AnOverlayis always on top of other elements, it will always be rotated in such a way that it is facing theMapViewcamera. The Overlay scales keeping the size consistent regardless of how far away theMapViewCamera is.Note: an
ImageOverlaywill respect the alpha channel of the UIImage, so it can be used to do more sophisticated graphics on some areas.The
See moreImageOverlayalways tries to be a 1:1 pixel scale with the device’s screen. Meaning a high resolution image will end up much larger then an image that is a low resolution. Care should be taken in selecting the correctly scaled images.Declaration
Swift
public class ImageOverlay : Element -
A
Prismis a class that allows the creation of any type of prism. It requires a 2D list of points that will be used to build that path. If there areNpoints, there will beN+1Line segments as the last and the first point will always be joined.- Example:
let points = [ Vector2(0,1.2), Vector2(1.0,-1.2), Vector2(0,-0.8), Vector2(-1.0,-1.2) ] let prism = Prism( position: Vector3(50, 25, 0), heading: 0, points: points, height: 2, color: UIColor(red: 1.0, green: 0.29, blue: 0.03, alpha: 1.0) ) self.mapView.add(prism)The results in:
See more
-
A
TextOverlaywill overlay a UILabel on top of a Map. AnOverlayis always on top of other elements, it will always be rotated in such a way that it is facing the MapView camera. The Overlay scales keeping the size consistent regardless of how far away the MapView Camera is.Since a
See moreUILabelis used, it can be themed anyway a normal UILabel can be. By default aUILabeldoes not get drawn with a background. This can make it difficult to read over a map in some typefaces. It is recommended that you manually set a background color. The background color will always be used to fill the backdrop of theTextOverlay.Declaration
Swift
public final class TextOverlay : ImageOverlay -
The PathSolver is used to take a set of locations and create an ordered list of locations that is an efficent path though a venue.
This solver cannot just give the best solution, as this a brute force solver would run in O(N!) time, which is not resonable if the number is bigger then half a dozen items.
Instead of solving the problem all at once, the solver improves the solution continuously until a good enough solution is found.
To expediate this result for users, the solver returns results periodically as it finds a better solution then the one it currently has.
If the solver fails to improve it’s solution based on it’s internal huresitcs it will give up to save the users battery life.
See moreDeclaration
Swift
public class PathSolver -
The polygon class represents the 3D shape of a Location on a Map.
A Location would have zero or more Polygons associated with it. For example, a Washroom Location might have a few Polygons spread throughout the Venue for each one that exists, but a single store might just have one presence, and therefor one Polygon. Some locations just have a single point and only have Coordinates.
See moreDeclaration
Swift
public class Polygon : Navigatable, Focusable, Deserializableextension Polygon: Equatableextension Polygon: Hashable -
Venue is a specific place (like a mall) with one or more maps (typically representing different floors) and locations (stores, washrooms, elevators, etc).
Each Location is linked to:
- zero or more Polygons which represent its physical presence on the map
- zero or more nodes that represent entrances
- zero or more Categories that group several Locations together
A Venue can be in one of two states:
- As returned by getVenues() - When it’s initially pulled from the Mappedin API as part of a list of all venues your credentials have access to, it only contains basic information.
- As returned by getVenue() - When you retrieve the full details of a given venue, the locations, categories, maps, etc will be populated.
Declaration
Swift
open class Venueextension Venue: Hashableextension Venue: Equatable
View on GitHub
Classes Reference