- var map = new L.Map('map');
-
- var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
- cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
- cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution});
-
- map.setView(new L.LatLng(46.8, 2.52), 5).addLayer(cloudmade);
-
- var WorkshopIcon = L.Icon.extend({
- iconUrl: '#CONFIG{adresse_site}/plugins/carte-de-sites/images/grey.png',
- shadowUrl: '#CONFIG{adresse_site}/lib/CloudMade-Leaflet-404b097/dist/images/marker-shadow.png',
- iconSize: new L.Point(25, 41),
- shadowSize: new L.Point(41, 41),
- iconAnchor: new L.Point(13, 41),
- popupAnchor: new L.Point(0, -33)
- });
-
- var greyIcon = new WorkshopIcon()
- redIcon = new WorkshopIcon('#CONFIG{adresse_site}/plugins/carte-de-sites/images/red.png'),
- yellowIcon = new WorkshopIcon('#CONFIG{adresse_site}/plugins/carte-de-sites/images/yellow.png'),
- blueIcon = new WorkshopIcon('#CONFIG{adresse_site}/plugins/carte-de-sites/images/blue.png'),
- greenIcon = new WorkshopIcon('#CONFIG{adresse_site}/plugins/carte-de-sites/images/green.png');
-
+ <BOUCLE_mots_types(MOTS){type = (#ENV{groupe})}>
+ var group_#ID_MOT = new L.LayerGroup();
+ <BOUCLE_sites(SITES){id_mot}>
+ <BOUCLE_coord(GIS){id_syndic}>
+ var templateIcon = L.Icon.extend({
+ iconUrl: '[(#LOGO_MOT||extraire_attribut{src}|url_absolue)]',
+ shadowUrl: '[(#LOGO_MOT_SURVOL||extraire_attribut{src}|url_absolue)]',
+ iconSize: new L.Point(17, 28),
+ shadowSize: new L.Point(17, 17),
+ iconAnchor: new L.Point(13, 17),
+ popupAnchor: new L.Point(0, -33)
+ });
+ gisIcon = new templateIcon()
+ var markerGis = new L.Marker(new L.LatLng(#LAT, #LON), {icon: gisIcon});
+ [(#ENV{popup}|!={non}|oui)
+ markerGis.bindPopup("[(#ENV{images}|!={non}|oui)<span style='float: left; width: 45px;'><img src='[(#LOGO_SYNDIC||extraire_attribut{src}|url_absolue)]' alt='' style='width: 45px;' width='45'></span>]<h4>#TITRE</h4>#DESCRIPTIF[(#ENV{images}|!={non}|oui)<span class='spip_documents spip_documents_right' style='float: right; width: 100px;'>\<img src='[(#LOGO_SYNDIC_SURVOL||extraire_attribut{src}|url_absolue)]' alt='' style='width: 100px;' width='100'></span>]#ADRESSE<br/> #CODE_POSTAL #VILLE<br/><a href='#URL_SITE' target='_blank'>#NOM_SITE - #URL_SITE</a><br/><br/><em>Statut: [(#_mots_types:TITRE|supprimer_numero)]</em>");
+ ]
+ group_#ID_MOT.addLayer(markerGis)
+ </BOUCLE_coord>
+ </BOUCLE_sites>
+ </BOUCLE_mots_types>