Browse Source

Version 4.8.0 :

* Mise à jour de la lib qui n'embarque plus que les scripts utilisés + réorganisation de son contenu
* La lib du passe sur contrib vu qu'on ne peut plus déposer de zip chez github
* Passage du script de clustering dans la lib, les css peuvent être surchargées dans un répertoire css/
* Mise à jour du plugin leaflet-providers (ajout de couches Nokia, ESRI, etc.)
* Mise à jour du plugin minimap (option toggle active pour permettre d'afficher/masquer ce bloc)
* Le script de gis embarque la version non compressée de Leaflet si la compression des scripts de SPIP est désactivée (pratique pour le debug)
svn/root/tags/v4.47.18
brunobergot@gmail.com 10 years ago
parent
commit
306eab0206
  1. 3
      .gitattributes
  2. 45
      css/leaflet.markercluster.css
  3. 22
      css/leaflet.markercluster.ie.css
  4. 78
      gis_options.php
  5. 6
      gis_pipelines.php
  6. 18
      javascript/gis.js.html
  7. 2
      javascript/gis_init_map.js
  8. 1883
      javascript/leaflet.markercluster-src.js
  9. 10
      paquet.xml

3
.gitattributes vendored

@ -6,8 +6,6 @@ action/kml_infos.php -text
action/supprimer_gis.php -text
base/gis.php -text
crud/gis.php -text
css/leaflet.markercluster.css -text
css/leaflet.markercluster.ie.css -text
embed/kml.html -text
embed/kml_fonctions.php -text
formulaires/configurer_gis.html -text
@ -56,7 +54,6 @@ javascript/gis.js.html -text
javascript/gis_geocoder.js -text
javascript/gis_init_map.js -text
javascript/gis_utils.js -text
javascript/leaflet.markercluster-src.js -text
json/gis.html -text
json/gis_articles.html -text
json/gis_articles_plus_sites.html -text

45
css/leaflet.markercluster.css

@ -1,45 +0,0 @@
.marker-cluster-small {
background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
background-color: rgba(110, 204, 57, 0.6);
}
.marker-cluster-medium {
background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
background-color: rgba(240, 194, 12, 0.6);
}
.marker-cluster-large {
background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
background-color: rgba(241, 128, 23, 0.6);
}
.marker-cluster {
background-clip: padding-box;
border-radius: 20px;
}
.marker-cluster div {
width: 30px;
height: 30px;
margin-left: 5px;
margin-top: 5px;
text-align: center;
border-radius: 15px;
font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.marker-cluster span {
line-height: 30px;
}
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
-webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-in;
-moz-transition: -moz-transform 0.2s ease-out, opacity 0.2s ease-in;
-o-transition: -o-transform 0.2s ease-out, opacity 0.2s ease-in;
transition: transform 0.2s ease-out, opacity 0.2s ease-in;
}

22
css/leaflet.markercluster.ie.css

@ -1,22 +0,0 @@
/* IE 6-8 fallback colors */
.marker-cluster-small {
background-color: rgb(181, 226, 140);
}
.marker-cluster-small div {
background-color: rgb(110, 204, 57);
}
.marker-cluster-medium {
background-color: rgb(241, 211, 87);
}
.marker-cluster-medium div {
background-color: rgb(240, 194, 12);
}
.marker-cluster-large {
background-color: rgb(253, 156, 115);
}
.marker-cluster-large div {
background-color: rgb(241, 128, 23);
}

78
gis_options.php

@ -2,7 +2,7 @@
if (!defined('_ECRIRE_INC_VERSION')) return;
define('_DIR_LIB_GIS','lib/leaflet-gis-4.1.13/');
define('_DIR_LIB_GIS','lib/leaflet-gis-4.8.0/');
$GLOBALS['logo_libelles']['id_gis'] = _T('gis:libelle_logo_gis');
@ -11,15 +11,16 @@ $config = @unserialize($GLOBALS['meta']['gis']);
$GLOBALS['gis_layers'] = array (
'openstreetmap_mapnik' => array(
'nom' => 'OpenStreetMap',
'layer' => 'L.TileLayer.OpenStreetMap.Mapnik()'
'layer' => 'L.tileLayer.provider("OpenStreetMap")'
),
'openstreetmap_blackandwhite' => array(
'nom' => 'OpenStreetMap Black and White',
'layer' => 'L.TileLayer.OpenStreetMap.BlackAndWhite()'
'layer' => 'L.tileLayer.provider("OpenStreetMap.BlackAndWhite")'
),
'openstreetmap_de' => array(
'nom' => 'OpenStreetMap DE',
'layer' => 'L.TileLayer.OpenStreetMap.DE()'
'layer' => 'L.tileLayer.provider("OpenStreetMap.DE")'
),
'google_roadmap' => array(
'nom' => 'Google Roadmap',
@ -39,59 +40,100 @@ $GLOBALS['gis_layers'] = array (
),
'thunderforest_opencyclemap' => array(
'nom' => 'Thunderforest OpenCycleMap',
'layer' => 'L.TileLayer.Thunderforest.OpenCycleMap()',
'layer' => 'L.tileLayer.provider("Thunderforest.OpenCycleMap")'
),
'thunderforest_transport' => array(
'nom' => 'Thunderforest Transport',
'layer' => 'L.TileLayer.Thunderforest.Transport()'
'layer' => 'L.tileLayer.provider("Thunderforest.Transport")'
),
'thunderforest_landscape' => array(
'nom' => 'Thunderforest Landscape',
'layer' => 'L.TileLayer.Thunderforest.Landscape()'
'layer' => 'L.tileLayer.provider("Thunderforest.Landscape")'
),
'mapquestopen_osm' => array(
'nom' => 'Mapquest Open',
'layer' => 'L.TileLayer.MapQuestOpen.OSM()'
'layer' => 'L.tileLayer.provider("MapQuestOpen.OSM")'
),
'mapquestopen_aerial' => array(
'nom' => 'Mapquest Open Aerial',
'layer' => 'L.TileLayer.MapQuestOpen.Aerial()'
'layer' => 'L.tileLayer.provider("MapQuestOpen.Aerial")'
),
'stamen_toner' => array(
'nom' => 'Stamen Toner',
'layer' => 'L.TileLayer.Stamen.Toner()'
'layer' => 'L.tileLayer.provider("Stamen.Toner")'
),
'stamen_tonerlite' => array(
'nom' => 'Stamen Toner Lite',
'layer' => 'L.tileLayer.provider("Stamen.TonerLite")'
),
'stamen_terrain' => array(
'nom' => 'Stamen Terrain',
'layer' => 'L.TileLayer.Stamen.Terrain()'
'layer' => 'L.tileLayer.provider("Stamen.Terrain")'
),
'stamen_watercolor' => array(
'nom' => 'Stamen Watercolor',
'layer' => 'L.TileLayer.Stamen.Watercolor()'
'layer' => 'L.tileLayer.provider("Stamen.Watercolor")'
),
'esri_worldstreetmap' => array(
'nom' => 'Esri WorldStreetMap',
'layer' => 'L.TileLayer.Esri.WorldStreetMap()'
'layer' => 'L.tileLayer.provider("Esri.WorldStreetMap")'
),
'esri_delorme' => array(
'nom' => 'Esri DeLorme',
'layer' => 'L.TileLayer.Esri.DeLorme()'
'layer' => 'L.tileLayer.provider("Esri.DeLorme")'
),
'esri_worldtopomap' => array(
'nom' => 'Esri WorldTopoMap',
'layer' => 'L.TileLayer.Esri.WorldTopoMap()'
'layer' => 'L.tileLayer.provider("Esri.WorldTopoMap")'
),
'esri_worldimagery' => array(
'nom' => 'Esri WorldImagery',
'layer' => 'L.TileLayer.Esri.WorldImagery()'
'layer' => 'L.tileLayer.provider("Esri.WorldImagery")'
),
'esri_worldterrain' => array(
'nom' => 'Esri WorldTerrain',
'layer' => 'L.tileLayer.provider("Esri.WorldTerrain")'
),
'esri_worldshadedrelief' => array(
'nom' => 'Esri WorldShadedRelief',
'layer' => 'L.tileLayer.provider("Esri.WorldShadedRelief")'
),
'esri_worldphysical' => array(
'nom' => 'Esri WorldPhysical',
'layer' => 'L.tileLayer.provider("Esri.WorldPhysical")'
),
'esri_oceanbasemap' => array(
'nom' => 'Esri OceanBasemap',
'layer' => 'L.TileLayer.Esri.OceanBasemap()'
'layer' => 'L.tileLayer.provider("Esri.OceanBasemap")'
),
'esri_natgeoworldmap' => array(
'nom' => 'Esri NatGeoWorldMap',
'layer' => 'L.TileLayer.Esri.NatGeoWorldMap()'
'layer' => 'L.tileLayer.provider("Esri.NatGeoWorldMap")'
),
'esri_worldgraycanvas' => array(
'nom' => 'Esri WorldGrayCanvas',
'layer' => 'L.tileLayer.provider("Esri.WorldGrayCanvas")'
),
'nokia_normalday' => array(
'nom' => 'Nokia normalDay',
'layer' => 'L.tileLayer.provider("Nokia.normalDay")'
),
'nokia_normalgreyday' => array(
'nom' => 'Nokia normalGreyDay',
'layer' => 'L.tileLayer.provider("Nokia.normalGreyDay")'
),
'nokia_satellitenolabelsday' => array(
'nom' => 'Nokia satelliteNoLabelsDay',
'layer' => 'L.tileLayer.provider("Nokia.satelliteNoLabelsDay")'
),
'nokia_satelliteyeslabelsday' => array(
'nom' => 'Nokia satelliteYesLabelsDay',
'layer' => 'L.tileLayer.provider("Nokia.satelliteYesLabelsDay")'
),
'nokia_terrainday' => array(
'nom' => 'Nokia terrainDay',
'layer' => 'L.tileLayer.provider("Nokia.terrainDay")'
),
);

6
gis_pipelines.php

@ -10,10 +10,10 @@ if (!defined('_ECRIRE_INC_VERSION')) return;
*/
function gis_insert_head_css($flux){
$flux .="\n".'<link rel="stylesheet" href="'. find_in_path(_DIR_LIB_GIS.'dist/leaflet.css') .'" />';
$flux .= "\n".'<!--[if lte IE 8]> <link rel="stylesheet" href="'. find_in_path(_DIR_LIB_GIS.'dist/leaflet.ie.css') .'" /> <![endif]-->';
$flux .="\n".'<!--[if lte IE 8]> <link rel="stylesheet" href="'. find_in_path(_DIR_LIB_GIS.'dist/leaflet.ie.css') .'" /> <![endif]-->';
$flux .="\n".'<link rel="stylesheet" href="'. find_in_path(_DIR_LIB_GIS.'plugins/leaflet-plugins.css') .'" />';
$flux .="\n".'<link rel="stylesheet" href="'. find_in_path('css/leaflet.markercluster.css') .'" />';
$flux .="\n".'<!--[if lte IE 8]><link rel="stylesheet" href="'. find_in_path('css/leaflet.markercluster.ie.css') .'" /><![endif]-->';
$flux .="\n".'<link rel="stylesheet" href="'. sinon(find_in_path('css/leaflet.markercluster.css'),find_in_path(_DIR_LIB_GIS.'plugins/leaflet.markercluster.css')) .'" />';
$flux .="\n".'<!--[if lte IE 8]><link rel="stylesheet" href="'. sinon(find_in_path('css/leaflet.markercluster.ie.css'),find_in_path(_DIR_LIB_GIS.'plugins/leaflet.markercluster.ie.css')) .'" /><![endif]-->';
return $flux;
}

18
javascript/gis.js.html

@ -1,6 +1,6 @@
#HTTP_HEADER{Content-type:text/javascript}
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})dist/leaflet.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})dist/[(#CONFIG{auto_compress_js}|=={oui}|?{'leaflet','leaflet-src'})].js]})]})]
[L.Icon.Default.imagePath = "(#CHEMIN{#EVAL{_DIR_LIB_GIS}dist/images}|url_absolue)";]
@ -8,15 +8,15 @@
[(#INCLURE{javascript/gis_utils.js})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/layer/vector/KML.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/KML.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/layer/vector/GPX.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/GPX.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/layer/tile/leaflet-providers-0.0.1.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/leaflet-providers.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/control/Control.FullScreen.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/Control.FullScreen.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/control/Control.MiniMap.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/Control.MiniMap.js]})]})]
[(#REM) Tester suivant la config pour ces deux scripts ]
@ -26,11 +26,11 @@
]
[(#LISTE{google_roadmap,google_satellite,google_terrain}|array_intersect{#GET{layers}}|count|>{0}|oui)
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/layer/tile/Google.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/Google.js]})]})]
]
[(#VAL{bing_aerial}|in_array{#GET{layers}}|oui)
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/layer/tile/Bing.js]})]})]
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/Bing.js]})]})]
]
#INCLURE{javascript/gis_init_map.js}
@ -39,7 +39,7 @@
Lib clustering si besoin
]
[(#ENV{cluster}|=={oui}|oui)
#INCLURE{javascript/leaflet.markercluster-src.js}
[(#INCLURE{[(#VAL{[(#EVAL{_DIR_LIB_GIS})plugins/leaflet.markercluster-src.js]})]})]
]
[(#CONFIG{auto_compress_js}|=={oui}|oui)

2
javascript/gis_init_map.js

@ -73,7 +73,7 @@ var gis_init_map = function(mapcfg) {
map.addControl(new L.Control.FullScreen());
if (mapcfg['overview']){
var minimap_layer = get_layer(mapcfg['default_layer']);
var miniMap = new L.Control.MiniMap(minimap_layer,{width: 100,height: 100}).addTo(map);
var miniMap = new L.Control.MiniMap(minimap_layer,{width: 100,height: 100, toggleDisplay: true}).addTo(map);
}
}

1883
javascript/leaflet.markercluster-src.js

File diff suppressed because it is too large Load Diff

10
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="gis"
categorie="divers"
version="4.7.2"
version="4.8.0"
schema="2.0.3"
etat="test"
compatibilite="[3.0.0;3.0.*]"
@ -15,12 +15,12 @@
<auteur>b_b</auteur>
<auteur lien="http://www.kent1.info">kent1</auteur>
<auteur lien="http://www.ldd.fr">Les Développements Durables</auteur>
<credit lien="http://leaflet.cloudmade.com/">Leaflet</credit>
<credit lien="http://leafletjs.com/">Leaflet</credit>
<credit lien="https://github.com/shramov/leaflet-plugins">Leaflet plugins</credit>
<credit lien="https://github.com/brunob/leaflet-providers">Leaflet providers</credit>
<credit lien="https://github.com/leaflet-extras/leaflet-providers">Leaflet providers</credit>
<credit lien="https://github.com/brunob/leaflet.fullscreen">Leaflet fullscreen</credit>
<credit lien="https://github.com/Norkart/Leaflet-MiniMap">Leaflet minimap</credit>
<copyright>2011-2012</copyright>
<copyright>2011-2013</copyright>
<licence>GPL v3</licence>
<credit lien="http://mattrich.deviantart.com/art/Picnic-101256405">Icône de mattrich sous licence CC BY-NC-SA</credit>
@ -29,7 +29,7 @@
<utilise nom="selecteur_generique" compatibilite="[1.12;]" />
<necessite nom="saisies" compatibilite="[1.19.0;]" />
<lib nom="leaflet-gis-4.1.13" lien="http://github.com/downloads/brunob/Leaflet/leaflet-gis-4.1.13.zip" />
<lib nom="leaflet-gis-4.8.0" lien="http://contrib.spip.net/IMG/zip/leaflet-gis-4.8.0.zip" />
<pipeline
nom="declarer_tables_interfaces"

Loading…
Cancel
Save