<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5803" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=563003517-27072009>I'm
still stumped on this one. Does anyone know what a Scale of -1 means? Or a
Cellsize of 0? Is openlayers sending the coordinates in meters, while
mapserver is expecting them in latlon?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=563003517-27072009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=563003517-27072009>Thanks
again,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=563003517-27072009>Alexandre Laplante</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Laplante,
Alexandre - AGRI/AGRI <BR><B>Sent:</B> July 23, 2009 2:25 PM<BR><B>To:</B>
'users@openlayers.org'<BR><B>Subject:</B> FW: [OpenLayers-Users]
getFeatureInfo projection<BR><BR></FONT></DIV>
<DIV><SPAN class=405083216-21072009><FONT face=Arial><FONT color=#0000ff><FONT
size=2>Yeah, I added getName because I have multiple layers, and I needed to
know which one is being queried. Should have mentioned that.<SPAN
class=147222418-23072009> </SPAN></FONT></FONT></FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Dave Winfield
[mailto:winfield.dave@gmail.com] <BR><B>Sent:</B> July 21, 2009 12:10
PM<BR><B>To:</B> Alexandre.Laplante@statcan.gc.ca<BR><B>Subject:</B> Re:
[OpenLayers-Users] getFeatureInfo projection<BR><BR></FONT></DIV>I'm not
totally sure, but what is map.getName() returning? You want it to be
the layer that's on your wms layer.<BR><BR>
<DIV class=gmail_quote>On Tue, Jul 21, 2009 at 11:52 AM, <SPAN
dir=ltr><<A
href="mailto:Alexandre.Laplante@statcan.gc.ca">Alexandre.Laplante@statcan.gc.ca</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<P><FONT face=Arial size=2>Hello,</FONT> </P>
<P><FONT face=Arial size=2>I have a map in EPSG:42304 projection. I'm
trying to have a getFeatureInfo return information about clicked features,
but there are always 0 results. I'm using mapserver, and when I use a
template header
with:<BR><BR>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Bounding box</th></FONT> <BR><FONT face=Arial
size=2>
<td>[minx],[miny],[maxx],[maxy]</td></FONT> <BR><FONT
face=Arial
size=2>
</tr></FONT> <BR><FONT face=Arial
size=2>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Image Coordinates</th></FONT> <BR><FONT face=Arial
size=2>
<td>[img.x], [img.y]</td></FONT> <BR><FONT face=Arial
size=2>
</tr></FONT> <BR><FONT face=Arial
size=2>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Map Coordinates</th></FONT> <BR><FONT face=Arial
size=2>
<td>[mapx], [mapy]</td></FONT> <BR><FONT face=Arial
size=2>
</tr></FONT> <BR><FONT face=Arial
size=2>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Number of results</th></FONT> <BR><FONT face=Arial
size=2>
<td>[nr]</td></FONT> <BR><FONT face=Arial
size=2>
</tr></FONT> <BR><FONT face=Arial
size=2>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Scale</th></FONT> <BR><FONT face=Arial
size=2>
<td>[scale]</td></FONT> <BR><FONT face=Arial
size=2>
</tr></FONT> <BR><FONT face=Arial
size=2>
<tr></FONT> <BR><FONT face=Arial
size=2>
<th>Cellsize</th></FONT> <BR><FONT face=Arial
size=2>
<td>[cellsize]</td></FONT> <BR><FONT face=Arial
size=2>
</tr></FONT> </P>
<P><FONT face=Arial size=2>I get back something like:</FONT>
<BR><BR><B><FONT face="Times New Roman">Bounding box</FONT></B><FONT
face="Times New Roman">
1593723.472943,6433235.946381,1740788.283491,6511201.698335</FONT>
<BR><B><FONT face="Times New Roman">Image Coordinates</FONT></B><FONT
face="Times New Roman"> 227, 115</FONT> <BR><B><FONT
face="Times New Roman">Map Coordinates</FONT></B><FONT
face="Times New Roman"> 1663128.279584, 6476040.672944</FONT> <BR><B><FONT
face="Times New Roman">Number of results</FONT></B><FONT
face="Times New Roman"> 0 </FONT><BR><B><FONT
face="Times New Roman">Scale</FONT></B><FONT face="Times New Roman">
-1.000000 </FONT><BR><B><FONT
face="Times New Roman">Cellsize</FONT></B><FONT face="Times New Roman">
0.000000</FONT> <BR><FONT face="Times New Roman">Is this an issue of
projection? What does a scale of -1 mean?</FONT> </P>
<P><FONT face="Times New Roman">This is the relevent openlayers
javascript:<BR></FONT><FONT face="Courier New"
size=2>map.events.register('click', map, function (e) {</FONT> <BR><FONT
face="Courier New"
size=2>
OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please
wait...";</FONT> </P>
<P><FONT face="Courier New"
size=2>
var url = wms.getFullRequestString({</FONT> <BR><FONT
face="Courier New"
size=2>
REQUEST: "GetFeatureInfo",</FONT> <BR><FONT face="Courier New"
size=2>
EXCEPTIONS: "application/vnd.ogc.se_xml",</FONT> <BR><FONT
face="Courier New"
size=2>
BBOX: wms.map.getExtent().toBBOX(),</FONT> <BR><FONT face="Courier New"
size=2>
X: e.xy.x,</FONT> <BR><FONT face="Courier New"
size=2>
Y: e.xy.y,</FONT> <BR><FONT face="Courier New"
size=2>
INFO_FORMAT: 'text/html',</FONT> <BR><FONT face="Courier New"
size=2>
//QUERY_LAYERS: wms.params.LAYERS,</FONT> <BR><FONT face="Courier New"
size=2>
QUERY_LAYERS: map.getName(),</FONT> <BR><FONT face="Courier New"
size=2>
WIDTH: wms.map.size.w,</FONT> <BR><FONT face="Courier New"
size=2>
HEIGHT: wms.map.size.h});</FONT> <BR><FONT face="Courier New"
size=2>
OpenLayers.loadURL(url, '', this, setHTML);</FONT> <BR><FONT
face="Courier New"
size=2>
OpenLayers.Event.stop(e);</FONT> <BR><FONT face="Courier New"
size=2> });</FONT> <BR><FONT
face="Courier New" size=2> function setHTML(response)
{</FONT> <BR><FONT face="Courier New"
size=2>
OpenLayers.Util.getElement('nodeList').innerHTML =
response.responseText;</FONT> <BR><FONT face="Courier New"
size=2> }</FONT> </P>
<P><FONT face="Times New Roman">Thank you,</FONT> <BR><FONT
face="Times New Roman">Alexandre Laplante</FONT>
</P></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A
href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR><A
href="http://openlayers.org/mailman/listinfo/users"
target=_blank>http://openlayers.org/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>