[OpenLayers-Users] display php& postgresql queries in openlayers via Geojson format

Noli Sicad nsicad at gmail.com
Fri Aug 12 07:52:26 EDT 2011


Chapter 9 / Kapital 9 in the book (below) have examples for PostGIS
and WKT (not GeoJson)

http://www.openlayers-buch.de/beispiele.php

Download the source and have a look.

Noli

On 8/12/11, javad sadidi <jsadidi at gmail.com> wrote:
> I am using openstreet maps OSM as the background for my projects and I am
> doing pgrouting to find the best route. it works fine.my database for
> routing is inside the postgresql .
> now I have added a field in my table in postgresql , this field is the
> status of the streets , I mean some records of this field are CLOSE and the
> rest are OPEN.
> I want to show the CLOSE records from the Status field in the browser with
> Geojson format. for sure I have to do a query like , select * from mytable
> WHERE status='CLOSE;
> I use php for server side dealing . my database projection is in geographic
> 4326 and the OSM streets in the browser is in mercator 900913.
> how can I display the result of the query as a line vector layer in the
> browser ?
> I know that I have ti cerate a layer in openlayer and write php codes to do
> the query , but it doesnt work. who can help me in more details or show an
> example exception pgrouting workshop 2010.
> sinecerly
>


More information about the Users mailing list