caesen

Parc del Garraf

Navigation

Equipaments d'educació ambiental


  • Associació Cetàcea
  • Catalonia Adventures
  • Centre d'Activitats Ambientals Cal Ganxo
  • Centre d'Estudis del Mar
  • Cova d'en Sadurní
  • Associació EDULIS
  • Museu de Gavà
  • Casa de colònies  Escola de Natura Can Grau
  • Centre d'Activitats Ambientals Cal Ganxo
  • Granja Escuela Can Pere de la Plana

Showing 1 - 10 of 18 results.

An error occurred while processing the template.
The following has evaluated to null or missing:
==> marca.iconaMarcador.urlExterna2  [in template "10311#10344#MAPA_GOOGLE" at line 24, column 39]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign iconaMarcadorURL = marca.icon...  [in template "10311#10344#MAPA_GOOGLE" at line 24, column 12]
----
1<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.1/dist/leaflet.css" integrity="sha256-sA+zWATbFveLLNqWO2gtiw3HL/lh1giY/Inf1BJ0z14=" crossorigin="" /> 
2<script src="https://unpkg.com/leaflet@1.9.1/dist/leaflet.js" integrity="sha256-NDI0K41gVbWqfkkaHj15IzU7PtMoelkzyKp8TOaFQ3s=" crossorigin=""></script> 
3 
4<div id="map${.vars["reserved-article-id"].data}" class="embed-responsive embed-responsive-16by9" style="clear:both;margin:10px 0"></div>  
5<#assign apostrofe="'">  
6<#assign replaceApostrofe="\'">  
7<#assign intro="\n">  
8<#assign replaceIntro="">  
9  
10<script>   
11var map${.vars["reserved-article-id"].data} ;  
12<#assign i=0>  
13var markers = [  
14<#assign iconaURL= icona.getData()>  
15<#if icona.urlExterna?? && (!iconaURL?has_content ||  iconaURL?length ==0)>  
16   <#assign iconaURL= icona.urlExterna.getData()>  
17</#if>   
18<#list marcador.getSiblings() as marca>  
19    <#if i gt 0>  
20		,  
21	</#if>  
22	<#assign iconaMarcadorURL= marca.iconaMarcador.getData()>  
23	<#if !iconaMarcadorURL?has_content ||  iconaMarcadorURL?length ==0>  
24	   <#assign iconaMarcadorURL= marca.iconaMarcador.urlExterna2.getData()>  
25	</#if>   
26    <#assign iconaMarcador="">  
27    <#if iconaMarcadorURL?has_content &&  iconaMarcadorURL?length ==0>  
28        <#assign iconaMarcador=" iconaMarcadorURL">  
29    <#else> 
30        <#assign iconaURL= icona.getData()>  
31		<#if iconaURL?has_content &&  iconaURL?length ==0>  
32		   <#assign iconaURL= icona.urlExterna.getData()>  
33		</#if>   
34        <#if iconaURL?has_content &&  iconaURL?length ==0>  
35            <#assign iconaMarcador=" iconaURL">  
36        </#if>      
37    </#if>  
38	<#assign tMarcador = htmlUtil.escapeJS(marca.titolMarcador.getData())> 
39    <#assign iMarcador = htmlUtil.escapeJS(marca.infoMarcador.getData())> 
40	<#if (marca.latitud1?? && marca.latitud1.getData()?has_content) && (marca.longitud1?? && marca.longitud1.getData()?has_content)> 
41		['${tMarcador}',${marca.latitud1.getData()},${marca.longitud1.getData()},'${iMarcador}', '${iconaMarcador}']  
42	</#if> 
43	<#assign i=1>  
44</#list>  
45];  
46 
47function addMarker(latLong, label, html, iconMarker) {  
48     
49     var marker = null;  
50     if(iconMarker != ""){  
51		var myIcon = L.icon({iconUrl: iconMarker, iconSize: [25, 41],}); 
52        marker = L.marker([latLong.lat,latLong.lng], {icon: myIcon, title: label}).addTo(map${.vars["reserved-article-id"].data}).bindPopup(html,{maxHeight:300}); 
53     }else{  
54		marker = L.marker([latLong.lat,latLong.lng], {title: label}).addTo(map${.vars["reserved-article-id"].data}).bindPopup(html,{maxHeight:300}); 
55     }  
56      
57    return marker;  
58}  
59 
60function setMarkers(locations) {  
61  /* Add markers to the map */ 
62  var bounds = L.latLngBounds([]);  
63  for (var i = 0; i < locations.length; i++) {  
64    var marker = locations[i];  
65    var myLatLng = L.latLng(marker[1], marker[2]);  
66    var marker2 = addMarker(myLatLng,marker[0],marker[3],marker[4]);  
67    bounds.extend(myLatLng);  
68  }  
69  if(locations.length > 1){ 
70    map${.vars["reserved-article-id"].data}.fitBounds(bounds); 
71
72}  
73function initMap(){  
74		// Llista de cartografies. 
75		var googleStreets = L.tileLayer('https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&hl=ca', { 
76		  maxZoom: 20, 
77		  subdomains: ['mt0', 'mt1', 'mt2', 'mt3'], 
78		  attribution: "&copy; Diputació de Barcelona" 
79		}); 
80		var latlng = L.latLng(${centre.latitud.getData()},${centre.longitud.getData()}); 
81		map${.vars["reserved-article-id"].data}  = L.map("map${.vars["reserved-article-id"].data}", {attributionControl:false, center: latlng, zoom: ${zoom.getData()}, layers: [googleStreets], zoomSnap: 0.5}); 
82        L.control.attribution({prefix:false}).addTo(map${.vars["reserved-article-id"].data}); 
83		setMarkers(map${.vars["reserved-article-id"].data}, markers);  
84}  
85$(document).ready(function() { 
86			initMap(); 
87		}); 
88</script> 

#language("interest")