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.

Tag Variable

Below are the Tag Variables. Those Variables can be used in the tag described above

marker:n:latlng

Show the latlng of one marker.

{your_custom_field:marker:n:latlng}

marker:latlng

Show all latlng positions with pipeline`s

{your_custom_field:marker:latlng}

marker:n:title

Show the title for one marker

{your_custom_field:marker:n:title}

marker:title

Show all titles with pipeline`s

{your_custom_field:marker:title}

marker:n:icon

Show one icon

{your_custom_field:marker:n:icon}

marker:icon

Show all icons with pipeline`s

{your_custom_field:marker:icon}

route:from

Show the from latlng for use in the route function

{your_custom_field:route:from}

route:stops

Show the stops latlng for use in the route function

{your_custom_field:route:stops}

route:to

Show the to latlng for use in the route function

{your_custom_field:route:to}

has:markers

Variable that check if there is any marker set

{maps_field_extension:has:markers}

markers

Loop over the Markers

{maps_field_extension:markers}...{/maps_field_extension:markers}

markers:lat

The lat of the marker

{maps_field_extension:markers}{lat}{/maps_field_extension:markers}

markers:lng

The lng of the marker

{maps_field_extension:markers}{lng}{/maps_field_extension:markers}

markers:title

The title of the marker

{maps_field_extension:markers}{title}{/maps_field_extension:markers}

markers:icon

The icon of the marker

{maps_field_extension:markers}{icon}{/maps_field_extension:markers}

markers:content

The content of the infowindow

{maps_field_extension:markers}{content}{/maps_field_extension:markers}

markers:count

Holds the current number, started from 1

{maps_field_extension:markers}{count}{/maps_field_extension:markers}

markers:abs_count

Holds the current number, started from 0

{maps_field_extension:markers}{abs_count}{/maps_field_extension:markers}

markers:total_results

Show the total numbers of markers

{maps_field_extension:markers}{total_results}{/maps_field_extension:markers}

polyline:n:from

Get the from latlng form the n polyline

{maps_field_extension:polyline:1:from}

polyline:n:stops

Get the stops (latlng pipline seperated) from the n polyline to convert it to the route method

{maps_field_extension:polyline:1:stops}

polyline:n:to

Get the to latlng form the n polyline

{maps_field_extension:polyline:1:to}

polyline[OPTIONAL:N]

Loop over the polyline positions, where N is the number of the polyline created.

{maps_fieldtype:polyline[OPTIONAL:1]}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{path}
		{lat}, {lng}
	{/path}
{/maps_fieldtype:polyline[OPTIONAL:1]}

polygon[OPTIONAL:N]

Loop over the polygons, where N is the number of the polygon created.

{maps_fieldtype:polygon[OPTIONAL:1]}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{fill_color}
	{fill_opacity}
	{path}
		{lat}, {lng}
	{/path}
{/maps_fieldtype:polygon[OPTIONAL:1]}

circle[OPTIONAL:N]

Loop over the circles, where N is the number of the circle created.

{maps_fieldtype:circle[OPTIONAL:1]}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{fill_color}
	{fill_opacity}
	{lat}
	{lng}
	{radius}
{/maps_fieldtype:circle[OPTIONAL:1]}

rectangle[OPTIONAL:N]

Loop over the circles, where N is the number of the circle created.

{maps_fieldtype:rectangle[OPTIONAL:1]}
	{stroke_color}
	{stroke_opacity}
	{stroke_weight}
	{fill_color}
	{fill_opacity}
	{bounds}
		{lng}
		{lng}
	{/bounds}
{/maps_fieldtype:rectangle[OPTIONAL:1]}

map

Get all map variables

{maps_fieldtype:map}
	{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}
{/maps_fieldtype:map}