\n\t\t\t\t<\/div>","center":{"type":"fix","lat":"43.623976","lng":"3.83521","poi":""},"zoom":{"actif":"","value":"10","molette":"","min":"0","max":"0","position":""},"streetview":{"actif":"","position":""},"deplacement":{"actif":"","position":""},"type":{"actif":"","defaut":"","position":""},"recherche":{"actif":"","label":""},"itineraire":{"actif":"","type":"","show":"","panel":"","label":""},"cluster":{"actif":""},"id":86};eGmap.pois={"poi":[{"title":"Marseille","uid":"1","lat":"43.28039055","lng":"5.38049645000001","type":"Poi","table":"tx_egmap_domain_model_poi","cats":"17"},{"title":"R\u00e9gion PACA","uid":"2","lat":"43.301214400000006","lng":"5.373690600000032","type":"Poi","table":"tx_egmap_domain_model_poi","cats":"18"}]};eGmap.kmls={"kml":{"title":"Test KML","uid":"1","data":"http:\/\/www.axeseine.fr\/fileadmin\/cartographie\/95-val-doise_01.kml"}};function eGmapLoadMap(){eGmap.map=new google.maps.Map(document.getElementById('eGmapMap'),{center:new google.maps.LatLng(eGmap.conf.center.lat,eGmap.conf.center.lng),zoom:parseInt(eGmap.conf.zoom.value),minZoom:parseInt(eGmap.conf.zoom.min),maxZoom:parseInt(eGmap.conf.zoom.max),scrollwheel:(eGmap.conf.zoom.molette=='0')?!1:!0,draggable:(eGmap.conf.draggable=='0')?!1:!0,zoomControl:(eGmap.conf.zoom.actif=='0')?!1:!0,zoomControlOptions:(eGmap.conf.zoom.position)?{position:google.maps.ControlPosition[eGmap.conf.zoom.position]}:{},streetViewControl:(eGmap.conf.streetview.actif=='0')?!1:!0,streetViewControlOptions:(eGmap.conf.streetview.position)?{position:google.maps.ControlPosition[eGmap.conf.streetview.position]}:{},panControl:(eGmap.conf.deplacement.actif=='0')?!1:!0,panControlOptions:(eGmap.conf.deplacement.position)?{position:google.maps.ControlPosition[eGmap.conf.deplacement.position]}:{},mapTypeControl:(eGmap.conf.type.actif=='0')?!1:!0,mapTypeControlOptions:(eGmap.conf.type.position)?{position:google.maps.ControlPosition[eGmap.conf.type.position]}:{},mapTypeId:(eGmap.conf.type.defaut)?google.maps.MapTypeId[eGmap.conf.type.defaut]:google.maps.MapTypeId.ROADMAP,overviewMapControl:!1,rotateControl:!1,scaleControl:!1,styles:(eGmap.styles)?eGmap.styles:null});eGmapLoadPois();eGmapLoadKmls();eGmapCatInit()} function eGmapLoadKmls(){if(eGmap.kmls&&eGmap.kmls.kml){if(eGmap.kmls.kml.length>0){for(i=0;i0){for(i=0;i0){eGmap.map.setCenter(eGmap.bounds.getCenter())}else{eGmap.map.fitBounds(eGmap.bounds)}} if(eGmap.conf.forcePoi){if(eGmapLoadInfosPoi(eGmap.uidToKey[eGmap.conf.forcePoi])){eGmap.map.setCenter(eGmap.marker[eGmap.uidToKey[eGmap.conf.forcePoi]].getPosition())}}}else{eGmapLoadPoi(eGmap.pois.poi);if(eGmapLoadInfosPoi(0)){eGmap.map.setCenter(eGmap.marker[0].getPosition())}}}} function eGmapLoadPoi(poi){key=eGmap.marker.length;position=new google.maps.LatLng(poi.lat,poi.lng);eGmap.marker[key]=new google.maps.Marker({position:position,title:poi.title});eGmap.marker[key].key=key;eGmap.marker[key].infopoi=poi;if(poi.cats){eGmap.marker[key].cats=poi.cats.split(',')}else{eGmap.marker[key].cats=new Array} eGmap.marker[key].setMap(eGmap.map);eGmap.uidToKey[poi.table+'_'+poi.uid]=key;if(poi.picto&&poi.picto!=''){eGmap.marker[key].setIcon(poi.picto)} google.maps.event.addListener(eGmap.marker[key],'click',function(){eGmapLoadInfosPoi(this.key)});eGmap.bounds.extend(position)} function eGmapLoadInfosPoi(key){if(!eGmap.marker[key]) return!1;if(eGmap.marker[key].infobubble){eGmap.marker[key].infobubble.close();eGmap.marker[key].infobubble=!1}else{eGmap.marker[key].infobubble=new InfoBubble();eGmap.marker[key].infobubble.open(eGmap.map,eGmap.marker[key]);eGmap.marker[key].infobubble.setContent(eGmap.conf.loadingInfo);eGmap.marker[key].infobubble.key=key;eGmap.infoZIndex=(eGmap.infoZIndex)?eGmap.infoZIndex+1:6;eGmap.marker[key].infobubble.setZIndex(eGmap.infoZIndex);google.maps.event.addDomListener(eGmap.marker[key].infobubble.bubble_,'click',function(){eGmap.infoZIndex++;this.style.setProperty('z-index',eGmap.infoZIndex)});google.maps.event.addListener(eGmap.marker[key].infobubble,'closeclick',function(){eGmap.marker[this.key].infobubble=!1});console.log(eGmap);jQuery.ajax({type:'POST',dataType:"xml",data:{eID:'eGmapInfoPoi',id:eGmap.conf.id,uid:eGmap.marker[key].infopoi.uid,type:eGmap.marker[key].infopoi.type,key:key},success:function(result){console.log(result);key=jQuery(result).find("key").text();tabs=jQuery(result).find("tab");if(tabs.length>0){jQuery(result).find("tab").each(function(){label=jQuery(this).find("label").text();content=jQuery(this).find("content").text();eGmap.marker[key].infobubble.addTab(label,content)})}else{content=jQuery(result).find("content").html();eGmap.marker[key].infobubble.setContent(content);eGmap.marker[key].infobubble.updateContent_()} window.setTimeout(function(){eGmap.marker[key].infobubble.panToView()},100)},error:function(error){console.dir(error);eGmap.marker[key].infobubble.close();eGmap.marker[key].infobubble=!1}})} return!0} google.maps.event.addDomListener(window,'load',eGmapLoadMap);function eGmapYAller(lat,lng,adresse){if(eGmap.directionsService){maDestination=new google.maps.LatLng(lat,lng);if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(position){var type='';type=type?google.maps.TravelMode[type]:null;var maPosition=new google.maps.LatLng(position.coords.latitude,position.coords.longitude);console.dir(position.coords);var request={origin:maPosition,destination:maDestination,travelMode:type};eGmap.directionsService.route(request,function(response,status){if(status==google.maps.DirectionsStatus.OK){eGmap.directionsDisplay.setDirections(response)}})})}} destField=jQuery('#eGmapAdress2');if(destField.length){console.log(adresse);destField.val(adresse)} return!1} function eGmapCatInit(){jQuery('.egmap_cat').click(function(){eGmapCatCheck(this)});jQuery('.egmapcat_kmls').click(function(){eGmapKmlsCheck(this)});jQuery('.egmap_cat_racine').click();eGmapCatCheckAllInit()} function eGmapCatCheck(elem){var infos=jQuery(elem).attr('id').split('_');var idCat=infos[1];var elem=infos[2];var input=jQuery('#egmapcat_'+idCat+'_input');var checked=input.prop('checked');if(elem!='input'){input.prop('checked',!checked)}else{checked=!checked} for(var i=0;i=0){if(checked&&eGmapIsNoLastCat(poi)){eGmapHidePoi(poi)}else{eGmapShowPoi(poi)}}} var childs=jQuery('.egmap_child_'+idCat);if(childs.length){childs.click()}} function eGmapIsNoLastCat(poi){for(var i=0;i ul.cats > li > div input:checkbox').click();thisButton.val("Cocher tout").removeClass('allchecked').addClass('allunchecked');console.log('check all undone')}else{jQuery('ul.cats input:checkbox').prop('checked',!1);jQuery('div > ul.cats > li > div input:checkbox').click();thisButton.val("Décocher tout").addClass('allchecked').removeClass('allunchecked');console.log('check all done')}})} function eGmapPoiListeInit(){google.maps.event.addListener(eGmap.map,'bounds_changed',function(e){var mapBounds=eGmap.map.getBounds();for(var i=0;i*/ Eurovelo 8 - Cartographie