-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple osm_tag to filter Photon result #196
Comments
Specifying two identical keys for the JavaScript object cannot work, since the second one overrides the first one. An option would be to specify an array of
We could either file a PR for Leaflet, or copy & modify this function in leaflet-control-geocoder. |
I think photon is not really standard conform here. The right way to do it is |
What if params can be also a string and the query gets build in the provider plugin for this special case? export function getJSON(url, params, callback) {
//...
if (typeof params === 'object') {
url += L.Util.getParamString(params);
}else{
url += params;
}
xmlHttp.open('GET', url, true);
// ...
} |
Since 2d06ebf, the following should work and yield the URL geocodingQueryParams: {
osm_tag: ['!shop', '!landuse']
} |
Hi,
it's possible to add multiple
osm_tag
parameter to filter photon results forosm_key
andosm_value
fields. https://github.com/komoot/photon/blob/master/README.md#user-content-filter-results-by-tags-and-valuesTo filter all shops from the result set I would do this.
Which translate to:
https://photon.komoot.de/api/?q=kaufland&limit=8&osm_tag=!shop
But of course it is not possible to have multiple
osm_tag
paramshttps://photon.komoot.de/api/?q=kaufland&limit=8&osm_tag=!shop&osm_tag=!landuse
since same keys are getting merged:
And when I look at the utils/getJSON function I don't see how to make this work with only changing the Photon provider plugin.
Any idea?
The text was updated successfully, but these errors were encountered: