1 <script src=
"#CONFIG{adresse_site}/lib/CloudMade-Leaflet-404b097/dist/leaflet.js"></script>
3 <div id=
"map" style=
"width: 540px; height: 400px">
5 var map = new L.Map('map');
7 var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/
997/
256/{z}/{x}/{y}.png',
8 cloudmadeAttribution = 'Map data
© 2011 OpenStreetMap contributors, Imagery
© 2011 CloudMade',
9 cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom:
18, attribution: cloudmadeAttribution});
11 map.setView(new L.LatLng(
46.8,
2.52),
5).addLayer(cloudmade);
15 <BOUCLE_ateliers_types(MOTS){type = Ateliers}{par num titre}
>
16 <BOUCLE_sites(SITES){id_mot}
>
17 <BOUCLE_coord(GIS){id_syndic}
>
18 var WorkshopIcon = L.Icon.extend({
19 iconUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT|fichier)]',
20 shadowUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT_SURVOL|fichier)]',
21 iconSize: new L.Point(
25,
41),
22 shadowSize: new L.Point(
41,
41),
23 iconAnchor: new L.Point(
13,
41),
24 popupAnchor: new L.Point(
0, -
33)
26 siteIcon = new WorkshopIcon()
27 var markerAtelier = new L.Marker(new L.LatLng(#LAT, #LON), {icon: siteIcon});
28 map.addLayer(markerAtelier);
29 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='#URL_SITE'>#NOM_SITE</a><br/>#_sites:DESCRIPTIF<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>");
32 </BOUCLE_ateliers_types>
35 map.on('click', onMapClick);
37 var popup = new L.Popup();
39 function onMapClick(e) {
40 var latlngStr = '(' + e.latlng.lat.toFixed(
3) + ', ' + e.latlng.lng.toFixed(
3) + ')';
42 popup.setLatLng(e.latlng);
43 popup.setContent(
"You clicked the map at " + latlngStr);
52 <h2 class='h2 spip'
>Legende
</h2>
53 <BOUCLE_legende(MOTS){type = Ateliers}{par num titre}
>
54 <p>#LOGO_MOT [(#TITRE|supprimer_numero)]
</p>
59 <h2 class='h2 spip'
>Ateliers
</h2>
60 <BOUCLE_liste_pays(GIS){par pays}{fusion pays}
>
61 <h3 class='h3 spip'
>#PAYS
</h3>
62 <BOUCLE_liste_region(GIS){par region}{pays}{fusion region}
>
63 <h4 class='h4 spip'
>#REGION
</h4>
64 <BOUCLE_liste_ateliers(GIS){par ville}{region}
>
65 <li>#VILLE (#CODE_POSTAL) #TITRE - #ADRESSE
</li>
66 </BOUCLE_liste_ateliers>
67 </BOUCLE_liste_region>