src/Helper/Controls/MapTypeControlHelper.php
public function render(MapTypeControl $mapTypeControl)
    {
        $this->jsonBuilder->reset();

        foreach ($mapTypeControl->getMapTypeIds() as $index => $mapTypeId) {
            $this->jsonBuilder->setValue(
                sprintf('[mapTypeIds][%d]', $index),
                $this->mapTypeIdHelper->render($mapTypeId),
                false
            );
        }

        return $this->jsonBuilder
            ->setValue(
                '[position]',
                $this->controlPositionHelper->render($mapTypeControl->getControlPosition()),
                false
            )
            ->setValue(
                '[style]',
                $this->mapTypeControlStyleHelper->render($mapTypeControl->getMapTypeControlStyle()),
                false
            )
            ->build();
    }
public function render(MapTypeControl $mapTypeControl)
    {
        $this->jsonBuilder->reset();

        foreach ($mapTypeControl->getMapTypeIds() as $index => $mapTypeId) {
            $this->jsonBuilder->setValue(
                sprintf('[mapTypeIds][%d]', $index),
                $this->mapTypeIdHelper->render($mapTypeId),
                false
            );
        }

        return $this->jsonBuilder
            ->setValue(
                '[position]',
                $this->controlPositionHelper->render($mapTypeControl->getControlPosition()),
                false
            )
            ->setValue(
                '[style]',
                $this->mapTypeControlStyleHelper->render($mapTypeControl->getMapTypeControlStyle()),
                false
            )
            ->build();
    }
Renders a map type control.

@param \Ivory\GoogleMap\Controls\MapTypeControl $mapTypeControl The map type control.

@return string The JS output.