[OpenLayers-Users] WMS GetFeatureInfo results in new window
Indika Tantrigoda
indika85 at gmail.com
Fri Nov 21 11:43:54 EST 2008
Hi,
Maybe you could have a look at the SelectFeature control. I haven't tried
this on a wms layer.
I have tried this on a wfs layer. Works nicely.
Indika.
2008/11/21 Peter N. Schweitzer <pschweitzer at usgs.gov>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081121/0e62bf44/attachment.html
More information about the Users
mailing list