+ Start a Discussion
Angie YzaguirreAngie Yzaguirre 

latitude and longitude into custom fields

Hello - I need to create a latitude and longitude coordinate field based on the Billing Address at the Account level.  I need the coordinates to be able to pull into a report like any other custom field.

Is this possible???

Help and thank you in advance!!
KaranrajKaranraj
Yes you can display the latitude and longitude fields in a report like other custom fields. Check the screenshot below

User-added image
Angie YzaguirreAngie Yzaguirre
Hi Karanraj - That's a great snapshot of the latitude and longitude, but I don't see any coordinates and those look like custom fields.  How can I pull that data from the billing address into the fields which can then be pulled into a report?
KaranrajKaranraj
Getting latitude and longitude information based on the address field is not a straight forward. You have to make some api calls to google map to get those details and get stored in salesforce. Here is the sample code, which helps you to get start in that http://developer.force.com/codeshare/apex/ProjectPage?id=a063000000316ogAAA
Angie YzaguirreAngie Yzaguirre
I understand and have been working to find the right code, but have only been able to find code that will pull a map into the account layout.  I need to be able to just pull the coordinates into custom fields.

I do not see any sample code in the link you provided above??

 
KaranrajKaranraj
Click the view source button in that page or try this link https://code.google.com/p/force-google-earth/source/browse/trunk/GoogleEarth/src
Angie YzaguirreAngie Yzaguirre
Thank you for the links and guidance, but I am somewhat new to Visualforce code.  So I am lost.