Conditions | 9 |
Paths | 20 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function render(Marker $marker) |
||
43 | { |
||
44 | $options = $marker->hasStaticOption('styles') ? $marker->getStaticOption('styles') : []; |
||
45 | |||
46 | if ($marker->hasIcon()) { |
||
47 | $icon = $marker->getIcon(); |
||
48 | |||
49 | if (!isset($options['icon']) && ($url = $icon->getUrl()) !== Icon::DEFAULT_URL) { |
||
50 | $options['icon'] = $url; |
||
51 | } |
||
52 | |||
53 | if (!isset($options['anchor']) && $icon->hasAnchor()) { |
||
54 | $options['anchor'] = $icon->getAnchor(); |
||
55 | } |
||
56 | } |
||
57 | |||
58 | if (isset($options['anchor']) && $options['anchor'] instanceof Point) { |
||
59 | $options['anchor'] = $this->pointRenderer->render($options['anchor']); |
||
60 | } |
||
61 | |||
62 | return $this->renderStyle($options); |
||
63 | } |
||
64 | } |
||
65 |