Bradley McLain wrote: > Ok what I am trying to do is to have a progress database dump all > relevant information about various locations in some form of text file > nightly. > > I then want to use OpenLayers to read from/query this file and display > the relevant information. > > I was wondering if this is possible to do, can OpenLayers read/query a > text file such as a csv or xml?
You've got a number of options. If you want to use GML or GeoRSS, then see the layers with corresponding names ([1] and [2]). If you want to use your own text format, then see the text layer [3]. If you want to load your data yourself (instead of letting the layer load it) use something like OpenLayers.loadURL, then see the wiki for an example [4]. If you load your data with loadURL, then you can parse it with an instance of any of the format classes and add the resulting features to a vector layer. See documentation for the KML [5], GML [6], GeoRSS [7], WKT [8], and GeoJSON [9] formats. If your data is in EPSG:4326 in one of the available formats, you can paste it in to the vector formats example [10] to see what it will look like. Tim [1] http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/GML-js.html [2] http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/GeoRSS-js.html [3] http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Text-js.html [4] http://trac.openlayers.org/wiki/SimpleAjax [5] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/KML-js.html [6] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GML-js.html [7] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GeoRSS-js.html [8] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/WKT-js.html [9] http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GeoJSON-js.html [10] http://openlayers.org/dev/examples/vector-formats.html > > Cheers > > Brad > !DSPAM:4033,474b418453091336712104! > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > > > !DSPAM:4033,474b418453091336712104! _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
