| @@ 22-58 (lines=37) @@ | ||
| 19 | /** |
|
| 20 | * @author GeLo <[email protected]> |
|
| 21 | */ |
|
| 22 | class GeoJsonLayer implements OptionsAwareInterface, VariableAwareInterface |
|
| 23 | { |
|
| 24 | use OptionsAwareTrait; |
|
| 25 | use VariableAwareTrait; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @var string |
|
| 29 | */ |
|
| 30 | private $url; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @param string $url |
|
| 34 | * @param mixed[] $options |
|
| 35 | */ |
|
| 36 | public function __construct($url, array $options = []) |
|
| 37 | { |
|
| 38 | $this->setVariablePrefix('geo_json_layer'); |
|
| 39 | $this->setUrl($url); |
|
| 40 | $this->setOptions($options); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return string |
|
| 45 | */ |
|
| 46 | public function getUrl() |
|
| 47 | { |
|
| 48 | return $this->url; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @param string $url |
|
| 53 | */ |
|
| 54 | public function setUrl($url) |
|
| 55 | { |
|
| 56 | $this->url = $url; |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||
| @@ 22-58 (lines=37) @@ | ||
| 19 | /** |
|
| 20 | * @author GeLo <[email protected]> |
|
| 21 | */ |
|
| 22 | class KmlLayer implements OptionsAwareInterface, VariableAwareInterface |
|
| 23 | { |
|
| 24 | use OptionsAwareTrait; |
|
| 25 | use VariableAwareTrait; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @var string |
|
| 29 | */ |
|
| 30 | private $url; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @param string $url |
|
| 34 | * @param mixed[] $options |
|
| 35 | */ |
|
| 36 | public function __construct($url, array $options = []) |
|
| 37 | { |
|
| 38 | $this->setVariablePrefix('kml_layer'); |
|
| 39 | $this->setUrl($url); |
|
| 40 | $this->addOptions($options); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return string |
|
| 45 | */ |
|
| 46 | public function getUrl() |
|
| 47 | { |
|
| 48 | return $this->url; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @param string $url |
|
| 53 | */ |
|
| 54 | public function setUrl($url) |
|
| 55 | { |
|
| 56 | $this->url = $url; |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||