Parametres :
- legende = non : ne pas afficher la legende
+ - coord = 46.8,2.52 : pour un centrage optimal sur la carte de France
+ - zoom = 5 : pour un centrage optimal sur la carte de France
]
<!-- Carte -->
var WorkshopIcon = L.Icon.extend({
iconUrl: '[(#LOGO_MOT||extraire_attribut{src}|url_absolue)]',
shadowUrl: '[(#LOGO_MOT_SURVOL||extraire_attribut{src}|url_absolue)]',
- iconSize: new L.Point(25, 41),
- shadowSize: new L.Point(41, 41),
- iconAnchor: new L.Point(13, 41),
+ iconSize: new L.Point(17, 28),
+ shadowSize: new L.Point(17, 17),
+ iconAnchor: new L.Point(13, 17),
popupAnchor: new L.Point(0, -33)
});
siteIcon = new WorkshopIcon()
var markerAtelier = new L.Marker(new L.LatLng(#LAT, #LON), {icon: siteIcon});
- markerAtelier.bindPopup("<span style='float: left; width: 45px;'> <img src='[(#LOGO_SYNDIC||extraire_attribut{src}|url_absolue)]' alt='' style='width: 45px;' width='45'></span><a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#NOM_SITE</a>#_sites:DESCRIPTIF<i>#DESCRIPTIF</i><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/><br/><em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>");
+ markerAtelier.bindPopup("\
+ <span style='float: left; width: 45px;'><img src='[(#LOGO_SYNDIC||extraire_attribut{src}|url_absolue)]' alt='' style='width: 45px;' width='45'></span>\
+ <a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#TITRE</a><br/>#DESCRIPTIF\
+ <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'>#NOM_SITE - #URL_SITE</a><br/><br/>\
+ <em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>\
+ ");
group_#ID_MOT.addLayer(markerAtelier)
</BOUCLE_coord>
</BOUCLE_sites>
minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 14189});
-<B_map>
- 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> midnightCommander, minimal]});
-</B_map>
+ <B_map>
+ var map = new L.Map('map', {center: new L.LatLng([(#ENV{coord}|sinon{'46.8,2.52'})]), zoom: [(#ENV{zoom}|sinon{5})], layers: [<BOUCLE_map(MOTS){type = Ateliers}> group_#ID_MOT,</BOUCLE_map> midnightCommander, minimal]});
+ </B_map>
+
var baseMaps = {
"Vue de nuit ;-)": midnightCommander,
function onMapClick(e) {
var latlngStr = '(' + e.latlng.lat.toFixed(5) + ', ' + e.latlng.lng.toFixed(5) + ')';
popup.setLatLng(e.latlng);
- popup.setContent("You clicked the map at " + latlngStr);
+ popup.setContent("Coordonnees de votre clic (Latitude, Longitude)" + latlngStr);
map.openPopup(popup);
}
]
<BOUCLE_legende(MOTS){type = Ateliers}{par num titre}>
[(#ENV{legende}|!={non}|oui)
- <p>#LOGO_MOT [(#TITRE|supprimer_numero)]</p>
+ <p>#LOGO_MOT_NORMAL [(#TITRE|supprimer_numero)]</p>
]
</BOUCLE_legende>
</B_legende>
-