Governs the topmost settings for a MapsIndoors solution.

Export

Hierarchy

  • MPSolution

Constructors

  • Private

    Creates an instance of MPSolution.

    Parameters

    • id: string
    • name: string
    • solutionConfig: MPSolutionConfig
    • defaultLanguage: string
    • availableLanguages: string[]
    • modules: string[]
    • Optional locationTemplates: string
    • Optional customerId: string
    • Optional mapClientUrl: string
    • Optional types: MPPOIType[]

    Returns MPSolution

Properties

availableLanguages: string[]
customerId?: string
defaultLanguage: string
id: string
locationTemplates?: string
mapClientUrl?: string
modules: string[]
name: string
solutionConfig: MPSolutionConfig
types?: MPPOIType[]

Methods

  • Check if the solution supports a language.

    Matching follows BCP-47 / RFC 4647 rather than string equality, so the tag does not have to be spelled exactly the way the CMS spells it. Casing is ignored (zh-hant matches zh-Hant), the ICU underscore form is accepted (zh_Hans), legacy region-only Chinese tags resolve to their script (zh-CN matches zh-Hans, zh-TW matches zh-Hant), and a more specific tag falls back to a less specific one (en-US matches en).

    Deliberately conservative about ambiguity: bare zh does not match a solution that advertises only zh-Hans and zh-Hant, because there is no way to tell which script is wanted. Pass the script explicitly in that case.

    true means the tag is safe to pass to MapsIndoors.setLanguage. false is not a guarantee that setLanguage will reject it - see that method for what its boolean means on each platform.

    Parameters

    • Optional language: string

      A BCP-47 language tag, for example en, zh-Hans or zh-CN.

    Returns boolean

  • Check whether room extrusions are available for select map providers.

    Returns boolean

  • Check whether wall extrusions are available for select map providers.

    Returns boolean

  • Check whether the 22nd zoom level is available for select map providers.

    Returns boolean

  • Parses a venue ID and a location ID to create a mapClientUrl.

    Parameters

    • venueId: string
    • locationId: string

    Returns Promise<string>

    Async

  • Resolve a language tag to the exact tag this solution advertises.

    The companion to hasLanguage, for when a yes or no is not enough: given a device locale, this returns the tag to hand to MapsIndoors.setLanguage, spelled the way the CMS spells it. resolveLanguage("zh-Hant-TW") returns "zh-Hant" for a solution that publishes it.

    Parameters

    • Optional language: string

      A BCP-47 language tag, for example en, zh-Hans or zh-CN.

    Returns string

    The matching advertised tag, or undefined if there is none.

Generated using TypeDoc