I have basic point data and I want to count the number of points in the data. I am displaying the data using WFST-Leaflet since I need to also apply filters and this plugin seems like the cleanest method.
const wfstPointOptions = {
crs: L.CRS.EPSG4326,
showExisting: true,
geometryField: 'geom',
url: 'http://localhost:8080/geoserver/HEC/wfs',
typeNS: 'HEC',
typeName: 'Universities',
maxFeatures: 100,
opacity: 1,
style: function(layer) {
return {
color: 'purple',
weight: 1
}
},
};
const wfstPoint = new L.WFST(wfstPointOptions, new L.Format.GeoJSON({
crs: L.CRS.EPSG4326,
pointToLayer(geoJsonPoint, latlng) {
const layer = new L.CircleMarker(latlng, {
radius: 5,
});
return layer;
},
}));
wfstPoint.addTo(map);
How do I count the number of features in this layer?
http://localhost:8080/geoserver/HEC/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=Universities&resulttype=hits