Newer Version Available
Retrieve Data That Salesforce Maps Hosts
Salesforce Maps works with data providers that supply property and business data. Periodically, these providers update their data, which can affect custom code. If the providers change their data formats, update your custom code accordingly. Salesforce Maps can update, replace, or remove property data at any time.
Signature
- maps is the namespace that's available after you install Salesforce Maps.
- API is the class that contains the global methods exposed to developers.
- GetHostedData() is the method.
Sample Code to Retrieve Geographical IDs
The first example request using the GetHostedData() method returns geographical IDs for women-owned businesses that Salesforce Maps host. Those businesses produce revenue between $100,000 and $1,000,000 in a specified area.
Input Format of the Parameters
Example
Sample Response of Geographical IDs
Although the return value is an Apex Map<String, Object> object, this JSON response illustrates the essential data you receive in the resulting map.
Sample Code to Display Geographical IDs
The second request using the GetHostedData() method takes the geographical IDs and display parameters, such as legend and popup information, and displays them in Salesforce Maps.
Input Format of the Parameters
Example
Sample Response of Displaying the Geographical IDs
Although the return value is an Apex Map<String, Object> object, this JSON response illustrates the essential data you receive in the resulting map.