[pgrouting-users] ender the postgresql query into browser by openlayers (GeoJSON output)

javad sadidi jsadidi at gmail.com
Wed Aug 17 04:49:58 EDT 2011


hi thanks  for your answer.
can you show an example in more details?


On Wed, Aug 10, 2011 at 11:17 PM, Charles Galpin <cgalpin at lhsw.com> wrote:

> Hi Javad
>
> I use geoserver and it's "sql view" feature to do this.  I don't return the
> results in GeoJSON but I believe it can, but you can use a vector layer if
> you want the raw data to put into a store or do something interactive, or a
> wms layer if there are large results for better performance.
>
> The way it works is pretty much like you describe. In openlayers you define
> a layer with a filter and in your app you can let someone enter a street
> name say, and refresh the layer (using mergeNewParams).  The parameters get
> send to the geoserver sql view which you'd have your select statement use
> the parameter value, and the layer results go back just like in a static
> layer.
>
> hth
> charles
>
> On Aug 10, 2011, at 12:54 PM, javad sadidi wrote:
>
> > hi to all.
> >  I am working on pgrouting project.I am using OSM data to find the best
> route.
> > but I want to take a query into postgresql by php server side and returen
> the result on the browser with GeoJSON format. for example I want bring the
> result of this query as selected streets on the browser by openlayers.
> > select * from table where streetname is x or y;
> > then bring the result by Geojson output to the browser,I would like to
> display these streets as red color in the browser for clients.
> > who can help me?
> > it the simplest example.
> > danke
> > _______________________________________________
> > Pgrouting-users mailing list
> > Pgrouting-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110817/6ee27a1d/attachment.html


More information about the Pgrouting-users mailing list