Skip to content

Maps Fieldtype Tag ​

To show your created map, you can put your custom field tag inside a {exp:channel:entries} loop. This will show your map that you created from within the CP.

{your_custom_field}

To modify the map (like the map style or anything else) you can use the power of the Maps module. Simply extend your tag with some params from the {exp:reinos_maps:map} method

{your_custom_field width="100%"}

Please make sure you add the {exp:reinos_maps:html_header} and {exp:reinos_maps:html_footer} to your template to include the necessary files

Tag params ​

The following tags from the Maps module are supported

  • tiles
  • tile_control_position
  • google_maps:style
  • center:address
  • center:latlng
  • zoom
  • zoom:max
  • marker_cluster:enabled
  • marker_cluster:show_coverage_on_hover
  • marker_cluster:zoom_to_bounds_on_click
  • marker_cluster:spiderfy_on_max_zoom
  • marker_cluster:remove_outside_visible_bounds
  • div_class
  • width
  • height
  • overlay:html
  • overlay:position
  • focus_current_location
  • scroll_wheel
  • zoom_control
  • zoom_control_position
  • scale_control

[marker|circle|rectangle|polygon|polyline]:popup:offset ​

Set the offset per feature for the popup

{your_field marker:popup:offset="-10,-100"}
{your_field circle:popup:offset="-10,-100"}
{your_field rectangle:popup:offset="-10,-100"}
{your_field polygon:popup:offset="-10,-100"}
{your_field polyline:popup:offset="-10,-100"}

There are some that filled in automatically because you set them in the entry self.

Markers Fieldtype tag ​

Read markers data from the fieldtype and show it in your template. You can use the following tags to show the markers data:

Example ​

{mapsfieldtype:markers prefix=""}
	{lat}
	{lng}
	{tooltip}
	{icon}
	{content}
	{count}
	{abs_count}
	{total_results}
{/mapsfieldtype:markers}

{!-- With prefix --}
{mapsfieldtype:markers prefix="marker"}
	{marker:lat}
	{marker:lng}
	{marker:tooltip}
	{marker:icon}
	{marker:content}
	{marker:count}
	{marker:abs_count}
	{marker:total_results}
{/mapsfieldtype:markers}

Polyline Fieldtype tag ​

Read Polyline data from the fieldtype and show it in your template. You can use the following tags to show the polyline data:

Example ​

{mapsfieldtype:polylines prefix=""}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{path}
		{lat}, {lng}
	{/path}
{/mapsfieldtype:polylines}

Polygon Fieldtype tag ​

Read Polygon data from the fieldtype and show it in your template. You can use the following tags to show the polygon data:

Example ​

{mapsfieldtype:polygons prefix=""}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{fill_color}
	{fill_opacity}
	{path}
		{lat}, {lng}
	{/path}
{/mapsfieldtype:polygons}

Circles Fieldtype tag ​

Read Circle data from the fieldtype and show it in your template. You can use the following tags to show the circle data:

Example ​

{mapsfieldtype:circles prefix=""}
	 {stroke_color}
     {stroke_opacity}
     {stroke_weight}
     {fill_color}
     {fill_opacity}
     {lat}
     {lng}
     {radius}
{/mapsfieldtype:circles}

Rectangle Fieldtype tag ​

Read Rectangle data from the fieldtype and show it in your template. You can use the following tags to show the rectangle data:

Example ​

{mapsfieldtype:rectangle prefix=""}
	 {stroke_color}
     {stroke_opacity}
     {stroke_weight}
     {fill_color}
     {fill_opacity}
     {latlngs}
         {lat}, {lng}
     {/latlngs}
{/mapsfieldtype:rectangle}

Routes Fieldtype tag ​

Read Route data from the fieldtype and show it in your template. You can use the following tags to show the route data:

Example ​

{mapsfieldtype:routes prefix=""}
	 {from}
		{from:lat}
		{from:lng}
		{from:title}
		{from:icon}
		{from:content}
     {/from}
     
     {stops}
         {stops:lat}
         {stops:lng}
         {stops:title}
         {stops:icon}
         {stops:content}
     {/stops}
     
     {to}
         {to:lat}
         {to:lng}
         {to:title}
         {to:icon}
         {to:content}
     {/to}
{/mapsfieldtype:routes}

Map Fieldtype tag ​

Read Map data from the fieldtype and show it in your template. You can use the following tags to show the map data:

Example ​

{mapsfieldtype:maps prefix=""}
	{map_types}
	{map_type}
	{zoom_level}
	{scroll_wheel}
	{zoom_control}
	{zoom_control_style}
	{zoom_control_position}
	{pan_control}
	{pan_control_position}
	{map_type_control}
	{map_type_control_style}
	{map_type_control_position}
	{street_view_control}
	{street_view_control_position}
	{google_overlay_html}
	{google_overlay_position}
	{center}
{/mapsfieldtype:maps}