You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My data happens to contain a few 'user provided' entries which have the same content in the propertyName: 'Title' for different locations.
Now, if I do a search on this propertyName: 'Title' in the marker layers to be searched in, I only get 1 result listed even though others exist.
I am not fluent enough in Javascript to determine where, let alone even why, filtering is applied.
Duplicate names for locations is something that is a real-world occurence (supermarket chains for instance) and I honestly cannot understand why the search control even does filtering. It should never filter but simply return what exists in the data, duplicate propertyName or not...
If this cannot be fixed I am forced to search for a replacement control (and it was already difficult enough to find one that searches in the existing marker data instead of real world locations)
or, heaven forbid, struggle to write my own custom control...
The text was updated successfully, but these errors were encountered:
Using Leaflet 1.8.0. Data: OSM geoJSON.
Workaround:
Desired search field is a person name, but there are duplicates.
Added new property to geoJSON features (in this particular case, the person name concatenated to separator string (" - ") and then to the name of the street of residence (as all data points come from one municipality only).
Used this new property for search control.
Specific to my data ... but perhaps a hint to others.
(Thanks to: https://jsfiddle.net/nathansnider/oe61fkg0/ for the example.)
All this said, a change for duplicate handling by search control author is obviously still most desirable
My data happens to contain a few 'user provided' entries which have the same content in the
propertyName: 'Title'
for different locations.Now, if I do a search on this
propertyName: 'Title'
in the marker layers to be searched in, I only get 1 result listed even though others exist.I am not fluent enough in Javascript to determine where, let alone even why, filtering is applied.
Duplicate names for locations is something that is a real-world occurence (supermarket chains for instance) and I honestly cannot understand why the search control even does filtering. It should never filter but simply return what exists in the data, duplicate propertyName or not...
If this cannot be fixed I am forced to search for a replacement control (and it was already difficult enough to find one that searches in the existing marker data instead of real world locations)
or, heaven forbid, struggle to write my own custom control...
The text was updated successfully, but these errors were encountered: