Hi Matt, That's what I am willing to do. But to be honest your demo is very slow to load :)
I already have all my features in a mYSQL database and I can query them by coordinates etc (don't know the speed anyway) in order to use the BBOX and maxfeatures elements. But how do I call my PHP script with openlayers. Typically Matt, I do not see in your example the call to aiports.php with associated parameters thanks 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.he...@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-boun...@openlayers.org [mailto:users-boun...@openlayers.org] > On Behalf Of darrepac > Sent: Monday, March 30, 2009 5:08 PM > To: users@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@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- m a t t h e w k e n n y http://www.mkgeomatics.com _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- View this message in context: http://n2.nabble.com/Just-a-simple-php-script-instead-of-WFS-server---tp2559646p2561983.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users