Provide OpenStreetMap links to location information in events [WIP]
Needs ReviewPublic

Authored by neobrain on Oct 26 2018, 6:21 PM.

Details

Reviewers
mlaurent
winterz
Group Reviewers
VDG
Summary

Currently, this feature is hardcoded to link to the Nominatim search tool for OSM data. Example screenshot:

I'm hoping to gather some feedback on this (unfinished!) patch, specifically but not limited to:

  • Should we use Nominatim rather than directly linking to OpenStreetMap? (Does the former provide better search results for imprecise inputs, for instance?)
  • Should an option be provided to select other map services? (Google/Bing/etc)

In my personal calendar, the simple approach used in this patch works on about 30% of the entries. Other services might fare better, but may come at the cost of the user's privacy. 30% is good enough though, and for the other entries it's still quicker to fixup the search query (turning nonstrict address formats into strict ones) than to do a manual search.

TODOs:

  • Gather feedback
  • Add the link to other templates where applicable

Diff Detail

Repository
R173 KCalendar Utils
Lint
Lint Skipped
Unit
Unit Tests Skipped
neobrain created this revision.Oct 26 2018, 6:21 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptOct 26 2018, 6:21 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
neobrain requested review of this revision.Oct 26 2018, 6:21 PM

I like the idea!
Hardcoding this to OSM is IMHO fine, we do the same elsewhere already (see e.g. https://phabricator.kde.org/source/kdepim-addons/browse/master/plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp$149).
A possible extension might be to prefer the geo coordinate field if present. That's rare on "normal" calendar entries, but e.g. KItinerary-generated events have it set if known.

neat.

Volker has a good point. Incidences can have geo coordinates so an even better idea is to provide location based on that.

also, it's a little strange if the location isn't a real world physical location. for example I sometimes put urls in the location field and @mlaurent added some C++ code (somewhere, I forget) that looks for urls in the location field and turns those into hyperlinks
and what happens if I put in a location like "John's House" or "skype" , etc