CloudMade Web Maps API

The CloudMade Web Maps API - also known as “Web Maps Lite” - is a javascript map display library focussed on displaying maps created by the CloudMade Style Editor. It isn’t a particularly widely used javascript library, and we wouldn’t recommend it for new projects, but if you’re using it already then you’ll want to know how to add layers from Thunderforest.

Here’s an example of how to create a map displaying the OpenCycleMap layer.

var opencyclemap = new CM.Tiles.Base({
  tileUrlTemplate: 'https://#{subdomain}{zoom}/#{x}/#{y}.png?apikey=<insert-your-apikey-here>',
  title: 'OpenCycleMap',
  copyright: '&copy; Data &copy; CC-BY-SA OpenStreetMap contributors'

var map = new CM.Map('map', opencyclemap);

You can of course customise the URL depending on which of our different map styles you want to use.

Outdated Tile Class

The Web Maps API also contains an outdated Tile Class - CM.Tiles.OpenStreetMap.Cycle - that used to show OpenCycleMap tiles. Unfortunately, years after the server it refers to was deprecated (it was their server, so they should know!), CloudMade still haven’t updated their library, and so if you try using that class then it will no longer work.

Avoid using the CM.Tiles.OpenStreetMap.Cycle in your projects, and use the CM.Tiles.Base layer described above. Note that there’s no equivalent within the Web Maps API for the other Thunderforest layers.

Alternative Libraries

As mentioned above, we wouldn’t recommend using this library in any of your projects. Check out either Leaflet or OpenLayers as alternatives.

For more details on Web Maps API, see