Is it possible to include coordinates in a Google Contact?

2,430 views
Skip to first unread message

Adrian Cuthbert

unread,
Feb 17, 2011, 12:35:39 PM2/17/11
to google-co...@googlegroups.com
More specifically I like being able to select a location on Google Maps from my contacts. Better still I can update my contacts from elsewhere, have them sync onto my phone and be available from Google Maps. 

As far as I can tell a structured address is a component available in all contacts and Google Maps geocodes the address (if present) to work out what map to display. But there are some things that either don't geocode correctly or can't be properly described using a postal address. Is there anyway to capture these in a contact and use it to drive Google Maps to the correct coordinates.

Any help/thoughts would be greatly appreciated,

Adrian

Nicolas Garnier

unread,
Feb 17, 2011, 6:20:11 PM2/17/11
to google-co...@googlegroups.com, Adrian Cuthbert
Hey Adrian,

If you would like to save coordinates of a contact my advice would be to save the coordinates in the formattedAddress field of a gd:structuredPostalAddress and to use the format "lat,lon" (in decimal) for example "50,0"
You could set the @rel attribute to "http://schemas.google.com/g/2005#otherand the @label to "Coordinates" to differentiate this address from regular address.

By doing ti this way you would benefits from clients that already have an integration with Google maps. For example Android phones have a cool feature, when you click on an address of a contact this opens Google maps and searches for the contact. This is the equivalent to using: http://maps.google.com?q=formattedAddress

So if you save "lat,lon" in the formattedAddress field you would benefit from this integration because http://maps.google.com?q=50,0 for example actually points to coordinates latitude=50 longitude=0 automatically.

Cheers

Nicolas

--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
google-co...@googlegroups.com
To unsubscribe from this group, send email to
google-contacts...@googlegroups.com
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Stream18

unread,
Feb 18, 2011, 9:31:06 AM2/18/11
to google-co...@googlegroups.com
Hi Adrian,

for this I would use one extended property (http://code.google.com/intl/es-ES/apis/contacts/docs/3.0/reference.html#ProjectionsAndExtended).
One of the advantages of this method is that the owner of the Contact will not be able to remove/modify this information by mistake, as the Contacts application from Google does not show this extended properties.

Kind regards,
Eduardo.

Adrian Cuthbert

unread,
Feb 22, 2011, 8:05:38 AM2/22/11
to google-co...@googlegroups.com
Hi Eduardo,

the problem I foresee with extended properties for my scenario is that I want third-party apps that have access to Google Contacts to be able to use the coordinates. For example an app might use a contact to drive a map to a particular location or - even better - use a contact as the destination of a route. In most circumstances, using an address and having the third-party app geocode it is sufficient but - sadly - not all. 

Regards,

Adrian
Reply all
Reply to author
Forward
0 new messages