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

Mapbox usage in tutorial/context-api is broken #261

Closed
jeroenheijmans opened this issue Jan 3, 2022 · 3 comments
Closed

Mapbox usage in tutorial/context-api is broken #261

jeroenheijmans opened this issue Jan 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@jeroenheijmans
Copy link
Contributor

The page at https://svelte.dev/tutorial/context-api is usable, but broken: it does not show any map at all in the rendered output.

Here's what I get on the initial load:

Console:

VM767:845 Uncaught (in promise) ReferenceError: map is not defined
VM767:513 GET https://api.mapbox.com/styles/v1/mapbox/streets-v9?access_token=undefined 401 (Unauthorized)
VM765 about:srcdoc:164 Error: Unauthorized: you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes

Renders as:

screenshot of tutorial page and errors, and no map

And after using the "Show me" button:

Console:

VM768:519 GET https://api.mapbox.com/styles/v1/mapbox/streets-v9?access_token=undefined 401
VM765 about:srcdoc:164 Error: Unauthorized: you may have provided an invalid Mapbox access

Screenshot:

similarly broken page as screenshot before

I presume that it is supposed to work, using a Svelte Mapbox key? If we are supposed to enter our own key to show actual maps, that should be a bit clearer instead, I suggest.

@Conduitry
Copy link
Member

It's supposed to be using Svelte's - you don't need to bring your own - but apparently that's broken or the build time var isn't correctly configured on our end.

@Conduitry Conduitry added the bug Something isn't working label Jan 3, 2022
@Conduitry
Copy link
Member

Should be good now. Thanks for catching this!

@TheKinng96
Copy link

It is back now, but this time it is with another issue
image
Cannot find "/[object Object]" in mapbox-gl@2.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants