Jump to Content

Objective HTML

Google Maps for ExpressionEngine

The complete geolocation and mapping toolkit

Markers from a Matrix Field

This example goes one step further and integrates a Matrix field. This example assumes the Matrix field has at least 2 columns – one for the latitude, and one for the longitude.

{exp:gmap:init id="map3" scrollwheel="false"  style="width:400px;height:300px"}

{exp:channel:entries channel="gis_data" disable="member_data|pagination|categories|category_fields"}
		{exp:gmap:marker id="map3" latitude="{matrix_latitude}" longitude="{matrix_longitude}"}

There is no real reason to use Matrix to plot your data. This is mainly used for people with existing datasets that can't use the Fieldtype. The fieldtype is more than capable of plotting multiple points per entry. If you are starting a new project it's best to use the provided fieldtype.