Coder Social home page Coder Social logo

map is not shown about opensensemap HOT 11 CLOSED

najtin avatar najtin commented on August 15, 2024
map is not shown

from opensensemap.

Comments (11)

ubergesundheit avatar ubergesundheit commented on August 15, 2024

Hi najtin ,

can you provide a screenshot of your browsers developer tools (Press F12, select Console and refresh the page)? This would help us in resolving this problem.

from opensensemap.

najtin avatar najtin commented on August 15, 2024

sure
grafik

from opensensemap.

ubergesundheit avatar ubergesundheit commented on August 15, 2024

najtin, do you have any browser plugins installed which could cause this?

@felixerdy do you have an idea?

from opensensemap.

najtin avatar najtin commented on August 15, 2024

$ curl https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/2/1/0?access_token=pk.eyJ1Ijoic2Vuc2Vib3giLCJhIjoiY2p1Y2x6NXl1MG5wNDN6cGk1MGc2cGZhaSJ9.HRwU3DShLMEtj_UHYlqb8g {"message":"Forbidden"}

Tested it in two different networks

from opensensemap.

felixerdy avatar felixerdy commented on August 15, 2024

The mapbox access_token is equipped with an URL restriction. Only opensensemap.org can access tiles with this access_token

from opensensemap.

najtin avatar najtin commented on August 15, 2024

The mapbox access_token is equipped with an URL restriction. Only opensensemap.org can access tiles with this access_token

do you mean the client side opensensemap.org or the server?

from opensensemap.

najtin avatar najtin commented on August 15, 2024

najtin, do you have any browser plugins installed which could cause this?

yes uMatrix, but i lifted all restrictions for this domain

from opensensemap.

felixerdy avatar felixerdy commented on August 15, 2024

The mapbox access_token is equipped with an URL restriction. Only opensensemap.org can access tiles with this access_token

do you mean the client side opensensemap.org or the server?

Well client side I guess. Could you check again now? I just added api.mapbox.com to the URL restriction list as stated in the mapbox docs: https://docs.mapbox.com/accounts/overview/tokens/#add-url-restrictions-to-access-tokens

from opensensemap.

najtin avatar najtin commented on August 15, 2024

Same result.
Here is the answer of one of the requests:

GEThttps://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/2/1/0?access_token=pk.eyJ1Ijoic2Vuc2Vib3giLCJhIjoiY2p1Y2x6NXl1MG5wNDN6cGk1MGc2cGZhaSJ9.HRwU3DShLMEtj_UHYlqb8g
[HTTP/1.1 403 Forbidden 648ms]

GET
https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/2/1/0?access_token=pk.eyJ1Ijoic2Vuc2Vib3giLCJhIjoiY2p1Y2x6NXl1MG5wNDN6cGk1MGc2cGZhaSJ9.HRwU3DShLMEtj_UHYlqb8g
Status403
Forbidden
VersionHTTP/1.1
Übertragen565 B (23 B Größe)

HTTP/1.1 403 Forbidden

Content-Type: application/json; charset=utf-8

Content-Length: 23

Connection: keep-alive

Date: Fri, 23 Oct 2020 12:35:48 GMT

X-Powered-By: Express

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET

Cache-Control: no-cache

X-Content-Type-Options: nosniff

ETag: W/"17-bqIm6pxC4cx+ZoszvXxsClwgWw8"

X-Cache: Error from cloudfront

Via: 1.1 e9ece8a38ce6bb2b68b3b5a87615cfee.cloudfront.net (CloudFront)

X-Amz-Cf-Pop: TLV50-C1

X-Amz-Cf-Id: JloSLTJD_U2axNTVflxtbMLUX8g8jASpinVwFm7KIv9wxXwS_twl7Q==
	
Accept
	image/webp,*/*
Accept-Encoding
	gzip, deflate, br
Accept-Language
	de,en-US;q=0.7,en;q=0.3
Cache-Control
	no-cache
Connection
	keep-alive
DNT
	1
Host
	api.mapbox.com
Pragma
	no-cache
Referer
	https://api.mapbox.com/
User-Agent
	Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

from opensensemap.

najtin avatar najtin commented on August 15, 2024

Does X-Cache: Error from cloudfront mean anything?

from opensensemap.

mpfeil avatar mpfeil commented on August 15, 2024

Going to close this issue.
The token is restricted to request coming form opensensemap.org.

$ curl https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/2/1/0?access_token=pk.eyJ1Ijoic2Vuc2Vib3giLCJhIjoiY2p1Y2x6NXl1MG5wNDN6cGk1MGc2cGZhaSJ9.HRwU3DShLMEtj_UHYlqb8g {"message":"Forbidden"}

Tested it in two different networks
Having the same error if I am calling it directly in my browser.

Feel free to open this issue again if you are not seeing the tiles on opensensemap.org.

If you are hosting an own instance or running it locally you have to provide your own Mapbox Access Token.

from opensensemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.