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)?

(1/2) > >>

orbis:
I use the FARR Google Maps alias(es) really quite often, but prefer generally to keep away from Google wherever possible.

It would be wonderful if there could be an alias (maps and directions) which harnessed Openstreetmap, instead of Google.

I have no idea where to start on that, so am just throwing it out for anyone who can, to consider!

Nod5:
Do you mean the "maps" alias in FARR's Core-Search.alias? In that case this should do it:

Alias name: OpenStreetMap
Alias regex: ^osm (.*)$
Alias result:

--- ---Open Street Map - $$1 | https://www.openstreetmap.org/search?query=$$1
If you also want an icon we can add that like so
Alias result:

--- ---Open Street Map - $$1 | https://www.openstreetmap.org/search?query=$$1 /icon=C:\some folder\openstreetmap.ico
The attached zipped openstreetmap.ico was made from this SVG
https://wiki.openstreetmap.org/wiki/File:Public-images-osm_logo.svg
put through this convertor
https://favicon.io/favicon-converter/

If you never use the google maps alias you can disable (uncheck) it in the alias settings and then instead use assign the "maps" alias prefix phrase for OpenStreetMap with this regex line
Alias regex: ^maps (.*)$

orbis:
That is wonderful. It works well! Thank you so much!

Any chance of doing me/us an OSM version of the GM directions alias, with regex? (I know it's an ask, but it would be so helpful!)

Nod5:
Try this

Alias name: OpenStreetMap direction
Alias regex: ^dir (.*) (.*)$
Alias result:

--- ---To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to=$$1&from=$$2
Things missing: A way to default the from location to ones current location. Selecting mode of transport (default is car). Such details should be findable on their wiki or help pages
https://help.openstreetmap.org/questions/73989/setting-the-initial-to-address-in-directions-by-passing-a-parameter-via-url

edit: sorry that gives an error, need to encode the & character. Will update later when more time. My mistake, it does work.

In general if you want to make or tweak these kind of website URL search aliases the keywords to google for is <site name> and URL query or URL search syntax or similar terms. The other thing to try is to type in a search on the website and see if the browser URL changes. Often the pattern to use is visible then. For example if we go to https://www.wikipedia.org/ and search for "ball" the URL changes to https://en.wikipedia.org/wiki/Ball , which means the FARR alias would be something like
alias name: wikipedia
alias regex: ^wiki (.*)$
alias result:

--- ---Wiki $$1 | https://en.wikipedia.org/wiki/$$1

orbis:
Thank you so much for this. See bold below for one unresolved issue.

 Just for clarity:

1) Set up a new custom alias.

2) Call it "dir" [no quote marks].

3) Put in the Results box [without the quote marks]: "Open Street Map - To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to=$$1&from=$$2".

3) Put in the Regular Expression Pattern box [no quotes]: "^dir (.*) (.*)$".

4) Form of search =: dir [destination] [from]

See the clip attached.

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?

Navigation

[0] Message Index

[#] Next page

Go to full version