Skip to content
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

generic overpass query #12

Open
Dirk-- opened this issue Dec 16, 2021 · 6 comments
Open

generic overpass query #12

Dirk-- opened this issue Dec 16, 2021 · 6 comments

Comments

@Dirk--
Copy link

Dirk-- commented Dec 16, 2021

how about adding a generic query (like the 'question mark functionality' at lower right side of https://www.openstreetmap.org)?

This would be a nice add-on at my site https://brouter.grade.de/#map=5/54.618/23.533/CARTO,CEMT

@plepe
Copy link
Owner

plepe commented Dec 16, 2021

You mean for the demo application? Sure, why not, that's a good idea.

I don't think this should be available for all applications that use this library, though.

I'm sure you can integrate this into your site right now :-)

@Dirk--
Copy link
Author

Dirk-- commented Dec 16, 2021

I don't think this should be available for all applications that use this library, though.

why not? Query just

  • within a small radius
  • keys probably preselected
  • result in a popup

@plepe
Copy link
Owner

plepe commented Dec 16, 2021

Because it's against the UNIX philosophy. Do one thing, but do this one thing great.

For example: In my application OpenStreetBrowser, I'm using multiple layers. Should this query be available on each layer? If I add it, which query should it use? The same which this layer is configured for? Which style(s) for displaying results should be used?

I don't say, this is a bad idea, and you can still use overpass-layer for this. The only thing which might not be possible right now, is to force the bounding box (or rather bounding area if you want a circle). So: If a user clicks a location, add a new layer with your custom query (e.g. 'nwr;' for everything), with a forced bounding box (the underlying overpass-frontend accepts GeoJSON polygons as bbox, so this shouldn't be a problem) - and done.

I will check, if I can add a forced bounding area easily.

@plepe
Copy link
Owner

plepe commented Dec 23, 2021

Sorry for not coming back to you earlier. I found a few issues adding the "forced bounding box" functionality. But I'm making good progress: plepe/overpass-frontend#21

Also, I added a lot more tests to be more stable in the future.

@plepe
Copy link
Owner

plepe commented Dec 31, 2021

Check this out: https://github.com/plepe/leaflet-overpass-lens

@plepe
Copy link
Owner

plepe commented Jan 2, 2022

I added some examples how to use the module in the README file. Also, I added a link to a short screencast: https://www.youtube.com/watch?v=JTzVa9E0Yo8

I hope, you find this useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants