[OpenLayers-Users] how to query wms, like wfs?
Phil Scadden
p.scadden at gns.cri.nz
Thu Feb 27 12:31:03 PST 2014
> thanks phil. now trying to apply sld_body to layer on click (so
> feature whose info is returned is highlighted):
>
> var query = {
> click: new OpenLayers.Control.WMSGetFeatureInfo({
> layers: [layer1],
> queryVisible: true
> /* is this where i put this???
> sld_body: sld1 */
> })
> };
Dont see how that could work. To be honest I generally use WFS instead
of WMSGetFeatureInfo for this kind of thing. I draw the selected feature
from the GML returned and construct the info popup from the attributes.
Where this strategy doesnt work is when the geometry returned is very
large. In this cases, it is better to use the SLDSelect object to do
what you are attempting above, and WMSGetFeatureInfo (trigger from
sldselect "selected" event) or a WFS query without the shape attribute
in the propertylist to the attribute info.
--
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.
More information about the Users
mailing list