question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Third party vector tiles not supported with v10

See original GitHub issue

Does anyone know, if this is simply not supported by mapbox anymore?

In our project, we rely on vector tiles from third party providers. Up to now, we are using pre v10 version of this repo and have a MapView component which renders customised styles, sourcing vector tiles from HERE.com (see below), which worked out nicely.

With v10 implementation, this does not work anymore it seems.

Environment

  • Mapbox (GL) implementation: v10
  • Mapbox (GL) version: 10.7.0
  • @rnmapbox/maps Version #main
  • Platform: Android
  • React Native Version 0.68.2
  • Platform OS: Android 11, 12
  • Device: e.g. Samsung Galaxy A03
  • Emulator/ Simulator: as well
  • Dev OS: OSX 12.5SOurce.1

Standalone component to reproduce

The component

<MapboxGL.MapView
        styleURL={getMapStyle(lightMode)}
        [...]
>

returning a style json such as:

const lightModeStyle = {
  version: 8,
  name: STYLE_NAME,
  metadata: {},
  sources: {
    omv: {
      type: 'vector',
      tiles: [
        'https://vector.hereapi.com/v2/vectortiles/base/mc/{z}/{x}/{y}/omv?apikey=<HERE_API_KEY>',
      ],
    },
  },
  glyphs: 'https://assets.vector.hereapi.com/fonts/{fontstack}/{range}.pbf',
  layers: [
    {
      id: 'background',
      type: 'background',
      paint: {
        'background-color': 'hsl(40, 0%, 78%)',
      },
     [...]

Observed behavior and steps to reproduce

After upgrading to v10 implementation of rnmapbox, loading of the custom styles fails with:

Mapbox error Map load failed: {type=style, message=Failed to load style: Expected URL scheme 'http' or 'https' 
but no colon was found, begin=3034414799} {"level": "error", "message": "Map load failed: 
{type=style, message=Failed to load style: Expected URL scheme 'http' or 'https' but no colon was found,
begin=3034414799}", "tag": "RCTMGLMapView"}

Expected behavior

Dumb comment … still: Tile source to be loaded as before

Notes / preliminary analysis

Searching the Mapbox Maps SDK (iOS and Android) docs for anything related to vector tiles or custom tile / vector sources, I can only find this or this, both referring to legacy SDK versions.

Nothing in the current (v10.7.0) docs. Looks like the only way to use custom tiles is to upload them to mapbox. Does anyone know this for sure? That would help already.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
veb-iokicommented, Dec 8, 2022

UPDATE I edited this statement :

~Seems that from v10 on, Mapbox enforces you to use their services.~

from my previous comment, because it can’t be true. We now saw that with the current state of rnmapbox (#main branch, v10 implementation), sourcing of custom vector tiles in a local style JSON (done as in the description) works on iOS.

This must be an issue on Android only.

~(We will investigate further and update here, but it will take time.)~ Late EDIT: what @SkySails commented => this got fixed 👏

1reaction
SkySailscommented, Oct 24, 2022

~I’m seeing the same thing. Did you find the reason @veb-ioki ?~

Nevermind, this seems to be solved in beta 48! 3rd party vector tiles work well on both Android and IOS now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

V10. Documentation and example clarification #2160 - GitHub
Environment Mapbox (GL) implementation: v10 @rnmapbox/maps #main Platform: iOS ... Third party vector tiles not supported with v10 #2163.
Read more >
Migrating to the modern Static Tiles API | Help - Mapbox docs
We notified the maintainers of third party plugins about the shutdown of Mapbox classic styles, but it is possible they have not migrated...
Read more >
Tippecanoe generated pbf stored on s3 visualised on mapbox-gl
Usually this shows up in the console with an error, something like "Unsupported record type 4". The tiles are being served just fine,...
Read more >
Layer type is not supported for vector tile packag...
Hi There, I'm trying to create a Vector Tile Package (.vtpk) in ArcGIS Pro 2.5 using ESRI's vector tile base map. Unfortunately, it...
Read more >
Introducing the Elasticsearch vector tile search API | Elastic Blog
Using the vector tile search API in third-party apps ... TMS or WMTS does not support request-body params in their GET-contracts, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found