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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| <div id="viewerDiv" style="width:970px; height:600px; margin-top:-15px;"></div>
<script type="text/javascript" src="http://api.ign.fr/geoportail/api/js/1.3/GeoportalExtended.js">
<!--//--><![CDATA[//><!--
//--><!]]></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
// AJOUT de la variable qui va recevoir l'interface de visualisation (facilite le deboggage)
var iVIEWER= null;
window.onload = function () {
var Projections = ['IGNF:RGF93G','CRS:84','IGNF:LAMB93','IGNF:LAMBE'];
// les options proviennent du constructeur Geoportal.Viewer.Default
iVIEWER = Geoportal.load(
'viewerDiv',
// Clé API, Centrage carte, Zoom
['4630919453149898197'],{lon:-1.2576,lat:43.0389},12,{
overlays:{'kml':[{name:'49\272 Etape',url:'http://gerard.cayez.pagesperso-orange.fr/Cartes/KML/49.kml',
options:{params:{originators:[{pictureUrl:'../../Images/HRP.ico',url:'../../index.html'}]},visibility:true}}]},
displayProjection: Projections,
viewerClass:Geoportal.Viewer.Default,
componentsOptions:{'Geoportal.Component.LegalNotice.Logo':{logoSize:30}},
onView: initGeoportalMap,
layers:['GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC'],
layersOptions:{'GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC':{name:'Carte IGN (Fr)',visibility:true,opacity:1}}
}
);
};
// UTILISATION du chargeur API
var viewer = null;
function initGeoportalMap(options){
viewer = this.getViewer();
viewer.setLayersPanelVisibility(true);
viewer.openLayersPanel(false);
viewer.setToolsPanelVisibility(true);
viewer.openToolsPanel(false);
viewer.setInformationPanelVisibility(true);
//IDEE
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= viewer.getMap().addLayer(
"WMS-C",'Carte IDEE (Es)',
"http://www.idee.es/wms-c/IDEE-Base/IDEE-Base",
{
layers:'Todas',
format:'image/png',
transparent:true
},
{
singleTile: false,
projection:'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:1,
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'
}
]
});
//Fin IDEE
}
//Fin Chargeur API
//--><!]]></script> |
Partager