New element MAP

Hello,

I’m trying to get a map working, but I’m having some trouble. My goal is to create a Custom Post Type where I can add individual branches, each with its own content. I’d then like to display these branches on a map as clickable markers (so that clicking a marker shows the content).

I’m adding coordinates for each branch using custom fields in ACF.

How can I display these branches on the map?

Is this possible with a Leaflet map as well, or can it only be done using the Google Maps API?

EDIT:
This is what my structure looks like — the block with the query contains a query for the CPT with branches.
image

This is Map Connector
image

This is settings on Map (Leaflet) element

In ACF, I have for each post separate fields (numbers) for Latitude and Longitude. With this setup, it doesn’t work. However, if I add a Map element directly into the query block to the Map Connector, the points on the map appear, but the map is generated multiple times, with only one point on each map. Where am I making a mistake?

Hi @AdamP ,

Map connector is only working with Map element (Google), not the Map (Leaflet)

Hello @itchycode
and what about this update from 2.1 ?

I kind of understood that it’s meant to replace Google API, and that it’s now possible to create markers using Leaflet as well?

Hi @AdamP

Documentation Map (Leaflet) – Bricks Academy

You can use the leaflet map element, but it does not support query sync / query mode like the map element (Google) yet.

If you want to have that feature, please use the Map element (Google)

Any idea if the map connector / query sync for Leaflet maps is on the roadmap? I suppose I can’t switch to Leaflet if there’s no way to query for multiple locations (CPTs) on a page.

3 Likes

Custom PHP works perfectly, just ask Claude.

Care to explain? I’m not sure there is a way to use custom PHP in Bricks Builder Leaflet map connectors.