Newer Version Available

This content describes an older version of this product. View Latest

Get the Boundary Information

The GetBoundaryInformation() Apex method returns geographical IDs of locations that fit the specified search criteria.

Signature

Where,
  • maps is the namespace of the Salesforce Maps package. It’s automatically available when the package is installed.
  • API is the class that contains the global methods exposed to developers.
  • GetBoundaryInformation() is the method.

Sample Code

This code finds the geographical IDs of states in the USA beginning with “A”.

If you invoke methods within a flow, process builder, or trigger, do one of the following to avoid uncommitted work errors:

  • Call the methods through a future method
  • Call the methods as queueable

Warning

Example

Sample Response

Although the return value is an Apex Map<String, Object> object, this JSON response illustrates the essential data you receive in the resulting map.