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 as MPIMaps, MPILocations, MPIPolygons, MPINodes, MPIVortexes, MPIMapGroups, can be accessed through MPIData.
  • An MPIVenue describing the venue

    Declaration

    Swift

    public var venue: MPIVenue
  • 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 venue

    Note

    every geographical area covered by every MPILocation in a venue

    Declaration

    Swift

    public var polygons: [MPIPolygon]
  • An array of MPINodes in a venue

    Note

    specific positions anchored to an MPIMap

    Declaration

    Swift

    public var nodes: [MPINode]
  • 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 an MPIData object where data can be accessed

    Declaration

    Swift

    public static func fromVenueResponse(response: MPIVenueResponse) -> MPIData?

    Parameters

    response

    an MPIVenueResponse object that can be converted into an MPIData object

    Return 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 accessed

    Declaration

    Swift

    public static func fromVenueResponse(response: String) -> MPIData?

    Parameters

    response

    a venue response string that can be converted into an MPIData object

    Return 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