diff --git a/examples/wms-custom-proj.html b/examples/wms-custom-proj.html
index 8dc04d889d..0638842076 100644
--- a/examples/wms-custom-proj.html
+++ b/examples/wms-custom-proj.html
@@ -33,10 +33,10 @@
Tiled WMS with custom projection example
-
Example of a tiled WMS layer using the projection EPSG:21781.
+
Example of two tiled WMS layers (Pixelmap 1:1'000'000 and national parks) using the projection EPSG:21781.
diff --git a/examples/wms-custom-proj.js b/examples/wms-custom-proj.js
index ee262faec5..270b1423e9 100644
--- a/examples/wms-custom-proj.js
+++ b/examples/wms-custom-proj.js
@@ -24,16 +24,29 @@ var layers = new ol.Collection([
new ol.layer.TileLayer({
source: new ol.source.TiledWMS({
url: 'http://wms.geo.admin.ch/?',
+ attributions: [new ol.Attribution('©
Pixelmap 1:1000000 / geo.admin.ch')],
+ crossOrigin: null,
params: {'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale'},
- projection: epsg21781
+ projection: epsg21781,
+ extent: extent
+ })
+ }),
+ new ol.layer.TileLayer({
+ source: new ol.source.TiledWMS({
+ url: 'http://wms.geo.admin.ch/?',
+ attributions: [new ol.Attribution('©
National parks / geo.admin.ch')],
+ crossOrigin: null,
+ params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
+ projection: epsg21781,
+ extent: extent
})
})
]);
var map = new ol.Map({
- center: new ol.Coordinate(600000, 200000),
+ center: new ol.Coordinate(660000, 190000),
projection: epsg21781,
layers: layers,
target: 'map',
- zoom: 8
+ zoom: 9
});