Add layerName option for WMSGetFeatureInfo format

This option allows the format to read only features of a
given layer. This is useful if you wish to make a single
query to a WMS server with multiple layers in it.
This commit is contained in:
Alexandre Dubé
2016-01-21 10:54:26 -05:00
parent b9c3981261
commit 906a132e89
6 changed files with 384 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
---
layout: example.html
title: WMS GetFeatureInfo (Layers)
shortdesc: >
Shows how to fetch features per layer name in a single WMS GetFeatureInfo
request
docs: >
Demonstrates the use of the `layers` option in the
`ol.format.WMSGetFeatureInfo` format object, which allows features returned
by a single WMS GetFeatureInfo request that asks for more than one layer
to be read by layer name.
resources:
- https://code.jquery.com/jquery-1.11.2.min.js
---
<table id="info">
<tr>
<td>All features:</td>
<td id="all"></td>
</tr>
<tr>
<td>Hotel features:</td>
<td id="hotel"></td>
</tr>
<tr>
<td>Restaurant features:</td>
<td id="restaurant"></td>
</tr>
</table>