From aa943068720d172acb3f7c95d8bff1d217c34c30 Mon Sep 17 00:00:00 2001
From: "brunobergot@gmail.com" <>
Date: Mon, 9 Jul 2012 12:53:32 +0000
Subject: [PATCH] refonte du squelette gis_kml pour faciliter sa surcharge par
d'autres plugins (cf gis_geometries) + ajout d'un squelette de download d'un
objet gis au format kml ou gpx
---
.gitattributes | 5 +++++
gis_download.html | 1 +
gis_kml.html | 41 +-------------------------------------
inclure/download_gpx.html | 7 +++++++
inclure/download_kml.html | 9 +++++++++
inclure/gpx-item.html | 9 +++++++++
inclure/kml-item.html | 42 +++++++++++++++++++++++++++++++++++++++
7 files changed, 74 insertions(+), 40 deletions(-)
create mode 100644 gis_download.html
create mode 100644 inclure/download_gpx.html
create mode 100644 inclure/download_kml.html
create mode 100755 inclure/gpx-item.html
create mode 100755 inclure/kml-item.html
diff --git a/.gitattributes b/.gitattributes
index 9a6e89e..536871e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -15,6 +15,7 @@ formulaires/rechercher_gis.php -text
genie/gis_nettoyer_base.php -text
/gis_administrations.php -text
/gis_autoriser.php -text
+/gis_download.html -text
/gis_fonctions.php -text
/gis_json.html -text
/gis_kml.html -text
@@ -41,6 +42,10 @@ images/openlayers/dark/zoombar.png -text
inc/gis_xmlrpc.php -text
inc/iptc.php -text
inc/kml_infos.php -text
+inclure/download_gpx.html -text
+inclure/download_kml.html -text
+inclure/gpx-item.html -text
+inclure/kml-item.html -text
javascript/gis.js -text
json/gis.html -text
json/gis_articles.html -text
diff --git a/gis_download.html b/gis_download.html
new file mode 100644
index 0000000..914a7bd
--- /dev/null
+++ b/gis_download.html
@@ -0,0 +1 @@
+[(#ENV**{format}|=={kml}|?{#HTTP_HEADER{Content-Type: application/vnd.google-earth.kml+xml;charset=#CHARSET},#HTTP_HEADER{Content-Type: application/gpx+xml;charset=#CHARSET}})][(#HTTP_HEADER{Content-Disposition: attachment; filename=#TITRE|concat{.#ENV**{format}}})][(#INCLURE{fond=inclure/download_#ENV{format},id_gis})]
\ No newline at end of file
diff --git a/gis_kml.html b/gis_kml.html
index 051c888..28e2934 100755
--- a/gis_kml.html
+++ b/gis_kml.html
@@ -7,46 +7,7 @@ version="1.0" encoding="#CHARSET" ?>
[(#NOM_SITE_SPIP|texte_backend)]
[(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)]
-
- [(#TITRE|sinon{#INFO_TITRE{#OBJET,#ID_OBJET}}|supprimer_numero|texte_backend)]
-
-
-
-
- [
- (#LON),[(#LAT)]
- ]
- [(#SET{logo_doc,''})]
- [(#LOGO_GIS|oui)
- [(#SET{logo_doc,#LOGO_GIS|image_passe_partout{28,28}|image_recadre{28,28}|image_recadre{32,32,center}})]]
- [(#LOGO_GIS|non)
- [(#CHEMIN{images/marker_defaut.png}|oui)[
- (#SET{logo_doc,#CHEMIN{images/marker_defaut.png}|image_passe_partout{28,28}|image_recadre{28,28}})]
- ]]
- [(#GET{logo_doc}|oui)
- #SET{icon_w,#GET{logo_doc}|extraire_attribut{src}|largeur}
- #SET{icon_h,#GET{logo_doc}|extraire_attribut{src}|hauteur}
- #SET{icon_anchorPoint,''}
-
-
- [
- (#GET{icon_w}),[(#GET{icon_h})]
- ]
-
- 0.5,0.5
-
- ]
-
+ [(#INCLURE{fond=inclure/kml-item,id_gis,objet,id_objet})]
\ No newline at end of file
diff --git a/inclure/download_gpx.html b/inclure/download_gpx.html
new file mode 100644
index 0000000..8191d49
--- /dev/null
+++ b/inclure/download_gpx.html
@@ -0,0 +1,7 @@
+
+
+ [(#INCLURE{fond=inclure/gpx-item,id_gis})]
+
\ No newline at end of file
diff --git a/inclure/download_kml.html b/inclure/download_kml.html
new file mode 100644
index 0000000..87d6aff
--- /dev/null
+++ b/inclure/download_kml.html
@@ -0,0 +1,9 @@
+
+
+
+[(#NOM_SITE_SPIP|texte_backend)]
+[(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)]
+ [(#INCLURE{fond=inclure/kml-item,id_gis})]
+
+
\ No newline at end of file
diff --git a/inclure/gpx-item.html b/inclure/gpx-item.html
new file mode 100755
index 0000000..5264c65
--- /dev/null
+++ b/inclure/gpx-item.html
@@ -0,0 +1,9 @@
+
+
+ [(#TITRE|supprimer_numero|texte_backend)][
+ (#DESCRIPTIF|texte_backend)
+ ]
+ []
+
+
+
\ No newline at end of file
diff --git a/inclure/kml-item.html b/inclure/kml-item.html
new file mode 100755
index 0000000..ade8ba0
--- /dev/null
+++ b/inclure/kml-item.html
@@ -0,0 +1,42 @@
+
+
+ [(#TITRE|supprimer_numero|texte_backend)][
+
+ ]
+
+
+ [
+ (#LON),[(#LAT)]
+ ]
+ [(#SET{logo_doc,''})]
+ [(#LOGO_GIS|oui)
+ [(#SET{logo_doc,#LOGO_GIS|image_passe_partout{28,28}|image_recadre{28,28}|image_recadre{32,32,center}})]]
+ [(#LOGO_GIS|non)
+ [(#CHEMIN{images/marker_defaut.png}|oui)[
+ (#SET{logo_doc,#CHEMIN{images/marker_defaut.png}|image_passe_partout{28,28}|image_recadre{28,28}})]
+ ]]
+ [(#GET{logo_doc}|oui)
+ #SET{icon_w,#GET{logo_doc}|extraire_attribut{src}|largeur}
+ #SET{icon_h,#GET{logo_doc}|extraire_attribut{src}|hauteur}
+ #SET{icon_anchorPoint,''}
+
+
+ [
+ (#GET{icon_w}),[(#GET{icon_h})]
+ ]
+
+ 0.5,0.5
+
+ ]
+
+
\ No newline at end of file