1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
viewer.getMap().addLayer(
"WMS",
'Cartes SwissTopo',
"http://api.geo.admin.ch/main/mapproxy/service",
{//paramètres_du_wms: contient tous les paramètres nécessaires au paramétrage du service WMS
layers:'ch.swisstopo.pixelkarte-farbe',
format:'image/png',
transparent:'true'
},
{ //options_couche: contient les paramètres pour gérer le comportement de la couche WMS
singleTile:false, //false=affichage par dalles, true=affichage d'un bloc
projection:'EPSG:900913',
maxExtent: new OpenLayers.Bounds(700000,5000000,900000,7000000), // attention valeurs bidon pour tester
minZoomLevel: 5,
maxZoomLevel:20,
opacity:0.7,
isBaseLayer: false,
visibility: false,
originators:[
{
logo:'SwissTopo',
pictureUrl: '../../html/images/swisstopo.png',
url: 'http://www.swisstopo.admin.ch/internet/swisstopo/fr/home.html'
}
]
}
); |
Partager