Browse Source

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

svn/root/tags/v4.47.18
brunobergot@gmail.com 11 years ago
parent
commit
aa94306872
  1. 5
      .gitattributes
  2. 1
      gis_download.html
  3. 41
      gis_kml.html
  4. 7
      inclure/download_gpx.html
  5. 9
      inclure/download_kml.html
  6. 9
      inclure/gpx-item.html
  7. 42
      inclure/kml-item.html

5
.gitattributes vendored

@ -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

1
gis_download.html

@ -0,0 +1 @@
<BOUCLE_gis(GIS){id_gis}>[(#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})]</BOUCLE_gis>

41
gis_kml.html

@ -7,46 +7,7 @@ version="1.0" encoding="#CHARSET" ?>
[<name>(#NOM_SITE_SPIP|texte_backend)</name>]
[<description>(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)</description>]
<BOUCLE_gis(GIS gis_liens){id_gis ?}{id_rubrique ?}{id_article ?}{id_breve ?}{id_document ?}{id_mot ?}{id_auteur ?}{id_syndic ?}{recherche ?}{0, #ENV{limit,500}}>
<Placemark id="#gis[(#ID_GIS)]">
<name>[(#TITRE|sinon{#INFO_TITRE{#OBJET,#ID_OBJET}}|supprimer_numero|texte_backend)]</name>
<atom:link rel="related" href="[(#ID_OBJET|generer_url_entite{#OBJET}|url_absolue)]" />
<description>
<![CDATA[
[(#DESCRIPTIF|texte_backend)]
]]>
</description>
[<Point>
<coordinates>(#LON),[(#LAT)]</coordinates>
</Point>]
[(#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,''}
<Style>
<IconStyle>
<scale>1.0</scale>
[<Icon>
<href>(#GET{logo_doc}|extraire_attribut{src}|url_absolue)</href>
</Icon>]
<hotSpot x="0.5" y="0.5" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<ExtendedData>
[<Data name="iconSize">
<value>(#GET{icon_w}),[(#GET{icon_h})]</value>
</Data>]
<Data name="iconAnchor">
<value>0.5,0.5</value>
</Data>
</ExtendedData>]
</Placemark>
[(#INCLURE{fond=inclure/kml-item,id_gis,objet,id_objet})]
</BOUCLE_gis>
</Document>
</kml>

7
inclure/download_gpx.html

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="#CHARSET" standalone="no" ?>
<gpx version="1.1" creator="SPIP"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
[(#INCLURE{fond=inclure/gpx-item,id_gis})]
</gpx>

9
inclure/download_kml.html

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="#CHARSET" ?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
[<name>(#NOM_SITE_SPIP|texte_backend)</name>]
[<description>(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)</description>]
[(#INCLURE{fond=inclure/kml-item,id_gis})]
</Document>
</kml>

9
inclure/gpx-item.html

@ -0,0 +1,9 @@
<BOUCLE_gis(GIS){id_gis}>
<trk>
[<name>(#TITRE|supprimer_numero|texte_backend)</name>][
<desc>(#DESCRIPTIF|texte_backend)</desc>
]<trkseg>
[<trkpt lat="(#LAT)" lon="[(#LON)]"></trkpt>]
</trkseg>
</trk>
</BOUCLE_gis>

42
inclure/kml-item.html

@ -0,0 +1,42 @@
<BOUCLE_gis(GIS){id_gis}>
<Placemark id="#gis[(#ID_GIS)]">
<name>[(#TITRE|supprimer_numero|texte_backend)]</name>[
<atom:link rel="related" href="(#ID_OBJET|generer_url_entite{#OBJET}|url_absolue)" />
]<description>
<![CDATA[
[(#DESCRIPTIF|texte_backend)]
]]>
</description>
[<Point>
<coordinates>(#LON),[(#LAT)]</coordinates>
</Point>]
[(#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,''}
<Style>
<IconStyle>
<scale>1.0</scale>
[<Icon>
<href>(#GET{logo_doc}|extraire_attribut{src}|url_absolue)</href>
</Icon>]
<hotSpot x="0.5" y="0.5" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<ExtendedData>
[<Data name="iconSize">
<value>(#GET{icon_w}),[(#GET{icon_h})]</value>
</Data>]
<Data name="iconAnchor">
<value>0.5,0.5</value>
</Data>
</ExtendedData>]
</Placemark>
</BOUCLE_gis>
Loading…
Cancel
Save