-1

I currently implemented this example. So I can select layer's features with a single click or box selection.

But I want to know is it possible to get features with box selection on a wms layer?

(i tried with vector layer and it's currently working).

Thanks.

Mahdi Mahmoodian
  • 473
  • 2
  • 13
sep7696
  • 494
  • 2
  • 16

1 Answers1

0

There are several ways of loading a layer as WMS.

WMS can be used as a Tile layer, as shown here, or as an Image layer.

In both ways, the webserver(GeoServer) sends a tile/image to the client. The example you mentioned uses Vector Layer, which means server send features one by one, not an image or a tile. So you can't check the "box selection extent" and features to find Intersections.

But there is another thing that can help a bit. GetFeatureInfo is a solution to get features from a WMS layer. it gets a single coordinate (a click) and some other information, then return feature of that coordinate.

So answering your question. No, it's not possible to box selecting but you can get a feature by a single click.

here is the example.

Mahdi Mahmoodian
  • 473
  • 2
  • 13