Skip to content

Instantly share code, notes, and snippets.

@mrcmorales
Last active December 25, 2015 12:48
Show Gist options
  • Save mrcmorales/6978561 to your computer and use it in GitHub Desktop.
Save mrcmorales/6978561 to your computer and use it in GitHub Desktop.
/** @var Ivory\GoogleMapBundle\Model\Map */
$map = $this->get('ivory_google_map.map');
$infoWindow = $this->get('ivory_google_map.info_window');
$marker = $this->get('ivory_google_map.marker');
$map->setMapOption('zoom', 4);
$map->setMapOption('mapTypeId', 'roadmap');
$map->setStylesheetOptions(array(
'width' => '100%',
'height' => '450px'
));
        $marker->setPosition($construction->getAddress()->getLat(), $construction->getAddress()->getLon(), true);
$map->setCenter($construction->getAddress()->getLat(), $construction->getAddress()->getLon(), true);
$marker->setInfoWindow($infoWindow);
$map->addMarker($marker);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment