-
Notifications
You must be signed in to change notification settings - Fork 4
Layers
Andreas Fast edited this page Feb 13, 2016
·
5 revisions
Layers is where you specify what sources you are using for the map.
It is enough to just specify osm
or bing
if you're using the default basemap urls. However if you want to specialize or combine you can do so by indicating type and url format.
Layers is an array of
-
type
(osm, bing) to understand variable substitution and stitching toghether the final imagerequired
-
urls
is an array of formatted urls, depending on the type of format used.optional
-
level
When printing many sources, this will allow to indicate what to put on top or at the bottom. The higher levels will be put over the smaller ones.optional
-
opacity
When combining many layers this will allow to see through different levels.optional
map: {
layers: [{
type: 'osm', # (osm, bing)
urls: ['http://a.tile.thunderforest.com/transport/${z}/${x}/${y}.png'],
level: 1,
opacity: 1.0
}]
}