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.
29 lines
705 B
HTML
29 lines
705 B
HTML
---
|
|
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>
|