ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

Openstreetmap alias(es)?

<< < (2/2)

4wd:
There is one issue: this formulation doesn't cope with places with more than one word as a name (like New York, for example). Is there a solution to that, do you think?
-orbis (October 11, 2020, 04:23 AM)
--- End quote ---

Enclose it in quotes: dir "new york" chicago

Nod5:
If you use plus characters "+" instead of spaces then it works as is. For example try searching

--- ---dir yonkers+ny long+island+nyThat's because FARR will detect the two parts as whole strings and the website will treat + in the URL as spaces.

Alternatively you can tweak the regex pattern in FARR to require quotes around the to and from strings
alias regex:

--- ---^dir "(.*)" "(.*)"$alias results:

--- ---To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to="$$1"&from="$$2"
To use that you would type in the FARR searchbox

--- ---dir "yonkers ny" "long island ny"
Note that you can keep both aliases, the one which requires quote marks and the one without, active at the same time. Because only one will trigger depending on if you type the quotemarks or not.

That would look something like this


and





orbis:
Superb, Nod5! Thank you so much!!

wjamoe:
or you can add 'from'  to the alias, then you don't need + signs or quotes in the seach field

regex
dir (.+) from (.+)

in combination with (same as before)
alias result
To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to="$$1"&from="$$2"

you can also add ' to'  and ' from' to the alias (please note the use of $$3)

regex
dir (.+) (from|to) (.+)

filter results (to only show the results containing 'to' or 'from'
$$2

directions for $$1 to $$3 | https://www.openstreetmap.org/directions?to="$$3"&from="$$1"
directions for $$1 from $$3 | https://www.openstreetmap.org/directions?to="$$1"&from="$$3"
directions for $$1 from HOME | https://www.openstreetmap.org/directions?to="$$1"&from="HOME ADDRESS"
directions for $$1 from OFFICE | https://www.openstreetmap.org/directions?to="$$1"&from="OFFICE ADDRESS"

example

dir segbroeklaan, den haag to schiphol airport
or
dir circuit, zandvoort from home

of course you need to replace HOME ADDRESS with your own home address ;-)

Navigation

[0] Message Index

[*] Previous page

Go to full version