osmlab / learnoverpass

LearnOverpass is the definitive, one stop learning resource for the Overpass API.
https://osmlab.github.io/learnoverpass/en/
71 stars 23 forks source link

Popups triggered by overpass turbo map #3

Closed mmd-osm closed 9 years ago

mmd-osm commented 9 years ago

I tried to change some of the Overpass QL code snippets in the reference section, but each time I do any change, a popup with syntax errors appears. Also, I noticed that when switching from one reference page to another reference page, I also sometimes get some intermediate popups.

Secretmapper commented 9 years ago

Currently creating a JS API for the interactive map that should fix this!

Secretmapper commented 9 years ago

Fixed by ccdbb3a4a4b1e8a369a9cad5726a7d8343198d2f! (and https://github.com/tyrasd/overpass-turbo/pull/175)

mmd-osm commented 9 years ago

Cool. The popups are gone. On Firefox console/Firebug I get some error messages when the Overpass QL query is invalid. It's probably not a big thing, maybe you've already seen this:

s1

Do you plan to show some error messages somewhere else? What about a small delay between key types and executing a query? If we trigger a query for each key type, we might run into HTTP 429 issues (to prevent overload). Also triggering kill_my_queries to abort potentially long running queries comes to mind, although it doesn't work properly at the moment (see https://github.com/drolbr/Overpass-API/issues/214).

Sorry, if this stretches this ticket a bit, I'll create additional ones if needed.

tyrasd commented 9 years ago

+1 for delaying query execution a bit and to call kill_my_queries even if it's currently buggy.

Secretmapper commented 9 years ago

Yup, right now it's being console logged as I'm planning on a way to show the errors.

The query is being delayed by 200 Millisecond, which I agree is very low. Another code-run website that uses 'autocompile' (Codecombat) use a 5 second delay, so I guess we can delay that long and we can tweak it to what works best for the project :)