Private constructorStatic addStatic applyApplies a list of MPUserRoles to the SDK which will get the UserRole specific locations..
Static cacheStatic checkChecks if there is on device data (embedded/locally stored) available. For this to return true, data has to be available for all solution data types (MPLocation, MPBuilding...).
Returns true if data is available, otherwise returns false.
Static destroyClears the internal state of MapsIndoors SDK. Any loaded content is purged from memory.
Invoke load to start the SDK anew.
Static disabledisable SDK event logging through MapsIndoors. No logs will be created or send with this disabled.
By default it is enabled. But disabled in the CMS meaning logs will be created but never uploaded.
Static getRetrieves the API key that was set when calling load.
Will return empty string if no key has been set.
Static getReturns the list of MPUserRoles that is currently applied.
Static getStatic getGets a collection of all building for the current solution.
Static getGets a collection of all categories for the current solution.
Static getRetrieve the default display rule (fallback rule in case the main rule has not loaded/ has errors).
Static getStatic getStatic getRetrieve the display rule for the given location.
Requires that load has successfully executed.
Static getRetrieve the display rule with a given name.
Requires that load has successfully executed.
The ID of the DisplayRule
Static getStatic getRetrieves a MPLocation by its id.
Static getGets all locations (a list of MPLocation objects) for the current solution.
Static getRun a query on all available locations with a query and filter.
Static getRetrieves a list of MPLocations by externalIds.
Static getRetrieve the main display rule (can be configured in the CMS).
Requires that load has successfully executed.
Static getGets a collection of available map styles.
Static getGets the MPSolution for the current loaded api key.
Static getRetrieve the corresponding display rule for the given MPSolutionDisplayRule.
Requires that load has successfully executed.
Static getStatic getGets the User Roles for the current solution.
Note that role names are localized.
Static getGets a collection of all venues for the current solution.
Static isStatic isChecks whether the map provider in use can cache base-map tiles at all.
Base-map tiles are the outdoor map rendered underneath MapsIndoors, and they live in the map provider's own storage - separate from the MapsIndoors content cached by cacheData. Only the Mapbox provider can cache them; on the Google Maps provider this returns false and every other base-map caching call rejects with baseMapCachingNotSupported.
Check this before offering offline base maps in the UI, so an unsupported provider fails fast instead of once per venue.
True if base-map tiles can be cached.
Static isCheck if load has been called.
Static isStatic loadLoads content from the MapsIndoors solution matching the given API apiKey.
The key to the MapsIndoors solution.
Optional venues: String[] = nullAn optional list of venueIds as strings.
If the load fails for any reason, it will reject with a MPError.
Static removeStatic setEnables or disables base-map tile caching for the solution matching the given apiKey.
The flag only marks the solution, it downloads nothing - call synchronizeBaseMapTiles for that. Turning it off does not remove already-cached tiles either; those are reclaimed when the solution's cache is removed.
The flag is persisted, so it survives an app restart and only has to be set once.
It is a property of the solution, not of the map provider, so it is accepted and stored even where isBaseMapCachingSupported is false - on Google Maps this resolves successfully and sets a flag nothing can act on, and only synchronizeBaseMapTiles reports baseMapCachingNotSupported. Check isBaseMapCachingSupported first if you need to know before then. Rejecting here instead would make the same call behave differently per map provider, which is worse for code meant to run against either.
True to cache base-map tiles for this solution.
The key to the MapsIndoors solution.
If the solution is not managed, or the call fails for any other reason, it will reject with a MPError.
Static setSets the SDK's internal language.
The tag should be one the solution advertises - see getAvailableLanguages - and is
matched loosely: casing is ignored, and legacy region-only Chinese tags resolve to their
script, so zh-CN selects zh-Hans and zh-TW selects zh-Hant. Use
hasLanguage to check a tag before calling, or
resolveLanguage to turn a device locale into the exact tag the solution
publishes.
Until this is called, the SDK language is:
The returned boolean does not mean the same thing on both platforms, and an app should not branch on it without reading this:
false when the tag does not resolve against the solution's
available languages, and also when the SDK has no solution yet or is mid-
synchronizeContent. In that second case the change is queued and applied once
the SDK is ready, so false is not "it will never take effect".true for any
non-empty tag. An unsupported language is reconciled later, on the next solution fetch,
which reverts the SDK to the solution's default.A false here is therefore a reliable "this did not take effect" signal on Android only. To
confirm the language actually changed on either platform, read it back with
getLanguage.
An empty or whitespace-only tag resolves false without reaching the native SDK, matching
Android's own precondition. iOS would otherwise accept it and store an empty language.
A BCP-47 language tag, for example en, zh-Hans or zh-CN.
Static setSet a new position provider, or pass undefined to remove the current one.
Optional positonProvider: MPPositionProviderInterfaceStatic synchronizeDownloads and caches base-map tiles so the map can render without a network connection.
Covers every solution that base-map tile caching has been enabled for with setBaseMapTilesEnabled, unless apiKeys narrows it to a subset. This is a long-running network download that can take minutes - pass onProgress to follow it.
This runs independently of synchronizeContent and cacheData, which cache the MapsIndoors content itself. Both are needed for a fully offline map.
On iOS, a MapView has to have been mounted at least once first: the iOS SDK registers its base-map cache when it builds the map provider, and until then this rejects with baseMapCachingNotSupported even on Mapbox. Android has no such ordering requirement.
Run one call at a time. Progress arrives on a single channel carrying only the fraction, with nothing identifying the call, so two overlapping calls interleave their progress - including into a caller that passed no onProgress of its own. The default already covers every enabled solution in one call, so there is rarely a reason to fan out.
Optional onProgress: OnBaseMapCacheProgressListenerOptional listener called with the fraction completed, from 0.0 to 1.0. Not every map provider reports progress.
Optional apiKeys: string[]An optional list of solution API keys to narrow the operation to. Defaults to every solution with base-map tile caching enabled. An empty array narrows it to nothing and caches nothing, which is deliberately not the same as omitting the argument - a filter that matched no solutions should not turn into a download of all of them.
Rejects with a MPError if the map provider cannot cache base-map tiles (baseMapCachingNotSupported) or a download fails.
Static synchronizeGenerated using TypeDoc
Main class for accessing data in the MapsIndoors SDK.
Export