WIP: Leaflet Map with Query Loop

Hi there,

I know i am able to create a Query Loop for multiple markers with Google Maps.

As for GDPR purposes i would like to use Leaflet as Map solution but this one has no Query loop possibility yet. Is it possible to have this added in the future?

Joep

I’m waiting for this one day too

well

if anyone need a urgent leaflet openstreetmap element with post type+query loop possibility
snn-brx already has it :wink:

waiting for that too

[EDIT]

I created and published a plugin that adds the query functionality into the Bricks Leaflet map, directly in the builder.

The current version supports:

  • query markers from a post type, using an custom field value (native custom field, ACF through other plugins like Metbox..)
  • either use 2 fields for latitude and longitude, or use the Openstreetmap field for ACF plugin to have a single field.
  • conditionally show (or not) markers based on a dynamic field condition (checking a field value)
  • merge or dispatch markers in case multiple markers shre the exact same location:
    • merge will display one single makers, but in the tooltip it will show the details for all the markers
    • spread will create multiple markers around the same location spot.
  • The map is automatically centered in the middle of all the queried markers.

You can find it in the official repository : Query Markers for Bricks Leaflet Map – WordPress plugin | WordPress.org

Any feedback is welcome, I’m happy to make some changes if needed :slight_smile: