Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

This field type represents a geographical location.

NameInternal nameExpected input

Table of contents:


This FieldType makes possible to store and retrieve a geographical location.

As input it expects two float values, latitude, longitude, and a string value in third place, corresponding to the name or address of the location.

Input expectations

array( 'latitude' => 59.928732, 'longitude' => 10.777888, 'address' => "eZ Systems Norge" )

Value object


The Value class of this field type contains the following properties:

$latitude floatThis property will store the latitude value of the map location reference.
floatThis property will store the longitude value of the map location reference.
$addressstringThis property will store the address of map location.


The MapLocation\Value constructor will initialize a new Value object with the values provided. Two floats and a string are expected.

Constructor example

Parameters accepted by ez_render_field Twig function

The template called by the ez_render_field() Twig function while rendering a Map Location field accepts the following the parameters:

mapTypestring"ROADMAP"One of the GMap type of map
showMapbooleantrueWhether to show a Google Map
showInfoboooleantrueWhether to show a latitude, longitude and the address outside of the map
zoominteger13The initial zoom level on the map

Whether to enable draggable map


The width of the rendered map with its unit (ie "500px" or "50em"), set to false to not set any width style inline.


The height of the rendered map with its unit (ie "200px" or "20em"), set to false to not set any height style inline.