3

Could someone let me know how I add a API key to QGIS 2.14.10. The diagonal API key required is still on my map layer. Bit of a novice on QGIS.

5

I guess you are using the QOSM plugin to display the OpenCycleMap, since the standard OSM map does not have API keys.

You can obtain an API key from the map producer Thunderforest. They provide details here, including a sample tile request URL. You can add that to the properties of the QOSM layer, inserting the line

http://a.tile.thunderforest.com/cycle/${z}/${x}/${y}.png?apikey=<insert-your-apikey-here>

and clicking on Add Custom Type. Take care of the grammar for the variables that differs from the linked site.

Alternatively, you can use the QuickMapServices plugin, which does not show an API request for that site at the moment.

  • QuickMapServices works like a charm! Find the menu under "Web" the same as "OpenLayersPlugin". – Russell Fulton May 19 '17 at 4:41
  • @AndreJ, please, can you specify where exactly to insert the line with my API key "http://.."? When I open Properties of OSM layer (left click on the layer in the Layer Panel), there is no option to insert the specified line. Thank you! – maycca May 1 '18 at 18:15
  • 1
    @maycca in the QOSM plugin, go to the settings, Custom Tile Types. With QMS, you have to create a new custom tile provider. – AndreJ May 2 '18 at 5:56
  • I recently went through this again and I found I had to remove the a. at the start of the url before it would work. The urls I got from thunderforest were https://{s}.title... QGIS did not cope with https (unknown protocol!) and until I removed the {s}. they seemed to load an empty layer. what I have now is tile.thunderforest.com/landscape/${z}/${x}/${y}.png?apikey=<insert-your-apikey-here> – Russell Fulton Oct 31 '18 at 23:56
3

A very similar question was also answered here.

Again, if you are using the OpenLayers Plugin, this should work:

  1. If necessary, update OpenLayers Plugin to at least version 1.4.2
  2. Web > OpenLayer plugin > OSM/Thunderforest > Set API Key
  3. Enter API Key and confirm with OK
  4. Add the OSM layer from the OSM/Thunderforest menu again (previous layer(s) will not update even with API key entered)

PS: As already mentioned earlier, API keys are available for free from http://www.thunderforest.com/docs/apikeys/

  • OpenLayers doesn't seem to be a plugin in QGIS3. I think it's functionality was rolled into the QuickMapServices plugin, which has different configuration menus than explained above. See gis.stackexchange.com/questions/272778/… – Dave X Mar 11 at 14:54
0

It isn't the QuickOSM plugin in QGIS3, or the Web/QuickMap Services/OSM/... menu, but with base QGIS3, under the Browser panel, you can add the apikey services as XYZ Tiles raster maps:

1) Right click Browser/XYZ Tiles 2) Choose "New Connection" 3) Add a descriptive name. E.g.: "OSM Landscape" 4) Add a URL with api key E.g.: https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=3333333e97ba38423f5bef103f39bdb3

Then you can add your new layer to your projects by working through the Layer Browser / XYZ Tiles/ Add Layer To Project.

If you are getting diagonal 'API Key Required' watermarks on your OSM layer with a 'TF ...' prefix, it's likely an add-on to a raster layer as delivered by the OSM's tileservice delivered by ThunderForest. See http://www.thunderforest.com/docs/apikeys/ for some details. I'm not sure how to reconfigure QGIS3's Web/QuickMapServices/OSM to use a Thunderforest API Key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.