[Open in new Window]
include_once('../../GoogleMapsPHP/Classes/Core/Bootstrap.php');
$map = \AdGrafik\GoogleMapsPHP\Utility\ClassUtility::makeInstance('AdGrafik\\GoogleMapsPHP\\MapBuilder');
$map->setFitBoundsOnLoad(TRUE);
$map->add('MarkerClusterer');
$map->add('Marker', array(
'position' => array(
'48.0, 16.0', '48.2, 16.2', '48.4, 16.4', '48.6, 16.6',
'48.8, 16.4', '49.0, 16.2', '49.2, 16.0', '49.0, 15.8',
'48.8, 15.6', '48.6, 15.4', '48.4, 15.6', '48.2, 15.8',
),
));
echo $map;
[Open in new Window]
include_once('../../GoogleMapsPHP/Classes/Core/Bootstrap.php');
$map = \AdGrafik\GoogleMapsPHP\Utility\ClassUtility::makeInstance('AdGrafik\\GoogleMapsPHP\\MapBuilder');
$map->setFitBoundsOnLoad(TRUE);
$map->add('MarkerClusterer', array(
'maxZoom' => 7,
'gridSize' => 40,
'styles' => array(
array(
'url' => '../../GoogleMapsPHP/Ressources/Public/Icons/MarkerCluster/people35.png',
'height' => 35,
'width' => 35,
'anchor' => array(16, 0),
'textColor' => '#ff00ff',
'textSize' => 10
),
array(
'url' => '../../GoogleMapsPHP/Ressources/Public/Icons/MarkerCluster/people45.png',
'height' => 45,
'width' => 45,
'anchor' => array(24, 0),
'textColor' => '#ff0000',
'textSize' => 11
),
array(
'url' => '../../GoogleMapsPHP/Ressources/Public/Icons/MarkerCluster/people55.png',
'height' => 55,
'width' => 55,
'anchor' => array(32, 0),
'textColor' => '#ffffff',
'textSize' => 12
),
),
));
$map->add('Marker', array(
'position' => array(
'48.0, 16.0', '48.2, 16.2', '48.4, 16.4', '48.6, 16.6',
'48.8, 16.4', '49.0, 16.2', '49.2, 16.0', '49.0, 15.8',
'48.8, 15.6', '48.6, 15.4', '48.4, 15.6', '48.2, 15.8',
),
'title' => array(
'48.0, 16.0', '48.2, 16.2', '48.4, 16.4', '48.6, 16.6',
'48.8, 16.4', '49.0, 16.2', '49.2, 16.0', '49.0, 15.8',
'48.8, 15.6', '48.6, 15.4', '48.4, 15.6', '48.2, 15.8',
),
'titleOptionSplit' => '*',
'infoWindow' => array(
array('content' => '<strong>A</strong>'),
array('content' => '<strong>B</strong>'),
array('content' => '<strong>C</strong>'),
),
'infoWindowOptionSplit' => '0 || 1 |*| 2 || 0 || 2 |*| 1 || 0',
));
echo $map;