<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Hi</DIV>
<DIV>&nbsp;</DIV>
<DIV>GetFeatureInfo requests against Mapserver will not be much different than against ArcGIS WMS. Here is an example:</DIV>
<DIV>&nbsp;</DIV>
<DIV><A href="http://mapsvr/cgi-bin/mapserv.exe?map=mylocation&amp;service=wms&amp;version=1.1.1&amp;request=GetFeatureInfo&amp;LAYERS=synlait&amp;QUERY_LAYERS=synlait&amp;INFO_FORMAT=text/plain&amp;SRS=EPSG:2193&amp;BBOX=1492834.61,5131445.29,1493034.61,5131645.29&amp;WIDTH=100&amp;HEIGHT=100&amp;x=50&amp;y=50">http://mapsvr/cgi-bin/mapserv.exe?map=mylocation&amp;service=wms&amp;version=1.1.1&amp;request=GetFeatureInfo&amp;LAYERS=synlait&amp;QUERY_LAYERS=synlait&amp;INFO_FORMAT=text/plain&amp;SRS=EPSG:2193&amp;BBOX=1492834.61,5131445.29,1493034.61,5131645.29&amp;WIDTH=100&amp;HEIGHT=100&amp;x=50&amp;y=50</A><BR><BR>For a single point, just play around with the size of the BBOX, WIDTH, HEIGHT,x &amp; y parameters&nbsp;- make as small or large as you need to ensure you get a single point. You can also specify a TOLERANCE in your mapfile:</DIV>
<DIV>&nbsp;</DIV>
<DIV>LAYER<BR>&nbsp; NAME "synlait"<BR>&nbsp; GROUP "FMS"<BR>&nbsp; DATA ../data/nztm/synlait<BR>&nbsp; SIZEUNITS PIXELS<BR>&nbsp; STATUS ON<BR>&nbsp; DUMP TRUE<BR>&nbsp; # query templates for HTML-based queries<BR>&nbsp; # responds to OGC:WMS request=GetFeatureInfo......&amp;info_format=text/html<BR>&nbsp; HEADER&nbsp;&nbsp; ../templates/synlait_query_header.html<BR>&nbsp; TEMPLATE ../templates/synlait_query_body.html<BR>&nbsp; <BR>&nbsp; # fuzziness for querying<BR>&nbsp; TOLERANCE 5000<BR>&nbsp; TOLERANCEUNITS METERS<BR>&nbsp; TYPE POINT<BR>&nbsp; UNITS METERS<BR>&nbsp; # scale range<BR>&nbsp; MAXSCALE 250000<BR>&nbsp; MINSCALE 750<BR>&nbsp; LABELMAXSCALE 100000<BR>&nbsp; LABELMINSCALE 1<BR>&nbsp; LABELCACHE on<BR>&nbsp; LABELITEM 'reference_code'<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 138 43 226<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 13<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL "triangle"<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE truetype<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT "arial"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 10<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION ur<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 235 235 235 #--Halo<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 0&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 2<BR>&nbsp;&nbsp;&nbsp; END #LABEL<BR>&nbsp; END #CLASS<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp; "wms_group_title" "FMS"<BR>&nbsp;&nbsp;&nbsp; "wms_name"&nbsp;&nbsp;&nbsp; "synlait" <BR>&nbsp;&nbsp;&nbsp; "wms_title"&nbsp;&nbsp;&nbsp; "synlait"<BR>&nbsp;&nbsp;&nbsp; "wms_abstract"&nbsp;&nbsp;&nbsp; "These are Synlait farms in NZTM"<BR>&nbsp;&nbsp;&nbsp; "wms_keywordlist"&nbsp;&nbsp;&nbsp; "AgriBase"<BR>&nbsp;&nbsp;&nbsp; #"wms_server_version"&nbsp;&nbsp;&nbsp; "1.1.1"<BR>&nbsp;&nbsp;&nbsp; "wms_srs"&nbsp;&nbsp; "EPSG:2193"<BR>&nbsp;&nbsp;&nbsp; "wms_extent" "1114412.940 4793178.168 2089186.204 6190213.601"<BR>&nbsp;&nbsp;&nbsp; "wms_dataurl_format" "text/HTML"<BR>&nbsp;&nbsp;&nbsp; "gml_include_items"&nbsp;&nbsp;&nbsp;&nbsp; "all"<BR>&nbsp;&nbsp;&nbsp; "gml_exclude_items"&nbsp;&nbsp;&nbsp;&nbsp; ""<BR>&nbsp;&nbsp;&nbsp; "ows_include_items"&nbsp;&nbsp;&nbsp;&nbsp; "all"<BR>&nbsp;&nbsp;&nbsp; "ows_exclude_items"&nbsp;&nbsp;&nbsp;&nbsp; ""&nbsp; <BR>&nbsp;&nbsp;&nbsp; "wms_exceptions_format" "application/vnd.ogc.se_xml"<BR>&nbsp; END<BR>&nbsp;END #synlait</DIV>
<DIV>&nbsp;</DIV>
<DIV>Note: The DATA directive contains the path and name of the Shape file.</DIV>
<DIV>The HEADER and TEMPLATE directives reference a couple of html files that format the response to the GetFeatureInfo request when you request &amp;info_format=text/html. If you are just requesting text/plain then you will get all of the attributes.</DIV>
<DIV>&nbsp;</DIV>
<DIV>regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert</DIV>
<DIV><BR>&gt;&gt;&gt; sunny74 &lt;sb.ray@hotmail.com&gt; 22/03/2010 6:28 p.m. &gt;&gt;&gt;<BR><BR><BR>Hi Robert,<BR><BR>Thanks for your reply.<BR><BR>There are a few doubts about the code:<BR><BR>1) If you taken a single lonlat and then made a bounding box(BBOX) by doing<BR>+- 10.<BR>But what if I want to get the feature info of just one point.What will be<BR>the url in that case?<BR><BR>2) The url is "var regc =<BR>"http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer?service=WMS&amp;version=1.1.1&amp;request=GetFeatureInfo&amp;QUERY_LAYERS=2&amp;INFO_FORMAT=text/plain&amp;SRS=EPSG:2193&amp;BBOX="<BR>+ bbox1 + "," + bbox2 + "," + bbox3 + "," + bbox4 +<BR>"&amp;WIDTH=20&amp;HEIGHT=20&amp;X=10&amp;Y=10";"<BR><BR>&nbsp; It seems from the url that you r using ARCGIS with Mapserver. But if I am <BR>using<BR>only mapserver with openlayers then what is the url?<BR><BR>3) HOw do I make a layers queryable in the map file? What r the extra things<BR>I need to specify?<BR><BR>Pls reply soon.<BR>-- <BR>View this message in context: <A href="http://n2.nabble.com/Get">http://n2.nabble.com/Get</A>-Feature-Info-in-pop-up-working-example-tp4773944p4776299.html<BR>Sent from the OpenLayers Users mailing list archive at Nabble.com.<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc.  </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>