[mapserver-users] querying with mode=tile

Mr. Puneet Kishor punk.kish at gmail.com
Sat Sep 10 23:00:04 EDT 2011


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
> 



More information about the mapserver-users mailing list