1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
var timer= null;
function initGeoportalMap() {//ou le callback onload
if (timer!=null) {
window.clearTimeout(timer);
timer= null;
}
// si api minimale :
/*
if (typeof(OpenLayers)=='undefined' &&
typeof(Geoportal)=='undefined') {
timer= window.setTimeout('initGeoportalMap();', 100);
return;
}
*/
// si api standard ou étendue :
if (typeof(Geoportal)=='undefined' &&
typeof(Geoportal.Viewer)=='undefined' &&
typeof(Geoportal.Viewer.Standard)=='undefined') {
timer= window.setTimeout('initGeoportalMap();', 100);
return;
}
// le reste du code ici ...
} |
Partager