Opened 16 years ago
Closed 15 years ago
#2568 closed defect (wontfix)
mapserver 5.0.2 does not appear to allow setting filter and tileindex values for the layer object on the fly
Reported by: | gwatmuff1 | Owned by: | sdlime |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | MapServer CGI | Version: | 5.0 |
Severity: | blocker | Keywords: | layer tileindex filter |
Cc: |
Description
a url fragment: ...&layer=Species&map_layer[Species]=tileindex%20birdata/sitespecies/species1.shp..... produces the error: loadLayer(): Unknown identifier. Parsing error near (tileindex):(line 1)
similarly:
...&map_layer[FirstAtlasSpeciesRR]=filter%20([apr]%3E0)..... produces the error: loadLayer(): Unknown identifier. Parsing error near (filter):(line 1)
while
....&layer=Species&map_layer[Species]=data%20species382.shp.... works fine for example
Does this represent a change of policy for mapserver 5 with respect to changing filter, tileindex and possibly other properties of the layer object on the fly? Or am I missing something in the new syntax? This is a dead blocker for upgrading our applications from Mapserver 4x to 5x.
Change History (3)
comment:1 by , 16 years ago
Owner: | changed from | to
---|
comment:2 by , 16 years ago
comment:3 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Marking as wontfix (in 5.0.2), this was addressed in 5.4 though where the requirement to define validation patterns is present.
Steve
If you want to set the FILTER item on-the-fly, edit the maplexer.l file and add the URL_STRING after the INITIAL keyword:
It works with MapServer 5.0.3 and a CONNECTIONTYPE postgis. I think it is the same for the TILEINDEX item.
Beware that the FILTER item is used by MapServer to build an SQL query, so some security issues may arise. It seems that basic sanification is performed by MapServer, but you be warned.