GNOME Bugzilla – Bug 736803
Allow route to contact
Last modified: 2015-01-31 23:52:04 UTC
Would be really cool if we could allow user to enter contact's name in the 'To' entry and we complete it, if we got an address for that contact and then automatically substitute it in the entry. If we know last check-in (and its recent enough) we could give an option for use to choose "Fred's last known location" or "Fred's home".
Ths could be done by using libfolks in Maps, it is what Contacts uses for backend: https://wiki.gnome.org/Projects/Folks/ Quote from Philip Withnall: > For displaying contact details, you might want to just open Contacts to > view a specific contact. For tighter integration, e.g. displaying > contacts on a map, you should use libfolks directly, which is the > backend Contacts uses.
So, Some comments/questions. Say we get the contacts from libfolks, and add them to the store at some point so we can complete against them. When do we perform the geocode lookup of the address? And what visual hint should we provide that we are doing this? Also, maybe we should use Nominatim's structured request? http://wiki.openstreetmap.org/wiki/Nominatim#Parameters "street=<housenumber> <streetname> city=<city> county=<county> state=<state> country=<country> postalcode=<postalcode> (experimental) Alternative query string format for structured requests. Structured requests are faster and require less server resources. DO NOT COMBINE WITH q=<query> PARAMETER." We could add a geocode_forward_new_from_place or something like that to get an interface to search with this. Maybe it gives better results as well? You can try with your own address: http://nominatim.openstreetmap.org/?street=&city=&state=&postalcode=&format=jsonv2&addressdetails=1
Or maybe we can just use the geocode_forward_new_for_params, we might have to add something to allow all the ones we need.
Created attachment 294337 [details] [review] placeStore: Add contact type to place store
Created attachment 294338 [details] [review] contact: Add custom unique id Make sure contacts to not clash in placeStore even if more than one points to the same OpenStreetMap object.
Created attachment 294339 [details] [review] placeBubble: Do not add favorite button for contacts
Created attachment 294340 [details] [review] mapView: Use ContactMarker for contacts
Created attachment 294341 [details] [review] application: Add contacts to place store
Created attachment 294342 [details] Cast of searching and routing to contacts
So this adds contacts to the placeStore in startup, it only adds those that we are able to geocode to a lat/lon. It will geocode async, so it will take a short while before the contacts are added. The geocode cache will work in our favour here I guess. Some things that might need addressing: Other completes in the place store have an icon to indicate their type, like recent and favorite. Is there an icon we could use for contact? I do not want to store the contacts in our json file, because I do not really now how to serialize and de-serialize the contact. Or rather, the avatar pixbuf. So I dunno how I would keep track of the contact being a favorite.
Created attachment 294358 [details] [review] placeStore: Add contact type to place store
Created attachment 294359 [details] [review] placeListRow: Add avatar icon for contact
Created attachment 294360 [details] [review] contact: Add custom unique id Make sure contacts to not clash in placeStore even if more than one points to the same OpenStreetMap object.
Created attachment 294361 [details] [review] placeBubble: Do not add favorite button for contacts
Created attachment 294362 [details] [review] application: Add contacts to place store
Created attachment 294402 [details] [review] placeStore: Add contact type to place store
Created attachment 294403 [details] [review] placeListRow: Add avatar icon for contact
Created attachment 294404 [details] [review] application: Add contacts to place store
Created attachment 294437 [details] [review] application: Add contacts to place store
Created attachment 295831 [details] [review] placeStore: Add contact type to place store
Created attachment 295832 [details] [review] placeListRow: Add avatar icon for contact
Created attachment 295833 [details] [review] application: Add contacts to place store
Attachment 295831 [details] pushed as 22c8681 - placeStore: Add contact type to place store Attachment 295832 [details] pushed as 369835a - placeListRow: Add avatar icon for contact Attachment 295833 [details] pushed as 09adee6 - application: Add contacts to place store