| @@ 8-52 (lines=45) @@ | ||
| 5 | use Cornford\Googlmapper\Contracts\ModelingInterface; | |
| 6 | use Illuminate\View\Factory as View; | |
| 7 | ||
| 8 | class Circle implements ModelingInterface | |
| 9 | { | |
| 10 | /** | |
| 11 | * Options. | |
| 12 | * | |
| 13 | * @var array | |
| 14 | */ | |
| 15 | protected $options = []; | |
| 16 | ||
| 17 | /** | |
| 18 | * Public constructor. | |
| 19 | * | |
| 20 | * @param array $parameters | |
| 21 | */ | |
| 22 | public function __construct(array $parameters = []) | |
| 23 |     { | |
| 24 | $this->options = $parameters; | |
| 25 | } | |
| 26 | ||
| 27 | /** | |
| 28 | * Render the model item. | |
| 29 | * | |
| 30 | * @param int $identifier | |
| 31 | * @param View $view | |
| 32 | * | |
| 33 | * @return string | |
| 34 | */ | |
| 35 | public function render($identifier, View $view) | |
| 36 |     { | |
| 37 |         return $view->make('googlmapper::circle') | |
| 38 | ->withOptions($this->options) | |
| 39 | ->withId($identifier) | |
| 40 | ->render(); | |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Get the model options. | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function getOptions() | |
| 49 |     { | |
| 50 | return $this->options; | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| @@ 8-52 (lines=45) @@ | ||
| 5 | use Cornford\Googlmapper\Contracts\ModelingInterface; | |
| 6 | use Illuminate\View\Factory as View; | |
| 7 | ||
| 8 | class Polygon implements ModelingInterface | |
| 9 | { | |
| 10 | /** | |
| 11 | * Options. | |
| 12 | * | |
| 13 | * @var array | |
| 14 | */ | |
| 15 | protected $options = []; | |
| 16 | ||
| 17 | /** | |
| 18 | * Public constructor. | |
| 19 | * | |
| 20 | * @param array $parameters | |
| 21 | */ | |
| 22 | public function __construct(array $parameters = []) | |
| 23 |     { | |
| 24 | $this->options = $parameters; | |
| 25 | } | |
| 26 | ||
| 27 | /** | |
| 28 | * Render the model item. | |
| 29 | * | |
| 30 | * @param int $identifier | |
| 31 | * @param View $view | |
| 32 | * | |
| 33 | * @return string | |
| 34 | */ | |
| 35 | public function render($identifier, View $view) | |
| 36 |     { | |
| 37 |         return $view->make('googlmapper::polygon') | |
| 38 | ->withOptions($this->options) | |
| 39 | ->withId($identifier) | |
| 40 | ->render(); | |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Get the model options. | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function getOptions() | |
| 49 |     { | |
| 50 | return $this->options; | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| @@ 8-52 (lines=45) @@ | ||
| 5 | use Cornford\Googlmapper\Contracts\ModelingInterface; | |
| 6 | use Illuminate\View\Factory as View; | |
| 7 | ||
| 8 | class Polyline implements ModelingInterface | |
| 9 | { | |
| 10 | /** | |
| 11 | * Options. | |
| 12 | * | |
| 13 | * @var array | |
| 14 | */ | |
| 15 | protected $options = []; | |
| 16 | ||
| 17 | /** | |
| 18 | * Public constructor. | |
| 19 | * | |
| 20 | * @param array $parameters | |
| 21 | */ | |
| 22 | public function __construct(array $parameters = []) | |
| 23 |     { | |
| 24 | $this->options = $parameters; | |
| 25 | } | |
| 26 | ||
| 27 | /** | |
| 28 | * Render the model item. | |
| 29 | * | |
| 30 | * @param int $identifier | |
| 31 | * @param View $view | |
| 32 | * | |
| 33 | * @return string | |
| 34 | */ | |
| 35 | public function render($identifier, View $view) | |
| 36 |     { | |
| 37 |         return $view->make('googlmapper::polyline') | |
| 38 | ->withOptions($this->options) | |
| 39 | ->withId($identifier) | |
| 40 | ->render(); | |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Get the model options. | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function getOptions() | |
| 49 |     { | |
| 50 | return $this->options; | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| @@ 8-52 (lines=45) @@ | ||
| 5 | use Cornford\Googlmapper\Contracts\ModelingInterface; | |
| 6 | use Illuminate\View\Factory as View; | |
| 7 | ||
| 8 | class Rectangle implements ModelingInterface | |
| 9 | { | |
| 10 | /** | |
| 11 | * Options. | |
| 12 | * | |
| 13 | * @var array | |
| 14 | */ | |
| 15 | protected $options = []; | |
| 16 | ||
| 17 | /** | |
| 18 | * Public constructor. | |
| 19 | * | |
| 20 | * @param array $parameters | |
| 21 | */ | |
| 22 | public function __construct(array $parameters = []) | |
| 23 |     { | |
| 24 | $this->options = $parameters; | |
| 25 | } | |
| 26 | ||
| 27 | /** | |
| 28 | * Render the model item. | |
| 29 | * | |
| 30 | * @param int $identifier | |
| 31 | * @param View $view | |
| 32 | * | |
| 33 | * @return string | |
| 34 | */ | |
| 35 | public function render($identifier, View $view) | |
| 36 |     { | |
| 37 |         return $view->make('googlmapper::rectangle') | |
| 38 | ->withOptions($this->options) | |
| 39 | ->withId($identifier) | |
| 40 | ->render(); | |
| 41 | } | |
| 42 | ||
| 43 | /** | |
| 44 | * Get the model options. | |
| 45 | * | |
| 46 | * @return array | |
| 47 | */ | |
| 48 | public function getOptions() | |
| 49 |     { | |
| 50 | return $this->options; | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| @@ 8-53 (lines=46) @@ | ||
| 5 | use Cornford\Googlmapper\Contracts\ModelingInterface; | |
| 6 | use Illuminate\View\Factory as View; | |
| 7 | ||
| 8 | class Streetview implements ModelingInterface | |
| 9 | { | |
| 10 | /** | |
| 11 | * Options. | |
| 12 | * | |
| 13 | * @var array | |
| 14 | */ | |
| 15 | protected $options = []; | |
| 16 | ||
| 17 | /** | |
| 18 | * Public constructor. | |
| 19 | * | |
| 20 | * @param array $parameters | |
| 21 | */ | |
| 22 | public function __construct(array $parameters = []) | |
| 23 |     { | |
| 24 | $this->options = $parameters; | |
| 25 | } | |
| 26 | ||
| 27 | /** | |
| 28 | * Render the model item. | |
| 29 | * | |
| 30 | * @param int $identifier | |
| 31 | * @param View $view | |
| 32 | * | |
| 33 | * @return string | |
| 34 | */ | |
| 35 | public function render($identifier, View $view) | |
| 36 |     { | |
| 37 |         return $view->make('googlmapper::streetview') | |
| 38 | ->withOptions($this->options) | |
| 39 | ->withId($identifier) | |
| 40 | ->withView($view) | |
| 41 | ->render(); | |
| 42 | } | |
| 43 | ||
| 44 | /** | |
| 45 | * Get the model options. | |
| 46 | * | |
| 47 | * @return array | |
| 48 | */ | |
| 49 | public function getOptions() | |
| 50 |     { | |
| 51 | return $this->options; | |
| 52 | } | |
| 53 | } | |
| 54 | ||