sysoppl / Cities-Skylines-heightmap-generator

A heightmap generator for Cities: Skylines
https://heightmap.skydark.pl/
177 stars 53 forks source link

Expired api key => white screen #90

Closed llx001 closed 1 month ago

llx001 commented 8 months ago

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.

gilberdn90 commented 8 months ago

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

sysoppl commented 8 months ago

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.

gilberdn90 commented 8 months ago

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 commented 8 months ago

Where do we support?

sysoppl commented 8 months ago

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

gilberdn90 commented 8 months ago

Takes the pressure off you!

OceanHotelVibes commented 7 months ago

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 #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.

use this key for now: pk.eyJ1IjoiYmVydGRldm4iLCJhIjoiY2t2dXF1ZGhyMHlteTJ2bzJjZzE3M24xOCJ9.J5skknTRyh-6RoDWD4kw2w

ifangc commented 7 months ago

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

falcon4ever commented 1 month ago

FWIW:

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

sysoppl commented 1 month ago

fixed:

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.