[mapserver-users] querying with mode=tile

Steve Lime sdlime at gmail.com
Sun Sep 11 09:19:21 EDT 2011


Issue 1: only certain extensions can be used for templates. I believe .js is legal but .json is not. We could change that in future releases. Could you file a ticket?

Issue 2: it's possible a linefeed is getting in the way of the trimming. Try bumping the closing feature tag up a line. If that works then it's a bug and a ticket should be filed.

Steve

Sent from my iPad

On Sep 10, 2011, at 10:00 PM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:

> Couple of follow-ups (the following hint from Prabu Raja does work) --
> 
> If I change the name of the template from "template.html" to "template.json" I get the following error
> 
> Content-type: text/html msReturnPage(): Web application error. Malformed template name (/Users/punkish/Documents/www/gmaps/lib/template.json).
> 
> Another issue -- my template looks like so --
> 
> // mapserver template
> [resultset layer=layer]
> {
>  "type": "FeatureCollection",
>  "features": [
>    [feature trimlast=',']
>    {
>      "attrib1": "[attrib1]",
>      "attrib2": "[attrib2]",
>      "attrib3": "[attrib2]"
>    },
>    [/feature]
>  ]
> }
> [/resultset]
> 
> When the above does work, I get back the following --
> 
> { "type": "FeatureCollection", "features": [ { "attrib1": "foo", "attrib2": "bar", "attrib3": "baz" }, ] }
> 
> Hmmm... what's with that last "," after the first element in the features array? From what it seems like, I thought the [feature trimlast=','] would get rid of the last comma. 
> 
> 
> On Sep 10, 2011, at 9:52 PM, Mr. Puneet Kishor wrote:
> 
>> 
>> On Sep 10, 2011, at 9:42 PM, Prabu Raja wrote:
>> 
>>> Try this,
>>> 
>>> http://localhost/cgi-bin/app?layers=layer&mode=query&mapxy=lng+lat
>>> 
>>> where lng = clicked longitude
>>>        lat = clicked latitude
>>> 
>>> working for me.
>> 
>> 
>> Neat! it does work. Many thanks. 
>> 
>> 
>> Where did you find this information? Could you please point me to the location in the documentation where I could read up on this?
>> 
>> 
>> 
>>> 
>>> On Sun, Sep 11, 2011 at 6:58 AM, Mr. Puneet Kishor <punk.kish at gmail.com>wrote:
>>> 
>>>> 
>>>> http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920
>>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Regards,
>>> Prabu Raja
>> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list