benjamintd / benmaps.fr

Web maps that don't track you.
https://benmaps.fr
MIT License
179 stars 22 forks source link

Error on map style switch due to needing specific mapbox api key #47

Closed mpmckenna8 closed 7 years ago

mpmckenna8 commented 7 years ago

If the project is run without Benjamin's mapbox api key in the .env file the request for the static image for the primary basemap will fail with https://api.mapbox.com/styles/v1/benjamintd/cj0szkyh5009i2slfhsmxhtni/static/-122.45920072674187,37.7712861641578,15.255089647198925/56x100@2x?access_token=pk.eyJ1IjoibXBtY2tlbm5hOCIsImEiOiJfYWx3RlJZIn0.v-vrWv_t1ytntvWpeePhgQ&attribution=false 404 (Not Found)

But since it's basically just the streets basemap we would just use that link and it will work for any mapbox api user. See https://github.com/mpmckenna8/mapbox-maps/blob/staticlinkfix/src/components/StyleSwitch.js#L32

benjamintd commented 7 years ago

Closed in #48