Accéder au contenu.
Menu Sympa

devel - [Devel] r357 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r357 - trunk


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r357 - trunk
  • Date: Sun, 13 Jul 2008 11:03:53 +0200 (CEST)
  • List-archive: <http://agendadulibre.org/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: thomas
Date: Sun Jul 13 10:56:37 2008
New Revision: 357

Log:

* lugtextlist.php

Nouveau script qui génère un fichier texte séparé par des tabs
compréhensible par l'API OpenLayers.Layer.Text. Voir

http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/Text-js.html
pour la documentation de cette API.

* map.php

Ajout d'un layer rendu à partir du fichier texte généré par
lugtextlist.php, qui permet de visualiser la position des GULLs sur
la carte de France.

* lug.png

Jolie petite icône pour positionner les GULLs sur la carte.



Added:
trunk/lug.png (contents, props changed)
trunk/lugtextlist.php
Modified:
trunk/map.php

Added: trunk/lug.png
==============================================================================
Binary file. No diff available.

Added: trunk/lugtextlist.php
==============================================================================
--- (empty file)
+++ trunk/lugtextlist.php Sun Jul 13 10:56:37 2008
@@ -0,0 +1,57 @@
+<?php
+/* Copyright 2008
+ * - Thomas Petazzoni <thomas POINT petazzoni CHEZ enix POINT org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+include("bd.inc.php");
+include("bd-private.inc.php");
+include("funcs.inc.php");
+
+$db = new db();
+
+calendar_setlocale();
+
+Header("Content-type: text/plain; charset: iso-8859-1");
+
+echo "lon\tlat\ttitle\tdescription\ticon\n";
+
+$sql = "select * from lugs";
+
+$lugs = $db->query($sql);
+while($lug = mysql_fetch_object($lugs))
+{
+ if ($lug->city == "")
+ continue;
+
+ $city = $db->query("select * from cities where name='" . $lug->city . "'");
+ if (! $city)
+ continue;
+
+ if (mysql_num_rows($city) != 1)
+ continue;
+
+ $city = mysql_fetch_object($city);
+
+ echo
+ $city->longitude . "\t" .
+ $city->latitude . "\t" .
+ $lug->name . "\t" .
+ "<p style=\"font-size: 60%; text-align: center;\"><a href=\"" .
$lug->url . "\">" . $lug->url . "</a></p>" . "\t" .
+ calendar_absolute_url("lug.png") . "\n";
+}
+?>
\ No newline at end of file

Modified: trunk/map.php
==============================================================================
--- trunk/map.php (original)
+++ trunk/map.php Sun Jul 13 10:56:37 2008
@@ -57,6 +57,9 @@

var newl = new OpenLayers.Layer.GeoRSS('AdL', '" .
calendar_absolute_url("rss.php?region=all&map=1&daylimit=0") . "');
map.addLayer(newl);
+
+ var newl = new OpenLayers.Layer.Text('LUGs', {location: '" .
calendar_absolute_url("lugtextlist.php") . "'});
+ map.addLayer(newl);
}

</script>




  • [Devel] r357 - trunk, svn, 13/07/2008

Archives gérées par MHonArc 2.6.16.

Haut de le page