1 <div id=
"map" style=
"width: 540px; height: 400px">
2 <script src=
"#CONFIG{adresse_site}/lib/CloudMade-Leaflet-50a5790/dist/leaflet.js"></script>
8 <BOUCLE_ateliers_types(MOTS){type = Ateliers}{par num titre}
>
9 var group_#ID_MOT = new L.LayerGroup();
10 <BOUCLE_sites(SITES){id_mot}
>
11 <BOUCLE_coord(GIS){id_syndic}
>
12 var WorkshopIcon = L.Icon.extend({
13 iconUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT|fichier)]',
14 shadowUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT_SURVOL|fichier)]',
15 iconSize: new L.Point(
25,
41),
16 shadowSize: new L.Point(
41,
41),
17 iconAnchor: new L.Point(
13,
41),
18 popupAnchor: new L.Point(
0, -
33)
20 siteIcon = new WorkshopIcon()
21 var markerAtelier = new L.Marker(new L.LatLng(#LAT, #LON), {icon: siteIcon});
22 markerAtelier.bindPopup(
"<span style='float: left; width: 45px;'> <img src='#CONFIG{adresse_site}/IMG/#LOGO_SYNDIC**' alt='' style='width: 45px;' width='45'></span><a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#NOM_SITE</a><br/>#_sites:DESCRIPTIF<br/><i>#DESCRIPTIF</i><span class='spip_documents spip_documents_right' style='float: right; width: 100px;'> <img src='#CONFIG{adresse_site}/IMG/#LOGO_SYNDIC_SURVOL**' alt='' style='width: 100px;' width='100'></span>#ADRESSE<br/> #CODE_POSTAL #VILLE<br/><br/><em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>");
23 group_#ID_MOT.addLayer(markerAtelier)
26 </BOUCLE_ateliers_types>
28 var cloudmadeAttribution = 'Map data
© 2011 OpenStreetMap contributors, Imagery
© 2011 CloudMade',
29 cloudmadeOptions = {maxZoom:
18, attribution: cloudmadeAttribution},
30 cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/{styleId}/
256/{z}/{x}/{y}.png';
32 var minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId:
22677}),
33 midnightCommander = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId:
999}),
34 motorways = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId:
46561});
37 var map = new L.Map('map', {center: new L.LatLng(
46.8,
2.52), zoom:
5, layers: [
<BOUCLE_map(MOTS){type = Ateliers}
> group_#ID_MOT,
</BOUCLE_map> minimal, midnightCommander, motorways]});
41 "Night View": midnightCommander,
47 <BOUCLE_groups(MOTS){type = Ateliers}{par num titre}
>
48 "[(#TITRE|supprimer_numero)]": group_#ID_MOT,
</BOUCLE_groups>
49 "Motorways": motorways
54 layersControl = new L.Control.Layers(baseMaps, overlayMaps);
56 map.addControl(layersControl);
58 map.on('click', onMapClick);
60 var popup = new L.Popup();
62 function onMapClick(e) {
63 var latlngStr = '(' + e.latlng.lat.toFixed(
3) + ', ' + e.latlng.lng.toFixed(
3) + ')';
64 popup.setLatLng(e.latlng);
65 popup.setContent(
"You clicked the map at " + latlngStr);
72 <h2 class='h2 spip'
>Legende
</h2>
73 <BOUCLE_legende(MOTS){type = Ateliers}{par num titre}
>
74 <p>#LOGO_MOT [(#TITRE|supprimer_numero)]
</p>
77 <h2 class='h2 spip'
>Ateliers
</h2>
78 <BOUCLE_liste_pays(GIS){par pays}{fusion pays}
>
79 <h3 class='h3 spip'
>#PAYS
</h3>
80 <BOUCLE_liste_region(GIS){par region}{pays}{fusion region}
>
81 <h4 class='h4 spip'
>#REGION
</h4>
82 <BOUCLE_liste_ateliers(GIS){par ville}{region}
>
83 <li>#VILLE (#CODE_POSTAL) #TITRE - #ADRESSE
</li>
84 </BOUCLE_liste_ateliers>
85 </BOUCLE_liste_region>