/** * Renders the map type control * * @param Ivory\GoogleMapBundle\Model\Controls\MapTypeControl $mapTypeControl * @return string HTML output */ public function render(MapTypeControl $mapTypeControl) { $mapTypeIds = array(); foreach ($mapTypeControl->getMapTypeIds() as $mapTypeId) { $mapTypeIds[] = $this->mapTypeIdHelper->render($mapTypeId); } return sprintf('{"mapTypeIds":[%s],"position":%s,"style":%s}', implode(', ', $mapTypeIds), $this->controlPositionHelper->render($mapTypeControl->getControlPosition()), $this->mapTypeControlStyleHelper->render($mapTypeControl->getMapTypeControlStyle())); }