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

Missing saved queries #224

Closed
govvin opened this issue Feb 21, 2016 · 12 comments
Closed

Missing saved queries #224

govvin opened this issue Feb 21, 2016 · 12 comments

Comments

@govvin
Copy link

govvin commented Feb 21, 2016

I have previously saved my often used, or customized queries, and never had problems loading them. Today, I just discovered that I lost all my saved queries. 😭

Any suggestions how to recover these?

@tyrasd
Copy link
Owner

tyrasd commented Feb 21, 2016

uh oh. Did you clear your browser cache lately? Did you switch to the https version of overpass turbo? Ehich browser (version) are you using? Please try opening your browser dev tool and look if you can find any data in the "Resources" section under "Local Storage" (or equivalent; depends on browser): There should be a couple of fields, especially one named overpass-ide_saves. Can you post the data of that field?

@govvin
Copy link
Author

govvin commented Feb 22, 2016

No, I haven't cleared my browser's cache, nor switched to https.

Unfortunately, I found no overpass-ide-saves, and these are what i found under local storage:

overpass-ide_background_opacity 1   
overpass-ide_code   {"overpass":"/*\nOverpass Turbo Query for edits made during mapathons, and similar mapping events.\n\n*/\n// set variables\n{{dates=\"2016-02-09T00:00:00Z\", \"2016-02-11T23:59:59Z\"}}\n{{party=3610401,24338,1041828,1521733,2258022,3575137,3610250,3610214,3610478,3610383,3610358,3610674,3610406,3610420,1821301,3610422,3610361,3610425,3610386,3610458,3610462}}\n\n[out:json][timeout:500];\n\n// query changes made during event date\n(\n node(changed:{{dates}})({{bbox}});\n way(changed:{{dates}})({{bbox}});\n)->.EventEdits;\n\n(\n node.EventEdits(uid: {{party}});\n way.EventEdits(uid: {{party}});\n);\nout meta;\n\n/*\n{{data:overpass,server=http://dev.overpass-api.de/api_mmd/}}\n*/"}    
overpass-ide_coords_lat 11.027387948231146  
overpass-ide_coords_lon 124.00800704956055  
overpass-ide_coords_zoom    13  
overpass-ide_disable_poiomatic  false   
overpass-ide_editor_width       
overpass-ide_enable_crosshairs  false   
overpass-ide_export_image_attribution   true    
overpass-ide_export_image_scale true    
overpass-ide_force_simple_cors_request  false   
overpass-ide_no_autorepair  false   
overpass-ide_saves  {"Drinking Water":{"overpass":"/*\nThis is an example Overpass query.\nTry it out by pressing the Run button above!\nYou can find more examples with the Load tool.\n*/\nnode\n [amenity=drinking_water]\n ({{bbox}});\nout;","type":"example"},"Cycle Network":{"overpass":"/*\nThis shows the cycleway and cycleroute network.\n*/\n\n[out:json];\n\n(\n // get cycle route relatoins\n relation[route=bicycle]({{bbox}})->.cr;\n // get cycleways\n way[highway=cycleway]({{bbox}});\n way[highway=path][bicycle=designated]({{bbox}});\n);\n\nout body;\n>;\nout skel qt;","type":"example"},"Where am I?":{"overpass":"/*\nThis lists all areas which include the map center point.\n*/\n[out:json];\nis_in({{center}});\nout;","type":"example"},"Mountains in Area":{"overpass":"/*\nThis shows all mountains (peaks) in the Dolomites.\nYou may want to use the \"zoom onto data\" button. =>\n*/\n\n[out:json];\n\n// search the area of the Dolmites\narea\n [place=region]\n [\"region:type\"=\"mountain_area\"]\n [\"name:en\"=\"Dolomites\"];\nout body;\n\n// get all peaks in the area\nnode\n [natural=peak]\n (area);\nout body qt;\n\n// additionally, show the outline of the area\nrelation\n [place=region]\n [\"region:type\"=\"mountain_area\"]\n [\"name:en\"=\"Dolomites\"];\nout body;\n>;\nout skel qt;","type":"example"},"Map Call":{"overpass":"/*\nThis is a simple map call.\nIt returns all data in the bounding box.\n*/\n[out:xml];\n(\n node({{bbox}});\n <;\n);\nout meta;","type":"example"},"MapCSS styling":{"type":"example","overpass":"/*\nThis example shows how the data can be styled.\nHere, some common amenities are displayed in \ndifferent colors.\n\nRead more: http://wiki.openstreetmap.org/wiki/Overpass_turbo/MapCSS\n*/\n[out:json];\n\n(\n node[amenity]({{bbox}});\n way[amenity]({{bbox}});\n relation[amenity]({{bbox}});\n);\nout body;\n<;\nout skel qt;\n\n{{style: /* this is the MapCSS stylesheet */\nnode, area\n{ color:gray; fill-color:gray; }\n\nnode[amenity=drinking_water],\nnode[amenity=fountain]\n{ color:blue; fill-color:blue; }\n\nnode[amenity=place_of_worship],\narea[amenity=place_of_worship]\n{ color:grey; fill-color:grey; }\n\nnode[amenity=~/(restaurant|hotel|cafe)/],\narea[amenity=~/(restaurant|hotel|cafe)/]\n{ color:red; fill-color:red; }\n\nnode[amenity=parking],\narea[amenity=parking]\n{ color:yellow; fill-color:yellow; }\n\nnode[amenity=bench]\n{ color:brown; fill-color:brown; }\n\nnode[amenity=~/(kindergarten|school|university)/],\narea[amenity=~/(kindergarten|school|university)/]\n{ color:green; fill-color:green; }\n}}"},"key":{"type":"template","parameters":["key"],"wizard":"{{key}}=*","comment":"This query looks for nodes, ways and relations \nwith the given key.\nChoose your region and hit the Run button above!"},"key-type":{"type":"template","parameters":["key","type"],"wizard":"{{key}}=* and type:{{type}}","comment":"This query looks for nodes, ways or relations \nwith the given key.\nChoose your region and hit the Run button above!"},"key-value":{"type":"template","parameters":["key","value"],"wizard":"{{key}}={{value}}","comment":"This query looks for nodes, ways and relations \nwith the given key/value combination.\nChoose your region and hit the Run button above!"},"key-value-type":{"type":"template","parameters":["key","value","type"],"wizard":"{{key}}={{value}} and type:{{type}}","comment":"This query looks for nodes, ways or relations \nwith the given key/value combination.\nChoose your region and hit the Run button above!"},"type-id":{"type":"template","parameters":["type","id"],"wizard":"type:{{type}} and id:{{id}} global","comment":"This query looks for a node, way or relation \nwith the given id.\nTo execute, hit the Run button above!"}}   
overpass-ide_server //overpass-api.de/api/  
overpass-ide_share_compression  auto    
overpass-ide_share_include_pos  true    
overpass-ide_show_data_stats    true    
overpass-ide_tile_server    //{s}.tile.openstreetmap.org/{z}/{x}/{y}.png    
overpass-ide_ui_language    auto    
overpass-ide_use_rich_editor    true    
overpass-ide_version    31  

@Abbe98
Copy link

Abbe98 commented Feb 22, 2016

Possible: Windows automatically clears the browser cache if the hard drive is running out of space.

@tyrasd
Copy link
Owner

tyrasd commented Feb 22, 2016

ok. yeah, it really looks like as if your browser's local storage has been reset/cleared for some reason… I've never heard of a browser doing this automatically because of low storage (or during software upgrades, etc.). Can you tell us which browser and browser-version you're using?

@govvin
Copy link
Author

govvin commented Feb 22, 2016

I'm using Chromium, version 48.0.2564.82 Xubuntu 14.04 (64-bit).

Now, I really wish there's a way to store/retrieve queries from gist/github.

@d1g
Copy link

d1g commented Mar 4, 2016

there's a way to store/retrieve queries from gist/github.

We could also port code from wiki: http://wiki.openstreetmap.org/wiki/Overpass_turbo/Examples and possibly from other pages.

Rating for each query will ease navigation. But I don't think it is possible within single repo or with gists.

@tbertels
Copy link

How about saving the queries in our osm profile?
The saving form should at least inform the user that the queries are saved in the browser cache and should provide an easy way to backup those queries (show them in a window and allow import/export).

@tyrasd
Copy link
Owner

tyrasd commented May 20, 2017

saving the queries in our osm profile

This would be really cool, but AFAIK, that's not technically possible. At least I wouldn't know a way to store custom user data in an osm "profile". Do you have an idea how this could be implemented?

Also related: #219, #21

@simon04
Copy link
Collaborator

simon04 commented May 22, 2017

The OSM API endpoint /api/0.6/user/preferences promises exactly that.

The overpass-turbo would need to authorize against the OSM API via OAuth (or ask the user for her credentials, which is not recommended). https://github.com/osmlab/osm-auth could be used for that.

@tyrasd
Copy link
Owner

tyrasd commented May 22, 2017

Thanks @simon04, I didn't know that one. It's a bit limited in the sense that one can only save relatively short strings of up to 255 characters, but apparently one can store up to 150 of these, which should be enough for most users' queries.

@tyrasd
Copy link
Owner

tyrasd commented Jun 17, 2017

Queries can soon be synced with an osm.org account (testing on http://overpass-turbo.eu/master/ is already possible). 🎉

I think/hope that this will eventually make the issue of lost locally stored queries become less of an issue (and also help when people are switching between browsers, or migrating between the http and https protocols, etc.).

@ProBackup-nl
Copy link

With Firefox ESR 52.9.0 my local saved queries were lost more then once. After changing "Maintain Offline Storage" permissions from "Use Default" to an explicit "Allow", I can restart the browser an the saved local queries are still there.

I have no clue if one of these Extensions does interfere and causing the issue: CanvasBlock, Ghostery, I don't care about cookies, Load from cache, NoScript, Text Area Cache, uBlock Origin.

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

No branches or pull requests

7 participants