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

"API Key Required" Shows up on OSM_tiled_cycle.geo Maps #153

Open
KB3EFS opened this issue Jul 29, 2019 · 3 comments
Open

"API Key Required" Shows up on OSM_tiled_cycle.geo Maps #153

KB3EFS opened this issue Jul 29, 2019 · 3 comments

Comments

@KB3EFS
Copy link

KB3EFS commented Jul 29, 2019

Even with the recent cleaning up of the code and related items regarding API Keys I am still seeing "API Key Required" on OSM_tiled_cycle.geo maps. Perhaps this is a new requirement given the fluid nature of the way OSM has been trending of late. (This is my first time filing a "Git-Issue".) This issue is reproducable. I am running Xastir V2.1.5 (9692556) on

@tvrusso
Copy link
Member

tvrusso commented Jul 29, 2019

This has nothing to do with Xastir code or the machine you're on. Clearly, OSM has changed their terms of use for that map, and require an API key to get an unmolested tile set, probably because annoying codes like Xastir keep using their tile servers and bogging them down. My guess is that eventually they'll not just put a watermark over the image, but deny access entirely unless a proper API key is given.

Fixing this would require figuring out not only how to get an API key for Xastir use, but how to wedge it into the tile requests.

@tvrusso
Copy link
Member

tvrusso commented Jul 29, 2019

This explains how to make it go away.

I am not sure if we can just do it on an application basis, it looks like they want each individual user to have their own key.

https://www.thunderforest.com/docs/apikeys/

This does make it difficult for us to support this sort of thing in Xastir itself, except by adding code to allow users to store their thunderforest API key into the Xastir config, and modifying map_OSM.c to append "?apikey=value" to the request URL after the tile specifier before sending it.

@tvrusso
Copy link
Member

tvrusso commented Jul 29, 2019

I take it back --- it looks like you can get an API key for an app or a web site and have the app or web site use that key for the download.

We'll have to add a keyword for .geo files so that we can specify the key, and add code to pass it down to the OSM code and download manager so they can append the necessary apikey keyword and value.

Since not every OSM server will require them, and each might require a different key, it will be important to make sure that the key is passed to the download manager when the tile request is queued, because that is when the actual tile URL is constructed. Higher than that level, all anyone knows is the server URL and the tile coordinates/zoom level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants