overpasser icon indicating copy to clipboard operation
overpasser copied to clipboard

Example query works only after format and timeout have been removed....

Open kamir opened this issue 5 years ago • 1 comments

Using overpass-api.de it was not possible to load results for this query:

["out":"json"]["timeout":"30"]; ( node ["amenity"="parking"] ["access"!="private"] (47.48047027491862,19.039797484874725,47.51331674014172,19.07404761761427); <; ); out body center qt 100;

But this works fine:

( node ["amenity"="parking"] ["access"!="private"] (47.48047027491862,19.039797484874725,47.51331674014172,19.07404761761427); <; ); out body center qt 100;

If I ignore format and timeout in the query builder, I still get an ";" in the beginning of the query string.

In order to get a working query string I had to use: query.substring(31)

Now I get a response but also the parsing error:

com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

Even when XML Outputformat is used, the same error message appears.

kamir avatar Apr 06 '19 14:04 kamir

["out":"json"]["timeout":"30"]; is rejected because it is invalid syntax!

You need to use [out:json][timeout:30]; without any " in there.

See https://github.com/zsoltk/overpasser/pull/13 where this issue was already fixed.

mmd-osm avatar May 02 '19 19:05 mmd-osm