Commit 30a88a7c authored by Evan Prodromou's avatar Evan Prodromou

Only match start of word

parent 2cc196bf
......@@ -260,9 +260,9 @@ function makeOSM (argv) {
vb = viewbox(lat, lon, d)
}
if (q && lat && lon) {
query = `(node["name"~"${q}"](${vb});way["name"~"${q}"](${vb}))`
query = `(node["name"~"^${q}"](${vb});way["name"~"^${q}"](${vb}))`
} else if (q) {
query = `(node["name"~"${q}"];way["name"~"${q}"])`
query = `(node["name"~"^${q}"];way["name"~"^${q}"])`
} else if (lat && lon) {
query = `(node["name"](${vb});way["name"](${vb}))`
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment