heremaps/harp.gl

"ThemedTileDecoder: cannot decode tile, as there is not style available" when using mapbox base map.

utkarsh2794 opened this issue · 4 comments

With Angular Framework integrated harp.gl with following data source:
const omvDataSource = new VectorTileDataSource({
baseUrl: "https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v7",
apiFormat: APIFormat.MapboxV4,
authenticationCode: environment.mapboxToken,
authenticationMethod: {
method: AuthenticationMethod.QueryString,
name: "access_token"
},
});

Api call for mapbox tiles succeds.

in docoder file:
VectorTileDecoderService.start();
GeoJsonTilerService.start();

no base map drawn in following message in console:
"ThemedTileDecoder: cannot decode tile, as there is not style available"

Hi @utkarsh2794 ,

For the basemap to be drawn, you will need a theme file containing the styles for the data. As harp.gl is working in a data-driven mode, the style file has to match the structure of the data.
Not sure, you added one of the available theme files to MapView.setTheme or in the constructors MapViewOptions?

Still, you might have to adjust the Theme.json file to find the data from the mapbox data.

Best
Frauke

Hi @FraukeF
I was using berlin_tilezen_effects_outlines.json theme which was working fine with here maps (https://vector.hereapi.com/v2/vectortiles/base/mc) . Do we have different themes for Mapbox base maps?

Hi @utkarsh2794,

yes, although the mapbox vector tiles use the same format as the HERE Vector Tiles, the data in the mapbox tiles is ordered with a different schema, in different layers, with other naming, the styles used for the HERE data (which is using the tilezen schema (https://github.com/tilezen/vector-datasource/blob/master/docs/layers.md), will probably not find styles for most of the layers in a mapbox vector tile.

@FraukeF Thanks for the info. Closing this issue!