[mapserver-users] interesting thread on JSON-ish output from MapServer

Mr. Puneet Kishor punk.kish at gmail.com
Sun Sep 11 10:40:06 EDT 2011


On Sep 11, 2011, at 7:58 AM, Richard Greenwood wrote:

> On Sat, Sep 10, 2011 at 10:42 PM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:
>> [http://osgeo-org.1803224.n2.nabble.com/GeoJSON-output-from-MapServer-td3188987.html]
>> 
>> If I call my template "template.html" I get the output, but I get mime type warning and a syntax error in parsing the output.
> 
> Where is the warning originating? I have no problem consuming
> mapserver template based JSON in jQuery, despite the incorrect mime
> type. I do not know of any way to set the mime type of a mapserver
> template.
> 

I solved that one. See my recent email on the lack of JSONP callback in the template being the culprit. This is another in the list of items that I would like to add to MapServer documentation.

Re. setting mime type of MapServer templates, ostensibly you can in the OUTPUTFORMAT block. For example, I have the following

    OUTPUTFORMAT
      NAME "geojson"
      DRIVER "TEMPLATE"
      MIMETYPE "application/json"
      FORMATOPTION "FILE=/Users/punkish/Documents/www/gmaps/lib/gmna.html"
    END

Puneet.



More information about the mapserver-users mailing list