Bug Safari Ipad
[lhc/web/spip_carte_de_sites.git] / contenu / page-carte_de_sites.html
old mode 100644 (file)
new mode 100755 (executable)
index 8c12851..e4769ad
@@ -1,5 +1,14 @@
+[(#REM)
+    Modele carte_de_site
+    
+    Parametres :
+
+    - legende = non : ne pas afficher la legende
+]
+
+<!-- Carte -->
 <div id="map" style="width: 540px; height: 400px">
-<script src="#CONFIG{adresse_site}/lib/CloudMade-Leaflet-50a5790/dist/leaflet.js"></script>
+<script src="[(#CHEMIN{lib/CloudMade-Leaflet-edb7d25/dist/leaflet.js}|url_absolue)]"></script>
 
 <script>
 <BOUCLE_ateliers_types(MOTS){type = Ateliers}{par num titre}>
                <BOUCLE_sites(SITES){id_mot}>
                                <BOUCLE_coord(GIS){id_syndic}>
                                                var WorkshopIcon = L.Icon.extend({
-                                                   iconUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT|fichier)]',
-                                                   shadowUrl: '#CONFIG{adresse_site}/IMG/[(#LOGO_MOT_SURVOL|fichier)]',
-                                                   iconSize: new L.Point(25, 41),
-                                                   shadowSize: new L.Point(41, 41),
-                                                   iconAnchor: new L.Point(13, 41),
+                                                   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)
                                                });
                                                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='#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>");
+                                               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><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)]'>[(#URL_SITE)]</a><br/><br/><em>Statut: [(#_ateliers_types:TITRE|supprimer_numero)]</em>");
                                                group_#ID_MOT.addLayer(markerAtelier)
                                </BOUCLE_coord>
                </BOUCLE_sites>
@@ -27,7 +36,7 @@
                cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/{styleId}/256/{z}/{x}/{y}.png';
                
        var midnightCommander = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 999}),
-               minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 22677});
+               minimal = new L.TileLayer(cloudmadeUrl, cloudmadeOptions, {styleId: 14189});
                
 
 <B_map>
        var popup = new L.Popup();
 
        function onMapClick(e) {
-               var latlngStr = '(' + e.latlng.lat.toFixed(3) + ', ' + e.latlng.lng.toFixed(3) + ')';
+               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);
        }
 
 </script>
 </div>
 
-<h2 class='h2 spip'>Legende</h2>
+<!-- Legende -->
+
+<B_legende>
+    [(#ENV{legende}|!={non}|oui)
+        <h2 class='h2 spip'>Legende</h2>
+    ]
 <BOUCLE_legende(MOTS){type = Ateliers}{par num titre}>
-       <p>#LOGO_MOT [(#TITRE|supprimer_numero)]</p>
+    [(#ENV{legende}|!={non}|oui)
+           <p>#LOGO_MOT_NORMAL [(#TITRE|supprimer_numero)]</p>
+       ]       
 </BOUCLE_legende>
+</B_legende>
 
-<h2 class='h2 spip'>Ateliers</h2>
-<BOUCLE_liste_pays(GIS){par pays}{fusion pays}>
-       <h3 class='h3 spip'>#PAYS</h3>
-               <BOUCLE_liste_region(GIS){par region}{pays}{fusion region}>
-                       <h4 class='h4 spip'>#REGION</h4>
-                               <BOUCLE_liste_ateliers(GIS){par ville}{region}>
-                                       <li>#VILLE (#CODE_POSTAL) #TITRE - #ADRESSE</li>
-                               </BOUCLE_liste_ateliers>
-               </BOUCLE_liste_region>
-</BOUCLE_liste_pays>