Allow '{-y}' placeholder

This commit is contained in:
Frederic Junod
2014-04-14 13:57:36 +02:00
parent 738fe65268
commit 9b5512c065
5 changed files with 105 additions and 6 deletions

40
examples/xyz.js Normal file
View File

@@ -0,0 +1,40 @@
goog.require('ol.Attribution');
goog.require('ol.Map');
goog.require('ol.View2D');
goog.require('ol.layer.Tile');
goog.require('ol.source.OSM');
goog.require('ol.source.XYZ');
var attribution = new ol.Attribution({
html: 'Tiles &copy; <a href="http://maps.nls.uk/townplans/glasgow_1.html">' +
'National Library of Scotland</a>'
});
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM({
attributions: [
new ol.Attribution({
html: 'Tiles &copy; <a href="http://www.opencyclemap.org/">' +
'OpenCycleMap</a>'
}),
ol.source.OSM.DATA_ATTRIBUTION
],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
})
}),
new ol.layer.Tile({
source: new ol.source.XYZ({
attributions: [attribution],
url: 'http://geo.nls.uk/maps/towns/glasgow1857/{z}/{x}/{-y}.png'
})
})
],
view: new ol.View2D({
center: [-472202, 7530279],
zoom: 12
})
});