πŸ”§ How to use with a Matrix field

How to update from Smart Map to Google Maps

Follow the instructions below to learn how to update to the new Google Maps plugin...

Matrix field usage is nearly identical to how it was handled in Smart Map, with only one exception:

  • You can no longer use a query object to plot markers on a map. The query must now be explicitly converted into an array of elements, or any other valid set of locations.
{# OLD #}
{% set locations = entry.myMatrixField %}
{{ craft.smartMap.map(locations) }}

{# NEW #}
{% set locations = entry.myMatrixField.all() %}
{{ googleMaps.map(locations).tag() }}

New Documentation

See the complete new Address in a Matrix Field documentation.