Reinos.nl internet media examples

Entries from a feed

Maps 5.0.1 Live

The entries in their own template as a GeoJSON feed (stores/geojson), loaded by the map after the page. See A feed.

Template stores/geojson
{exp:reinos_maps:geojson}
	{exp:channel:entries channel="stores" dynamic="no" limit="5000"}
		{maps:entry latlng="{store_location:markers_latlngs}" title="{title:attr_safe}" keys="store_{entry_id}"}<h3>{title}</h3>{/maps:entry}
	{/exp:channel:entries}
{/exp:reinos_maps:geojson}
Template
{exp:reinos_maps:html_header}
{exp:reinos_maps:map width="100%" height="400px" marker_cluster:enabled="yes" fit_map:markers="yes"}
	{maps:add_entries url="{path='stores/geojson'}"}
{/exp:reinos_maps:map}
{exp:reinos_maps:html_footer}

Build it in your own site

What this example needs in ExpressionEngine, step by step.

  1. Install Maps.
  2. Create the field, with these short names:
    Short nameTypeNotes
    store_locationMapsSet the field setting Mode to Single location: one marker per store, placed with the search field. Maps Locator indexes that marker, so this one field is the location for the map and the search.
  3. Create the channel stores (Stores) and assign the field.
  4. Put the code in a template.
  5. Put the code of stores/geojson in the template stores/geojson.
  6. Add a few stores (the demo site has 34 bike stores in the Netherlands).

This example comes from the Maps docs: the preview runs exactly the code above.