[OpenLayers-Users] WMS GetFeatureInfo results in new window
Arnd Wippermann
arnd.wippermann at web.de
Fri Nov 21 14:44:40 EST 2008
MapServer offers the possibility to show a specific html side, when there
are no results.
Add EMPTY to the WEB part of the map
EMPTY 'Templates/empty.html'
Or you can change the tolerance radius for selecting a point.
Arnd Wippermann
-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Peter N. Schweitzer
Gesendet: Freitag, 21. November 2008 17:21
An: users at openlayers.org
Betreff: [OpenLayers-Users] WMS GetFeatureInfo results in new window
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/>
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list