"The explosive growth of the GeoWeb and geographic information has made GIS powerful media for the general public to communicate, but perhaps more importantly, GIS have also become media for constructive dialogs and interactions about social issues." - Sui & Goodchild
This is an old revision of the document!
INSERT INTO my4capitals (cartodb_id, name, the_geom) VALUES ( 0, 'Paris', ST_GeometryFromText( 'POINT(2.333 48.867)', 4326)); INSERT INTO my4capitals (cartodb_id, name, the_geom) VALUES ( 1, 'Bern', ST_GeometryFromText( 'POINT(7.433 46.95)', 4326)); INSERT INTO my4capitals (cartodb_id, name, the_geom) VALUES ( 2, 'Rome', ST_GeometryFromText( 'POINT(12.5 41.883)', 4326)); INSERT INTO my4capitals (cartodb_id, name, the_geom) VALUES ( 3, 'Madrid', ST_GeometryFromText( 'POINT(-3.71 40.41)', 4326));
SELECT * from my4capitals
La classe Connection du GeoManager précédent est maintenant remplacée par un appel à une API Web. On peut y lancer des requêtes GQL. Par exemple :
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $api_key = "2e957be5f1e9c0793ca1725aab08274a795f2c3f"; $q = "select name, ST_AsGeoJSON(the_geom) as geom from my4capitals"; $url = "http://oertz.cartodb.com/api/v2/sql?api_key=" . $api_key. "&q=" . urlencode($q); curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); header("Content-type: application/json"); echo $result; ?>
TODO