\MapField
Synopsis
class MapField
extends FormField
{
- // members
- public string $mapObjectClass = 'GoogleMap';
- public array $defaults = ;
- public array $mapWidth = ;
- public array $mapHeight = ;
- private $mapObject = NULL;
- private array $mapData = ;
- public boolean $storeAddress = true;
- private string $fieldAction = 'update';
- public string $addressFieldPlaceholder = 'enter address to place marker on the map';
- // methods
- public void __construct()
- public void Field()
- public void setValue()
- public void getObjectByID()
- public void saveInto()
- public void getChildFields()
- public void setMapObjectClass()
- public void getMapObjectClass()
- public void setAddressPlaceholder()
- public void getAddressPlaceholder()
- public void setMapSize()
- public void setMapWidth()
- public void getMapWidth()
- public void setMapHeight()
- public void getMapHeight()
- public void getMapCSS()
- public void setStoreAddress()
- public void setDefault()
- public void setDefaults()
- public void setMap()
- public void APIKey()
Hierarchy
Extends
- FormField
Members
private
- $fieldAction
- $mapData
- $mapObject
public
- $addressFieldPlaceholder
- $defaults
- $mapHeight
—
array
Height of the map in the field specified as array(int min height, int max height). Can be used to match the field to the dimensions of the map of the front end. - $mapObjectClass
—
string
The type of map object. Can be changed for eg if you're using a subclass of GoogleMap - $mapWidth
—
array
Width of the map in the field specified as array(int min width, int max width). Can be used to match the field to the dimensions of the map of the front end. - $storeAddress
—
boolean
Disable storing the address. This stops the map link from working
Methods
public
- __construct()
- APIKey()
- Field()
- getAddressPlaceholder()
- getChildFields()
- getMapCSS() — This returns the inline CSS used to size the map
- getMapHeight()
- getMapObjectClass()
- getMapWidth()
- getObjectByID()
- saveInto()
- setAddressPlaceholder() — Set the placeholder text for the address search field
- setDefault()
- setDefaults()
- setMap() — Assign a map object to this field manually. Essentially sets the defaults
- setMapHeight()
- setMapObjectClass() — Set the DataObject class to save into. In case you want to use a subclass of GoogleMap or something
- setMapSize() — Set the size of the map in the CMS. Each dimension can be either a single number or an array of (min, max)
- setMapWidth()
- setStoreAddress()
- setValue()