0

Maybe someone could help me how to use plugin Leaflet Control Search with WFS from GeoServer. The control is added to the map. But when I try to search a single feature with this plugin, the WFS response with full list of all features. How should I use the Leaflet Control Search to get ony one, searched feature from WFS. I'm quite new in Leaflet and GeoServer. Please, help. Here is what I made:

mapid.addControl(new L.Control.Search({
   url: "http://localhost:8000/geoserver/przejazdy/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=przejazdy:lokalizacje&outputFormat=application/json"
   propertyLoc: ['wsp_lat', 'wsp_lon'],
   propertyName: 'nr_id',
   zoom: 16,
   markerLocation: true
}));    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.