diff options
| author | Code WvS <code-wvs@quantentunnel.de> | 2015-03-08 10:09:15 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-03-08 10:09:15 +0100 |
| commit | 53f4378325f30728cceeae8d149d69a74ca5556e (patch) | |
| tree | 596d8b8b64270feb61188bc2ffb2123b948a22de /threads.js | |
| parent | 0b9b31b84c1070e51d4d3e257db5ccb1e63db683 (diff) | |
| download | snap-yow-53f4378325f30728cceeae8d149d69a74ca5556e.tar.gz snap-yow-53f4378325f30728cceeae8d149d69a74ca5556e.zip | |
make overpass query more usable by returning the list of elements
Diffstat (limited to 'threads.js')
| -rw-r--r-- | threads.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2692,8 +2692,8 @@ Process.prototype.focusMap = function (lon, lat, zoom) { // there is a library imported that uses this function. // TODO: Improve this :) // -// returns true if there are elements returned by the overpass query -Process.prototype.overpassQuerySucceeds = function (query) { +// returns elements returned by the overpass query +Process.prototype.overpassQuery = function (query) { var url = 'overpass-api.de/api/interpreter?data=[out:json];' + query; @@ -2706,7 +2706,7 @@ Process.prototype.overpassQuerySucceeds = function (query) { response = this.httpRequest.responseText; this.httpRequest = null; console.log(response); // DEBUG - return JSON.parse(response).elements.length > 0; + return new List(JSON.parse(response).elements); } this.pushContext('doYield'); this.pushContext(); |
