Conditions | 5 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public function handleMap(StaticMapEvent $event) |
||
41 | { |
||
42 | $map = $event->getMap(); |
||
43 | |||
44 | if ($map->hasStaticOption('center')) { |
||
45 | $center = $map->getStaticOption('center'); |
||
46 | } elseif (!$map->isAutoZoom() && !$map->hasStaticOption('visible')) { |
||
47 | $center = $this->coordinateRenderer->render($map->getCenter()); |
||
48 | } |
||
49 | |||
50 | if (isset($center)) { |
||
51 | $event->setParameter('center', $center); |
||
52 | } |
||
53 | } |
||
54 | |||
63 |