<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&nbsp; MAPSERVER_TRIMQ USING UNIQUE MAXIMO_ID SRID 32632 VERSION 10g"<BR>...</DIV>
<DIV>METADATA</DIV>
<DIV>&nbsp;&nbsp;&nbsp; ...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_exclude_items" "ALL"</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;"wms_include_items" "MAXIMO_ID, ASSETTYPE"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "oms_exclude_items" "ALL" </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "ows_include_items" "MAXIMO_ID, ASSETTYPE"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "gms_exclude_items" "ALL"</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "gml_include_items" "MAXIMO_ID, ASSETTYPE"<BR>END</DIV>
<DIV>&nbsp;...<BR><BR>&gt;&gt;&gt; Kristian Thy &lt;thy@42.dk&gt; 7/6/2008 18:49 &gt;&gt;&gt;<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>&nbsp; LAYER<BR>&nbsp;&nbsp;&nbsp; NAME 'TRIM-Q'<BR>&nbsp;&nbsp;&nbsp; TYPE POINT<BR>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE oraclespatial<BR>&nbsp;&nbsp;&nbsp; CONNECTION "******@******"<BR>&nbsp;&nbsp;&nbsp; DATA "SHAPE FROM (SELECT MAXIMO_ID, ASSETTYPE, SHAPE FROM MAPSERVER_TRIMQ) USING UNIQUE MAXIMO_ID SRID 32632 VERSION 10g"<BR>&nbsp;&nbsp;&nbsp; TEMPLATE "trim.html"<BR>&nbsp;&nbsp;&nbsp; HEADER "trim_header.html"<BR>&nbsp;&nbsp;&nbsp; FOOTER "trim_footer.html"<BR>&nbsp;&nbsp;&nbsp; TOLERANCE 20<BR>&nbsp;&nbsp;&nbsp; DUMP true <BR><BR>&nbsp;&nbsp;&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_title" "TRIM-Q"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_srs" "EPSG:32632"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wms_include_items" "ALL"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "ows_include_items" "ALL"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "gml_include_items" "ALL"<BR>&nbsp;&nbsp;&nbsp; END #metadata<BR><BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 'vejskab' <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ('[ASSETTYPE]' = 'VEJSKAB')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 'square'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFFSET -4 -2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END #STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type truetype<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; antialias true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font arial_black<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position ll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outlinecolor 255 255 255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; partials false<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END #label<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEXT ([MAXIMO_ID])<BR>&nbsp;&nbsp;&nbsp; END #class<BR><BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #NAME faerdselstavle<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ('[ASSETTYPE]' = 'TAVLE')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 'triangle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFFSET -10 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END #STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FORCE true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type truetype<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; antialias true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font arial_black<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position lc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outlinecolor 255 255 255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; partials false<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end #label<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEXT ([MAXIMO_ID])<BR>&nbsp;&nbsp;&nbsp; END #class<BR><BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #NAME 'other values'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 100 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END #STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type truetype<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; antialias true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font arial_black<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size 8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position uc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outlinecolor 255 255 255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; partials false<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end #label<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEXT ([MAXIMO_ID])<BR>&nbsp;&nbsp;&nbsp; END #class<BR><BR>&nbsp;&nbsp;&nbsp; SIZEUNITS PIXELS<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; UNITS meters<BR>&nbsp;&nbsp;&nbsp; MAXSCALE 60000<BR>&nbsp;&nbsp;&nbsp; LABELMAXSCALE 60000&nbsp;&nbsp;&nbsp; <BR>&nbsp; END #layer<BR>------------------------------------------------------------------------<BR><BR>The OpenLayers code I use for calling GetFeatureInfo:<BR>------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.events.register('click', map, function (e)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var url = trimq.getFullRequestString({<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; REQUEST: 'GetFeatureInfo',<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; EXCEPTIONS: 'application/vnd.ogc.se_xml',<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; BBOX: trimq.map.getExtent().toBBOX(),<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; X: e.xy.x,<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Y: e.xy.y,<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; INFO_FORMAT: 'text/plain',<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; QUERY_LAYERS: 'TRIM-Q',<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RADIUS: 5,<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WIDTH: trimq.map.size.w,<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; HEIGHT: trimq.map.size.h});<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; document.getElementById('map').style.cursor = 'wait';<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OpenLayers.loadURL(url, '', this, handleResponse);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Event.stop(e);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; });<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; function handleResponse(response)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; document.getElementById('map').style.cursor = 'auto';<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; alert(response.responseText);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<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>