AnsweredAssumed Answered

creating a filter (query?)

Question asked by joepub on Sep 9, 2014
Latest reply on Jul 17, 2018 by JGravois-esristaff

I am using esri's feature service and ersi-leaflet library to display my map.  The following code snippet is used to display

the countries

featureURL = "http://dev.xxxxx.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0"

var countries = L.esri.featureLayer(featureURL,

{

   style: getStyle,

  onEachFeature: onEachFeature

}).addTo(map);

 

At this time, it is displaying all the countries.

 

I'd like to display (or highlight) only the countries that satisfies a certain filter or query.

For example, I want to display only the countries that satisfy the filter/query type = SDG.

 

I reviewed the docs and examples for esri-leaflet library but am totally lost as to how use the query method.

 

Can someone point me to an example that show how to use the filter/query to do the above

 

Thanks

Chris

Outcomes