Allow '{-y}' placeholder
This commit is contained in:
40
examples/xyz.js
Normal file
40
examples/xyz.js
Normal 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 © <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 © <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
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user