Talk:OpenStreetBrowser/Howto Categories

From OpenStreetMap Wiki
Jump to navigation Jump to search

Regular Expression Syntax

While I was successful using this guide to create a new OpenStreetBrowser Category, I failed to use regular expression syntax like described here.

 (node[tourism=hotel];)

works (displays hotels), but

 (node[tourism="^hotel$"];)

as described in this guide does not. Why ? -- Juergeen (talk) 22:26, 13 January 2019 (UTC)

Oh, I had a typo in the documentation. It should be (node[tourism~"^hotel$"];). I already updated the example. By the way, it's now possible to use nwr[tourism~"^hotel$"] to match nodes, ways and relations.
Thank you. That works. :-) -- Juergeen (talk) 18:47, 17 February 2019 (UTC)

Filtering by distance to a way

Is it possible to filter the nodes found by their distance to some specific way, for instance to show alle the hotels next to or near a road ?
Not fltering on a low zoom level that shows a long road overloads my browser, and, probably, also the server.
The distance should be defined as the distance from each node to the closest point of the way. Because this is not easy to calculate, we might relax this definition to the distance to the closest endpoint of any path that is part of the way: This seems easier to calculate and doesn't make a difference on a low zoom level. -- Juergeen (talk) 18:47, 17 February 2019 (UTC)

Hmm, interesting. Do you mean as a special category which shows e.g. all address nodes which belong to a street or more a general selection which applies to all categories? I could image a button (or so) which restricts the query to all objects within an (adminstrative) boundary, a custom bounding box or - as you suggested - close to a node / way (e.g. street). -- Skunk (talk) 08:34, 18 February 2019 (UTC)
I created an issue on Github (because this is the primary place for feature requests / bug reports). -- Skunk (talk) 09:38, 26 February 2019 (UTC)
I left a comment there. And sorry for the long delay ... -- Juergeen (talk) 14:12, 23 March 2019 (UTC)

Dashed lines

Can markerLine({ 'width': 2, color: ...}) draw dashed lines? How? Is this function documented? Where? Icons can be used for that, but it's a bit cumbersome. --Hufkratzer (talk) 20:21, 14 August 2019 (UTC)