Hi,<br>Maybe you could have a look at the SelectFeature control. I haven't tried this on a wms layer. <br>I have tried this on a wfs layer. Works nicely.<br><br>Indika.<br><br>2008/11/21 Peter N. Schweitzer <span dir="ltr"><<a href="mailto:pschweitzer@usgs.gov">pschweitzer@usgs.gov</a>></span><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I want to put the results of a WMS GetFeatureInfo into a new window.<br>
Instead of calling loadURL, I'm using open, like this<br>
<br>
var url = wms.getFullRequestString({<br>
REQUEST: "GetFeatureInfo",<br>
EXCEPTIONS: "application/vnd.ogc.se_xml",<br>
BBOX: wms.map.getExtent().toBBOX(),<br>
X: e.xy.x,<br>
Y: e.xy.y,<br>
INFO_FORMAT: 'text/html',<br>
QUERY_LAYERS: wms.params.LAYERS,<br>
WIDTH: wms.map.size.w,<br>
HEIGHT: wms.map.size.h});<br>
// OpenLayers.loadURL(url, '', this, setHTML);<br>
open(url);<br>
<br>
This works well when the user has hit a feature. For polygon data<br>
that is easy for users, because polygons are normally large. But for<br>
point features, it is more likely that the user will "miss"--click on<br>
a place that does not select a feature. My simple code still opens a<br>
new window, which is now empty, leaving a confused and frustrated user.<br>
<br>
What might I do differently so that a feature miss would not result<br>
in an empty new window?<br>
<br>
The interface is at <a href="http://mrdata.usgs.gov/mineral-resources/ardf.html" target="_blank">http://mrdata.usgs.gov/mineral-resources/ardf.html</a><br>
<br>
Peter<br>
<font color="#888888">--<br>
Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)<br>
(703) 648-6533 FAX: (703) 648-6252 email: <a href="mailto:pschweitzer@usgs.gov">pschweitzer@usgs.gov</a><br>
<<a href="http://geology.usgs.gov/peter/" target="_blank">http://geology.usgs.gov/peter/</a>><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>
</font></blockquote></div><br>