Another way would be to use the postgis extension to postgresql to store spatial tables, which can then be exported to GEOJSON format.
http://www.postgis.org/documentation/manual-1.5/ST_AsGeoJSON.html On Mon, Oct 10, 2011 at 11:36 PM, Gabriele Seitz <[email protected]> wrote: > Hi, > > I never tried ist myself before, but there is a GeoJSON Example at > http://www.openlayers.org/dev/examples/geojson.html > > Basically yuo should use var geojson_format = new > OpenLayers.Format.GeoJSON(); > > Hope this helps. > > Gabriele > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/how-to-add-php-postgresql-query-result-as-Geojson-layer-to-openlayers-tp6876808p6879775.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Vishal K. Mehta, PhD Scientist Stockholm Environment Institute - US 133 D St Suite F Davis CA 95616 www.sei-us.org
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
