watergis/mapbox-gl-legend

Errors when loading sprites

Closed this issue · 5 comments

The plugin seems to working correctly but is giving these errors when loading sprites. When I comment out lines 261, 262 in the file dist/index.js the errors stop.

image
image

@SamiAlavi Thank you for the issue. I haven’t tested sprite url for Mapbox studio in this plugin because I am self hosting sprite.
You may comment out these two lines in order to stop errors, but it is not permanent solution. These lines are necessary to show some symbol icons.

@SamiAlavi I fixed this bug in this PR. Could you check feature/adopt4mapboxstyleurl branch whether it can work in your environment? If it can work, I will merge and release as new version.

The error is still there. I checked the value of accessToken being used in dist/index.js and it was null. When I manually set my accessToken, then no errors came. Hence, I think the accessToken will have to be passed in the constructor.

image

@SamiAlavi this issue might be the same with mapbox-gl-export. let me think how I can fix it for v2 users.

@SamiAlavi I think the issue was resolved, so I merged and released it as v1.1.4 although there is still an issue of accesstoken for your v2 environment.