<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>maybe you can try to limite the output field in the metadata "$$$_include_items" "$$$_exclude_items" tag :</DIV>
<DIV>...</DIV>
<DIV>DATA "SHAPE FROM MAPSERVER_TRIMQ USING UNIQUE MAXIMO_ID SRID 32632 VERSION 10g"<BR>...</DIV>
<DIV>METADATA</DIV>
<DIV> ...<BR> "wms_exclude_items" "ALL"</DIV>
<DIV> "wms_include_items" "MAXIMO_ID, ASSETTYPE"<BR> "oms_exclude_items" "ALL" </DIV>
<DIV> "ows_include_items" "MAXIMO_ID, ASSETTYPE"<BR> "gms_exclude_items" "ALL"</DIV>
<DIV> "gml_include_items" "MAXIMO_ID, ASSETTYPE"<BR>END</DIV>
<DIV> ...<BR><BR>>>> Kristian Thy <thy@42.dk> 7/6/2008 18:49 >>><BR></DIV>
<DIV style="COLOR: #000000">Hi list<BR><BR>I've made a small openlayers viewer that shows a data layer from a<BR>materialized view in Oracle Spatial. When clicking on the map, I do a<BR>simple GetFeatureInfo which works when I test it with a shapefile-based<BR>layer, but when I move to the Oracle layer, I get an error message<BR>saying that no features were found with MAXIMO_ID = 0 (something to that<BR>effect, anyways). Unfortunately this is an internal GIS app, so I can't<BR>demo it.<BR><BR>The relevant layer definition in my map file:<BR>------------------------------------------------------------------------<BR> LAYER<BR> NAME 'TRIM-Q'<BR> TYPE POINT<BR> CONNECTIONTYPE oraclespatial<BR> CONNECTION "******@******"<BR> DATA "SHAPE FROM (SELECT MAXIMO_ID, ASSETTYPE, SHAPE FROM MAPSERVER_TRIMQ) USING UNIQUE MAXIMO_ID SRID 32632 VERSION 10g"<BR> TEMPLATE "trim.html"<BR> HEADER "trim_header.html"<BR> FOOTER "trim_footer.html"<BR> TOLERANCE 20<BR> DUMP true <BR><BR> METADATA<BR> "wms_title" "TRIM-Q"<BR> "wms_srs" "EPSG:32632"<BR> "wms_include_items" "ALL"<BR> "ows_include_items" "ALL"<BR> "gml_include_items" "ALL"<BR> END #metadata<BR><BR> CLASS<BR> NAME 'vejskab' <BR> EXPRESSION ('[ASSETTYPE]' = 'VEJSKAB')<BR> STYLE<BR> SYMBOL 'square'<BR> OFFSET -4 -2<BR> END #STYLE<BR> LABEL<BR> type truetype<BR> antialias true<BR> font arial_black<BR> size 8<BR> position ll<BR> color 0 0 0<BR> outlinecolor 255 255 255<BR> buffer 2<BR> partials false<BR> END #label<BR> TEXT ([MAXIMO_ID])<BR> END #class<BR><BR> CLASS<BR> #NAME faerdselstavle<BR> EXPRESSION ('[ASSETTYPE]' = 'TAVLE')<BR> STYLE<BR> SYMBOL 'triangle'<BR> OFFSET -10 2<BR> END #STYLE<BR> LABEL<BR> FORCE true<BR> type truetype<BR> antialias true<BR> font arial_black<BR> size 8<BR> position lc<BR> color 0 0 0<BR> outlinecolor 255 255 255<BR> buffer 0<BR> partials false<BR> end #label<BR> TEXT ([MAXIMO_ID])<BR> END #class<BR><BR> CLASS<BR> #NAME 'other values'<BR> STYLE<BR> SYMBOL 'circle'<BR> SIZE 2<BR> COLOR 100 0 0<BR> END #STYLE<BR> LABEL<BR> type truetype<BR> antialias true<BR> font arial_black<BR> size 8<BR> position uc<BR> color 0 0 0<BR> outlinecolor 255 255 255<BR> buffer 2<BR> partials false<BR> end #label<BR> TEXT ([MAXIMO_ID])<BR> END #class<BR><BR> SIZEUNITS PIXELS<BR> STATUS ON<BR> UNITS meters<BR> MAXSCALE 60000<BR> LABELMAXSCALE 60000 <BR> END #layer<BR>------------------------------------------------------------------------<BR><BR>The OpenLayers code I use for calling GetFeatureInfo:<BR>------------------------------------------------------------------------<BR> map.events.register('click', map, function (e)<BR> {<BR> var url = trimq.getFullRequestString({<BR> REQUEST: 'GetFeatureInfo',<BR> EXCEPTIONS: 'application/vnd.ogc.se_xml',<BR> BBOX: trimq.map.getExtent().toBBOX(),<BR> X: e.xy.x,<BR> Y: e.xy.y,<BR> INFO_FORMAT: 'text/plain',<BR> QUERY_LAYERS: 'TRIM-Q',<BR> RADIUS: 5,<BR> WIDTH: trimq.map.size.w,<BR> HEIGHT: trimq.map.size.h});<BR> document.getElementById('map').style.cursor = 'wait';<BR> OpenLayers.loadURL(url, '', this, handleResponse);<BR> Event.stop(e);<BR> });<BR><BR> function handleResponse(response)<BR> {<BR> document.getElementById('map').style.cursor = 'auto';<BR> alert(response.responseText);<BR> }<BR>------------------------------------------------------------------------<BR><BR>As mentioned, this works if I query a shapefile-based layer, so I assume<BR>the javascript is ok. Any ideas what my problem is?<BR><BR>\\kristian<BR>-- <BR>... et nemo ex vobis interrogat me: »Quo vadis?«<BR>_______________________________________________<BR>mapserver-users mailing list<BR>mapserver-users@lists.osgeo.org<BR><A href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR></DIV></BODY></HTML>