Add an option to choose to make overpass requests per bbox or per tiles#28
Add an option to choose to make overpass requests per bbox or per tiles#28GuillaumeAmat wants to merge 34 commits into
Conversation
|
I don't completely understand what this changes. Can you explain a little how the old version worked and what you enabled in your new version? Especially what this could be used for? It looks interesting. |
|
The purpose of this Leaflet module is to create Lealfet layers with Overpass requests associated to them. The old behavior was to launch one request per tile on the map. A tile is sort of a piece of the map puzzle. So, 10 requests were launched per layer each time we dragged the map (not totally true but it's the idea). My modification adds an option to stick to this behavior or disable it by launching only one request per layer and per move/pan. |
|
Ah sounds good. I always wanted to also make a change to limit the requests but never found the time to do so. 👍 |
…s without changing it
- The callback function is now called onSuccess - Two new callbacks: onError and onTimeout - New option timeout
…he layer is added to the map
|
A few remarks:
|
|
Do you think maybe you could add those changes? 😏 They sound like a very good idea. |
|
First of all thanks for your work @GuillaumeAmat I want to merge the first 2 commits see #30 (later ones are fork specific but I like the features). Now I would like to point out why I used tile like requests
Nevertheless I agree that the bbox approach reduces the request count for (most?) use cases. |
|
@kartenkarsten I totally agree with your two points and knew that, that's why I added a « switch » option to activate one solution or the other. In my developments, I encountered many errors due to the number of requests from the Overpass server. Those errors motivated the change. I think I will add @mmd-osm's proposal in my fork by adding an option to use Also, I need live data and can't cache the Overpass returned ones. I don't know if I already told you but thank you too for your work ;) |
|
@nrenner : looking at how this is implemented in overpass turbo, we even see both variants there: first the abort() call then I don't know exactly how reliably Edit: I just deployed achavi on the test box, adjusted the URLs to point to the test server instead, ran a query and immediately pressed cancel. The |
|
@mmd-osm thanks for your answer and investigation.
Can't help you with that, I'm afraid. |
No description provided.