Use a Bounding Box to Zoom In on Your Map
Now it's time to tune the awesome zip-code map you created to get a better visualization. Ideally, you can zoom in on the areas for which you have data. Instead of a map that includes all of the geometry encoded in the GeoJSON, we want a map based on a subset of that geometry.
A bounding box redefines the area of the map to display by delimiting the boundaries of the new area using coordinates. The trick is figuring out the correct coordinates.
For the geographical map of zip-code areas, the coordinates of every shape encoded in the GeoJSON are simply longitude and latitude coordinates. Finding the longitude and latitude of an area of the map that includes only the relevant area of the map requires a tool that can display those coordinates on the map itself.
There are many tools available on the Internet that can do this task for you. But we’ve already found the coordinates you need to zoom in on the zip codes with the data.
You can create the new map from the same GeoJSON file you already uploaded.
Log in to your Salesforce DE org, and navigate to the URL
formed by appending
/analytics/wave/web/custommap.apexp to your
org’s base URL.
For example, if your org’s base URL is https://na30.salesforce.com, go to https://na30.salesforce.com/analytics/wave/web/custommap.apexp.
- Click New.
- Enter Central L.A. Zipcodes in the Map Label and Map Name fields. The map name and label appear in Analytics.
- Select Equirectangular from the Projection menu.
- In Bounding Box Top, enter 34.2. This number is the latitudinal value defining the upper map boundary.
- In Bounding Box Bottom, enter 33.85. This number is the latitudinal value defining the lower map boundary.
- In Bounding Box Right, enter -117.65. This number is the longitudinal value defining the right map boundary.
- In Bounding Box Left, enter -118.65. This number is the longitudinal value defining the left map boundary.
- Select the GeoJSON definition you created, la_zip_codes, from the GeoJSON menu.
- Click Insert Map. A confirmation appears that the map was successfully created.
Now it’s time to create your masterpiece!
- From the Analytics home page, click the Dashboards tab.
- Locate and click the Los Angeles Tax Data by Zip Code dashboard.
Click to edit the dashboard.
You can skip this step if your dashboard is already in edit mode.
- Click the map to view the widget properties.
Open the Map panel and select
Custom: Central L.A. Zipcodes from
the Map Type menu.
- Save the dashboard.
What a difference a bounding box makes!
This useful map never existed in Analytics before you created it. With so many GeoJSON map definitions freely available on the web, there’s no limit to what geographical data you can visualize with Analytics.