Selecting features by attribute in Leaflet

المشرف العام

Administrator
طاقم الإدارة
Is there a way to select an individual feature based on an attribute from a FeatureGroup in Leaflet? For example, when selecting a feature based on a click event, I will do something like,

function myFun(e){ layer = e.target; } Is there a way to do something along the lines of,

function myFun(uniqueID){ layer = featureGroup WHERE featureGroup.feature.properties.ID == uniqueID; } Thanks for any suggestions.



أكثر...
 
أعلى