I know how to set the Lat/Lng on standard Geocoding fields, but let's say I have Geocode__c on a custom object.

Do I set the Lat/Lng by simply doing:

CustomObjectInstance.Geocode__c.Latitude__c = ; CustomObjectInstance.Geocode__c.Longitude__c = ;


It is pretty straightforward to get and set. Here is some documentation which offers the following two lines:

Double theLatitude = myObject__c.aLocation__latitude__s;
myObject__c.aLocation__longitude__s = theLongitude;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.