Hi Andrea, following your hint i tried this way:
url = disruptions.getFullRequestString(
{
REQUEST: “GetFeatureInfo”,
BBOX: map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: ‘text/html’,
QUERY_LAYERS: disruptions.params.LAYERS,
FEATURE_COUNT: 50,
layers: ‘topp:v_disruptions_now’,
styles: ‘’,
srs: ‘EPSG:3003’,
WIDTH: map.size.w,
HEIGHT: map.size.h
},
“/geoserver/wms”
);
When i load it, the querystring contains also the filter defined for the layer:
http://suppa.dyndns.org:8080/geoserver/wms?
WIDTH=650&
FILTER=%3CFilter%3E%3CAnd%3E%3CPropertyIsLessThan%3E%3CPropertyName%3Edata_da%3C%2FPropertyName%3E%3CLiteral%3E2008-03-08%3C%2FLiteral%3E%3C%2FPropertyIsLessThan%3E%3CPropertyIsGreaterThan%3E%3CPropertyName%3Edata_a%3C%2FPropertyName%3E%3CLiteral%3E2008-03-08%3C%2FLiteral%3E%3C%2FPropertyIsGreaterThan%3E%3C%2FAnd%3E%3C%2FFilter%3E&
LAYERS=topp%3Av_disruptions_now&
HEIGHT=400&
FORMAT=image%2Fpng&
TRANSPARENT=true&
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetFeatureInfo&STYLES=&
EXCEPTIONS=application%2Fvnd.ogc.se_inimage&
OLRELOADSALT=0.45879735603354377&
SRS=EPSG%3A900913&
BBOX=1321968.84938%2C5683532.565124%2C1325074.103653%2C5685443.490831&
X=300&Y=139&
INFO_FORMAT=text%2Fhtml&
QUERY_LAYERS=topp%3Av_disruptions_now&
FEATURE_COUNT=50&
layers=topp%3Av_disruptions_now&
styles=&srs=
EPSG%3A3003
which gives me the error java.lang.IllegalArgumentException: Only the following delimiters are supported: =, )(, , & Only the following delimiters are supported: =, )(, , &
If I manualy remove the filter from the query string, I simply got no error and no results.
I can get no clue on what’s going on : /
Thanks
Andrea
Il giorno 08/mar/08, alle ore 11:17, Andrea Aime ha scritto:
Andrea Maschio ha scritto:
i have thi url
url = '/geoserver/wms?WIDTH=650&LAYERS=topp%3Av_disruptions_now
&HEIGHT=400
&FORMAT=image%2Fpng
&TRANSPARENT=true&SERVICE=WMS
&VERSION=1.1.1&REQUEST=GetFeatureInfo
&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml
&OLRELOADSALT=0.6880378263618003&
SRS=EPSG%3A900913
&BBOX = 1322609.0094913673,5684096.288207863,1322656.782634039,5684144.061350537 ,EPSG:900913
&INFO_FORMAT=text%2Fhtml
&QUERY_LAYERS=topp%3Av_disruptions_now
&filter=
&FEATURE_COUNT=50
&srs=EPSG%3A3003
&layers=topp%3Av_disruptions_now
&styles=’
when called, i have this error: 1322609.0094913673,5684096.288207863,1322656.782634039,5684144.061350537 ,EPSG:900913 is not a valid pair of coordinates. I am passing the SRID with coordinates to have the projection, because my srs is EPSG:3003.
A GetFeatureInfo request must closely derive from the WMS request
that generate the map. So you have to put EPSG:900913 in the srs,
not in the bbox. As a rule of thumb, take the WMS request as is,
and add the x,y,query_layers and info_format parameters and you
should be good (and yes, you can also add a filter if you want to
get feature infos only on a subset of the originally displayed
featues).
Hope this helps
Cheers
Andrea