var map= null;function geoportalLoadmap(idDivMap, mode, territoire, crs, dispcrs, proxy){var options= {};if(mode) {options.mode= mode;}if(territoire) {options.territory= territoire;}if(crs) {options.projection= crs;}if(dispcrs) {options.displayProjection= dispcrs;}if(proxy) {options.proxy= proxy;}options.nameInstance= 'map';options.apiKey= [];options.apiKey.push('7860155105272487310');options['7860155105272487310']= {tokenServer:{url:'http://jeton-api.ign.fr',ttl:600},tokenTimeOut:600,transport:'json',bounds: [-180.0,-90.0,180.0,90.0],allowedGeoportalLayers:[],resources:{}};options['7860155105272487310'].allowedGeoportalLayers.push('ORTHOIMAGERY.ORTHOPHOTOS:WMSC');options['7860155105272487310'].resources['ORTHOIMAGERY.ORTHOPHOTOS:WMSC']= {name:'ORTHOIMAGERY.ORTHOPHOTOS',type:'WMSC',url:'http://wxs.ign.fr/geoportail/wmsc'};options['7860155105272487310'].allowedGeoportalLayers.push('GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC');options['7860155105272487310'].resources['GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC']= {name:'GEOGRAPHICALGRIDSYSTEMS.MAPS',type:'WMSC',url:'http://wxs.ign.fr/geoportail/wmsc'};map= new Geoportal.Viewer.Default(idDivMap, options);return map;}// Geoportal API version 1.0beta4(Extended)
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= 'http://api.ign.fr/geoportail/api/js/1.0beta4/GeoportalExtended.js';
script.charset='utf-8';
script.defer= true;
script.onload= script.onreadystatechange= function(){
if(script.readyState && script.readyState!=4 && script.readyState!='loaded' && script.readyState!='complete'){return;}
script.onload= script.onreadystatechange= null;
if(typeof(initGeoportalMap)=='function'){initGeoportalMap();}else{
var save_callback= function(){};
if(typeof(window.onload)!='undefined'){save_callback= window.onload;}
window.onload= function() {
if(typeof(initGeoportalMap)=='function'){initGeoportalMap();}
if(save_callback != 'undefined' && save_callback!=null) {save_callback();}
};
}
};
//Useful only on FireFox (to have an error in case of a 404)
script.onerror= function() {throw ('The script ' + this.src + ' has not been found.');};
var nodes= document.getElementsByTagName('head');
var head= nodes.length>0? nodes[0]: document.body;
head.appendChild(script);

