Passed
Branch master (aa7df3)
by Mike
04:36
created
src/Providers/Service.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
     public function register()
11 11
     {
12
-        $this->app->singleton('map', function () {
12
+        $this->app->singleton('map', function() {
13 13
             return new Map(['apiKey' => config('services.google.maps.api-key')]);
14 14
         });
15 15
     }
Please login to merge, or discard this patch.
src/Map.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2228,10 +2228,10 @@
 block discarded – undo
2228 2228
                 return array($row->latitude, $row->longitude);
2229 2229
             }
2230 2230
         }
2231
-	//utf8_encode($address) will return only english adress mean it's take only english address.
2232
-    	// Remove utf8_encode from urlencode then it'll support all languages(eg. en, ur, chinese, russian, japanese, greek etc.)
2231
+    //utf8_encode($address) will return only english adress mean it's take only english address.
2232
+        // Remove utf8_encode from urlencode then it'll support all languages(eg. en, ur, chinese, russian, japanese, greek etc.)
2233 2233
         // $data_location = "https://maps.google.com/maps/api/geocode/json?address=".urlencode(utf8_encode($address)); //Old One just for english
2234
-	    $data_location = "https://maps.google.com/maps/api/geocode/json?address=".urlencode($address); // New One for every language.
2234
+        $data_location = "https://maps.google.com/maps/api/geocode/json?address=".urlencode($address); // New One for every language.
2235 2235
         if ($this->region != "" && strlen($this->region) == 2) {
2236 2236
             $data_location .= "&region=".$this->region;
2237 2237
         }
Please login to merge, or discard this patch.
Spacing   +247 added lines, -247 removed lines patch added patch discarded remove patch
@@ -7,144 +7,144 @@  discard block
 block discarded – undo
7 7
     protected $output_js_contents;
8 8
     protected $output_html;
9 9
 
10
-    public $adsense = false;                    // Whether Google Adsense For Content should be enabled
11
-    public $adsenseChannelNumber = '';                        // The Adsense channel number for tracking the performance of this AdUnit
12
-    public $adsenseFormat = 'HALF_BANNER';            // The format of the AdUnit
13
-    public $adsensePosition = 'TOP_CENTER';                // The position of the AdUnit
14
-    public $adsensePublisherID = '';                        // Your Google AdSense publisher ID
15
-    public $apiKey = '';                        // If you've got an API key you can use it by passing this parameter. Setup an API key here: https://code.google.com/apis/console
16
-    public $backgroundColor = '';                        // A hex color value shown as the map background when tiles have not yet loaded as the user pans
17
-    public $bicyclingOverlay = false;                    // If set to TRUE will overlay bicycling information (ie. bike paths and suggested routes) onto the map by default
18
-    public $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"
19
-
20
-    public $class = '';                        // A class name if wishing to style the map further through CSS. Can also be useful if wanting it to be responsive etc.
21
-    public $cluster = false;                    // Whether to cluster markers
22
-    public $clusterGridSize = 60;                        // The grid size of a cluster in pixels
23
-    public $clusterMaxZoom = '';                        // The maximum zoom level that a marker can be part of a cluster
24
-    public $clusterZoomOnClick = true;                        // Whether the default behaviour of clicking on a cluster is to zoom into it
25
-    public $clusterAverageCenter = false;                    // Whether the center of each cluster should be the average of all markers in the cluster
26
-    public $clusterMinimumClusterSize = 2;                        // The minimum number of markers to be in a cluster before the markers are hidden and a count is shown
27
-    public $clusterStyles = []; 				// (object) An array that has style properties: *  'url': (string) The image url. *  'height': (number) The image height. *  'width': (number) The image width. *  'anchor': (Array) The anchor position of the label text. *  'textColor': (string) The text color. *  'textSize': (number) The text size. *  'backgroundPosition': (string) The position of the backgound x, y.
28
-    public $disableDefaultUI = false;                    // If set to TRUE will hide the default controls (ie. zoom, scale etc)
29
-    public $disableDoubleClickZoom = false;                    // If set to TRUE will disable zooming when a double click occurs
30
-    public $disableMapTypeControl = false;                    // If set to TRUE will hide the MapType control (ie. Map, Satellite, Hybrid, Terrain)
31
-    public $disableNavigationControl = false;                    // If set to TRUE will hide the Navigation control (ie. zoom in/out, pan)
32
-    public $disableScaleControl = false;                    // If set to TRUE will hide the Scale control
33
-    public $disableStreetViewControl = false;                    // If set to TRUE will hide the Street View control
34
-    public $draggable = true;                        // If set to FALSE will prevent the map from being dragged around
35
-    public $draggableCursor = '';                        // The name or url of the cursor to display on a draggable object
36
-    public $draggingCursor = '';                        // The name or url of the cursor to display when an object is being dragged
37
-    public $geocodeCaching = false;                    // If set to TRUE will cache any geocode requests made when an address is used instead of a lat/long. Requires DB table to be created (see documentation)
38
-    public $https = false;                    // If set to TRUE will load the Google Maps JavaScript API over HTTPS, allowing you to utilize the API within your HTTPS secure application
39
-    public $navigationControlPosition = '';                        // The position of the Navigation control, eg. 'BOTTOM_RIGHT'
40
-    public $infowindowMaxWidth = 0;                        // The maximum width of the infowindow in pixels. Expecting an integer without units
41
-    public $keyboardShortcuts = true;                        // If set to FALSE will disable to map being controlled via the keyboard
42
-    public $jsfile = '';                        // Set this to the path of an external JS file if you wish the JavaScript to be placed in a file rather than output directly into the <head></head> section. The library will try to create the file if it does not exist already. Please ensure the destination file is writeable
43
-    public $kmlLayerURL = '';                        // A URL to publicly available KML or GeoRSS data for displaying geographic information. Multiple KML layers can be passed in by using an array of URL's. Note, if using multiple you'll probably have to set $kmlLayerPreserveViewport to true and manually set map center and zoom
44
-    public $kmlLayerPreserveViewport = false;                    // Specifies whether the map should be adjusted to the bounds of the KmlLayer's contents. By default the map is zoomed and positioned to show the entirety of the layer's contents
45
-    public $language = '';                        // The map will by default load in the language of the browser. This can be overriden however here. For a full list of codes see https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
46
-    public $loadAsynchronously = false;                    // Load the map and API asynchronously once the page has loaded
47
-    public $map_div_id = "map_canvas";                // The ID of the <div></div> that is output which contains the map
48
-    public $map_height = "450px";                    // The height of the map container. Any units (ie 'px') can be used. If no units are provided 'px' will be presumed
49
-    public $map_name = "map";                    // The JS reference to the map. Currently not used but to be used in the future when multiple maps are supported
50
-    public $map_type = "ROADMAP";                // The default MapType. Values accepted are 'HYBRID', 'ROADMAP', 'SATELLITE' or 'TERRAIN'
51
-    public $map_types_available = array();                    // The other MapTypes available for selection on the map
52
-    public $map_width = "100%";                    // The width of the map container. Any units (ie 'px') can be used. If no units are provided 'px' will be presumed
53
-    public $maps_loaded = 0;                        // Counter which keeps track of how many maps have been created to avoid standard functions being output twice
54
-    public $mapTypeControlPosition = '';                        // The position of the MapType control, eg. 'BOTTOM_RIGHT'
55
-    public $mapTypeControlStyle = '';                        // The style of the MapType control. blank, 'DROPDOWN_MENU' or 'HORIZONTAL_BAR' values accepted.
56
-    public $minzoom = '';                        // The minimum zoom level which will be displayed on the map
57
-    public $maxzoom = '';                        // The maximum zoom level which will be displayed on the map
58
-    public $minifyJS = false;                    // If TRUE will run the JavaScript through Jsmin.php (this file and PHP5+ required) to minify the code
59
-    public $noClear = false;                    // If TRUE do not clear the contents of the map div
60
-    public $onboundschanged = '';                        // The JavaScript action to perform when the viewport bounds have changed
61
-    public $oncenterchanged = '';                        // The JavaScript action to perform when themap center property changes
62
-    public $onclick = '';                        // The JavaScript action to perform when the map is clicked
63
-    public $ondblclick = '';                        // The JavaScript action to perform when the map is double-clicked
64
-    public $ondrag = '';                        // The JavaScript action to perform while the map is dragged
65
-    public $ondragend = '';                        // The JavaScript action to perform when the user stops dragging the map
66
-    public $ondragstart = '';                        // The JavaScript action to perform when the user starts dragging the map
67
-    public $onidle = '';                        // The JavaScript action to perform when the map becomes idle after panning or zooming
68
-    public $onload = '';                        // The JavaScript action to perform when the map first loads. This library hi-jacks the window.load event so add any bespoke code using this option
69
-    public $onmousemove = '';                        // The JavaScript action to perform when the user's mouse moves over the map container
70
-    public $onmouseout = '';                        // The JavaScript action to perform when the user's mouse exits the map container
71
-    public $onmouseover = '';                        // The JavaScript action to perform when the user's mouse enters the map container
72
-    public $onresize = '';                        // The JavaScript action to perform when the maps div changes size
73
-    public $onrightclick = '';                        // The JavaScript action to perform when the map is right-clicked
74
-    public $ontilesloaded = '';                        // The JavaScript action to perform when the visible tiles have finished loading
75
-    public $onzoomchanged = '';                        // The JavaScript action to perform when the maps zoom property changes
76
-    public $panoramio = false;                    // If TRUE will add photos from Panoramio as a layer to your maps as a series of large and small photo icons
77
-    public $panoramioTag = '';                        // Restrict the set of Panoramio photos shown to those matching a certain textual tag
78
-    public $panoramioUser = '';                        // Restrict the set of Panoramio photos shown to those matching a particular user
79
-    public $region = '';                        // Country code top-level domain (eg "uk") within which to search. Useful if supplying addresses rather than lat/longs
80
-    public $scaleControlPosition = '';                        // The position of the Scale control, eg. 'BOTTOM_RIGHT'
81
-    public $scrollwheel = true;                        // If set to FALSE will disable zooming by scrolling of the mouse wheel
82
-    public $streetViewAddressControl = true;                        // If set to FALSE will hide the Address control
83
-    public $streetViewAddressPosition = '';                        // The position of the Address control, eg. 'BOTTOM'
84
-    public $streetViewControlPosition = '';                        // The position of the Street View control when viewing normal aerial map, eg. 'BOTTOM_RIGHT'
85
-    public $streetViewCloseButton = false;                    // If set to TRUE will show the close button in the top right. The close button allows users to return to the aerial map
86
-    public $streetViewLinksControl = true;                        // If set to FALSE will hide the Links control
87
-    public $streetViewPanControl = true;                        // If set to FALSE will hide the Pan control
88
-    public $streetViewPanPosition = '';                        // The position of the Scale control, eg. 'TOP_RIGHT'
89
-    public $streetViewPovHeading = 0;                        // The Street View camera heading in degrees relative to true north. True north is 0, east is 90, south is 180, west is 270
90
-    public $streetViewPovPitch = 0;                        // The Street View camera pitch in degrees, relative to the street view vehicle. Directly upwards is 90, Directly downwards is -90.
91
-    public $streetViewPovZoom = 0;                        // The Street View zoom level. Fully zoomed-out is level 0, zooming in increases the zoom level.
92
-    public $streetViewZoomControl = true;                        // If set to FALSE will hide the Zoom control
93
-    public $streetViewZoomPosition = '';                        // The position of the Scale control, eg. 'TOP_RIGHT'
94
-    public $streetViewZoomStyle = '';                        // The size of the Street View zoom control. blank, 'SMALL' or 'LARGE' values accepted.
95
-    public $styles = array();                    // An array of styles used to colour aspects of the map and turn points of interest on and off
96
-    public $stylesAsMapTypes = false;                    // If applying styles, whether to apply them to the default map or add them as additional map types
97
-    public $stylesAsMapTypesDefault = '';                        // If $stylesAsMapTypes is true the default style. Should contain the 'Name' of the style
98
-    public $tilt = 0;                        // The angle of tilt. Currently only supports the values 0 and 45 in SATELLITE and HYBRID map types and at certain zoom levels
99
-    public $trafficOverlay = false;                    // If set to TRUE will overlay traffic information onto the map by default
100
-    public $version = "3";                        // Version of the API being used. Not currently used in the library
101
-    public $zoom = 13;                        // The default zoom level of the map. If set to "auto" will autozoom/center to fit in all visible markers. If "auto", also overrides the $center parameter
102
-    public $zoomControlPosition = '';                        // The position of the Zoom control, eg. 'BOTTOM_RIGHT'
103
-    public $zoomControlStyle = '';                        // The size of the zoom control. blank, 'SMALL' or 'LARGE' values accepted.
104
-
105
-    public $markers = array();                    // An array used by the library to store the markers as they are produced
106
-    public $markersInfo = array();                    // An array containing marker information (id, latitude, longitude etc) for use elsewhere
107
-    public $polylines = array();                    // An array used by the library to store the polylines as they are produced
108
-    public $polygons = array();                    // An array used by the library to store the polygons as they are produced
109
-    public $circles = array();                    // An array used by the library to store the circles as they are produced
110
-    public $rectangles = array();                    // An array used by the library to store the rectangles as they are produced
111
-    public $overlays = array();                    // An array used by the library to store the overlays as they are produced
112
-
113
-    public $directions = false;                    // Whether or not the map will be used to show directions
114
-    public $directionsStart = "";                        // The starting location (lat/long co-ordinate or address) of the directions. Set to 'auto' to default it to the users location
115
-    public $directionsEnd = "";                        // The destination point (lat/long co-ordinate or address) of the directions. Set to 'auto' to default it to the users location
116
-    public $directionsDivID = "";                        // An element's ID on the page where textual directions will be output to. Leave blank if not required
117
-    public $directionsMode = "DRIVING";                // DRIVING, WALKING or BICYCLING (US Only) - The vehicle/mode of transport to show directions for
118
-    public $directionsAvoidTolls = false;                    // Whether or not directions should avoid tolls
119
-    public $directionsAvoidHighways = false;                    // Whether or not directions should avoid highways
120
-    public $directionsDraggable = false;                    // Whether or not directions on the map are draggable
121
-    public $directionsChanged = "";                        // JavaScript to perform when directions are dragged
122
-    public $directionsUnits = "";                        // 'metric' for kilometers and meters or 'imperial for miles and feet. Leave blank and it will default to the region or country of where directions are being obtained
123
-    public $directionsWaypointArray = array();                    // An array of waypoints. eg array("Boston, MA", "Times Square, NY");
124
-    public $directionsWaypointsOptimize = false;                    // Should the waypoints be optimised? If TRUE, waypoints will be re-ordered to provide the most efficient route.
125
-
126
-    public $drawing = false;                    // Whether or not the drawing library tools will be loaded
127
-    public $drawingControl = true;                        // If set to FALSE will hide the Drawing Manager control
128
-    public $drawingControlPosition = 'TOP_CENTER';                // The position of the Drawing Manager control, eg. 'TOP_RIGHT'
129
-    public $drawingDefaultMode = 'marker';                    // The default mode for the Drawing Manager. Accepted values are marker, polygon, polyline, rectangle, circle, or null. null means that the user can interact with the map as normal when the map loads, and clicks do not draw anything.
130
-    public $drawingModes = array();                    // An array of modes available for use. Accepted values are marker, polygon, polyline, rectangle, circle
131
-    public $drawingOnComplete = array();                    // An array of JS to execute when shapes are completed, one array element per shape. For example: array('circle'=>'JS here', 'polygon'=>'JS here');
132
-    public $drawingOnEdit = array();                    // An array of JS to execute when shapes are changed/resized, one array element per shape. For example: array('circle'=>'JS here', 'polygon'=>'JS here');
133
-
134
-    public $places = false;                    // Whether or not the map will be used to show places
135
-    public $placesLocation = '';                        // A point (lat/long co-ordinate or address) on the map if the search for places is based around a central point
136
-    public $placesRadius = 0;                        // The radius (in meters) if search is based around a central position
137
-    public $placesLocationSW = '';                        // If preferring to search within bounds the South-West position (latitude/longitude coordinate OR address)
138
-    public $placesLocationNE = '';                        // If preferring to search within bounds the North-East position (latitude/longitude coordinate OR address)
139
-    public $placesTypes = array();                    // The types of places to search for. For a list of supported types see http://code.google.com/apis/maps/documentation/places/supported_types.html
140
-    public $placesName = '';                        // A term to be matched against when searching for places to display on the map
141
-    public $placesAutocompleteInputID = '';                        // The ID attribute of the textfield that the autocomplete should effect
142
-    public $placesAutocompleteTypes = array();                    // The types of places for the autocomplete to return. Options can be seen here https://developers.google.com/maps/documentation/javascript/places#places_autocomplete but include 'establishment' to only return business results, '(cities)', or '(regions)'
143
-    public $placesAutocompleteBoundSW = '';                        // By specifying an area in which to search for Places, the results are biased towards, but not restricted to, Places contained within these bounds.
144
-    public $placesAutocompleteBoundNE = '';                        // Both South-West (lat/long co-ordinate or address) and North-East (lat/long co-ordinate or address) values are required if wishing to set bounds
145
-    public $placesAutocompleteBoundsMap = false;                    // An alternative to setting the SW and NE bounds is to use the bounds of the current viewport. If set to TRUE, the bounds will be set to the viewport of the visible map, even if dragged or zoomed
146
-    public $placesAutocompleteOnChange = '';                        // The JavaScript action to perform when a place is selected
147
-    public $gestureHandling = 'auto';                                // Controls the panning and scrolling behavior of a map when viewed on a mobile device. greedy(allways moves on touch), cooperative(1 finger scroll 2 finger move), none(not pannable or pinchable), auto
10
+    public $adsense = false; // Whether Google Adsense For Content should be enabled
11
+    public $adsenseChannelNumber = ''; // The Adsense channel number for tracking the performance of this AdUnit
12
+    public $adsenseFormat = 'HALF_BANNER'; // The format of the AdUnit
13
+    public $adsensePosition = 'TOP_CENTER'; // The position of the AdUnit
14
+    public $adsensePublisherID = ''; // Your Google AdSense publisher ID
15
+    public $apiKey = ''; // If you've got an API key you can use it by passing this parameter. Setup an API key here: https://code.google.com/apis/console
16
+    public $backgroundColor = ''; // A hex color value shown as the map background when tiles have not yet loaded as the user pans
17
+    public $bicyclingOverlay = false; // If set to TRUE will overlay bicycling information (ie. bike paths and suggested routes) onto the map by default
18
+    public $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"
19
+
20
+    public $class = ''; // A class name if wishing to style the map further through CSS. Can also be useful if wanting it to be responsive etc.
21
+    public $cluster = false; // Whether to cluster markers
22
+    public $clusterGridSize = 60; // The grid size of a cluster in pixels
23
+    public $clusterMaxZoom = ''; // The maximum zoom level that a marker can be part of a cluster
24
+    public $clusterZoomOnClick = true; // Whether the default behaviour of clicking on a cluster is to zoom into it
25
+    public $clusterAverageCenter = false; // Whether the center of each cluster should be the average of all markers in the cluster
26
+    public $clusterMinimumClusterSize = 2; // The minimum number of markers to be in a cluster before the markers are hidden and a count is shown
27
+    public $clusterStyles = []; // (object) An array that has style properties: *  'url': (string) The image url. *  'height': (number) The image height. *  'width': (number) The image width. *  'anchor': (Array) The anchor position of the label text. *  'textColor': (string) The text color. *  'textSize': (number) The text size. *  'backgroundPosition': (string) The position of the backgound x, y.
28
+    public $disableDefaultUI = false; // If set to TRUE will hide the default controls (ie. zoom, scale etc)
29
+    public $disableDoubleClickZoom = false; // If set to TRUE will disable zooming when a double click occurs
30
+    public $disableMapTypeControl = false; // If set to TRUE will hide the MapType control (ie. Map, Satellite, Hybrid, Terrain)
31
+    public $disableNavigationControl = false; // If set to TRUE will hide the Navigation control (ie. zoom in/out, pan)
32
+    public $disableScaleControl = false; // If set to TRUE will hide the Scale control
33
+    public $disableStreetViewControl = false; // If set to TRUE will hide the Street View control
34
+    public $draggable = true; // If set to FALSE will prevent the map from being dragged around
35
+    public $draggableCursor = ''; // The name or url of the cursor to display on a draggable object
36
+    public $draggingCursor = ''; // The name or url of the cursor to display when an object is being dragged
37
+    public $geocodeCaching = false; // If set to TRUE will cache any geocode requests made when an address is used instead of a lat/long. Requires DB table to be created (see documentation)
38
+    public $https = false; // If set to TRUE will load the Google Maps JavaScript API over HTTPS, allowing you to utilize the API within your HTTPS secure application
39
+    public $navigationControlPosition = ''; // The position of the Navigation control, eg. 'BOTTOM_RIGHT'
40
+    public $infowindowMaxWidth = 0; // The maximum width of the infowindow in pixels. Expecting an integer without units
41
+    public $keyboardShortcuts = true; // If set to FALSE will disable to map being controlled via the keyboard
42
+    public $jsfile = ''; // Set this to the path of an external JS file if you wish the JavaScript to be placed in a file rather than output directly into the <head></head> section. The library will try to create the file if it does not exist already. Please ensure the destination file is writeable
43
+    public $kmlLayerURL = ''; // A URL to publicly available KML or GeoRSS data for displaying geographic information. Multiple KML layers can be passed in by using an array of URL's. Note, if using multiple you'll probably have to set $kmlLayerPreserveViewport to true and manually set map center and zoom
44
+    public $kmlLayerPreserveViewport = false; // Specifies whether the map should be adjusted to the bounds of the KmlLayer's contents. By default the map is zoomed and positioned to show the entirety of the layer's contents
45
+    public $language = ''; // The map will by default load in the language of the browser. This can be overriden however here. For a full list of codes see https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
46
+    public $loadAsynchronously = false; // Load the map and API asynchronously once the page has loaded
47
+    public $map_div_id = "map_canvas"; // The ID of the <div></div> that is output which contains the map
48
+    public $map_height = "450px"; // The height of the map container. Any units (ie 'px') can be used. If no units are provided 'px' will be presumed
49
+    public $map_name = "map"; // The JS reference to the map. Currently not used but to be used in the future when multiple maps are supported
50
+    public $map_type = "ROADMAP"; // The default MapType. Values accepted are 'HYBRID', 'ROADMAP', 'SATELLITE' or 'TERRAIN'
51
+    public $map_types_available = array(); // The other MapTypes available for selection on the map
52
+    public $map_width = "100%"; // The width of the map container. Any units (ie 'px') can be used. If no units are provided 'px' will be presumed
53
+    public $maps_loaded = 0; // Counter which keeps track of how many maps have been created to avoid standard functions being output twice
54
+    public $mapTypeControlPosition = ''; // The position of the MapType control, eg. 'BOTTOM_RIGHT'
55
+    public $mapTypeControlStyle = ''; // The style of the MapType control. blank, 'DROPDOWN_MENU' or 'HORIZONTAL_BAR' values accepted.
56
+    public $minzoom = ''; // The minimum zoom level which will be displayed on the map
57
+    public $maxzoom = ''; // The maximum zoom level which will be displayed on the map
58
+    public $minifyJS = false; // If TRUE will run the JavaScript through Jsmin.php (this file and PHP5+ required) to minify the code
59
+    public $noClear = false; // If TRUE do not clear the contents of the map div
60
+    public $onboundschanged = ''; // The JavaScript action to perform when the viewport bounds have changed
61
+    public $oncenterchanged = ''; // The JavaScript action to perform when themap center property changes
62
+    public $onclick = ''; // The JavaScript action to perform when the map is clicked
63
+    public $ondblclick = ''; // The JavaScript action to perform when the map is double-clicked
64
+    public $ondrag = ''; // The JavaScript action to perform while the map is dragged
65
+    public $ondragend = ''; // The JavaScript action to perform when the user stops dragging the map
66
+    public $ondragstart = ''; // The JavaScript action to perform when the user starts dragging the map
67
+    public $onidle = ''; // The JavaScript action to perform when the map becomes idle after panning or zooming
68
+    public $onload = ''; // The JavaScript action to perform when the map first loads. This library hi-jacks the window.load event so add any bespoke code using this option
69
+    public $onmousemove = ''; // The JavaScript action to perform when the user's mouse moves over the map container
70
+    public $onmouseout = ''; // The JavaScript action to perform when the user's mouse exits the map container
71
+    public $onmouseover = ''; // The JavaScript action to perform when the user's mouse enters the map container
72
+    public $onresize = ''; // The JavaScript action to perform when the maps div changes size
73
+    public $onrightclick = ''; // The JavaScript action to perform when the map is right-clicked
74
+    public $ontilesloaded = ''; // The JavaScript action to perform when the visible tiles have finished loading
75
+    public $onzoomchanged = ''; // The JavaScript action to perform when the maps zoom property changes
76
+    public $panoramio = false; // If TRUE will add photos from Panoramio as a layer to your maps as a series of large and small photo icons
77
+    public $panoramioTag = ''; // Restrict the set of Panoramio photos shown to those matching a certain textual tag
78
+    public $panoramioUser = ''; // Restrict the set of Panoramio photos shown to those matching a particular user
79
+    public $region = ''; // Country code top-level domain (eg "uk") within which to search. Useful if supplying addresses rather than lat/longs
80
+    public $scaleControlPosition = ''; // The position of the Scale control, eg. 'BOTTOM_RIGHT'
81
+    public $scrollwheel = true; // If set to FALSE will disable zooming by scrolling of the mouse wheel
82
+    public $streetViewAddressControl = true; // If set to FALSE will hide the Address control
83
+    public $streetViewAddressPosition = ''; // The position of the Address control, eg. 'BOTTOM'
84
+    public $streetViewControlPosition = ''; // The position of the Street View control when viewing normal aerial map, eg. 'BOTTOM_RIGHT'
85
+    public $streetViewCloseButton = false; // If set to TRUE will show the close button in the top right. The close button allows users to return to the aerial map
86
+    public $streetViewLinksControl = true; // If set to FALSE will hide the Links control
87
+    public $streetViewPanControl = true; // If set to FALSE will hide the Pan control
88
+    public $streetViewPanPosition = ''; // The position of the Scale control, eg. 'TOP_RIGHT'
89
+    public $streetViewPovHeading = 0; // The Street View camera heading in degrees relative to true north. True north is 0, east is 90, south is 180, west is 270
90
+    public $streetViewPovPitch = 0; // The Street View camera pitch in degrees, relative to the street view vehicle. Directly upwards is 90, Directly downwards is -90.
91
+    public $streetViewPovZoom = 0; // The Street View zoom level. Fully zoomed-out is level 0, zooming in increases the zoom level.
92
+    public $streetViewZoomControl = true; // If set to FALSE will hide the Zoom control
93
+    public $streetViewZoomPosition = ''; // The position of the Scale control, eg. 'TOP_RIGHT'
94
+    public $streetViewZoomStyle = ''; // The size of the Street View zoom control. blank, 'SMALL' or 'LARGE' values accepted.
95
+    public $styles = array(); // An array of styles used to colour aspects of the map and turn points of interest on and off
96
+    public $stylesAsMapTypes = false; // If applying styles, whether to apply them to the default map or add them as additional map types
97
+    public $stylesAsMapTypesDefault = ''; // If $stylesAsMapTypes is true the default style. Should contain the 'Name' of the style
98
+    public $tilt = 0; // The angle of tilt. Currently only supports the values 0 and 45 in SATELLITE and HYBRID map types and at certain zoom levels
99
+    public $trafficOverlay = false; // If set to TRUE will overlay traffic information onto the map by default
100
+    public $version = "3"; // Version of the API being used. Not currently used in the library
101
+    public $zoom = 13; // The default zoom level of the map. If set to "auto" will autozoom/center to fit in all visible markers. If "auto", also overrides the $center parameter
102
+    public $zoomControlPosition = ''; // The position of the Zoom control, eg. 'BOTTOM_RIGHT'
103
+    public $zoomControlStyle = ''; // The size of the zoom control. blank, 'SMALL' or 'LARGE' values accepted.
104
+
105
+    public $markers = array(); // An array used by the library to store the markers as they are produced
106
+    public $markersInfo = array(); // An array containing marker information (id, latitude, longitude etc) for use elsewhere
107
+    public $polylines = array(); // An array used by the library to store the polylines as they are produced
108
+    public $polygons = array(); // An array used by the library to store the polygons as they are produced
109
+    public $circles = array(); // An array used by the library to store the circles as they are produced
110
+    public $rectangles = array(); // An array used by the library to store the rectangles as they are produced
111
+    public $overlays = array(); // An array used by the library to store the overlays as they are produced
112
+
113
+    public $directions = false; // Whether or not the map will be used to show directions
114
+    public $directionsStart = ""; // The starting location (lat/long co-ordinate or address) of the directions. Set to 'auto' to default it to the users location
115
+    public $directionsEnd = ""; // The destination point (lat/long co-ordinate or address) of the directions. Set to 'auto' to default it to the users location
116
+    public $directionsDivID = ""; // An element's ID on the page where textual directions will be output to. Leave blank if not required
117
+    public $directionsMode = "DRIVING"; // DRIVING, WALKING or BICYCLING (US Only) - The vehicle/mode of transport to show directions for
118
+    public $directionsAvoidTolls = false; // Whether or not directions should avoid tolls
119
+    public $directionsAvoidHighways = false; // Whether or not directions should avoid highways
120
+    public $directionsDraggable = false; // Whether or not directions on the map are draggable
121
+    public $directionsChanged = ""; // JavaScript to perform when directions are dragged
122
+    public $directionsUnits = ""; // 'metric' for kilometers and meters or 'imperial for miles and feet. Leave blank and it will default to the region or country of where directions are being obtained
123
+    public $directionsWaypointArray = array(); // An array of waypoints. eg array("Boston, MA", "Times Square, NY");
124
+    public $directionsWaypointsOptimize = false; // Should the waypoints be optimised? If TRUE, waypoints will be re-ordered to provide the most efficient route.
125
+
126
+    public $drawing = false; // Whether or not the drawing library tools will be loaded
127
+    public $drawingControl = true; // If set to FALSE will hide the Drawing Manager control
128
+    public $drawingControlPosition = 'TOP_CENTER'; // The position of the Drawing Manager control, eg. 'TOP_RIGHT'
129
+    public $drawingDefaultMode = 'marker'; // The default mode for the Drawing Manager. Accepted values are marker, polygon, polyline, rectangle, circle, or null. null means that the user can interact with the map as normal when the map loads, and clicks do not draw anything.
130
+    public $drawingModes = array(); // An array of modes available for use. Accepted values are marker, polygon, polyline, rectangle, circle
131
+    public $drawingOnComplete = array(); // An array of JS to execute when shapes are completed, one array element per shape. For example: array('circle'=>'JS here', 'polygon'=>'JS here');
132
+    public $drawingOnEdit = array(); // An array of JS to execute when shapes are changed/resized, one array element per shape. For example: array('circle'=>'JS here', 'polygon'=>'JS here');
133
+
134
+    public $places = false; // Whether or not the map will be used to show places
135
+    public $placesLocation = ''; // A point (lat/long co-ordinate or address) on the map if the search for places is based around a central point
136
+    public $placesRadius = 0; // The radius (in meters) if search is based around a central position
137
+    public $placesLocationSW = ''; // If preferring to search within bounds the South-West position (latitude/longitude coordinate OR address)
138
+    public $placesLocationNE = ''; // If preferring to search within bounds the North-East position (latitude/longitude coordinate OR address)
139
+    public $placesTypes = array(); // The types of places to search for. For a list of supported types see http://code.google.com/apis/maps/documentation/places/supported_types.html
140
+    public $placesName = ''; // A term to be matched against when searching for places to display on the map
141
+    public $placesAutocompleteInputID = ''; // The ID attribute of the textfield that the autocomplete should effect
142
+    public $placesAutocompleteTypes = array(); // The types of places for the autocomplete to return. Options can be seen here https://developers.google.com/maps/documentation/javascript/places#places_autocomplete but include 'establishment' to only return business results, '(cities)', or '(regions)'
143
+    public $placesAutocompleteBoundSW = ''; // By specifying an area in which to search for Places, the results are biased towards, but not restricted to, Places contained within these bounds.
144
+    public $placesAutocompleteBoundNE = ''; // Both South-West (lat/long co-ordinate or address) and North-East (lat/long co-ordinate or address) values are required if wishing to set bounds
145
+    public $placesAutocompleteBoundsMap = false; // An alternative to setting the SW and NE bounds is to use the bounds of the current viewport. If set to TRUE, the bounds will be set to the viewport of the visible map, even if dragged or zoomed
146
+    public $placesAutocompleteOnChange = ''; // The JavaScript action to perform when a place is selected
147
+    public $gestureHandling = 'auto'; // Controls the panning and scrolling behavior of a map when viewed on a mobile device. greedy(allways moves on touch), cooperative(1 finger scroll 2 finger move), none(not pannable or pinchable), auto
148 148
 
149 149
 
150 150
     public function __construct($config = array())
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     public function create($center)
160 160
     {
161 161
         $gmapsConfig = [];
162
-        $gmapsConfig['center'] = $center->latitude . ', ' . $center->longitude;
162
+        $gmapsConfig['center'] = $center->latitude.', '.$center->longitude;
163 163
         $gmapsConfig['onboundschanged'] = "if ((typeof centreGot === 'undefined') || !centreGot) {
164 164
             var mapCentre = map.getCenter();
165 165
             marker_0.setOptions({
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         centreGot = true;";
170 170
         $this->initialize($gmapsConfig);
171 171
         $gmapsMarker = [];
172
-        $gmapsMarker['position'] = $center->latitude . ', ' . $center->longitude;
172
+        $gmapsMarker['position'] = $center->latitude.', '.$center->longitude;
173 173
         $gmapsMarker['animation'] = 'DROP';
174 174
         $gmapsMarker['highlightBackgroundColor'] = 'ff0000';
175 175
         $this->add_marker($gmapsMarker);
@@ -191,36 +191,36 @@  discard block
 block discarded – undo
191 191
         $marker = array();
192 192
         $this->markersInfo['marker_'.count($this->markers)] = array();
193 193
 
194
-        $marker['position'] = '';                                // The position (lat/long co-ordinate or address) at which the marker will appear
195
-        $marker['infowindow_content'] = '';                        // If not blank, creates an infowindow (aka bubble) with the content provided. Can be plain text or HTML
196
-        $marker['id'] = '';                                        // The unique identifier of the marker suffix (ie. marker_yourID). If blank, this will default to marker_X where X is an incremental number
197
-        $marker['clickable'] = true;                            // Defines if the marker is clickable
198
-        $marker['cursor'] = '';                                    // The name or url of the cursor to display on hover
199
-        $marker['draggable'] = false;                            // Defines if the marker is draggable
200
-        $marker['flat'] = false;                                // If set to TRUE will not display a shadow beneath the icon
201
-        $marker['icon'] = '';                                    // The name or url of the icon to use for the marker
202
-        $marker['icon_size'] = '';                                // The display size of the sprite or image being used. When using sprites, you must specify the sprite size. Expecting two comma-separated values for width and height respectively (ie '20,30'). See https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon
203
-        $marker['icon_scaledSize'] = '';                        // The size of the entire image after scaling, if any. Use this property to stretch/shrink an image or a sprite. Expecting two comma-separated values for width and height respectively (ie '20,30')
204
-        $marker['icon_origin'] = '';                            // If using a sprite, the position of the image within the sprite. Expecting two comma-separated values for distance from the top and left respectively (ie '20,30')
205
-        $marker['icon_anchor'] = '';                            // The position at which to anchor an image in correspondance to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image. Expecting two comma-separated values (ie '20,30'). Credit to https://github.com/colethorsen
206
-        $marker['animation'] = '';                                // blank, 'DROP' or 'BOUNCE'
207
-        $marker['onclick'] = '';                                // JavaScript performed when a marker is clicked
208
-        $marker['ondblclick'] = '';                                // JavaScript performed when a marker is double-clicked
209
-        $marker['ondrag'] = '';                                    // JavaScript repeatedly performed while the marker is being dragged
210
-        $marker['ondragstart'] = '';                            // JavaScript performed when a marker is started to be dragged
211
-        $marker['ondragend'] = '';                                // JavaScript performed when a draggable marker is dropped
212
-        $marker['onmousedown'] = '';                            // JavaScript performed when a mousedown event occurs on a marker
213
-        $marker['onmouseout'] = '';                                // JavaScript performed when the mouse leaves the area of the marker icon
214
-        $marker['onmouseover'] = '';                            // JavaScript performed when the mouse enters the area of the marker icon
215
-        $marker['onmouseup'] = '';                                // JavaScript performed when a mouseup event occurs on a marker
216
-        $marker['onpositionchanged'] = '';                        // JavaScript performed when the markers position changes
217
-        $marker['onrightclick'] = '';                            // JavaScript performed when a right-click occurs on a marker
218
-        $marker['raiseondrag'] = true;                            // If FALSE, disables the raising and lowering of the icon when a marker is being dragged
219
-        $marker['shadow'] = '';                                    // The name or url of the icon's shadow
220
-        $marker['title'] = '';                                    // The tooltip text to show on hover
221
-        $marker['visible'] = true;                                // Defines if the marker is visible by default
222
-        $marker['zIndex'] = '';                                    // The zIndex of the marker. If two markers overlap, the marker with the higher zIndex will appear on top
223
-        $marker['label'] = '';                                    // The label of the marker.
194
+        $marker['position'] = ''; // The position (lat/long co-ordinate or address) at which the marker will appear
195
+        $marker['infowindow_content'] = ''; // If not blank, creates an infowindow (aka bubble) with the content provided. Can be plain text or HTML
196
+        $marker['id'] = ''; // The unique identifier of the marker suffix (ie. marker_yourID). If blank, this will default to marker_X where X is an incremental number
197
+        $marker['clickable'] = true; // Defines if the marker is clickable
198
+        $marker['cursor'] = ''; // The name or url of the cursor to display on hover
199
+        $marker['draggable'] = false; // Defines if the marker is draggable
200
+        $marker['flat'] = false; // If set to TRUE will not display a shadow beneath the icon
201
+        $marker['icon'] = ''; // The name or url of the icon to use for the marker
202
+        $marker['icon_size'] = ''; // The display size of the sprite or image being used. When using sprites, you must specify the sprite size. Expecting two comma-separated values for width and height respectively (ie '20,30'). See https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon
203
+        $marker['icon_scaledSize'] = ''; // The size of the entire image after scaling, if any. Use this property to stretch/shrink an image or a sprite. Expecting two comma-separated values for width and height respectively (ie '20,30')
204
+        $marker['icon_origin'] = ''; // If using a sprite, the position of the image within the sprite. Expecting two comma-separated values for distance from the top and left respectively (ie '20,30')
205
+        $marker['icon_anchor'] = ''; // The position at which to anchor an image in correspondance to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image. Expecting two comma-separated values (ie '20,30'). Credit to https://github.com/colethorsen
206
+        $marker['animation'] = ''; // blank, 'DROP' or 'BOUNCE'
207
+        $marker['onclick'] = ''; // JavaScript performed when a marker is clicked
208
+        $marker['ondblclick'] = ''; // JavaScript performed when a marker is double-clicked
209
+        $marker['ondrag'] = ''; // JavaScript repeatedly performed while the marker is being dragged
210
+        $marker['ondragstart'] = ''; // JavaScript performed when a marker is started to be dragged
211
+        $marker['ondragend'] = ''; // JavaScript performed when a draggable marker is dropped
212
+        $marker['onmousedown'] = ''; // JavaScript performed when a mousedown event occurs on a marker
213
+        $marker['onmouseout'] = ''; // JavaScript performed when the mouse leaves the area of the marker icon
214
+        $marker['onmouseover'] = ''; // JavaScript performed when the mouse enters the area of the marker icon
215
+        $marker['onmouseup'] = ''; // JavaScript performed when a mouseup event occurs on a marker
216
+        $marker['onpositionchanged'] = ''; // JavaScript performed when the markers position changes
217
+        $marker['onrightclick'] = ''; // JavaScript performed when a right-click occurs on a marker
218
+        $marker['raiseondrag'] = true; // If FALSE, disables the raising and lowering of the icon when a marker is being dragged
219
+        $marker['shadow'] = ''; // The name or url of the icon's shadow
220
+        $marker['title'] = ''; // The tooltip text to show on hover
221
+        $marker['visible'] = true; // Defines if the marker is visible by default
222
+        $marker['zIndex'] = ''; // The zIndex of the marker. If two markers overlap, the marker with the higher zIndex will appear on top
223
+        $marker['label'] = ''; // The label of the marker.
224 224
 
225 225
         $marker_output = '';
226 226
 
@@ -451,20 +451,20 @@  discard block
 block discarded – undo
451 451
     {
452 452
         $polyline = array();
453 453
 
454
-        $polyline['points'] = array();                            // An array of latitude/longitude coordinates OR addresses, or a mixture of both. If an address is supplied the Google geocoding service will be used to return a lat/long.
455
-        $polyline['clickable'] = true;                            // Defines if the polyline is clickable
456
-        $polyline['strokeColor'] = '#FF0000';                    // The hex value of the polylines color
457
-        $polyline['strokeOpacity'] = '1.0';                        // The opacity of the polyline. 0 to 1.0
458
-        $polyline['strokeWeight'] = '2';                        // The thickness of the polyline
459
-        $polyline['onclick'] = '';                                // JavaScript performed when a polyline is clicked
460
-        $polyline['ondblclick'] = '';                            // JavaScript performed when a polyline is double-clicked
461
-        $polyline['onmousedown'] = '';                            // JavaScript performed when a mousedown event occurs on a polyline
462
-        $polyline['onmousemove'] = '';                            // JavaScript performed when the mouse moves in the area of the polyline
463
-        $polyline['onmouseout'] = '';                            // JavaScript performed when the mouse leaves the area of the polyline
464
-        $polyline['onmouseover'] = '';                            // JavaScript performed when the mouse enters the area of the polyline
465
-        $polyline['onmouseup'] = '';                            // JavaScript performed when a mouseup event occurs on a polyline
466
-        $polyline['onrightclick'] = '';                            // JavaScript performed when a right-click occurs on a polyline
467
-        $polyline['zIndex'] = '';                                // The zIndex of the polyline. If two polylines overlap, the polyline with the higher zIndex will appear on top
454
+        $polyline['points'] = array(); // An array of latitude/longitude coordinates OR addresses, or a mixture of both. If an address is supplied the Google geocoding service will be used to return a lat/long.
455
+        $polyline['clickable'] = true; // Defines if the polyline is clickable
456
+        $polyline['strokeColor'] = '#FF0000'; // The hex value of the polylines color
457
+        $polyline['strokeOpacity'] = '1.0'; // The opacity of the polyline. 0 to 1.0
458
+        $polyline['strokeWeight'] = '2'; // The thickness of the polyline
459
+        $polyline['onclick'] = ''; // JavaScript performed when a polyline is clicked
460
+        $polyline['ondblclick'] = ''; // JavaScript performed when a polyline is double-clicked
461
+        $polyline['onmousedown'] = ''; // JavaScript performed when a mousedown event occurs on a polyline
462
+        $polyline['onmousemove'] = ''; // JavaScript performed when the mouse moves in the area of the polyline
463
+        $polyline['onmouseout'] = ''; // JavaScript performed when the mouse leaves the area of the polyline
464
+        $polyline['onmouseover'] = ''; // JavaScript performed when the mouse enters the area of the polyline
465
+        $polyline['onmouseup'] = ''; // JavaScript performed when a mouseup event occurs on a polyline
466
+        $polyline['onrightclick'] = ''; // JavaScript performed when a right-click occurs on a polyline
467
+        $polyline['zIndex'] = ''; // The zIndex of the polyline. If two polylines overlap, the polyline with the higher zIndex will appear on top
468 468
 
469 469
         $polyline_output = '';
470 470
 
@@ -590,22 +590,22 @@  discard block
 block discarded – undo
590 590
     {
591 591
         $polygon = array();
592 592
 
593
-        $polygon['points'] = array();                            // The positions (latitude/longitude coordinates OR addresses) at which the polygon points will appear. NOTE: The first and last elements of the array must be the same
594
-        $polygon['clickable'] = true;                            // Defines if the polygon is clickable
595
-        $polygon['strokeColor'] = '#FF0000';                    // The hex value of the polygons border color
596
-        $polygon['strokeOpacity'] = '0.8';                        // The opacity of the polygon border. 0 to 1.0
597
-        $polygon['strokeWeight'] = '2';                            // The thickness of the polygon border
598
-        $polygon['fillColor'] = '#FF0000';                        // The hex value of the polygons fill color
599
-        $polygon['fillOpacity'] = '0.3';                        // The opacity of the polygons fill
600
-        $polygon['onclick'] = '';                                // JavaScript performed when a polygon is clicked
601
-        $polygon['ondblclick'] = '';                            // JavaScript performed when a polygon is double-clicked
602
-        $polygon['onmousedown'] = '';                            // JavaScript performed when a mousedown event occurs on a polygon
603
-        $polygon['onmousemove'] = '';                            // JavaScript performed when the mouse moves in the area of the polygon
604
-        $polygon['onmouseout'] = '';                            // JavaScript performed when the mouse leaves the area of the polygon
605
-        $polygon['onmouseover'] = '';                            // JavaScript performed when the mouse enters the area of the polygon
606
-        $polygon['onmouseup'] = '';                                // JavaScript performed when a mouseup event occurs on a polygon
607
-        $polygon['onrightclick'] = '';                            // JavaScript performed when a right-click occurs on a polygon
608
-        $polygon['zIndex'] = '';                                // The zIndex of the polygon. If two polygons overlap, the polygon with the higher zIndex will appear on top
593
+        $polygon['points'] = array(); // The positions (latitude/longitude coordinates OR addresses) at which the polygon points will appear. NOTE: The first and last elements of the array must be the same
594
+        $polygon['clickable'] = true; // Defines if the polygon is clickable
595
+        $polygon['strokeColor'] = '#FF0000'; // The hex value of the polygons border color
596
+        $polygon['strokeOpacity'] = '0.8'; // The opacity of the polygon border. 0 to 1.0
597
+        $polygon['strokeWeight'] = '2'; // The thickness of the polygon border
598
+        $polygon['fillColor'] = '#FF0000'; // The hex value of the polygons fill color
599
+        $polygon['fillOpacity'] = '0.3'; // The opacity of the polygons fill
600
+        $polygon['onclick'] = ''; // JavaScript performed when a polygon is clicked
601
+        $polygon['ondblclick'] = ''; // JavaScript performed when a polygon is double-clicked
602
+        $polygon['onmousedown'] = ''; // JavaScript performed when a mousedown event occurs on a polygon
603
+        $polygon['onmousemove'] = ''; // JavaScript performed when the mouse moves in the area of the polygon
604
+        $polygon['onmouseout'] = ''; // JavaScript performed when the mouse leaves the area of the polygon
605
+        $polygon['onmouseover'] = ''; // JavaScript performed when the mouse enters the area of the polygon
606
+        $polygon['onmouseup'] = ''; // JavaScript performed when a mouseup event occurs on a polygon
607
+        $polygon['onrightclick'] = ''; // JavaScript performed when a right-click occurs on a polygon
608
+        $polygon['zIndex'] = ''; // The zIndex of the polygon. If two polygons overlap, the polygon with the higher zIndex will appear on top
609 609
 
610 610
         $polygon_output = '';
611 611
 
@@ -738,23 +738,23 @@  discard block
 block discarded – undo
738 738
     {
739 739
         $circle = array();
740 740
 
741
-        $circle['center'] = '';                                    // The center position (latitude/longitude coordinate OR addresse) at which the circle will appear
742
-        $circle['clickable'] = true;                            // Defines if the circle is clickable
743
-        $circle['radius'] = 0;                                    // The circle radius (in metres)
744
-        $circle['strokeColor'] = '0.8';                            // The hex value of the circles border color
745
-        $circle['strokeOpacity'] = '0.8';                        // The opacity of the circle border
746
-        $circle['strokeWeight'] = '2';                            // The thickness of the circle border
747
-        $circle['fillColor'] = '#FF0000';                        // The hex value of the circles fill color
748
-        $circle['fillOpacity'] = '0.3';                            // The opacity of the circles fill
749
-        $circle['onclick'] = '';                                // JavaScript performed when a circle is clicked
750
-        $circle['ondblclick'] = '';                                // JavaScript performed when a circle is double-clicked
751
-        $circle['onmousedown'] = '';                            // JavaScript performed when a mousedown event occurs on a circle
752
-        $circle['onmousemove'] = '';                            // JavaScript performed when the mouse moves in the area of the circle
753
-        $circle['onmouseout'] = '';                                // JavaScript performed when the mouse leaves the area of the circle
754
-        $circle['onmouseover'] = '';                            // JavaScript performed when the mouse enters the area of the circle
755
-        $circle['onmouseup'] = '';                                // JavaScript performed when a mouseup event occurs on a circle
756
-        $circle['onrightclick'] = '';                            // JavaScript performed when a right-click occurs on a circle
757
-        $circle['zIndex'] = '';                                    // The zIndex of the circle. If two circles overlap, the circle with the higher zIndex will appear on top
741
+        $circle['center'] = ''; // The center position (latitude/longitude coordinate OR addresse) at which the circle will appear
742
+        $circle['clickable'] = true; // Defines if the circle is clickable
743
+        $circle['radius'] = 0; // The circle radius (in metres)
744
+        $circle['strokeColor'] = '0.8'; // The hex value of the circles border color
745
+        $circle['strokeOpacity'] = '0.8'; // The opacity of the circle border
746
+        $circle['strokeWeight'] = '2'; // The thickness of the circle border
747
+        $circle['fillColor'] = '#FF0000'; // The hex value of the circles fill color
748
+        $circle['fillOpacity'] = '0.3'; // The opacity of the circles fill
749
+        $circle['onclick'] = ''; // JavaScript performed when a circle is clicked
750
+        $circle['ondblclick'] = ''; // JavaScript performed when a circle is double-clicked
751
+        $circle['onmousedown'] = ''; // JavaScript performed when a mousedown event occurs on a circle
752
+        $circle['onmousemove'] = ''; // JavaScript performed when the mouse moves in the area of the circle
753
+        $circle['onmouseout'] = ''; // JavaScript performed when the mouse leaves the area of the circle
754
+        $circle['onmouseover'] = ''; // JavaScript performed when the mouse enters the area of the circle
755
+        $circle['onmouseup'] = ''; // JavaScript performed when a mouseup event occurs on a circle
756
+        $circle['onrightclick'] = ''; // JavaScript performed when a right-click occurs on a circle
757
+        $circle['zIndex'] = ''; // The zIndex of the circle. If two circles overlap, the circle with the higher zIndex will appear on top
758 758
 
759 759
         $circle_output = '';
760 760
 
@@ -869,23 +869,23 @@  discard block
 block discarded – undo
869 869
     {
870 870
         $rectangle = array();
871 871
 
872
-        $rectangle['positionSW'] = '';                            // The South-West position (latitude/longitude coordinate OR address) at which the rectangle will appear
873
-        $rectangle['positionNE'] = '';                            // The North-East position(latitude/longitude coordinate OR address) at which the rectangle will appear
874
-        $rectangle['clickable'] = true;                            // Defines if the rectangle is clickable
875
-        $rectangle['strokeColor'] = '0.8';                        // The hex value of the rectangles border color
876
-        $rectangle['strokeOpacity'] = '0.8';                    // The opacity of the rectangle border
877
-        $rectangle['strokeWeight'] = '2';                        // The thickness of the rectangle border
878
-        $rectangle['fillColor'] = '#FF0000';                    // The hex value of the rectangles fill color
879
-        $rectangle['fillOpacity'] = '0.3';                        // The opacity of the rectangles fill
880
-        $rectangle['onclick'] = '';                                // JavaScript performed when a rectangle is clicked
881
-        $rectangle['ondblclick'] = '';                            // JavaScript performed when a rectangle is double-clicked
882
-        $rectangle['onmousedown'] = '';                            // JavaScript performed when a mousedown event occurs on a rectangle
883
-        $rectangle['onmousemove'] = '';                            // JavaScript performed when the mouse moves in the area of the rectangle
884
-        $rectangle['onmouseout'] = '';                            // JavaScript performed when the mouse leaves the area of the rectangle
885
-        $rectangle['onmouseover'] = '';                            // JavaScript performed when the mouse enters the area of the rectangle
886
-        $rectangle['onmouseup'] = '';                            // JavaScript performed when a mouseup event occurs on a rectangle
887
-        $rectangle['onrightclick'] = '';                        // JavaScript performed when a right-click occurs on a rectangle
888
-        $rectangle['zIndex'] = '';                                // The zIndex of the rectangle. If two rectangles overlap, the rectangle with the higher zIndex will appear on top
872
+        $rectangle['positionSW'] = ''; // The South-West position (latitude/longitude coordinate OR address) at which the rectangle will appear
873
+        $rectangle['positionNE'] = ''; // The North-East position(latitude/longitude coordinate OR address) at which the rectangle will appear
874
+        $rectangle['clickable'] = true; // Defines if the rectangle is clickable
875
+        $rectangle['strokeColor'] = '0.8'; // The hex value of the rectangles border color
876
+        $rectangle['strokeOpacity'] = '0.8'; // The opacity of the rectangle border
877
+        $rectangle['strokeWeight'] = '2'; // The thickness of the rectangle border
878
+        $rectangle['fillColor'] = '#FF0000'; // The hex value of the rectangles fill color
879
+        $rectangle['fillOpacity'] = '0.3'; // The opacity of the rectangles fill
880
+        $rectangle['onclick'] = ''; // JavaScript performed when a rectangle is clicked
881
+        $rectangle['ondblclick'] = ''; // JavaScript performed when a rectangle is double-clicked
882
+        $rectangle['onmousedown'] = ''; // JavaScript performed when a mousedown event occurs on a rectangle
883
+        $rectangle['onmousemove'] = ''; // JavaScript performed when the mouse moves in the area of the rectangle
884
+        $rectangle['onmouseout'] = ''; // JavaScript performed when the mouse leaves the area of the rectangle
885
+        $rectangle['onmouseover'] = ''; // JavaScript performed when the mouse enters the area of the rectangle
886
+        $rectangle['onmouseup'] = ''; // JavaScript performed when a mouseup event occurs on a rectangle
887
+        $rectangle['onrightclick'] = ''; // JavaScript performed when a right-click occurs on a rectangle
888
+        $rectangle['zIndex'] = ''; // The zIndex of the rectangle. If two rectangles overlap, the rectangle with the higher zIndex will appear on top
889 889
 
890 890
         $rectangle_output = '';
891 891
 
@@ -1017,11 +1017,11 @@  discard block
 block discarded – undo
1017 1017
     {
1018 1018
         $overlay = array();
1019 1019
 
1020
-        $overlay['image'] = '';                                    // JavaScript performed when a ground overlay is clicked
1021
-        $overlay['positionSW'] = '';                            // The South-West position (latitude/longitude coordinate OR addresse) at which the ground overlay will appear
1022
-        $overlay['positionNE'] = '';                            // The North-East position (latitude/longitude coordinate OR addresse) at which the ground overlay will appear
1023
-        $overlay['clickable'] = true;                            // Defines if the ground overlay is clickable
1024
-        $overlay['onclick'] = '';                                // JavaScript performed when a ground overlay is clicked
1020
+        $overlay['image'] = ''; // JavaScript performed when a ground overlay is clicked
1021
+        $overlay['positionSW'] = ''; // The South-West position (latitude/longitude coordinate OR addresse) at which the ground overlay will appear
1022
+        $overlay['positionNE'] = ''; // The North-East position (latitude/longitude coordinate OR addresse) at which the ground overlay will appear
1023
+        $overlay['clickable'] = true; // Defines if the ground overlay is clickable
1024
+        $overlay['onclick'] = ''; // JavaScript performed when a ground overlay is clicked
1025 1025
 
1026 1026
         $overlay_output = '';
1027 1027
 
@@ -1233,9 +1233,9 @@  discard block
 block discarded – undo
1233 1233
             $this->output_js_contents .= '
1234 1234
 					center: myLatlng,';
1235 1235
         }
1236
-        if($this->gestureHandling != 'auto'){
1236
+        if ($this->gestureHandling != 'auto') {
1237 1237
             $this->output_js_contents .= '
1238
-                    gestureHandling: \''.$this->gestureHandling .'\',';
1238
+                    gestureHandling: \''.$this->gestureHandling.'\',';
1239 1239
         }
1240 1240
         if (strtolower($this->map_type) == "street") {
1241 1241
             $map_type = "ROADMAP";
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
 
1372 1372
         $this->output_js_contents .= '};';
1373 1373
 
1374
-        $this->output_js_contents .=$this->map_name.' = new google.maps.Map(document.getElementById("'.$this->map_div_id.'"), myOptions);';
1374
+        $this->output_js_contents .= $this->map_name.' = new google.maps.Map(document.getElementById("'.$this->map_div_id.'"), myOptions);';
1375 1375
 
1376 1376
         if ($styleOutput != "") {
1377 1377
             $this->output_js_contents .= $styleOutput.'
@@ -1865,14 +1865,14 @@  discard block
 block discarded – undo
1865 1865
                 $this->output_js_contents .= ',
1866 1866
 				styles: [ ';
1867 1867
                 $styleOutput = [];
1868
-                foreach($this->clusterStyles as $clusterStyle){
1869
-                    $attributes =[];
1870
-                    foreach($clusterStyle as $key => $style){
1868
+                foreach ($this->clusterStyles as $clusterStyle) {
1869
+                    $attributes = [];
1870
+                    foreach ($clusterStyle as $key => $style) {
1871 1871
                         $attributes[] = $key.':"'.$style.'"';
1872 1872
                     }
1873
-                    $styleOutput[] = '{'.implode(',',$attributes).'}';
1873
+                    $styleOutput[] = '{'.implode(',', $attributes).'}';
1874 1874
                 }
1875
-                $this->output_js_contents .= implode(',',$styleOutput);
1875
+                $this->output_js_contents .= implode(',', $styleOutput);
1876 1876
                 $this->output_js_contents .= ']';
1877 1877
             }
1878 1878
 
Please login to merge, or discard this patch.