You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“addr:street="Tālivalža iela" in Riga\n”
*/
[out:json][timeout:25];
// fetch area “Riga
” to search in
{{geocodeArea:Riga
}}->.searchArea;
// gather results
(
// query part for: “"addr:street"="Tālivalža iela"”
node["addr:street"="Tālivalža iela"](area.searchArea);
way["addr:street"="Tālivalža iela"](area.searchArea);
relation["addr:street"="Tālivalža iela"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
First of all, single line comment is broken:
// fetch area “Riga
” to search in
Secondly, area lookup is broken too:
{{geocodeArea:Riga
}}->.searchArea;
The problem does not occur if Wizard query is entered via UI. I suppose, input form trims newline in this case.
Now some background. My goal is to use overpass-turbo as a Code Playground for Zulip chat.
The links for opening code playgrounds are always constructed by concatenating the provided URL prefix with the URL-encoded contents of the code block.
In this case prefix is https://overpass-turbo.eu/?w= and the rest is an URL-encoded content of code block Zulip user typed in their message:
```wizard
addr:street="Tālivalža iela" in Riga
```
Zulip's Code Playgrounds only work with code blocks and Markdown code blocks always end with a newline. I have no control over what is URL-encoded, therefore I cannot trim the newline on my side. There are workarounds, e.g. quoting area name or adding a trailing space at the end of Wizard query, but this is not user-friendly and also consistency between Wizard UI and Code Playground in Zulip is lost. It would be very nice if overpass-turbo could trim newline from w= parameter value.
The text was updated successfully, but these errors were encountered:
Long story short, when passing Wizard query with trailing newline as URL parameter, newline is treated as part of area name.
For example, https://overpass-turbo.eu/?w=addr%3Astreet%3D%22T%C4%81lival%C5%BEa%20iela%22%20in%20Riga%0A results in the following Overpass query:
First of all, single line comment is broken:
Secondly, area lookup is broken too:
The problem does not occur if Wizard query is entered via UI. I suppose, input form trims newline in this case.
Now some background. My goal is to use overpass-turbo as a Code Playground for Zulip chat.
In this case prefix is https://overpass-turbo.eu/?w= and the rest is an URL-encoded content of code block Zulip user typed in their message:
Zulip's Code Playgrounds only work with code blocks and Markdown code blocks always end with a newline. I have no control over what is URL-encoded, therefore I cannot trim the newline on my side. There are workarounds, e.g. quoting area name or adding a trailing space at the end of Wizard query, but this is not user-friendly and also consistency between Wizard UI and Code Playground in Zulip is lost. It would be very nice if overpass-turbo could trim newline from
w=
parameter value.The text was updated successfully, but these errors were encountered: