WMS-C support is part of the minimum, standard and extended APIs. WMS-C delivery is deprecated for the upcoming release of the Geoportal services.
It is important to note that Geoportal layers are projected under a specific projection (IGNF:GEOPORTAL*, IGNF:MILLER, See RIG). As such, any other image based service (like WMS, WMS-C and al) has to be :
The Geoportal API also allows to display Geoportal's layers (IGNF:GEOPORTAL*) in plate-carre (IGNF:RGF93G, compatible with EPSG:4326) and other layers must be under the same plate-carre projection.
Adding a WMS-C layer is as simple as that :
myMap.getMap().addLayer(
"WMS-C",
layer_name,
"url_to_wmsc",
wmsc_parameters,
layer_options
);| Zoom | Resolution (m) | Projection | Scale |
|---|---|---|---|
| 0 | 39135.7500000 | MILLER | 1 : 156 543 000 |
| 1 | 19567.8750000 | MILLER | 1 : 78 271 500 |
| 2 | 9783.9375000 | MILLER | 1 : 39 135 750 |
| 3 | 4891.9687500 | MILLER | 1 : 19 567 875 |
| 4 | 2445.9843750 | MILLER | 1 : 9 783 938 |
| 5 | 2048.0000000 | GEOPORTAL### | 1 : 8 192 000 |
| 6 | 1024.0000000 | GEOPORTAL### | 1 : 4 096 000 |
| 7 | 512.0000000 | GEOPORTAL### | 1 : 2 048 000 |
| 8 | 256.0000000 | GEOPORTAL### | 1 : 1 024 000 |
| 9 | 128.0000000 | GEOPORTAL### | 1 : 512 000 |
| 10 | 64.0000000 | GEOPORTAL### | 1 : 256 000 |
| 11 | 32.0000000 | GEOPORTAL### | 1 : 128 000 |
| 12 | 16.0000000 | GEOPORTAL### | 1 : 64 000 |
| 13 | 8.0000000 | GEOPORTAL### | 1 : 32 000 |
| 14 | 4.0000000 | GEOPORTAL### | 1 : 16 000 |
| 15 | 2.0000000 | GEOPORTAL### | 1 : 8 000 |
| 16 | 1.0000000 | GEOPORTAL### | 1 : 4 000 |
| 17 | 0.5000000 | GEOPORTAL### | 1 : 2 000 |
| 18 | 0.2500000 | GEOPORTAL### | 1 : 1 000 |
| 19 | 0.1250000 | GEOPORTAL### | 1 : 500 |
| 20 | 0.0625000 | GEOPORTAL### | 1 : 250 |
Layer's resolutions can be both different in value and length from the Geoportal's ones, Geoportal.Layer.Grid class finds the closest resolution for the current Geoportal resolution in order to overlay them.
All in all, there is no significant difference between OpenLayers.Layer.WMS use and Geoportal.Layer.WMSC use expect for the geographic rights management that is :
GeoRM: Geoportal.GeoRMHandler.addKey(
gGEOPORTALRIGHTSMANAGEMENT.apiKey,
gGEOPORTALRIGHTSMANAGEMENT[gGEOPORTALRIGHTSMANAGEMENT.apiKey].tokenServer.url,
gGEOPORTALRIGHTSMANAGEMENT[gGEOPORTALRIGHTSMANAGEMENT.apiKey].tokenServer.ttl,
myMap)The following code snippet shows Geoportal WMS-C displayed in plate-carre and an overlay of a spanish WMS-C also in plate-carre :
...
myMap= new Geoportal.Viewer.Default("map", {
mode:"normal",
territory:"FXX",
projection:"IGNF:RGF93G"
});
...
var ideeResolutions= [
0.703125,
0.3515625,
0.17578125,
0.087890625,
0.0439453125,
0.02197265625,
0.010986328125,
0.0054931640625,
0.00274658203125,
0.001373291015625,
0.0006866455078125,
0.00034332275390625,
0.000171661376953125,
0.0000858306884765625,
0.00004291534423828125,
0.000021457672119140625,
0.0000107288360595703125,
0.00000536441802978515625,
0.000002682209014892578125,
0.0000013411045074462890625,
0.00000067055225372314453125,
0.000000335276126861572215625,
0.0000001676380634307861078125,
0.00000008381903171539305390625,
0.000000041909515857696526953125
];
var idee= myMap.getMap().addLayer(
"WMS-C",
{
'IDEE-Base':
{
'fr':"Cartes de base IDEE",
'en':"IDEE base maps",
'es':"Cartografia base IGN"
}
},
"http://www.idee.es/wms-c/IDEE-Base/IDEE-Base",
{
layers:'Todas',
format:'image/png',
transparent:true
},
{
singleTile: false,
projection:'EPSG:4326',
// extent in EPSG:4326 :
maxExtent: new OpenLayers.Bounds(-18.865234375,25.892578125,4.865234375,46.107421875),
gridOrigin: new OpenLayers.LonLat(0,0),
nativeResolutions:ideeResolutions.slice(0),
opacity:0.30,
units:'degrees',
isBaseLayer: false,
visibility:false,
originators:[
{
pictureUrl:'http://www.idee.es/images/Logo_IDEE.gif',
url:'http://www.idee.es/index.jsp?lang=FR'
}
]
});
...