TGetMapDataSharedOptions: {
    analytics?: {
        baseUri?: string;
        externalId?: string;
        logEvents?: boolean;
        sendEvents?: boolean;
    };
    baseAuthUri?: string;
    baseUri?: string;
    environment?: ServiceEnvironment;
    fallbackToNavigatorLanguage?: boolean;
    language?: string;
    layoutId?: "draft";
    mapId: string;
    onMVFParsed?: (mvf: TMVF) => void;
    prefetchTokens?: boolean;
    search?: TSearchOptions;
    viewId?: string;
}

Options shared by every getMapData call regardless of authentication mode. Carries the target mapId and optional overrides such as environment, base URL, and language preferences.

Type declaration

  • Optionalanalytics?: {
        baseUri?: string;
        externalId?: string;
        logEvents?: boolean;
        sendEvents?: boolean;
    }

    Analytics configuration.

    • OptionalbaseUri?: string

      Custom base URI for analytics requests. If not provided, the default analytics endpoint will be used. Use the environment setting to switch environments.

    • OptionalexternalId?: string

      The externalId parameter attaches a custom tracking identifier to every analytics event sent during the session. This is useful for correlating Mappedin analytics data with an external system — for example, linking a map session back to a specific marketing campaign, CRM record, or third-party tracking platform.

    • OptionallogEvents?: boolean

      Whether to log analytics events.

      false
      
    • OptionalsendEvents?: boolean

      Whether to send analytics events to the server.

      false
      
  • OptionalbaseAuthUri?: string

    Optionally provide a custom base URL for authentication when obtaining an access token. Use the environment setting to switch environments.

  • OptionalbaseUri?: string

    Optionally provide a custom base URL for the Mappedin API request. Use the environment setting to switch environments

  • Optionalenvironment?: ServiceEnvironment

    set the target SDK environment

    'us'
    
    const mapData = getMapData({
    key: '',
    secret: '',
    environment: 'eu'
    })
  • OptionalfallbackToNavigatorLanguage?: boolean

    Whether to use browser's language settings as fallback if the supplied language code is not available.

    true
    
  • Optionallanguage?: string

    The language of the map data. The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check (EnterpriseVenue.languages) for available languages

  • OptionallayoutId?: "draft"

    Load draft (unpublished) enterprise map instead of the live version. Set to "draft" to fetch the latest unpublished changes. Leave unspecified to load the published live data.

    Requires an Enterprise API key. Only applicable to maps made in Mappedin CMS.

    undefined
    
  • mapId: string

    Mappedin map ID.

  • OptionalonMVFParsed?: (mvf: TMVF) => void

    Callback for when the Mappedin map data has been fetched and parsed as Mappedin Venue Format (MVF) data.

  • OptionalprefetchTokens?: boolean

    Fetch bearer and SAS tokens for the map ahead of time and keep them up to date in the background.

    true
    
  • Optionalsearch?: TSearchOptions
  • OptionalviewId?: string

    Load different view of mvf data based on configId