Hi list!
I wanted to have GeoJSON as an output format. Now, if I got the
documentation right (
http://mapserver.org/it/development/rfc/ms-rfc-62.html,
http://mapserver.org/it/development/rfc/ms-rfc-36.html), I should
prepare a template for each layer I'd like to serve as GeoJSON.
Is this
Peter,
You can use OGR outputformats. Add something like this to your mapfile
OUTPUTFORMAT
NAME geojson
DRIVER OGR/GEOJSON
MIMETYPE application/json; subtype=geojson
FORMATOPTION STORAGE=stream
FORMATOPTION FORM=SIMPLE
END
Add to your LAYER or MAP METADATA, wfs_getfeature_formatlist”
On 11/13/2013 12:49 PM, Smith, Michael ERDC-RDE-CRREL-NH wrote:
Peter,
Hi Michael,
You can use OGR outputformats. Add something like this to your mapfile
OUTPUTFORMAT
NAME geojson
DRIVER OGR/GEOJSON
MIMETYPE application/json; subtype=geojson
FORMATOPTION STORAGE=stream
FORMATOPTION
I have a web service that use a php wrapper as described here,
http://mapserver.org/fr/ogc/mapscript.html#php-example
except that there is no mapscript, just php code that makes some query to
a database in order to add some parametes to the wms request
This wrapper ends with readfile ($url);
It
i am calling, like so:
(from
http://stackoverflow.com/questions/10368726/how-to-read-external-geojson-file-from-openlayers
)
geojson_layer = new OpenLayers.Layer.Vector(GeoJSON, {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({