Advanced Custom Fields: Multiple Coordinates

v1.4.0 · 10+ active installs · Free

An add-on for Advanced Custom Fields that stores more than one map coordinate per field. Version 1.4.0 rebuilds the editor: numbered points, a point list you drag to reorder, and a line or an area drawn through the points in a colour you pick. Same stored JSON as before, so nothing you have saved changes.

Highlights


What it does

Adds a Coordinates map field type to ACF. Click the map to drop a numbered point and drag it to move it. “Edit points (N)” opens the list of points, where a row is dragged by its handle to a new position or removed — and that order is the order the value is stored in, the order get_field() returns and the order a line or an area is drawn in.

Version 1.4.0 rebuilds the editor. The old removal mode — turn on a mode, then click the marker you wanted gone — is gone; points are edited in the list instead. A shape is chosen in two steps: Line or Area, then Sharp, Smoothed (a Catmull-Rom curve through every point) or Bounding box — six combinations that all mean something. Picking one reveals a colour picker that floats over the map and a Markers switch, which decides whether the frontend draws the points along with the line or the area. Clicking a marker opens a popup with its number, its latitude and longitude and its name; a point dropped by the search field keeps the name you searched for. Undo takes back the last change, up to 30 steps.

Originally inspired by the single-point ACF: Coordinates field by Stupid Studio; this plugin extends the idea to multiple points per field. It reads your existing Google Maps API key from ACF’s global setting (google_api_key), so no extra configuration is needed if you already use ACF Map fields.

Nothing you have saved changes: the same JSON in the same postmeta key, so existing field groups and values keep working. The frontend gets the points in stored order — lat/lng pairs, an optional label, the saved zoom level and, when a shape was chosen, the shape, its style, its colour and the marker switch. A value saved by an earlier release has none of the shape keys and draws only its markers, exactly as before. The plugin renders nothing on the frontend itself; the readme carries a paste-ready map example and a map-free one.

The Coordinates map field in the post editor with numbered points and a smoothed area drawn through them.
The Edit points list showing every point in stored order with a drag handle and a Remove button.