menu
Une erreur s'est produite lors du traitement du gabarit.
The following has evaluated to null or missing: ==> description [in template "10155#10193#CARTE-TEMPLATE" at line 1, column 6] ---- Tip: If the failing expression is known to be 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: #if description.getData()?? [in template "10155#10193#CARTE-TEMPLATE" at line 1, column 1] ----
1<#if description.getData()??>
2<#else>
3 $description.getData()
4</#if>
5
6
7
8
9<div id="map_canvas" style="width:${Largeur.getData()}; height:${Hauteur.getData()}"></div>
10
11<#assign LocationList = [] />
12<#list LocationName.getSiblings() as LocationName>
13<#assign LocationList = LocationList + [{"locationName" : LocationName.getData(),"coordonnees" : LocationName.Coordonnees.getData(),"adresse" : LocationName.Adresse.getData(),"image" : LocationName.Image.getData()}]>
14</#list>
15
16
17<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=AIzaSyDflp89NHPhIxb9RtjfNUKMTKKGUd2iU1A"></script>
18<script type="text/javascript">
19
20
21function initialize() {
22var locations = [
23 <#list LocationList as item>
24 ['${item.locationName}', '<h2>${item.locationName}</h2><img display="block" src="${item.image}" alt="map logo" width="200px" /><p>${item.adresse}</p>', ${item.coordonnees}],
25 </#list>
26 <#assign LocationList = "" />
27 ];
28
29 var map = new google.maps.Map(document.getElementById('map_canvas'), {
30 zoom: ${MapZoom.getData()},
31 center: new google.maps.LatLng( ${CenterCoordonnees.getData()}),
32 mapTypeId: google.maps.MapTypeId.ROADMAP
33 });
34
35 var infowindow = new google.maps.InfoWindow();
36
37 var marker, i;
38
39 for (i = 0; i < locations.length; i++) {
40 marker = new google.maps.Marker({
41 position: new google.maps.LatLng(locations[i][2], locations[i][3]),
42 title: locations[i][0],
43 html: locations[i][1],
44 map: map
45 });
46
47 google.maps.event.addListener(marker, 'click', (function(marker, i) {
48 return function() {
49 infowindow.setContent(this.html);
50 infowindow.open(map, marker);
51 }
52 })(marker, i));
53 }
54}
55google.maps.event.addDomListener(window, 'load', initialize);
56
57</script>