+ Start a Discussion
ckellieckellie 

Studying Geolocation

Does anyone know of an example of code using Account's geolocation based on the billing address. I am finding several examples of applications mapping the account, but I am not finding a tool to populate the account's geolocation (longitude and latitude). Does anyone have any examples I can use?

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
MoUsmanMoUsman

Hi ckelli,

Here is an good runing example for you just copy and paste and it is ready to test.using this example you can find lat long and location on google map as well http://sfdchack.blogspot.in/2012/09/google-map-integration-is-not-working.html

 

I hope it will help you!

---

Regards

Usman

All Answers

MoUsmanMoUsman

Hi ckelli,

Here is an good runing example for you just copy and paste and it is ready to test.using this example you can find lat long and location on google map as well http://sfdchack.blogspot.in/2012/09/google-map-integration-is-not-working.html

 

I hope it will help you!

---

Regards

Usman

This was selected as the best answer
colemabcolemab

Due to limits in google's api access (i.e. requests per second, total requests per day), google recommends you cache these values out.

 

I have written a schedulable class (see here) to run in the background. This is good for existing data and changes.

 

Scott @ internet creations wrote a trigger for this here.  This is good for coding new data as it comes in - as long as you aren't adding more than 2500 per day (which is the google limit ATM).