MPIData
public class MPIData : Codable
MPIData
represents the data received when loading a specific venue. Venue is a spceific place (example: a mall).
Note
All core aspects of the venue, such asMPIMaps
, MPILocations
, MPIPolygons
, MPINodes
, MPIVortexes
, MPIMapGroups
, can be accessed through MPIData
.
-
An array of
MPIMaps
specific to a venue- Example: different floors
Declaration
Swift
public var maps: [MPIMap]
-
An array of
MPILocations
in a venue- Example: stores, washrooms, banks…
Declaration
Swift
public var locations: [MPILocation]
-
An array of
MPICategories
in a venue- Example: clothing, food and drink, etc…
Declaration
Swift
public var categories: [MPICategory]
-
An array of
MPIPolygons
in a venueNote
every geographical area covered by everyMPILocation
in a venueDeclaration
Swift
public var polygons: [MPIPolygon]
-
An array of
MPIVortexes
in a venue- Example: elevators, stairs, escalators…
Declaration
Swift
public var vortexes: [MPIVortex]
-
An array of
MPIMapGroups
in a venue- Example: different floors of a single building
Declaration
Swift
public var mapGroups: [MPIMapGroup]
-
The ranking data for a venue
Declaration
Swift
public var rankings: MPIRankings?
-
This is a static method that converts an
MPIVenueResponse
object into anMPIData
object where data can be accessedDeclaration
Swift
public static func fromVenueResponse(response: MPIVenueResponse) -> MPIData?
Parameters
response
an
MPIVenueResponse
object that can be converted into anMPIData
objectReturn Value
an optional
MPIData
(returns nil if the conversion fails) -
This is a static method that converts an venue response string into an
MPIData
object where data can be accessedDeclaration
Swift
public static func fromVenueResponse(response: String) -> MPIData?
Parameters
response
a venue response string that can be converted into an
MPIData
objectReturn Value
an optional
MPIData
(returns nil if the conversion fails) -
This is a required initialization of
MPIData
to populate the core aspects including maps, locations, polygons, nodes, vortexes, and map groups correctly.Declaration
Swift
public required init(from decoder: Decoder) throws