[migration GIS4] affichage de la carte OK
[lhc/web/spip_carte_de_sites.git] / contenu / page-carte_de_sites.html
index 4811690..fa95376 100755 (executable)
 
 <div id="map" style="[(#ENV{larg}|oui) width: [(#ENV{larg}|sinon{'540'})px;]] height: [(#ENV{haut}|sinon{'400'})]px">
 
-<script src="[(#CHEMIN{lib/CloudMade-Leaflet-538dfb4/dist/leaflet.js}|url_absolue)]"></script>
+<script src="[(#CHEMIN{lib/leaflet-gis-4.1.13/dist/leaflet.js}|url_absolue)]"></script>
 
 <script>
    <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)
-                     });
+               var templateIcon = L.Icon.extend({
+                   options: {
+                        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)