[OpenLayers-Users] WMS GetFeatureInfo results in new window

Peter N. Schweitzer pschweitzer at usgs.gov
Fri Nov 21 11:20:34 EST 2008


I want to put the results of a WMS GetFeatureInfo into a new window.
Instead of calling loadURL, I'm using open, like this

  var url =  wms.getFullRequestString({
    REQUEST: "GetFeatureInfo",
    EXCEPTIONS: "application/vnd.ogc.se_xml",
    BBOX: wms.map.getExtent().toBBOX(),
    X: e.xy.x,
    Y: e.xy.y,
    INFO_FORMAT: 'text/html',
    QUERY_LAYERS: wms.params.LAYERS,
    WIDTH: wms.map.size.w,
    HEIGHT: wms.map.size.h});
  // OpenLayers.loadURL(url, '', this, setHTML);
  open(url);

This works well when the user has hit a feature.  For polygon data
that is easy for users, because polygons are normally large.  But for
point features, it is more likely that the user will "miss"--click on
a place that does not select a feature.  My simple code still opens a
new window, which is now empty, leaving a confused and frustrated user.

What might I do differently so that a feature miss would not result
in an empty new window?

The interface is at http://mrdata.usgs.gov/mineral-resources/ardf.html

Peter
-- 
Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  FAX: (703) 648-6252  email: pschweitzer at usgs.gov
<http://geology.usgs.gov/peter/>



More information about the Users mailing list