﻿window.onload = function() {
	initGeoportalMap();
}

var VISU = null; // empêche IE de se pleindre

function initGeoportalMap() {
	// Paramêtres par défaut
	geoportalLoadVISU("GeoportalVisuDiv", "normal", "FXX");
	if ((VISU) && (VISU.getMap().allowedGeoportalLayers)) {
		//VISU.addGeoportalLayers();
		VISU.addGeoportalLayer('GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC',{opacity:0.8});
		VISU.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS:WMSC',{visibility:false});

		VISU.getMap().addLayer("KML", "Les chemins du Pays d Othe", "/wp-content/themes/cdte10/Google/PO.kml");

		// Affichage d'une "patience" pendant le téléchargement
		VISU.getMap().addControl(new OpenLayers.Control.LoadingPanel());

		// onglet "couches" développé (true=oui false=non)
		VISU.openLayersPanel(false);

		// onglet "couches" affiché (true=oui false=non)
		VISU.setLayersPanelVisibility(true);

		// onglet "outils" développé (true=oui false=non)
		VISU.openToolsPanel(false);

		// positionnement : indiquer le point central de la carte
		VISU.getMap().setCenterAtLonLat(3.798368, 48.174106, 10);
	} 
}