Cities-Skylines-heightmap-generator icon indicating copy to clipboard operation
Cities-Skylines-heightmap-generator copied to clipboard

Expired api key => white screen

Open llx001 opened this issue 1 year ago • 8 comments

Hello, It looks your API token is no longer valid for MapBox. The result is no map data and a white screen.

This is the js error: Object { status: 401, url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v11?access_token= {{APIKEY}}", name: "e", message: "Unauthorized: you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes", stack: "" } evented.js:140:20

I have censored the api key i am not sure if its public or not.

llx001 avatar Mar 01 '24 09:03 llx001

Where do you add the new Access token? I'm new to all this. and thanks

gilberdn90 avatar Mar 06 '24 17:03 gilberdn90

Sorry to hear, mapbox is paid service, and there was about 10000 users monthly visiting this generator. I was thinking about changing it or self hosting in https://github.com/sysoppl/Cities-Skylines-heightmap-generator/issues/21 but this project for me is dead, so any PRs are welcome. If you want to use it, clone it and change API key here: https://github.com/sysoppl/Cities-Skylines-heightmap-generator/blob/5ac2306fe45243ecec927d209b6c1dee7e553492/src/app.js#L47 then you need to self host it.

sysoppl avatar Mar 07 '24 17:03 sysoppl

Ok, because I have an Access token. And thank you for replying. When you say host, do you mean to run it? Can you have the site make it so people can buy their own Access token and apply it?

gilberdn90 avatar Mar 07 '24 18:03 gilberdn90

Where do we support?

gilberdn90 avatar Mar 07 '24 18:03 gilberdn90

Hmm. Yeah, I like the idea of users getting own mapbox token and pasting it to the app. I might add this

sysoppl avatar Mar 07 '24 18:03 sysoppl

Takes the pressure off you!

gilberdn90 avatar Mar 07 '24 18:03 gilberdn90

How should I fix this?How to clone it and change API key?and thanks

ifangc avatar Apr 08 '24 13:04 ifangc

FWIW:

  • You'll need to update the mapbox gl key (create a mapbox account and generate a new token)
  • You will also need to replace the fontawesome key or the icons wont render in the side panel (again create a free account and replace the hash in the index.html).

No need to host it somewhere, just clone this repo, modify the 2 keys and open up your index.html locally.

falcon4ever avatar Sep 17 '24 14:09 falcon4ever

fixed:

  • now you need to put own mapbox api token to make this app work
  • replaced fa icons with tabler icons
  • bumped some libs

I tested this quickly and looks like everything is working and I'm able to download maps. If any issues occur please open new issue.

sysoppl avatar Sep 26 '24 11:09 sysoppl