Adapt examples to new signature for ol.Attribution

This commit is contained in:
Éric Lemoine
2013-08-30 16:48:25 +02:00
parent 38ab64c3c3
commit 729039ba04
5 changed files with 45 additions and 31 deletions

View File

@@ -21,10 +21,12 @@ var layers = [
source: new ol.source.TiledWMS({
url: 'http://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: [new ol.Attribution(
'© ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
'Pixelmap 1:1000000 / geo.admin.ch</a>')],
attributions: [new ol.Attribution({
html: '&copy; ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">' +
'Pixelmap 1:1000000 / geo.admin.ch</a>'
})],
params: {
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
'FORMAT': 'image/jpeg'
@@ -36,10 +38,12 @@ var layers = [
source: new ol.source.TiledWMS({
url: 'http://wms.geo.admin.ch/',
crossOrigin: 'anonymous',
attributions: [new ol.Attribution(
'&copy; ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
'National parks / geo.admin.ch</a>')],
attributions: [new ol.Attribution({
html: '&copy; ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">' +
'National parks / geo.admin.ch</a>'
})],
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
extent: extent
})