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