[OpenLayers-Users] Just a simple php script instead of WFS server ?

Matt Kenny matthewkenny at gmail.com
Mon Mar 30 17:37:10 EDT 2009


I've had a need to recently do just that. I just create a GeoJSON object and
pass those values into an OpenLayers.Layer.Vector I've got an example that
you can view here:

http://mkgeomatics.com/apps/ajax_dev/checkbox_form.html

Here is an example output of a PHP script generating geoJSON from a MySQL
Database

http://mkgeomatics.com/apps/ajax_dev/gis/scripts/airports.php

Take care,
Matt

On Mon, Mar 30, 2009 at 2:20 PM, Heidt, Christopher M. <
CHRISTOPHER.M.HEIDT at saic.com> wrote:

> Yes, I and many others do this very thing.
> You just need to get the data in a format reconizable to openlayers, and
> then insert it.
> There are many combinations of ways to do this.
> For one of my apps I fetch wkt and use openlayers wtk parser to convert
> those into features
> and then its as simple as layer.addFeatures(myFeatures)
>
> -----Original Message-----
> From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> On Behalf Of darrepac
> Sent: Monday, March 30, 2009 5:08 PM
> To: users at openlayers.org
> Subject: [OpenLayers-Users] Just a simple php script instead of WFS
> server ?
>
>
> Hi,
>
> I have an openlayers loading a GeoJson file locally (=on client side).
> This file is heavy and I want to avoid to load it locally.
>
> The perfect solution would probably be a WFS server to serve my features
> but I would prefer a lighter and easier solution (I am lost in tool like
> Geoserver and just get the feeling that it is too big for me and my
> usage).
>
> Is there not a way to build a small php script to serve my features from
> the GeoJson or GML and read in Openlayers through
> OpenLayers.Protocol.HTTP ?
> Such php script, on server side, should implement the maxfeatures and/or
> bbox query in order to load just the needed features.
>
> Does such php script (or very very very simple WFS server) exist?
>
> thanks
> --
> View this message in context:
> http://n2.nabble.com/Just-a-simple-php-script-instead-of-WFS-server---tp
> 2559646p2559646.html<http://n2.nabble.com/Just-a-simple-php-script-instead-of-WFS-server---tp%0A2559646p2559646.html>
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
m a t t h e w k e n n y
http://www.mkgeomatics.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090330/341e8eb0/attachment.html


More information about the Users mailing list