Test Failed
Push — master ( e6b57e...dd7c2d )
by Christophe
07:44
created

MapOptions   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 207
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 2
dl 0
loc 207
ccs 0
cts 47
cp 0
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setEnableScrollWheel() 0 6 1
A setIcons() 0 6 1
A setLineColor() 0 6 1
A setMaps() 0 6 1
A setMapType() 0 6 1
A setMapTypeIds() 0 6 1
A setShowLine() 0 6 1
A setShowTip() 0 6 1
A setUseMapTypeControl() 0 6 1
A setZoomLevel() 0 6 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options\Map;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ChartOptionsDraw;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\LineWidthTrait;
7
8
/**
9
 * @author Christophe Meneses
10
 */
11
class MapOptions extends ChartOptionsDraw
12
{
13
    /**
14
     * If set to true, enables zooming in and out using the mouse scroll wheel.
15
     *
16
     * @var bool
17
     */
18
    protected $enableScrollWheel;
19
20
    /**
21
     * Holds set(s) of custom markers. Each marker set can specify a normal and selected marker image. Can set a
22
     * default set by setting the default option, or custom marker sets by setting a unique marker ID.
23
     *
24
     * ['default' => ['normal' => '/path/to/marker/image', 'selected' => '/path/to/marker/image'],
25
     *  'customMarker' => ['normal' => '/path/to/other/marker/image', 'selected' => '/path/to/other/marker/image']]
26
     *
27
     * @var array
28
     */
29
    protected $icons;
30
31
    /**
32
     * If showLine is true, defines the line color. For example: '#800000'.
33
     *
34
     * @var bool
35
     */
36
    protected $lineColor;
37
38
    use LineWidthTrait;
39
40
    /**
41
     * An object containing properties of a custom map type. This custom map type will be accessed by the mapTypeId
42
     * you specify for the custom map type. A new mapTypeId must be given for each custom map type created. Each custom
43
     * map type should contain two properties :
44
     *    name: The display name for the styled map type
45
     *    styles: An array containing the style objects for the styled map type.
46
     *
47
     * @var array
48
     */
49
    protected $maps;
50
51
    /**
52
     * The type of map to show. Possible values are 'normal', 'terrain', 'satellite', 'hybrid', or the ID of a custom
53
     * map type, if any were created.
54
     *
55
     * @var string
56
     */
57
    protected $mapType;
58
59
    /**
60
     * If using the map type control (useMapTypeControl: true), the IDs specified in this array will be the only map
61
     * types displayed in the map type control. If this option is not set, the map type control will default to the
62
     * standard Google Maps map type control options plus any custom map types that may be available.
63
     *
64
     * @var array
65
     */
66
    protected $mapTypeIds;
67
68
    /**
69
     * If set to true, shows a Google Maps polyline through all the points.
70
     *
71
     * @var bool
72
     */
73
    protected $showLine;
74
75
    /**
76
     * If set to true, shows the location description as a tooltip when the mouse is positioned above a point marker.
77
     *
78
     * @var bool
79
     */
80
    protected $showTip;
81
82
    /**
83
     * Show a map type selector that enables the viewer to switch between [map, satellite, hybrid, terrain]. When
84
     * useMapTypeControl is false (default) no selector is presented and the type is determined by the mapType option.
85
     *
86
     * @var bool
87
     */
88
    protected $useMapTypeControl;
89
90
    /**
91
     * An integer indicating the initial zoom level of the map, where 0 is completely zoomed out (whole world) and 19
92
     * is the maximum zoom level.
93
     *
94
     * @var int
95
     */
96
    protected $zoomLevel;
97
98
    /**
99
     * @param bool $enableScrollWheel
100
     *
101
     * @return $this
102
     */
103
    public function setEnableScrollWheel($enableScrollWheel)
104
    {
105
        $this->enableScrollWheel = $enableScrollWheel;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @param array $icons
112
     *
113
     * @return $this
114
     */
115
    public function setIcons($icons)
116
    {
117
        $this->icons = $icons;
118
119
        return $this;
120
    }
121
122
    /**
123
     * @param bool $lineColor
124
     *
125
     * @return $this
126
     */
127
    public function setLineColor($lineColor)
128
    {
129
        $this->lineColor = $lineColor;
130
131
        return $this;
132
    }
133
134
    /**
135
     * @param array $maps
136
     *
137
     * @return $this
138
     */
139
    public function setMaps($maps)
140
    {
141
        $this->maps = $maps;
142
143
        return $this;
144
    }
145
146
    /**
147
     * @param string $mapType
148
     *
149
     * @return $this
150
     */
151
    public function setMapType($mapType)
152
    {
153
        $this->mapType = $mapType;
154
155
        return $this;
156
    }
157
158
    /**
159
     * @param array $mapTypeIds
160
     *
161
     * @return $this
162
     */
163
    public function setMapTypeIds($mapTypeIds)
164
    {
165
        $this->mapTypeIds = $mapTypeIds;
166
167
        return $this;
168
    }
169
170
    /**
171
     * @param bool $showLine
172
     *
173
     * @return $this
174
     */
175
    public function setShowLine($showLine)
176
    {
177
        $this->showLine = $showLine;
178
179
        return $this;
180
    }
181
182
    /**
183
     * @param bool $showTip
184
     *
185
     * @return $this
186
     */
187
    public function setShowTip($showTip)
188
    {
189
        $this->showTip = $showTip;
190
191
        return $this;
192
    }
193
194
    /**
195
     * @param bool $useMapTypeControl
196
     *
197
     * @return $this
198
     */
199
    public function setUseMapTypeControl($useMapTypeControl)
200
    {
201
        $this->useMapTypeControl = $useMapTypeControl;
202
203
        return $this;
204
    }
205
206
    /**
207
     * @param int $zoomLevel
208
     *
209
     * @return $this
210
     */
211
    public function setZoomLevel($zoomLevel)
212
    {
213
        $this->zoomLevel = $zoomLevel;
214
215
        return $this;
216
    }
217
}
218