• Construct a new offline manager

  • Loads a new style package or updates the existing one.

    If a style package with the given id already exists, it is updated with the values provided to the given load options. The missing resources get loaded and the expired resources get updated.

    If there no values provided to the given load options, the existing style package gets refreshed: the missing resources get loaded and the expired resources get updated.

    A failed load request can be reattempted with another loadStylePack() call.

    If the style cannot be fetched for any reason, the load request is terminated. If the style is fetched but loading some of the style package resources fails, the load request proceeds trying to load the remaining style package resources.

    Important

    By default, users may download up to 750 tile packs for offline use across all regions. If the limit is hit, any loadRegion call will fail until excess regions are deleted. This limit is subject to change. Please contact Mapbox if you require a higher limit. Additional charges may apply.
  • Fetch an array of the existing style packages.

    Note

    The user-provided callbacks will be executed on a worker thread; it is the responsibility of the user to dispatch to a user-controlled thread.

  • Returns a style package by its id.

    Note

    The user-provided callbacks will be executed on a worker thread; it is the responsibility of the user to dispatch to a user-controlled thread.

  • Returns a style package’s associated metadata.

    The style package’s associated metadata that a user previously set.

  • Removes a style package.

    Removes a style package from the existing packages list. The actual resources eviction might be deferred. All pending loading operations for the style package with the given id will fail with Canceled error.