This is the documentation of version 1.0.0-rc.4. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Function servesGeopoliticalView

    • Tells whether the SDK sends view to that API, so you can label a result with the view its request carried.

      Parameters

      • view:
            | "Unified"
            | "AE"
            | "AR"
            | "BN"
            | "CL"
            | "CN"
            | "DZ"
            | "IL"
            | "IN"
            | "KR"
            | "MA"
            | "MY"
            | "PH"
            | "PK"
            | "RS"
            | "RU"
            | "TR"
            | "TW"
            | "US"
            | "VN"
      • api: GeopoliticalViewAPI

      Returns boolean

      The map and the services decide what to send from this same predicate. A request without its view gets the API's default, as GeopoliticalView describes.

      const place = await reverseGeocode({ position, geopoliticalView: 'US' });
      // false: the address is in the default view for the caller's country
      const label = servesGeopoliticalView('US', 'reverseGeocoding') ? 'US' : 'Default view';