Using computed value to map locations on a Leaflet map

Created on 22 May 2024, 12 months ago

Problem/Motivation

I've added a Geocoder field to my webform, and I've successfully set up the field to populate from a TWIG representation of the city, state, and country:

{{ data.where_do_you_live.city }}, {{ data.where_do_you_live.state_province }}, {{ data.where_do_you_live.country }}

The field is populating correctly, with WKT values like:

POINT(-21.686270 64.028044)

I'd like to use the Leaflet and Leaflet Views modules to create a map of the computed points. I've done this previously to map nodes, using a Geofield as the data source, but it looks like the Geocoder field here isn't recognized as a Geofield, and so I can't set it as a data source.

It seems like I'm so close to having all the components I need to make this happen, but I'm missing some important glue, and I'm looking for guidance.

💬 Support request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

🇨🇦Canada reinvented

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024