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 29 30 31 32
|
viewer = null;
function initGeoportalMap()
{
/*[1]*/
if (typeof(OpenLayers)=='undefined' ||
typeof(Geoportal)=='undefined' ||
typeof(Geoportal.Viewer)=='undefined') {
setTimeout('initGeoportalMap()', 250);
return;
}
geoportalLoadviewer("map","normal","FXX","IGNF:GEOPORTALFXX",['IGNF:WGS84G','IGNF:RGF93G','IGNF:LAMB1','IGNF:LAMB2','IGNF:LAMB3','IGNF:LAMB4','IGNF:LAMBE','IGNF:LAMB93']);
if (viewer)
{
/*[2]*/
//viewer.getMap().updateSize(); /*1.0 ne sert à rien */
setTimeout('viewer.setSize(800,600);', 250);
// Ajout des calques du GéoPortail
viewer.addGeoportalLayers(['ORTHOIMAGERY.ORTHOPHOTOS:WMSC','GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC','CADASTRALPARCELS.PARCELS:WMSC'], {visibility:true});
/*[3]*/
var vml;
try {
vml= new OpenLayers.Renderer['VML'];
} catch (e) {
alert('onload pas encore levé ?-(');
}
// dernière opération : se centrer :
viewer.getMap().setCenterAtLonLat(4.33375, 43.80915, 14);
}
} |
Partager