Getting Locations by External ID

Last updated:

A method on MapsIndoors is available to retrieve locations by their externalId. This is only for exact matches and is not a part of the general search implementations, so must be specifically implemented.

The function on all 3 platforms functions similarly, returning an Array or List of Locations that match the supplied External ID strings.

Running the below snippet will return a List of MPLocations.

val locations = MapsIndoors.getLocationsByExternalIds(externalIds)
  1. Developing on the new Arm-based Apple Silicon (M1) Macs requires building and running on a physical iOS device or using an iOS simulator running iOS 13.7, e.g. iPhone 11. This is a temporary limitation in Google Maps SDK for iOS, and as such also a limitation in MapsIndoors, due to the dependency to Google Maps.
  2. Note: Due to a bug in CocoaPods it is necessary to include the post_install hook in your Podfile described in the PodFile post_install wiki.

Running the below snippet will return an Array of MPLocations.

MPLocationService.sharedInstance().getLocationsByExternalIds(externalIds)

Running the below snippet will return an Array of MPLocations.

locationsService.getLocationsByExternalId(externalIds)