Search code examples
openlayersgeoserverwms

How to do statistics with TileWMS using OpenLayers and Geoserver


I'm working on a real state software with OpenLayers/Geoserver and what i have done so far is having a map with a WMS layer on it where i can display plot with certain conditions.

I can only select one plot and get info thanks to the function getFeatureInfoUrl() but i want to select multiple plots with a box and return some informations like the price per m2. I cant find the solution on the doc of OpenLayers but i'm new so i might have missed it.

So how to select multiples plots using TileWMS with OpenLayers/Geoserver ?


Solution

  • If I understand you correctly, what you are looking for is WFS. Instead of retrieving a image like WMS, this service retrieves features. You have several conditions and filters to get features with WFS. Take a look at the examples of OL.