<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>La famille Bonnal dans un coin de territoire &#187; géomatique</title>
	<atom:link href="http://www.bonnal.net/category/geomatique/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bonnal.net</link>
	<description>De Brouzet-lès-Quissac à la géomatique</description>
	<lastBuildDate>Sun, 29 Jan 2012 16:56:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mon séminaire SIG à Dakar</title>
		<link>http://www.bonnal.net/mon-seminaire-sig-a-dakar/</link>
		<comments>http://www.bonnal.net/mon-seminaire-sig-a-dakar/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 09:15:26 +0000</pubDate>
		<dc:creator>Vincent Bonnal</dc:creator>
				<category><![CDATA[géomatique]]></category>

		<guid isPermaLink="false">http://www.bonnal.net/?p=1044</guid>
		<description><![CDATA[Du 28 novembre au 2 décembre 2011, je suis allé à Dakar réaliser un séminaire sur les méthodes et outils des systèmes d&#8217;information géographique. Très intéressant, les élèves ingénieurs informaticiens de 3ème année de l&#8217;École Supérieur Polytechnique étaient d&#8217;un très bon niveau, exigeants et curieux. Bref, ça restera un bon souvenir. Eprouvant, mais un bon &#8230; <a class="read-excerpt" href="http://www.bonnal.net/mon-seminaire-sig-a-dakar/">Continuer la lecture <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Du 28 novembre au 2 décembre 2011, je suis allé à Dakar réaliser un séminaire sur les méthodes et outils des systèmes d&#8217;information géographique. Très intéressant, les élèves ingénieurs informaticiens de 3ème année de l&#8217;École Supérieur Polytechnique étaient d&#8217;un très bon niveau, exigeants et curieux.</p>
<p>Bref, ça restera un bon souvenir. Eprouvant, mais un bon souvenir. Merci à eux.</p>
<div id="attachment_1045" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.bonnal.net/wp-content/uploads/2012/01/P1040293.jpg" rel="lightbox[1044]"><img class="size-medium wp-image-1045" title="La photo de la fin..." src="http://www.bonnal.net/wp-content/uploads/2012/01/P1040293-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">On sent les traits tirés du formateur <img src='http://www.bonnal.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bonnal.net/mon-seminaire-sig-a-dakar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installer Geonetwork</title>
		<link>http://www.bonnal.net/installer-geonetwork/</link>
		<comments>http://www.bonnal.net/installer-geonetwork/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 11:38:06 +0000</pubDate>
		<dc:creator>Vincent Bonnal</dc:creator>
				<category><![CDATA[géomatique]]></category>

		<guid isPermaLink="false">http://www.bonnal.net/?p=1005</guid>
		<description><![CDATA[Voici la liste des commandes sous Linux nécessaires pour installer à la main geonetwork sur un serveur linux de type Debian (comme Ubuntu): Il vous faut tout d&#8217;abord installer les outils nécessaires à la compilation de geonetwork, à savoir les paquets subversion (commande svn), maven2 (commande mvn) et éventuellement unzip (qui normalement est installé par &#8230; <a class="read-excerpt" href="http://www.bonnal.net/installer-geonetwork/">Continuer la lecture <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Voici la liste des commandes sous Linux nécessaires pour<strong> installer à la main geonetwork sur un serveur linux</strong> de type Debian (comme Ubuntu):</p>
<p>Il vous faut tout d&#8217;abord installer les outils nécessaires à la compilation de geonetwork, à savoir les paquets <a href="apt://subversion">subversion</a> (commande svn), <a href="apt://maven2">maven2 </a>(commande mvn) et éventuellement <a href="apt://unzip">unzip </a>(qui normalement est installé par défaut).</p>
<p>Notez que nous allons installer geonetwork dans le répertoire /usr/local/geonetwork/ que nous allons préalablement créer.</p>
<p>Passez en mode root:</p>
<address><span style="color: #333399;">sudo -i</span></address>
<p>Puis, tapez ces commandes:</p>
<address><span style="color: #333399;">svn co https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk geonetwork</span></address>
<address><span style="color: #333399;">cd geonetwork</span></address>
<address><span style="color: #333399;">mvn clean install</span></address>
<address><span style="color: #333399;">mvn assembly:assembly</span></address>
<address><span style="color: #333399;">mkdir /usr/local/geonetwork</span></address>
<address><span style="color: #333399;">mv target/release/geonetwork-2.7.0-SNAPSHOT-bin.zip /usr/local/geonetwork/.</span></address>
<address><span style="color: #333399;">cd /usr/local/geonetwork</span></address>
<address><span style="color: #333399;">unzip geonetwork-2.7.0-SNAPSHOT-bin.zip</span></address>
<address><span style="color: #333399;">cd geonetwork</span></address>
<address><span style="color: #333399;">cd bin</span></address>
<address><span style="color: #333399;">./start-geonetwork.sh</span></address>
<p>Pour tester l&#8217;installation, allez sur <a href="http://localhost:8080/geonetwork">http://localhost:8080/geonetwork</a></p>
<p>Dans la foulée, geoserver s&#8217;est installé: <a href="http://localhost:8080/geonetwork">http://localhost:8080/geoserver/web</a></p>
<p>Par défaut pour geoserver, l&#8217;utilisateur admin est &laquo;&nbsp;admin&nbsp;&raquo; (sans les guillemets) et le mot de passe est &laquo;&nbsp;geoserver&nbsp;&raquo; (toujours sans les guillements).</p>
<p>Détail à signaler. Par défaut la carte wms affichée est appelée par une requete WMS en localhost sur le geoserver installé conjointement à geoNetwork. Si vous tentez de consulter votre service geonetwork d&#8217;un autre poste, aucune carte s&#8217;affiche&#8230;</p>
<p>Il faut pour pallier  cela, éditer le fichier config-gui.xml et modifier toutes les ligne appelant le service wms en changant localhost par l&#8217;adresse (routable) de votre serveur, par exemple 193.89.123.125 (à vous de la connaître&#8230;)</p>
<p>Cherchez dans config-gui.xml toutes les lignes appelant:</p>
<p><span style="color: #000080;">http://localhost:8080/geoserver/wms</span></p>
<p>et remplacez les par</p>
<p><span style="color: #000080;">http://193.89.123.125:8080/geoserver/wms</span></p>
<h2>Installation plus rapide</h2>
<p>Bon, il est vrai qu&#8217;il y a un autre moyen d&#8217;installer geonetwork (beaucoup) plus simplement. Téléchargez le fichier jar nommé geonetwork-install-2.x.x-0.jar (on supposera que le fichier jar a été téléchargé dans /home/mon_user/Téléchargement/) puis dans un terminal (sans faire le sudo -i), tapez:</p>
<address><span style="color: #333399;"><em>sudo java -jar /home/mon_user/Téléchargement/geonetwork-install-2.x.x-0.jar</em></span></address>
<p>D&#8217;autres informations sont là: <a href="http://trac.osgeo.org/geonetwork/">http://trac.osgeo.org/geonetwork/</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre id="line63">http://localhost:8080/geoserver/wms</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bonnal.net/installer-geonetwork/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bonne année 2011 aux géomaticiens !</title>
		<link>http://www.bonnal.net/bonne-annee-2011-aux-geomaticiens/</link>
		<comments>http://www.bonnal.net/bonne-annee-2011-aux-geomaticiens/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 19:23:53 +0000</pubDate>
		<dc:creator>Vincent Bonnal</dc:creator>
				<category><![CDATA[géomatique]]></category>

		<guid isPermaLink="false">http://www.bonnal.net/?p=850</guid>
		<description><![CDATA[Voilà la carte de voeu pour 2011 Merci Patricio pour l&#8217;idée&#8230; (mais je pense qu&#8217;on doit la faire chaque année celle-là&#8230;)]]></description>
			<content:encoded><![CDATA[<p>Voilà la carte de voeu pour 2011</p>
<p><a href="http://www.bonnal.net/wp-content/uploads/2011/01/carte-de-voeu.jpg" rel="lightbox[850]"><img class="aligncenter size-medium wp-image-851" title="Voeu, département de l'Indre, région Centre" src="http://www.bonnal.net/wp-content/uploads/2011/01/carte-de-voeu-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p style="text-align: left;">Merci Patricio pour l&#8217;idée&#8230; (mais je pense qu&#8217;on doit la faire chaque année celle-là&#8230;)</p>
<p style="text-align: left;"> <img src='http://www.bonnal.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonnal.net/bonne-annee-2011-aux-geomaticiens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spatialiser une base de données postGIS</title>
		<link>http://www.bonnal.net/spatialiser-une-base-de-donnees-postgis/</link>
		<comments>http://www.bonnal.net/spatialiser-une-base-de-donnees-postgis/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 12:51:33 +0000</pubDate>
		<dc:creator>Vincent Bonnal</dc:creator>
				<category><![CDATA[Développement web]]></category>
		<category><![CDATA[géomatique]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Webmapping]]></category>

		<guid isPermaLink="false">http://www.bonnal.net/?p=705</guid>
		<description><![CDATA[Même si PostgreSQL a été installé conjointement avec PostGis, la base de données n&#8217;est pas, par défaut, spatialisée. Un rapide coup d&#8217;oeil aux tables nous montre l&#8217;absence des deux principales tables nécessaires à PostGIS, geometry_columns et spatial_ref_sys. Voilà comment les ajouter, ainsi que l&#8217;ensemble des fonctions nécessaires à la spatialisation de la base colloque: sudo &#8230; <a class="read-excerpt" href="http://www.bonnal.net/spatialiser-une-base-de-donnees-postgis/">Continuer la lecture <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Même si  PostgreSQL a été installé conjointement avec PostGis, la base de  données n&#8217;est pas, par défaut, spatialisée.</p>
<p>Un rapide coup d&#8217;oeil aux  tables nous montre l&#8217;absence des deux principales tables nécessaires à  PostGIS, geometry_columns et spatial_ref_sys.</p>
<p>Voilà comment les ajouter, ainsi que l&#8217;ensemble des fonctions nécessaires à la spatialisation de la base colloque:</p>
<pre>sudo su - postgres</pre>
<pre>createlang plpgsql colloque</pre>
<pre>psql -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql -d colloque</pre>
<pre>psql -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql -d colloque</pre>
<p>Pour ajouter les droits d’usage sur ces tables à l’utilisateur, saisir :</p>
<pre>sudo –s –u postgres</pre>
<pre>psql colloque</pre>
<pre>ALTER TABLE geometry_columns OWNER TO colloque;</pre>
<pre style="text-align: justify;">ALTER TABLE spatial_ref_sys OWNER TO colloque;
</pre>
<p><em><br />
</em></p>
<p><em>No stress   <img src='http://www.bonnal.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonnal.net/spatialiser-une-base-de-donnees-postgis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Création d’un serveur web virtualisé dédié au webmapping – partie 4, fin</title>
		<link>http://www.bonnal.net/creation-d%e2%80%99un-serveur-web-virtualise-dedie-au-webmapping-%e2%80%93-partie-4-fin/</link>
		<comments>http://www.bonnal.net/creation-d%e2%80%99un-serveur-web-virtualise-dedie-au-webmapping-%e2%80%93-partie-4-fin/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 12:45:24 +0000</pubDate>
		<dc:creator>Vincent Bonnal</dc:creator>
				<category><![CDATA[Développement web]]></category>
		<category><![CDATA[géomatique]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Serveur virtualisé]]></category>
		<category><![CDATA[serveur web]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Webmapping]]></category>

		<guid isPermaLink="false">http://www.bonnal.net/?p=702</guid>
		<description><![CDATA[C&#8217;est pas tout de créer des serveur web et bases de données, faut savoir els exploiter. Dans ce tutoriel, vous trouverez comment réaliser un petit script pour tester votre serveur en mettant en oeuvre Ajax. Premier site avec Ajax L&#8217;objectif est de créer une page web avec une zone de saisie couplée à un liste &#8230; <a class="read-excerpt" href="http://www.bonnal.net/creation-d%e2%80%99un-serveur-web-virtualise-dedie-au-webmapping-%e2%80%93-partie-4-fin/">Continuer la lecture <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em>C&#8217;est pas tout de créer des serveur web et bases de données, faut savoir els exploiter. Dans ce tutoriel, vous trouverez comment réaliser un petit script pour tester votre serveur en mettant en oeuvre Ajax.</em></p>
<p style="text-align: justify;">
<h1 style="text-align: justify;"></h1>
<h1 style="text-align: justify;">Premier site avec Ajax</h1>
<p style="text-align: justify;">L&#8217;objectif est de créer une page web avec une zone de saisie couplée à un liste de suggestion issue d&#8217;une base de données. A chaque saisie de l&#8217;utilisateur, une requete Ajax est soumise au serveur qui va interroger la base de données pour vérifier que le nom d&#8217;une ville commençant par les lettres saisies existe pas dans la table villes. Si c&#8217;est le cas, le serveur renvoi la liste des villes correspondant. Les villes renvoyées peuvent être cliquées pour remplir automatiquement la zone de saisie.</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;">Créons notre table</h2>
<p style="text-align: justify;">
<p style="text-align: justify;">Dans Postgresql, on créé la table avec le code SQL suivant</p>
<pre style="text-align: justify;">CREATE TABLE villes</pre>
<pre style="text-align: justify;">(</pre>
<pre style="text-align: justify;">nom character varying(50) NOT NULL,</pre>
<pre style="text-align: justify;">CONSTRAINT villes_pkey PRIMARY KEY (nom)</pre>
<pre style="text-align: justify;">)</pre>
<p style="text-align: justify;">
<p style="text-align: justify;">Il est téléchargé sur Jquery.com la bibliothèque Javascript JQuery qui est enregistrée à la racine du site. Pour fonctionner, le site est constitué des 3 principaux fichiers suivants:</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;"><strong>index.xhtml: </strong></h2>
<pre style="text-align: justify;">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</pre>
<pre style="text-align: justify;">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</pre>
<pre style="text-align: justify;">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</pre>
<pre style="text-align: justify;">&lt;head&gt;</pre>
<pre style="text-align: justify;">&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;</pre>
<pre style="text-align: justify;">&lt;!-- Vital, afin que le site soit bien interprété par le</pre>
<pre style="text-align: justify;">navigateur en termes de caractères --&gt;</pre>
<pre style="text-align: justify;">&lt;title&gt;Mon premier site utilisant Ajax&lt;/title&gt;</pre>
<pre style="text-align: justify;">&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;</pre>
<pre style="text-align: justify;">&lt;!-- lien vers la bibliothèque jquery téléchargées depuis jquery.com --&gt;</pre>
<pre style="text-align: justify;">&lt;script type="text/javascript" src="suggest.js"&gt;&lt;/script&gt;</pre>
<pre style="text-align: justify;">&lt;!-- lien vers le fichier personnel suggest.js qui s'exécuter après</pre>
<pre style="text-align: justify;">le chargement du DOM --&gt;</pre>
<pre style="text-align: justify;">&lt;link rel="stylesheet" href="suggest.css" media="screen" /&gt;</pre>
<pre style="text-align: justify;">&lt;!-- lien vers le fichier personnel CSS --&gt;</pre>
<pre style="text-align: justify;">&lt;/head&gt;</pre>
<pre style="text-align: justify;">&lt;body&gt;</pre>
<pre style="text-align: justify;">&lt;div&gt;</pre>
<pre style="text-align: justify;">Saisir un mot: &lt;input type="text" /&gt;</pre>
<pre style="text-align: justify;">&lt;!-- C'est ici que l'utilisateur sélectionnera</pre>
<pre style="text-align: justify;">les première lettre du nom à trouver  --&gt;</pre>
<pre style="text-align: justify;">&lt;/div&gt;</pre>
<pre style="text-align: justify;">&lt;div&gt;</pre>
<pre style="text-align: justify;">Suggestions: &lt;span id="suggest"&gt;&lt;/span&gt;</pre>
<pre style="text-align: justify;">&lt;!-- c'est dans ce span -élément inline- que s'écrira le résultat</pre>
<pre style="text-align: justify;">de la requete ajax  --&gt;</pre>
<pre style="text-align: justify;">&lt;/div&gt;</pre>
<pre style="text-align: justify;">&lt;/body&gt;</pre>
<pre style="text-align: justify;">&lt;/html&gt;</pre>
<p style="text-align: justify;">
<h2 style="text-align: justify;"><strong>suggest.js (exécuté côté client: le navigateur web): </strong></h2>
<pre style="text-align: justify;">$(document).ready(function() {</pre>
<pre style="text-align: justify;">// $(document).ready() s'exécute dès que le DOM est chargé,</pre>
<pre style="text-align: justify;">// avant que toutes les ressources soient téléchargées (ex: images)</pre>
<pre style="text-align: justify;">$('#txt1').keyup(function() {</pre>
<pre style="text-align: justify;">// inscrit dans le gestionnaire d'événement que la fonction propose() est</pre>
<pre style="text-align: justify;">// à lancer lorsque la touche du clavier est lachée sur le contrôle txt1</pre>
<pre style="text-align: justify;">propose();  // fonction à appeler sur le keyup de l'input txt1</pre>
<pre style="text-align: justify;">});</pre>
<pre style="text-align: justify;">});</pre>
<pre style="text-align: justify;">function propose(){</pre>
<pre style="text-align: justify;">if($('#txt1').val() == '') { // si l'input d'id=txt1 est vide ou vidé</pre>
<pre style="text-align: justify;">$('#suggest').html(''); // vide le span d'id=suggest</pre>
<pre style="text-align: justify;">return; // sort de la fonction</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;">$.ajax({  // exécute une requete Ajax</pre>
<pre style="text-align: justify;">type: 'GET',  // en mode GET</pre>
<pre style="text-align: justify;">url: 'suggest.php',  // vers le fichier suggest.php</pre>
<pre style="text-align: justify;">data: 'txt='+$("#txt1").val(),  // avec les paramètres suivant donc suggest.php?txt=...</pre>
<pre style="text-align: justify;">dataType:'text',  // le serveur renverra une réponse de suggest.php sous forme texte</pre>
<pre style="text-align: justify;">success: function(msg){ $('#suggest').html(msg); }</pre>
<pre style="text-align: justify;">// si Ajax réussi, écrit dans le span d'id=suggest</pre>
<pre style="text-align: justify;">// la réponse du serveur suggest.php?txt=</pre>
<pre style="text-align: justify;">});</pre>
<pre style="text-align: justify;">}</pre>
<p style="text-align: justify;">
<h2 style="text-align: justify;"><strong>suggest.php(exécuté côté serveur et restituant au client de l&#8217;HTML)<br />
</strong></h2>
<pre style="text-align: justify;">&lt;?php</pre>
<pre style="text-align: justify;">session_start();   // démarrer la gestion des sessions</pre>
<pre style="text-align: justify;">header("Content-Type: text/plain ; charset=utf-8");</pre>
<pre style="text-align: justify;">// renvoie un réponse au format MIME text avec les caractères utf-8</pre>
<pre style="text-align: justify;">header("Cache-Control: no-cache, private"); // anti cache pour HTTP/1.1</pre>
<pre style="text-align: justify;">header("Pragma: no-cache"); // anti cache pour HTTP/1.0</pre>
<pre style="text-align: justify;">if (!isset($_SESSION['chaineconnexion'])) {</pre>
<pre style="text-align: justify;">// si la variable $_SESSION['chaineconnexion'] n'est pas définie alors:</pre>
<pre style="text-align: justify;">$_SESSION['chaineconnexion']='host=localhost port=5432 user=form password=form dbname=form';</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;">if(isset($_REQUEST['txt'])){ // si la variable $_REQUEST['txt'] est bien définie alors:</pre>
<pre style="text-align: justify;">$conn=pg_connect($_SESSION['chaineconnexion']); // on créé la connexion avec la base PGSQL</pre>
<pre style="text-align: justify;">$sql = "SELECT nom FROM villes WHERE nom LIKE '".$_REQUEST['txt']."%'";</pre>
<pre style="text-align: justify;">// on définit la requete à exécuter</pre>
<pre style="text-align: justify;">$result = pg_query($conn,$sql);</pre>
<pre style="text-align: justify;">// on exécute la requete, le flux de données généré sera représenté par $result</pre>
<pre style="text-align: justify;">while($row = pg_fetch_assoc($result)){</pre>
<pre style="text-align: justify;">// on boucle ligne à ligne (à chaque appel de pg_fetch_array,</pre>
<pre style="text-align: justify;">// $row récupèrera sous forme de table la ligne de données)</pre>
<pre style="text-align: justify;">echo '&lt;div onclick=\'$("#txt1").val("'.$row['nom'].</pre>
<pre style="text-align: justify;">'");$("#suggest").hide();\'&gt;'.$row['nom'].'&lt;/div&gt;';</pre>
<pre style="text-align: justify;">// exemple, renverra: &lt;div onclick='$("#txt1").val("Montpellier");</pre>
<pre style="text-align: justify;">// $("#suggest").hide();'&gt;Montpellier&lt;/div&gt;</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;">?&gt;</pre>
<p style="text-align: justify;">
<p style="text-align: justify;">
<h1 style="text-align: justify;">Mise en forme</h1>
<p style="text-align: justify;">Pour mettre en forme notre site, on applique une feuille de style simple</p>
<h2 style="text-align: justify;">suggest.css</h2>
<p style="text-align: justify;">
<pre style="text-align: justify;">root {</pre>
<pre style="text-align: justify;">display: block;</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;"></pre>
<pre style="text-align: justify;">#suggest {</pre>
<pre style="text-align: justify;">position:fixed;</pre>
<pre style="text-align: justify;">top:33px;</pre>
<pre style="text-align: justify;">left:130px;</pre>
<pre style="text-align: justify;">background-color:#86B0D8;</pre>
<pre style="text-align: justify;">border-style:solid;</pre>
<pre style="text-align: justify;">border-width:1px;</pre>
<pre style="text-align: justify;">margin:5px;</pre>
<pre style="text-align: justify;">cursor : wait;</pre>
<pre style="text-align: justify;">}</pre>
<pre style="text-align: justify;"></pre>
<pre style="text-align: justify;">div:hover{</pre>
<pre style="text-align: justify;">background-color:white;</pre>
<pre style="text-align: justify;">}</pre>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;"><em>Voilà, c&#8217;est fini. Les prochains articles seront plus &laquo;&nbsp;webmapping&nbsp;&raquo; avec la spatialisation des bases de données, et leur exploitation.</em></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden; text-align: justify;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>FR</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:DoNotOptimizeForBrowser /> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:"Nimbus Roman No9 L"; 	mso-font-alt:"Times New Roman"; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:"DejaVu Sans"; 	mso-font-alt:"Times New Roman"; 	mso-font-charset:0; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:"Nimbus Sans L"; 	mso-font-alt:Arial; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:none; 	mso-hyphenate:none; 	text-autospace:ideograph-other; 	font-size:12.0pt; 	font-family:"Nimbus Roman No9 L","serif"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt;} p.Standard, li.Standard, div.Standard 	{mso-style-name:Standard; 	mso-style-unhide:no; 	mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:none; 	mso-hyphenate:none; 	text-autospace:ideograph-other; 	font-size:12.0pt; 	font-family:"Nimbus Roman No9 L","serif"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt;} p.Textbody, li.Textbody, div.Textbody 	{mso-style-name:"Text body"; 	mso-style-unhide:no; 	mso-style-parent:Standard; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:6.0pt; 	margin-left:0cm; 	mso-pagination:none; 	mso-hyphenate:none; 	text-autospace:ideograph-other; 	font-size:12.0pt; 	font-family:"Nimbus Roman No9 L","serif"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt;} p.Heading2, li.Heading2, div.Heading2 	{mso-style-name:"Heading 2"; 	mso-style-unhide:no; 	mso-style-next:"Text body"; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:6.0pt; 	margin-left:0cm; 	mso-pagination:none; 	page-break-after:avoid; 	mso-outline-level:2; 	mso-hyphenate:none; 	text-autospace:ideograph-other; 	font-size:14.0pt; 	font-family:"Nimbus Sans L","sans-serif"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt; 	font-weight:bold; 	font-style:italic;} p.Heading1, li.Heading1, div.Heading1 	{mso-style-name:"Heading 1"; 	mso-style-unhide:no; 	mso-style-next:"Text body"; 	margin-top:12.0pt; 	margin-right:0cm; 	margin-bottom:6.0pt; 	margin-left:0cm; 	mso-pagination:none; 	page-break-after:avoid; 	mso-outline-level:1; 	mso-hyphenate:none; 	text-autospace:ideograph-other; 	font-size:14.0pt; 	font-family:"Nimbus Sans L","sans-serif"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt; 	font-weight:bold;} p.lignedecodeLinux, li.lignedecodeLinux, div.lignedecodeLinux 	{mso-style-name:"ligne de code Linux"; 	mso-style-update:auto; 	mso-style-unhide:no; 	mso-style-parent:Standard; 	margin-top:0cm; 	margin-right:1.0cm; 	margin-bottom:0cm; 	margin-left:14.15pt; 	margin-bottom:.0001pt; 	mso-pagination:none; 	mso-hyphenate:none; 	background:#CCCCCC; 	text-autospace:ideograph-other; 	font-size:10.5pt; 	mso-bidi-font-size:12.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt;} p.code, li.code, div.code 	{mso-style-name:code; 	mso-style-unhide:no; 	mso-style-parent:"ligne de code Linux"; 	margin-top:0cm; 	margin-right:1.0cm; 	margin-bottom:0cm; 	margin-left:14.15pt; 	margin-bottom:.0001pt; 	mso-pagination:none; 	mso-hyphenate:none; 	background:#CCCCCC; 	text-autospace:ideograph-other; 	font-size:10.5pt; 	mso-bidi-font-size:12.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt; 	mso-ansi-language:EN-US;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:12.0pt; 	mso-ansi-font-size:12.0pt; 	mso-bidi-font-size:12.0pt; 	mso-ascii-font-family:"Nimbus Roman No9 L"; 	mso-fareast-font-family:"DejaVu Sans"; 	mso-hansi-font-family:"Nimbus Roman No9 L"; 	mso-bidi-font-family:"DejaVu Sans"; 	mso-font-kerning:1.5pt;} .MsoPapDefault 	{mso-style-type:export-only; 	mso-pagination:none; 	text-autospace:ideograph-other;} @page WordSection1 	{size:612.0pt 792.0pt; 	margin:70.85pt 70.85pt 70.85pt 70.85pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.WordSection1 	{page:WordSection1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Tableau Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:none; 	text-autospace:ideograph-other; 	font-size:12.0pt; 	font-family:"Nimbus Roman No9 L","serif"; 	mso-font-kerning:1.5pt;} --> <!--[endif]--></p>
<p class="Heading1" style="page-break-before: always;">Premier site avec Ajax</p>
<p class="Textbody">L&#8217;objectif est de créer une page web avec une zone de saisie couplée à un liste de suggestion issue d&#8217;une base de données. A chaque saisie de l&#8217;utilisateur, une requete Ajax est soumise au serveur qui va interroger la base de données pour vérifier que le nom d&#8217;une ville commençant par les lettres saisies existe pas dans la table villes. Si c&#8217;est le cas, le serveur renvoi la liste des villes correspondant. Les villes renvoyées peuvent être cliquées pour remplir automatiquement la zone de saisie.</p>
<p class="Textbody">Dans Postgresql, on créé la table avec le code SQL suivant</p>
<p class="lignedecodeLinux"><span lang="EN-US">CREATE TABLE villes</span></p>
<p class="lignedecodeLinux"><span lang="EN-US">(</span></p>
<p class="lignedecodeLinux"><span lang="EN-US"><span> </span>nom character varying(50) NOT NULL,</span></p>
<p class="lignedecodeLinux"><span lang="EN-US"><span> </span></span>CONSTRAINT villes_pkey PRIMARY KEY (nom)</p>
<p class="lignedecodeLinux">)</p>
<p class="Standard" style="text-align: justify;">
<p class="Standard" style="text-align: justify;">Il est téléchargé sur Jquery.com la bibliothèque Javascript JQuery qui est enregistrée à la racine du site. Pour fonctionner, le site est constitué des 3 principaux fichiers suivants:</p>
<p class="Heading2"><span lang="EN-US">index.xhtml</span></p>
<p class="Standard" style="text-align: justify;"><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">&lt;?xml version=&nbsp;&raquo;1.0&#8243; encoding=&nbsp;&raquo;UTF-8&#8243;?&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">&lt;!DOCTYPE html PUBLIC &laquo;&nbsp;-//W3C//DTD XHTML 1.0 Strict//EN&nbsp;&raquo; &laquo;&nbsp;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&nbsp;&raquo;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">&lt;html xmlns=&nbsp;&raquo;http://www.w3.org/1999/xhtml&nbsp;&raquo;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>&lt;head&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>&lt;meta http-equiv=&nbsp;&raquo;Content-Type&nbsp;&raquo; content=&nbsp;&raquo;text/html; charset=UTF-8&#8243;/&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">&lt;!&#8211; Vital, afin que le site soit bien interprété par le</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>navigateur en termes de caractères &#8211;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;title&gt;Mon premier site utilisant Ajax&lt;/title&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;script type=&nbsp;&raquo;text/javascript&nbsp;&raquo; src=&nbsp;&raquo;jquery.js&nbsp;&raquo;&gt;&lt;/script&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;!&#8211; lien vers la bibliothèque jquery téléchargées depuis jquery.com &#8211;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;script type=&nbsp;&raquo;text/javascript&nbsp;&raquo; src=&nbsp;&raquo;suggest.js&nbsp;&raquo;&gt;&lt;/script&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;!&#8211; lien vers le fichier personnel suggest.js qui s&#8217;exécuter après</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">le chargement du DOM &#8211;&gt;</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>&lt;link rel=&nbsp;&raquo;stylesheet&nbsp;&raquo; href=&nbsp;&raquo;suggest.css&nbsp;&raquo; type=&nbsp;&raquo;text/css&nbsp;&raquo; media=&nbsp;&raquo;screen&nbsp;&raquo; /&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">&lt;!&#8211; lien vers le fichier personnel CSS &#8211;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;/head&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;body&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;div&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>Saisir un mot: &lt;input type=&nbsp;&raquo;text&nbsp;&raquo; id=&nbsp;&raquo;txt1&#8243; /&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;!&#8211; C&#8217;est ici que l&#8217;utilisateur sélectionnera</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>les première lettre du nom à trouver<span> </span>&#8211;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">&lt;/div&gt;</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>&lt;div&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>Suggestions: &lt;span id=&nbsp;&raquo;suggest&nbsp;&raquo;&gt;&lt;/span&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">&lt;!&#8211; c&#8217;est dans ce span -élément inline- que s&#8217;écrira le résultat</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>de la requete ajax<span> </span>&#8211;&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>&lt;/div&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">&lt;/body&gt;</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">&lt;/html&gt;</span></p>
<p class="Standard" style="text-align: justify;"><span lang="EN-US"> </span></p>
<p class="Heading2"><span lang="EN-US">suggest.js</span></p>
<p class="Standard" style="text-align: justify;"><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">$(document).ready(function() {</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// $(document).ready() s&#8217;exécute dès que le DOM est chargé,</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// avant que toutes les ressources soient téléchargées (ex: images)</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>$(&#8216;#txt1&#8242;).keyup(function() {</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// inscrit dans le gestionnaire d&#8217;événement que la fonction propose() est</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// à lancer lorsque la touche du clavier est lachée sur le contrôle txt1</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span><span> </span>propose();<span> </span>// fonction à appeler sur le keyup de l&#8217;input txt1</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span><span> </span>});</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">});</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">function propose(){</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>if($(&#8216;#txt1&#8242;).val() == &nbsp;&raquo;) { // si l&#8217;input d&#8217;id=txt1 est vide ou vidé</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>$(&#8216;#suggest&#8217;).html(&nbsp;&raquo;); // vide le span d&#8217;id=suggest</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>return; // sort de la fonction</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>$.ajax({<span> </span>// exécute une requete Ajax</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>type: &#8216;GET&#8217;,<span> </span>// en mode GET</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>url: &#8216;suggest.php&#8217;,<span> </span>// vers le fichier suggest.php</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>data: &#8216;txt=&#8217;+$(&laquo;&nbsp;#txt1&#8243;).val(),<span> </span>// avec les paramètres suivant donc suggest.php?txt=&#8230;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>dataType:&#8217;text&#8217;,<span> </span>// le serveur renverra une réponse de suggest.php sous forme texte</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">success: function(msg){ $(&#8216;#suggest&#8217;).html(msg); }</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// si Ajax réussi, écrit dans le span d&#8217;id=suggest</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// la réponse du serveur suggest.php?txt=</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>});</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">}</span></p>
<p class="Standard" style="text-align: justify;">
<p class="Heading2">suggest.php</p>
<p class="Standard" style="text-align: justify;">
<p class="lignedecodeLinux"><span style="font-size: 8pt;">&lt;?php</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">session_start();<span> </span>// démarrer la gestion des sessions</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">header(&laquo;&nbsp;Content-Type: text/plain ; charset=utf-8&#8243;);</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">// renvoie un réponse au format MIME text avec les caractères utf-8</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">header(&laquo;&nbsp;Cache-Control: no-cache, private&nbsp;&raquo;); // anti cache pour HTTP/1.1</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">header(&laquo;&nbsp;Pragma: no-cache&nbsp;&raquo;); // anti cache pour HTTP/1.0</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">if (!isset($_SESSION['chaineconnexion'])) {</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// si la variable $_SESSION['chaineconnexion'] n&#8217;est pas définie alors:</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">$_SESSION['chaineconnexion']=&#8217;host=localhost port=5432 user=form password=form dbname=form&#8217;;</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">if(isset($_REQUEST['txt'])){ // si la variable $_REQUEST['txt'] est bien définie alors:</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>$conn=pg_connect($_SESSION['chaineconnexion']); // on créé la connexion avec la base PGSQL</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">$sql = &laquo;&nbsp;SELECT nom FROM villes WHERE nom LIKE &#8216;&nbsp;&raquo;.$_REQUEST['txt'].&nbsp;&raquo;%&#8217;&nbsp;&raquo;;</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// on définit la requete à exécuter</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">$result = pg_query($conn,$sql);</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// on exécute la requete, le flux de données généré sera représenté par $result</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">while($row = pg_fetch_assoc($result)){</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// on boucle ligne à ligne (à chaque appel de pg_fetch_array,</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// $row récupèrera sous forme de table la ligne de données)</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span></span><span style="font-size: 8pt;" lang="EN-US">echo &#8216;&lt;div onclick=\&#8217;$(&laquo;&nbsp;#txt1&#8243;).val(&laquo;&nbsp;&#8216;.$row['nom'].</span><span lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>&#8216;&nbsp;&raquo;);$(&laquo;&nbsp;#suggest&nbsp;&raquo;).hide();\&#8217;&gt;&#8217;.$row['nom'].&#8217;&lt;/div&gt;&#8217;;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">// exemple, renverra: &lt;div onclick=&#8217;$(&laquo;&nbsp;#txt1&#8243;).val(&laquo;&nbsp;Montpellier&nbsp;&raquo;);</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>// $(&laquo;&nbsp;#suggest&nbsp;&raquo;).hide();&#8217;&gt;Montpellier&lt;/div&gt;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;"><span> </span>}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">?&gt;</span></p>
<p class="Standard" style="text-align: justify;">
<p class="Heading2">Mise en forme</p>
<p class="Standard" style="text-align: justify;">Pour mettre en forme notre site, on applique une feuille de style simple suggest.css</p>
<p class="Standard" style="text-align: justify;">
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">root {</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>display: block;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">#suggest {</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>position:fixed;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>top:33px;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>left:130px;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>background-color:#86B0D8;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>border-style:solid;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>border-width:1px;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>margin:5px;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span>cursor : wait;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">}</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"> </span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US">div:hover{</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;" lang="EN-US"><span> </span></span><span style="font-size: 8pt;">background-color:white;</span></p>
<p class="lignedecodeLinux"><span style="font-size: 8pt;">}</span></p>
<p class="Standard" style="text-align: justify;">
<p class="Standard" style="text-align: justify;">
<p class="Heading1">Spatialiser la base de données colloque</p>
<p class="Textbody">Même si PostgreSQL a été installé conjointement avec PostGis, la base de données n&#8217;est pas par défaut spatialisée. Un rapide coup d&#8217;oeil aux tables nous montre l&#8217;absence des deux principales tables nécessaires à PostGIS, geometry_columns et statial_ref_sys.</p>
<p class="Textbody">Voilà comment les ajouter, ainsi que l&#8217;ensemble des fonctions necessaires à la spatialisation de la base colloque:</p>
<p class="lignedecodeLinux">sudo su &#8211; postgres</p>
<p class="lignedecodeLinux">createlang plpgsql colloque</p>
<p class="lignedecodeLinux">psql -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql -d colloque</p>
<p class="code"><span lang="EN-US">psql -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql -d colloque</span></p>
<p class="Standard" style="text-align: justify;"><span lang="EN-US"> </span></p>
<p class="Standard" style="text-align: justify;">Pour ajouter les droits d’usage sur ces tables à l’utilisateur, saisir :</p>
<p class="code"><span lang="EN-US">sudo –s –u postgres</span></p>
<p class="code"><span lang="EN-US">psql colloque</span></p>
<p class="code"><span lang="EN-US">ALTER TABLE geometry_columns OWNER TO colloque;</span></p>
<p class="code"><span lang="EN-US">ALTER TABLE spatial_ref_sys OWNER TO colloque;</span></p>
<p class="Standard" style="text-align: justify;"><span lang="EN-US"> </span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bonnal.net/creation-d%e2%80%99un-serveur-web-virtualise-dedie-au-webmapping-%e2%80%93-partie-4-fin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

