diff --git a/application/libraries/Googlemaps.php b/application/libraries/Googlemaps.php index 5f549f8..553e851 100644 --- a/application/libraries/Googlemaps.php +++ b/application/libraries/Googlemaps.php @@ -26,7 +26,9 @@ class Googlemaps { var $center = "37.4419, -122.1419"; // Sets the default center location (lat/long co-ordinate or address) of the map. If defaulting to the users location set to "auto" var $class = ''; // A class name if wishing to style the map further through CSS. Can also be useful if wanting it to be responsive etc. var $cluster = FALSE; // Whether to cluster markers - var $clusterGridSize = 60; // The grid size of a cluster in pixels + var $clusterLibrary = ''; // The cluster library to use. + var $clusterImagePath = ''; // Override for cluster image path. + var $clusterGridSize = 60; // The grid size of a cluster in pixels var $clusterMaxZoom = ''; // The maximum zoom level that a marker can be part of a cluster var $clusterZoomOnClick = TRUE; // Whether the default behaviour of clicking on a cluster is to zoom into it var $clusterAverageCenter = FALSE; // Whether the center of each cluster should be the average of all markers in the cluster @@ -1139,9 +1141,17 @@ function create_map() '; } - if ($this->cluster) { $this->output_js .= ' - - '; } + if ($this->cluster) { + if ($this->clusterLibrary) { + $this->output_js .= ' + + '; + } else { + $this->output_js .= ' + + '; + } + } } if ($this->jsfile=="") { $this->output_js .= ' @@ -1849,6 +1859,8 @@ function create_map() $this->output_js_contents .= ' var clusterOptions = { gridSize: '.$this->clusterGridSize; + if ($this->clusterImagePath != "") { $this->output_js_contents .= ', + imagePath: \'' . $this->clusterImagePath . '\''; } if ($this->clusterMaxZoom!="") { $this->output_js_contents .= ', maxZoom: '.$this->clusterMaxZoom; } if (!$this->clusterZoomOnClick) { $this->output_js_contents .= ',