Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Creating an OfflineTilePyramidRegionDefinition crashes with asset:// URL #5271

Closed

Description

@rm3dbeckers

We've recently tested the offline download on Android and although it looks like the mapView itself accepts styleURLs looking like "asset://style.json" (they load and the tiles are being requested correctly), but the class OfflineTilePyramidRegionDefinition only seems to accept styleUrls of the form "mapbox://styles/mapbox/streets-v9". styleURLs pointing into the assets seem to later cause an error like getHost() called on null reference (or something along that line) and then result in a termination from within the mapbox-gl.so

Activity

  1. jfirebaugh commented on Jun 7, 2016

    @jfirebaugh
    Contributor

    asset:// URLs are not supported for offline. You'll need to use a mapbox:// URL, or have the style hosted somewhere else and use a regular URL.

    That said, the expected behavior is an error message, not a crash. Leaving this issue open to investigate that problem.

  2. added
    Android
    on Jun 7, 2016
  3. changed the title [-]Android, Offline: Offline download with style in assets folder terminates the app[/-] [+]Creating an OfflineTilePyramidRegionDefinition crashes with asset:// URL[/+] on Jun 7, 2016
  4. glegrain commented on Aug 9, 2016

    @glegrain

    Hi, I am currently having the same issue on iOS. mapView accepts asset:// URLs but MGLTilePyramidOfflineRegion does not allow local file URL.

    Looking at the MGLTilePyramidOfflineRegion documentation and code:

    Relative file URLs cannot be used as offline style URLs.

    Why is that?

  5. added
    Core
    on Jan 4, 2018
  6. jussirantala commented on Mar 14, 2018

    @jussirantala

    Why is this? If I want to serve offline tiles, I need to run a http server on the phone...

  7. stale commented on Oct 27, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  8. added
    archived
    on Oct 27, 2018
  9. stale commented on Dec 6, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidCorearchivedoffline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions