Adapt examples to new signature for ol.Attribution
This commit is contained in:
@@ -11,9 +11,10 @@ var map = new ol.Map({
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.OSM({
|
||||
attributions: [
|
||||
new ol.Attribution(
|
||||
'All maps © ' +
|
||||
'<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'),
|
||||
new ol.Attribution({
|
||||
html: 'All maps © ' +
|
||||
'<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'
|
||||
|
||||
@@ -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: '© ' +
|
||||
'<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(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
'National parks / geo.admin.ch</a>')],
|
||||
attributions: [new ol.Attribution({
|
||||
html: '© ' +
|
||||
'<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
|
||||
})
|
||||
|
||||
@@ -13,10 +13,12 @@ goog.require('ol.source.TiledWMS');
|
||||
var layers = [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.TiledWMS({
|
||||
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: '© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/' +
|
||||
'en/home.html">' +
|
||||
'Pixelmap 1:1000000 / geo.admin.ch</a>'
|
||||
})],
|
||||
crossOrigin: 'anonymous',
|
||||
params: {
|
||||
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
|
||||
@@ -27,10 +29,12 @@ var layers = [
|
||||
}),
|
||||
new ol.layer.ImageLayer({
|
||||
source: new ol.source.SingleImageWMS({
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
'National parks / geo.admin.ch</a>')],
|
||||
attributions: [new ol.Attribution({
|
||||
html: '© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/' +
|
||||
'en/home.html">' +
|
||||
'National parks / geo.admin.ch</a>'
|
||||
})],
|
||||
crossOrigin: 'anonymous',
|
||||
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
|
||||
url: 'http://wms.geo.admin.ch/'
|
||||
|
||||
@@ -18,10 +18,12 @@ var layers = [
|
||||
source: new ol.source.SingleImageWMS({
|
||||
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: '© ' +
|
||||
'<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'
|
||||
@@ -33,10 +35,12 @@ var layers = [
|
||||
source: new ol.source.SingleImageWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
crossOrigin: 'anonymous',
|
||||
attributions: [new ol.Attribution(
|
||||
'© ' +
|
||||
'<a href="http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
'National parks / geo.admin.ch</a>')],
|
||||
attributions: [new ol.Attribution({
|
||||
html: '© ' +
|
||||
'<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
|
||||
})
|
||||
|
||||
@@ -51,10 +51,11 @@ xhr.onload = function() {
|
||||
'http://gpp3-wxs.ign.fr/static/logos/IGN/IGN.gif'
|
||||
];
|
||||
|
||||
var attribution = new ol.Attribution(
|
||||
'<a href="http://www.geoportail.fr/" target="_blank">' +
|
||||
'<img src="http://api.ign.fr/geoportail/api/js/latest/' +
|
||||
'theme/geoportal/img/logo_gp.gif"></a>');
|
||||
var attribution = new ol.Attribution({
|
||||
html: '<a href="http://www.geoportail.fr/" target="_blank">' +
|
||||
'<img src="http://api.ign.fr/geoportail/api/js/latest/' +
|
||||
'theme/geoportal/img/logo_gp.gif"></a>'
|
||||
});
|
||||
|
||||
var sourceOptions;
|
||||
var source;
|
||||
|
||||
Reference in New Issue
Block a user