Nearby Maps is a Lightning Component that provides a quick and simple contextual map of Salesforce data. This article provides answers to frequently asked questions about the Nearby Maps features.
First, Nearby creates a bounding box that encapsulates a circle with a radius of 'x' miles (where 'x' is the radius set in NB Maps). We then run a SOQL query based on the filters defined in NB Maps, limiting the records to the number of markers set in the NB Map configuration and within the bounding box.
Next, we apply a second layer of filtering to include only the records that fall within the circle of 'x' miles radius. When displaying the records on NB Maps, we show only those that fall within the circle. Therefore, any records fetched by the query that fall within the rectangle but outside the circle are ignored. The diagram below illustrates this process: markers within the circle (shaded in pink) are displayed, while markers within the bounding box (shaded in blue) but outside the circle are ignored.
In some cases, when a large number of markers are returned by the SOQL query, there may be records that fall within the square but not the circle. This can lead to discrepancies where some markers are missed or no markers are displayed on NB Maps. To avoid this, we recommend adding additional filters to your NB Maps to limit the number of markers returned. Alternatively, you can add a sort order in the NB Map configuration to ensure the records returned by the SOQL query are ordered by the sort field.
Showing Nearby Maps in Salesforce Records and on Sites
000381376

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.