1 | <?php |
||
21 | abstract class Layer extends Component |
||
22 | { |
||
23 | |||
24 | use NameTrait; |
||
25 | |||
26 | /** |
||
27 | * @var string the name of the javascript variable that will hold the reference |
||
28 | * to the map object. |
||
29 | */ |
||
30 | public $map; |
||
31 | /** |
||
32 | * @var array the options for the underlying LeafLetJs JS component. |
||
33 | * Please refer to the LeafLetJs api reference for possible |
||
34 | * [options](http://leafletjs.com/reference.html). |
||
35 | */ |
||
36 | public $clientOptions = []; |
||
37 | /** |
||
38 | * @var array the event handlers for the underlying LeafletJs JS plugin. |
||
39 | * Please refer to the LeafLetJs js api object options for possible events. |
||
40 | */ |
||
41 | public $clientEvents = []; |
||
42 | |||
43 | /** |
||
44 | * Returns the processed js options |
||
45 | * @return array |
||
46 | */ |
||
47 | 138 | public function getOptions() |
|
58 | |||
59 | /** |
||
60 | * @return string the processed js events |
||
61 | */ |
||
62 | 66 | public function getEvents() |
|
80 | |||
81 | /** |
||
82 | * Returns the javascript ready code for the object to render |
||
83 | * @return \yii\web\JsExpression |
||
84 | */ |
||
85 | abstract public function encode(); |
||
86 | } |
||
87 |