Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Error: Error' message too generic to debug #6204

Closed
HeercoGrond opened this issue Feb 21, 2018 · 1 comment
Closed

'Error: Error' message too generic to debug #6204

HeercoGrond opened this issue Feb 21, 2018 · 1 comment

Comments

@HeercoGrond
Copy link

HeercoGrond commented Feb 21, 2018

mapbox-gl-js version: npm shows ^0.43.0

I'm trying to debug the loading of tiles from local device. Map is initialised as follows:

 this.map = new mapboxgl.Map({
        container: 'map', // container id
        style: mapboxStyle,
        center: [this.route.points[0].coordinate.lng, this.route.points[0].coordinate.lat],
        zoom: 18, // starting zoom
        dragRotate: false, // disable rotation
        transformRequest: (url, resourceType) => { 
                    console.log(url, resourceType);

            return {
             url: url,
             headers: { 'Access-Control-Allow-Origin' : '*'}
            }
     }
});

in mapboxStyle the tilesurl is changed to read something like this: file:///storage/emulated/0/Android/data/com.someCompany.someApp/files/active/tiles/{z}-{x}-{y}.vector.pbf

image

Unfortunately, all I get is the generic Error: Error message when listening for error calls and printing the error using console.log(e.error). I can't seem to find anywhere why this is and I think this might be an error in mapbox itself. The files exist and loading them works with a regular ajax request, just not using Mapbox.

Tested on Android 7.0 and Android 4.4 with Xwalk and regular webview

@jfirebaugh
Copy link
Contributor

This was fixed in #6126 and will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants