Post by Louis Chancé

I needed to dynamically display markers on an openstreetmap map for a WordPress website using Bricks, so I created a plugin just for that.

It extends the functionalities of the Leaflet Map element in Bricks Builder, to query loop markers from a local post type (currently Bricks only supports this for Google map).

The plugin also allows to automatically merge markers sharing the same location into a single element (and show all the data in the clickable tooltip). Or to dispatch them in a little circular area around the shared location.

You can also use the value of another dynamic data (like an ACF toggle field) to decide if the post marker has to show up on the map or not.

It’s fully compatible with native posts and custom fields, as well as with plugins like ACF (and it supports the ACF Openstreetmap field too).

If you’re a Bricks user like me and prefer to use Openstreet maps over Google maps, you can try it out in the official repo: wordpress.org/plugins/…

A banner showing a map of Europe with 4 blue markers on it, and next to it the heading "Query Markers for Bricks Leaflet Map", with the subheading "One marker per post, straight from your query".
Plugin banner
A website section showing an openstreetmap with multiple markers, and a tooltip with some text inside showing up above one of the markers.
Example of a map

Other formats

Keyboard shortcuts

Navigation

Home g h
Feed g f
Messages g m
Notifications g n
Your profile g p
Search /

Actions

Write a new post n
Send the post or message you are writing ⌘/Ctrl ↵
Next post in the feed j
Previous post in the feed k

General

Show this help ?
Close menus and dialogs Esc

The single-key shortcuts pause while you type, and are off on phones and tablets.