Toolset allows you to easily display a list of posts on a map by using the View and Map blocks together.
You need to place both View and Map blocks on the same page. It is only important that the View has access to the address custom field.
A View will query the database for the posts you select. As it goes through posts, it will output an address for each of them and place a marker on the map.
You can use a View as a source for the map markers even if that View has no visual output. However, if you do display the results, you will see some additional features. For example, if your View uses pagination, as you go through pages, the markers on your map will update.
To add a map that uses a View as the source for the markers you have to:
- Add a View block to your page. This View must list posts that feature an Address custom field.
- Insert a Map block.
- As the source of the markers choose the View block.
- In the View block dropdown choose the name of the block you have inserted and in the Field dropdown select the custom field that contains the address.
- Installing Toolset Maps and Adding Address Fields
- Displaying a Simple Map
- Displaying a Map on A Single Post Template
- Creating Sliders with Dynamic Post Content
- Adding Dynamic Content to Your Homepage
- Creating a View
- Creating Responsive Columns and Grids
- Display Content Conditionally
- Filtering and Ordering Map Markers by Distance
- Using custom styles for maps
- Creating an API Key for Google and Azure Maps
- Using Third-Party Hidden Fields
- How to use Google Maps API in China
- Data Caching For Maps Addresses