Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 145 lines (129 sloc) 3.607 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
<?php

/**
* EGmap3 Yii extension
*
* Object oriented PHP interface to GMAP3 Javascript library for
* Google Maps.
*
* @copyright © Digitick <www.digitick.net> 2011
* @license GNU Lesser General Public License v3.0
* @author Ianaré Sévi
*
*/

/**
* Base class for controls having a position option.
*/
abstract class EGmap3MapSubOptionControl extends EGmap3OptionBase
{
/**
* Position id. Used to specify the position of the control on the map.
* @var string One of the positions defined in EGmap3ControlPosition.
*/
public $position;

public function getOptionChecks()
{
return array(
'position' => array(
EGmap3ControlPosition::BOTTOM_CENTER,
EGmap3ControlPosition::BOTTOM_LEFT,
EGmap3ControlPosition::BOTTOM_RIGHT,
EGmap3ControlPosition::LEFT_BOTTOM,
EGmap3ControlPosition::LEFT_CENTER,
EGmap3ControlPosition::LEFT_TOP,
EGmap3ControlPosition::RIGHT_BOTTOM,
EGmap3ControlPosition::RIGHT_CENTER,
EGmap3ControlPosition::RIGHT_TOP,
EGmap3ControlPosition::TOP_CENTER,
EGmap3ControlPosition::TOP_LEFT,
EGmap3ControlPosition::TOP_RIGHT,
),
);
}

}

/**
* Options for the rendering of the map type control.
*/
class EGmap3MapTypeControlOptions extends EGmap3MapSubOptionControl
{
/**
* @var array IDs of map types to show in the control.
*/
public $mapTypeIds;
/**
* Style id. Used to select what style of map type control to display.
* @var string One of the styles defined in EGmap3MapTypeControlStyle.
*/
public $style;

public function getOptionChecks()
{
$array = array('style' => array(
EGmap3MapTypeControlStyle::DEFAULT_STYLE,
EGmap3MapTypeControlStyle::DROPDOWN_MENU,
EGmap3MapTypeControlStyle::HORIZONTAL_BAR
),
'mapTypeIds' => 'array'
);
return array_merge($array, parent::getOptionChecks());
}
}

/**
* Options for the rendering of the Overview Map control.
*/
class EGmap3OverviewMapControlOptions extends EGmap3OptionBase
{
/**
* Whether the control should display in opened mode or collapsed
* (minimized) mode. By default, the control is closed.
* @var boolean
*/
public $opened;
}

/**
* Options for the rendering of the Street View pegman control on the map.
*/
class EGmap3StreetViewControlOptions extends EGmap3MapSubOptionControl
{
/**
* Position id. Used to specify the position of the control on the map.
* The default position is embedded within the navigation (zoom and pan)
* controls. If this position is empty or the same as that specified in the
* zoomControlOptions or panControlOptions, the Street View control will be
* displayed as part of the navigation controls. Otherwise, it will be
* displayed separately.
* @var string One of the positions defined in EGmap3ControlPosition.
*/
public $position;
}

/**
* Options for the rendering of the map zoom control.
*/
class EGmap3ZoomControlOptions extends EGmap3MapSubOptionControl
{
/**
* Style id. Used to select what style of map type control to display.
* @var string One of the styles defined in EGmap3ZoomControlStyle.
*/
public $style;

public function getOptionChecks()
{
$array = array('style' => array(
EGmap3ZoomControlStyle::DEFAULT_STYLE,
EGmap3ZoomControlStyle::LARGE,
EGmap3ZoomControlStyle::SMALL
),
);
return array_merge($array, parent::getOptionChecks());
}

}

/**
* Options for the rendering of the pan control.
*/
class EGmap3PanControlOptions extends EGmap3MapSubOptionControl
{

}

/**
* Options for the rendering of the rotate control.
*/
class EGmap3RotateControlOptions extends EGmap3MapSubOptionControl
{

}
Something went wrong with that request. Please try again.