MPMapControl

@interface MPMapControl : NSObject

Convenience class for setting up a Google map with MapsIndoors venues, buildings, locations and other map content.

  • Delegate object containing data events

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<MPMapControlDelegate> delegate;

    Swift

    weak var delegate: MPMapControlDelegate! { get set }
  • Provides the contextual information needed for setting up a map with specific MapsPeople site data

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPAppData *appData;

    Swift

    var appData: MPAppData! { get set }
  • Custom floor selector for the map to use. When provided, the MapControl will not create a floor selector control autonomously.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) id<MPFloorSelectorProtocol>
        customFloorSelector;

    Swift

    var customFloorSelector: MPFloorSelectorProtocol! { get set }
  • Floor selector UI element.

    If a custom floor selector is not provided (@sa customFloorSelector), MPMapControl will create a default floor selector. If you need a customized floor selector beyond what MPFloorSelectorControl provides, or need finer control over location and visibility of the floor selector, a custom floor selector can be provided to the MapControl using the MPFloorSelectorControl property.

    May be nil if a custom floor selector has been provided.

    Declaration

    Objective-C

    @property (readonly, atomic) MPFloorSelectorControl *floorSelector;

    Swift

    var floorSelector: MPFloorSelectorControl! { get }
  • Hide floor selector UI element. Only applies to default floor selector; if a custom floor selector is provided, the MapControl is not repsonsible for it’s visibility.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL floorSelectorHidden;

    Swift

    var floorSelectorHidden: Bool { get set }
  • Location info-snippet UI element.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPInfoSnippetView *infoSnippet;

    Swift

    var infoSnippet: MPInfoSnippetView! { get set }
  • Routing UI element.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPRoutingControl *routingControl;

    Swift

    var routingControl: MPRoutingControl! { get set }
  • Online tile layers.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSMutableDictionary *layers;

    Swift

    var layers: NSMutableDictionary! { get set }
  • Offline tile layers.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSMutableDictionary *offlineLayers;

    Swift

    var offlineLayers: NSMutableDictionary! { get set }
  • Latest routing query result.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPRoute *currentRoute;

    Swift

    var currentRoute: MPRoute! { get set }
  • Load indicator that will show up on the map when setting up offline maps.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPLoadIndicator *loader;

    Swift

    var loader: MPLoadIndicator! { get set }
  • The buildings that belong to this map control.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPBuildingDataset *buildings;

    Swift

    var buildings: MPBuildingDataset! { get set }
  • The solution that belong to this map control.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MPSolution *solution;

    Swift

    var solution: MPSolution! { get set }
  • The venues that belong to this map control.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MPVenueCollection *venueCollection;

    Swift

    var venueCollection: MPVenueCollection! { get set }
  • The current building in focus.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPBuilding *currentBuilding;

    Swift

    var currentBuilding: MPBuilding! { get set }
  • The dataset containing current locations.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MPLocationDataset *locationData;

    Swift

    var locationData: MPLocationDataset! { get set }
  • map

    The Google map reference.

    Declaration

    Objective-C

    @property (nonatomic, strong) GMSMapView* map
  • The venue name, at which the map should target its view.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSString *venue;

    Swift

    var venue: String! { get set }
  • The solution id, used for fetching venue/routing data.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *solutionId;

    Swift

    var solutionId: String! { get }
  • A reference to the google map delegate.

    Declaration

    Objective-C

    @property (readwrite, atomic) id GMSMapViewDelegate;

    Swift

    weak var gmsMapViewDelegate: AnyObject! { get set }
  • The current floor.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSNumber *currentFloor;

    Swift

    var currentFloor: NSNumber! { get set }
  • The offline flag (default is false/online).

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) BOOL offline;

    Swift

    var offline: Bool { get set }
  • Whether or not to hide all map locations. Default is NO

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL mapLocationsHidden;

    Swift

    var mapLocationsHidden: Bool { get set }
  • The current camera position.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) int *currentCameraPosition;

    Swift

    var currentCameraPosition: UnsafeMutablePointer
  • Locations provider.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) id<MPLocationsProvider> locationsProvider;

    Swift

    var locationsProvider: MPLocationsProviderProtocol! { get set }
  • Routing provider.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPRoutingProvider *routingProvider;

    Swift

    var routingProvider: MPRoutingProvider! { get set }
  • Solution provider.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPSolutionProvider *solutionProvider;

    Swift

    var solutionProvider: MPSolutionProvider! { get set }
  • Venue provider.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPVenueProvider *venueProvider;

    Swift

    var venueProvider: MPVenueProvider! { get set }
  • Position provider.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSArray *positionProviders;

    Swift

    var positionProviders: [Any]! { get set }
  • Current user location.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MPPositionIndicator *currentPosition;

    Swift

    var currentPosition: MPPositionIndicator! { get set }
  • Current route origin location.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPLocation *currentRouteOrigin;

    Swift

    var currentRouteOrigin: MPLocation! { get set }
  • Current route destination location.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) MPLocation *currentRouteDestination;

    Swift

    var currentRouteDestination: MPLocation! { get set }
  • Current single location selection.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MPLocation *selectedLocation;

    Swift

    var selectedLocation: MPLocation! { get set }
  • Current location search result.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSArray *searchResult;

    Swift

    var searchResult: [Any]! { get set }
  • Current language.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSString *language;

    Swift

    var language: String! { get set }
  • Building locations.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) NSArray *buildingLocations;

    Swift

    var buildingLocations: [Any]! { get set }
  • Initialize a MPMapControl object with given map. - parameter: map The map to build the map control on.

    Declaration

    Objective-C

    - (id)initWithMap:(id)map;

    Swift

    init!(map: Any!)

    Parameters

    map

    The map to build the map control on.

  • Setup the venue map with given providers. - parameter: locationsProvider The locations provider from which the MapControl is fetching its location data. - parameter: venueProvider The venue provider from which the MapControl is fetching its venue data. - parameter: routingProvider The routing provider to which the MapControl is performing its route requests. - parameter: appDataProvider The app data provider from which the MapControl is fetching app data, such as location display rules and location labelling.

    Declaration

    Objective-C

    - (void)setupMapWith:(MPLocationsProvider *)locationsProvider
                  venues:(MPVenueProvider *)venueProvider
                 routing:(MPRoutingProvider *)routingProvider;

    Swift

    func setupMap(with locationsProvider: MPLocationsProvider!, venues venueProvider: MPVenueProvider!, routing routingProvider: MPRoutingProvider!)

    Parameters

    locationsProvider

    The locations provider from which the MapControl is fetching its location data.

    venueProvider

    The venue provider from which the MapControl is fetching its venue data.

    routingProvider

    The routing provider to which the MapControl is performing its route requests.

    appDataProvider

    The app data provider from which the MapControl is fetching app data, such as location display rules and location labelling.

  • Setup the venue map with default providers based on given solution id (only venues). - parameter: solutionId The MapsPeople solution id.

    Declaration

    Objective-C

    - (void)setupMapWith:(NSString *)solutionId;

    Swift

    func setupMap(with solutionId: String!)

    Parameters

    solutionId

    The MapsPeople solution id.

  • Setup the venue map with default providers based on given solution id (venues, locations and routing if accessible). - parameter: solutionId The MapsPeople solution id. - parameter: venueName The MapsPeople site id, used for locations and routing.

    Declaration

    Objective-C

    - (void)setupMapWith:(NSString *)solutionId site:(NSString *)venueName;

    Swift

    func setupMap(with solutionId: String!, site venueName: String!)

    Parameters

    solutionId

    The MapsPeople solution id.

    venueName

    The MapsPeople site id, used for locations and routing.

  • Setup the venue map with default providers based on given solution id (venues, locations and routing if accessible). - parameter: solutionId The MapsPeople solution id. - parameter: venueName The MapsPeople site id, used for locations and routing. - parameter: locationsProvider The locations provider from which the MapControl is fetching its location data. - parameter: venueProvider The venue provider from which the MapControl is fetching its venue data. - parameter: routingProvider The routing provider to which the MapControl is performing its route requests. - parameter: appDataProvider The app data provider from which the MapControl is fetching app data, such as location display rules and location labelling.

    Declaration

    Objective-C

    - (void)setupMapWith:(NSString *)solutionId
                    site:(NSString *)venueName
               locations:(MPLocationsProvider *)locationsProvider
                  venues:(MPVenueProvider *)venueProvider
                 routing:(MPRoutingProvider *)routingProvider;

    Swift

    func setupMap(with solutionId: String!, site venueName: String!, locations locationsProvider: MPLocationsProvider!, venues venueProvider: MPVenueProvider!, routing routingProvider: MPRoutingProvider!)

    Parameters

    solutionId

    The MapsPeople solution id.

    venueName

    The MapsPeople site id, used for locations and routing.

    locationsProvider

    The locations provider from which the MapControl is fetching its location data.

    venueProvider

    The venue provider from which the MapControl is fetching its venue data.

    routingProvider

    The routing provider to which the MapControl is performing its route requests.

    appDataProvider

    The app data provider from which the MapControl is fetching app data, such as location display rules and location labelling.

  • Get the location that wraps the given marker.

    Declaration

    Objective-C

    - (MPLocation *)getLocation:(id)marker;

    Swift

    func getLocation(_ marker: Any!) -> MPLocation!
  • Get location by string id reference.

    Declaration

    Objective-C

    - (MPLocation *)getLocationById:(NSString *)idString;

    Swift

    func getLocationById(_ idString: String!) -> MPLocation!
  • Execute routing from one given to another given location

    Declaration

    Objective-C

    - (void)routingFrom:(MPLocation *)from
                     to:(MPLocation *)to
                     by:(NSString *)travelMode
                  avoid:(NSArray *)restrictions
                 depart:(NSDate *)departureTime
                 arrive:(NSDate *)arrivalTime;

    Swift

    func routing(from: MPLocation!, to: MPLocation!, by travelMode: String!, avoid restrictions: [Any]!, depart departureTime: Date!, arrive arrivalTime: Date!)
  • Show a given array of locations. The display will override any zoom level condition made from display rules. Clear the locations by calling again with [showLocations:nil fitBounds:NO]

    Declaration

    Objective-C

    - (void)showSearchResult:(BOOL)fitBounds;

    Swift

    func showSearchResult(_ fitBounds: Bool)
  • Add a location display rule - you need to know the categories applied to the map locations The display rule name corresponds to the location category we want the rule to apply for Adding a rule with name nil, will apply generally to all categories Adding a rule with a name, will override a more general rule

    Declaration

    Objective-C

    - (void)addDisplayRule:(MPLocationDisplayRule *)rule;

    Swift

    func add(_ rule: MPLocationDisplayRule!)
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface MPMapControl : NSObject