src/Helper/Overlays/MarkerCluster/JsMarkerClusterHelper.php
public function render(MarkerCluster $markerCluster, Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setValues($markerCluster->getOptions());

        return sprintf('%s = new MarkerClusterer(%s, %s, %s);'.PHP_EOL,
            $markerCluster->getJavascriptVariable(),
            $map->getJavascriptVariable(),
            sprintf(
                '%s.functions.to_array(%s.markers)',
                $this->getJsContainerName($map),
                $this->getJsContainerName($map)
            ),
            $this->jsonBuilder->build()
        );
    }
public function render(MarkerCluster $markerCluster, Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setValues($markerCluster->getOptions());

        return sprintf('%s = new MarkerClusterer(%s, %s, %s);'.PHP_EOL,
            $markerCluster->getJavascriptVariable(),
            $map->getJavascriptVariable(),
            sprintf(
                '%s.functions.to_array(%s.markers)',
                $this->getJsContainerName($map),
                $this->getJsContainerName($map)
            ),
            $this->jsonBuilder->build()
        );
    }
{@inheritdoc}