var pays="perigord"; var current ='france'; switch(pays){ case 'bretagne': case 'brittany': current='bretagne'; break; case 'bretagne-sud': case 'southern-brittany': current='bretagnedusud'; break; case 'bretagne-nord': case 'northern-brittany': current='bretagnedunord'; break; case 'pyrenees': case 'pyrenaen': current='pyrenees'; break; case 'vosges': case 'vogesen': current='vosges'; break; case 'perigord': current='perigord'; break; case 'perigord-et-quercy': case 'perigord-and-quercy': case 'perigord-und-quercy': current='perigordetquercy'; break; case 'massif-central': case 'zentralmassiv': current='massifcentral'; break; case 'jura': current='jura'; break; case 'alpes-du-nord': case 'northern-alps': case 'nordalpen': case 'alpen-nord': current='alpesdunord'; break; case 'alpes-du-sud': case 'southern-alps': case 'sudalpen': current='alpesdusud'; break; case 'pre-alpes-du-nord': case 'northern-prealps': case 'voralpen-nord': current='prealpesdunord'; break; case 'pre-alpes-du-sud': case 'southern-prealps': case 'voralpen-sud': current='prealpesdusud'; break; case 'provence': current='provence'; break; case 'corse': case 'corsica': case 'korsika': current='corse'; break; case 'drome-provencale': current='dromeprovencale'; break; case 'alpes': case 'alps': case 'alpen': current='alpes'; break; case 'pre-alpes': case 'prealps': case 'voralpen': current='prealpesdunord'; break; case 'midi-pyrenees': current='midipyrenees'; break; case 'cote-atlantique': case 'atlantic-coast': case 'atlantische-kuste': current='coteatlantique'; break; case 'loire': current='loire'; break; case 'bourgogne': case 'burgundy': case 'burgund': current='bourgogne'; break; case 'alsace': case 'alsace': case 'elsass': current='alsace'; break; case 'normandie': case 'normandy': current='normandie'; break; case 'sud-ouest': case 'south-west': case 'sudwesten': current='sudouest'; break; //case 'cantal': current='cantal'; // break } /* Déclaration des variables */ var geocoder; var map; var markers = new Array(); var i = 0; var regions = { bretagne:{ lat : -3.0432129, long: 48.2063713, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/bretagne.kml', zoom : 7 }, bretagnedusud:{ lat : -3.0432129, long: 48.2063713, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/bretagnedusud.kml', zoom : 7 }, bretagnedunord:{ lat : -3.0432129, long: 48.2063713, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/bretagnedunord.kml', zoom : 7 }, pyrenees:{ lat : 0.5493164, long: 42.9363178, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/pyrenees.kml', zoom : 7 }, vosges:{ lat : 7.135620100000001, long: 48.4146186, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/vosges.kml', zoom : 7 }, provence:{ lat : 5.4876709, long: 43.6122168, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/provence.kml', zoom : 7 }, massifcentral:{ lat : 3.1201172, long: 44.6814734, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/massifcentral.kml', zoom : 7 }, alpesdusud:{ lat : 6.7071533, long: 44.3631331, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/alpesdusud.kml', zoom : 7 }, prealpesdusud:{ lat : 5.6085205, long: 44.4180879, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/prealpesdusud.kml', zoom : 7 }, alpesdunord:{ lat : 6.5203857, long: 45.490945700000005, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/alpesdunord.kml', zoom : 7 }, prealpesdunord:{ lat : 5.8117676000000005, long: 45.6754822, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/prealpesdunord.kml', zoom : 7 }, jura:{ lat : 6.229248, long: 47.0027339, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/jura.kml', zoom : 7 }, perigord:{ lat : 0.736084, long: 45.17042, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/perigord.kml', zoom : 7 }, perigordetquercy:{ lat : 1.1425781, long: 44.9492493, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/perigordetquercy.kml?id=1', zoom : 8 }, corse:{ lat : 9.074707, long: 42.1124865, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/corse.kml', zoom : 7 }, dromeprovencale:{ lat : 5.1525879, long: 44.4569317, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/dromeprovencale.kml', zoom : 8 }, alpes:{ lat : 6.4105225, long: 44.9064687, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/alpes.kml', zoom : 7 }, midipyrenees:{ lat : 1.8457031, long: 43.3890819, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/midipyrenees.kml', zoom : 7 }, coteatlantique:{ lat : -1.3101196, long: 46.615488, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/coteatlantique.kml', zoom : 7 }, loire:{ lat : 0.5053711, long: 47.5617008, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/loire.kml', zoom : 7 }, bourgogne:{ lat : 4.1748047, long: 47.2046424, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/bourgogne.kml', zoom : 7 }, alsace:{ lat : 7.360839800000001, long: 48.2758815, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/alsace.kml', zoom : 7 }, normandie:{ lat : 0.1593018, long: 49.045069600000005, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/normandie.kml', zoom : 7 }, sudouest:{ lat : 0.7470703, long: 43.8820573, kml : 'https://'+window.location.host+'/mf_websites/cameleon/templates/maps/sudouest.kml', zoom : 6 }, france:{ lat : 3.1201172, long: 46.6814734, kml : '', zoom : 5 }, } /* Initialisation de la carte */ function initialize() { //centrage de la carte var centre = new google.maps.LatLng(regions[current]['long'], regions[current]['lat']); var optionsCarte = { zoom: regions[current]['zoom'], center: centre, mapTypeId: google.maps.MapTypeId.TERRAIN } // Chargement de la carte var maCarte = new google.maps.Map(document.getElementById("carte-monde"), optionsCarte); var kmlUrl = regions[current]['kml']; var kmlOptions = { suppressInfoWindows: true, preserveViewport: true, map: maCarte, url: kmlUrl }; var kmlLayer = new google.maps.KmlLayer(kmlUrl, kmlOptions); }