include_once('../../GoogleMapsPHP/Classes/Core/Bootstrap.php'); $map = \AdGrafik\GoogleMapsPHP\Utility\ClassUtility::makeInstance('AdGrafik\\GoogleMapsPHP\\MapBuilder'); $map->add('Rectangle', array( 'bounds' => '49.208202, 14.873749, 47.208202, 17.873749', 'fillColor' => 'red', 'fillOpacity' => .25, 'strokeColor' => 'red', 'infoWindow' => array( 'content' => '<strong>Hello</strong> World!', 'closeOnClickAgain' => TRUE, ), )); echo $map;
There are three ways to attach info windows to a shape
infoWindow
. In this example you see the position
variable has the value 2
, which means, that the info window will be attached to the second angle of the shape.'48.0, 16.0'
.include_once('../../GoogleMapsPHP/Classes/Core/Bootstrap.php'); $map = \AdGrafik\GoogleMapsPHP\Utility\ClassUtility::makeInstance('AdGrafik\\GoogleMapsPHP\\MapBuilder'); $map->add('Circle', array( 'center' => '48.208202, 16.373749', 'radius' => '100000', 'fillColor' => 'red', 'fillOpacity' => .25, 'strokeColor' => 'red', 'infoWindow' => array( 'content' => '<strong>Hello</strong> World!', 'closeOnClickAgain' => TRUE, ), )); echo $map;