[openstreetmap/openstreetmap-website] Properly mark `tel:` link on multiple phone numbers in the POI (#2069)

Nutchanon Wetchasit notifications at github.com
Thu Nov 22 17:11:01 UTC 2018

In Thailand, it is very common for moderate-sized stores and SME companies to provide multiple phone numbers rather than using single-number trunk line. (And you are expected to try the alternate numbers if you got a busy signal) These occurences are documented as such in my mapping journey by using the usual [semicolon-separated values](https://wiki.openstreetmap.org/wiki/Semi-colon_value_separator).

The problem is, main OpenStreetMap interface **does not seem to mark _any_ `tel:` link on POI's [`phone`](https://wiki.openstreetmap.org/wiki/Key:phone) key if this field contains semicolon separator(s)**. This leaves numbers in affected POIs as plain text, and user must manually select and copy each of them into a dialer when they need to call-- a minor incovenience for desktop, but very painful for mobile.

Examples and screenshots:

- [Nan Wan](https://www.openstreetmap.org/way/637578269)
		phone = +66 86 394 4382;+66 62 559 6156

- [Bangkok Art and Culture Centre](https://www.openstreetmap.org/way/48966995)
		phone = +66 2 214 6630;+66 2 214 6631;+66 2 214 6632;+66 2 214 6633;+66 2 214 6634;+66 2 214 6635;+66 2 214 6636;+66 2 214 6637;+66 2 214 6638

- [Krungdeb Co-Operative Store](https://www.openstreetmap.org/node/5304732122)
		phone = +66 2 281 8228;+66 2 282 2489;+66 2 629 4265; +66 2 629 4266

You would see that the telephone numbers are not autolinked. See _Notes_ below for more (many, many more) examples.

Compare and contrast with POI bearing a single phone number:

- [Pat Vintage Cafe](https://www.openstreetmap.org/way/234856667)
	`phone = +66 2 116 9966`
	You would see from the tooltip that phone number field is properly linked to [tel:+6621169966](tel:+6621169966).

Please investigate and fix.

Browser: Opera 11.64 (Win32)
System: Microsoft Windows XP Professional SP3


### Notes ###

- **Large number of places are affected by this** (~10k nodes and ~6k ways POI).
	- Overpass ([Turbo](https://overpass-turbo.eu/?Q=%28node%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%3B%28way%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%3B%28._%3B%3E%3B%29%3B%29%3B%29-%3E._%3Bout%3B&R) | [Raw](https://overpass-api.de/api/interpreter?data=%28node%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%3B%28way%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%3B%28._%3B%3E%3B%29%3B%29%3B%29-%3E._%3Bout%3B)) takes several minutes to enumerate them all.
	- Try this Overpass [Turbo+BBox](https://overpass-turbo.eu/?Q=%28node%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%28%7B%7Bbbox%7D%7D%29%3B%28way%5B%7E%22%5E%28contact%3A%29%3Fphone%28%3A.%2B%29%3F%24%22%7E%22%3B%22%5D%28%7B%7Bbbox%7D%7D%29%3B%28._%3B%3E%3B%29%3B%29%3B%29-%3E._%3Bout%3B) query if you would like to look for them in specific area.
- **This problem is a server-side quirk.**
	- It is not browser-specific.
	- The result is essentially the same when JavaScript is turned off.
- I'm not sure if [`fax`](https://wiki.openstreetmap.org/wiki/Key:fax), [`contact:phone`](https://wiki.openstreetmap.org/wiki/Key:contact), and [`contact:fax`](https://wiki.openstreetmap.org/wiki/Key:contact) key are also affected or not. If they are, the same provision should apply (so as their suffix keys).
- Before anyone bring up the `:mobile` suffix of the `phone` key, please note that phone numbers of _Nan Wan_ restaurant are _both_ mobile. (The rest of them are _all_ landline)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181122/d13e03d8/attachment.html>

More information about the rails-dev mailing list