Message-ID: <1761112060.3906.1485855846784.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3905_560046553.1485855846784" ------=_Part_3905_560046553.1485855846784 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html The MapLocation FieldType

The MapLocation FieldType

This field type represents a geographical location.

Name Internal name Expected input
MapLocation ezgmaplocation mixed

Table of contents:

=20 =20

Description


This FieldType makes possible to store and retrieve a geographical locat= ion.

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
Type Example
array
array( 'latitude' =3D> 59.928732, 'longi=
tude' =3D> 10.777888, 'address' =3D> "eZ Systems Norge" )

Value object


Properties

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

Property Type Description
$latitude  float This property will store the latit= ude value of the map location reference.
$longitude=
float This property will store the longi= tude value of the map location reference.
$address string This property will store the addre= ss of map location.

Constructor

The MapLocation= \Value constructor will initialize a new Va= lue object with the values provided. Two floats and a string are expected.<= br>

Constructor example
=20
// Instantiates a MapLocation Value object
$MapLocationValue =3D new MapLocation\Value( 59.928732, 10.777888, "eZ Syst=
ems Norge" );
=20

Parameters accepted by ez_render_field Twig function


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

Parameter Type Default Description
mapType string "ROADMAP" One of the GMap type of map
showMap boolean true Whether to show a Google Map
showInfo booolean true Whether to show a latitude, longit= ude and the address outside of the map
zoom integer 13 The initial zoom level on the map<= /td>
draggable boolean true

Whether to en= able draggable map

width string|false "500px"

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

height string|false "200px"

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

Example:

=20
{{ ez_render_field(content, 'location', {'parameters': {'width': '1=
00%', 'height': '330px', 'showMap': true, 'showInfo': false}}) }}
=20
------=_Part_3905_560046553.1485855846784--