Amelio popup des coordonnees
[lhc/web/spip_carte_de_sites.git] / contenu / page-carte_de_sites.html
index 15cb7d4..582dd05 100755 (executable)
     - haut  = 400   : hauteur
     - style = 14189 : style de carte. Voir http://maps.cloudmade.com/editor
     - boite = oui   : affiche la boite avec calques et types
+    - popup = oui   : autoriser les popups
+    - images = oui  : afficher les images
 ]
 
 <!-- Carte -->
-<!--
-<div id="map" style="[(#ENV{dimauto}|!={oui}|oui) width: [(#ENV{larg}|sinon{'540'})px;]] height: [(#ENV{haut}|sinon{'400'})]px">
--->
 
 <div id="map" style="[(#ENV{larg}|oui) width: [(#ENV{larg}|sinon{'540'})px;]] height: [(#ENV{haut}|sinon{'400'})]px">
 
                                                });
                                                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})]'>#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>\
-                                               ");
+                        [(#ENV{popup}|!={non}|oui)
+                                               markerAtelier.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>]<a href='[(#ID_SYNDIC|generer_url_entite{site})]'>#TITRE</a><br/>#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'>#NOM_SITE - #URL_SITE</a><br/><br/><em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>");
+                                               ]
                                                group_#ID_MOT.addLayer(markerAtelier)
                                </BOUCLE_coord>
                </BOUCLE_sites>
@@ -86,7 +80,7 @@
        var popup = new L.Popup();
 
        function onMapClick(e) {
-               var latlngStr = '(' + e.latlng.lat.toFixed(5) + ', ' + e.latlng.lng.toFixed(5) + ')';
+               var latlngStr = '(' + e.latlng.lat.toFixed(5) + ',' + e.latlng.lng.toFixed(5) + ')';
                popup.setLatLng(e.latlng);
                popup.setContent("Coordonnees de votre clic (Latitude, Longitude)" + latlngStr);
                map.openPopup(popup);