WP Google Maps - Version 7.11.00

Version Description

:- 2019-01-30 :- Medium priority = * Added new GlobalSettings module * Optimized marker tables and listings giving significant performance boost when viewing marker listings, editing, adding and deleting markers * Nominatim Cache now records country restriction * Improved robusticity of data-settings attribute handling * Added WPGMZA.LatLng.prototype.toLatLngLiteral * Added check for jQuery slider in wpgmaps_tabs.js * Added check for WordPress REST API and notices where that is not present * Removed 5,000 marker live edit limit following performance optimizations * Deprecated redundant WPGMZA_SETTINGS option * Moved all code from main PHP file to legacy-core.php * Checks for namespace, DOMDocument and WP REST API added in main file, a warning is issued if these are missing rather than a fatal error * Fixed undefined index wpgmza_settings_marker_pull on new installations * Fixed country restriction broken in OpenLayers * Fixed interaction controls (disable pan, double click zoom and mousewheel) ignored in OpenLayers due to wrong scope * Fixed zoom limits not respected in OpenLayers * Fixed zoom limits incorrectly interpreted by Google * Fixed "minZoom cannot exceed maxZoom" breaking Google maps when settings are reversed * Fixed country restriction not respected by OpenLayers

Download this release

Release Info

Developer perryrylance
Plugin Icon 128x128 WP Google Maps
Version 7.11.00
Comparing to
See all releases

Code changes from version 7.10.58 to 7.11.00

Files changed (168) hide show
  1. cache/index.html +0 -0
  2. constants.php +17 -0
  3. css/open-layers.css +3 -3
  4. css/wp-google-maps-admin.css +5 -0
  5. docs/circle.js.html +163 -0
  6. docs/core.js.html +469 -0
  7. docs/distance.js.html +104 -0
  8. docs/event-dispatcher.js.html +184 -0
  9. docs/event.js.html +84 -0
  10. docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  11. docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
  12. docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  13. docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  14. docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  15. docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  16. docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  17. docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
  18. docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  19. docs/fonts/OpenSans-Light-webfont.eot +0 -0
  20. docs/fonts/OpenSans-Light-webfont.svg +1831 -0
  21. docs/fonts/OpenSans-Light-webfont.woff +0 -0
  22. docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  23. docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  24. docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  25. docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  26. docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
  27. docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  28. docs/friendly-error.js.html +82 -0
  29. docs/geocoder.js.html +105 -0
  30. docs/google-maps_google-circle.js.html +102 -0
  31. docs/google-maps_google-geocoder.js.html +112 -0
  32. docs/google-maps_google-info-window.js.html +170 -0
  33. docs/google-maps_google-map.js.html +530 -0
  34. docs/google-maps_google-marker.js.html +198 -0
  35. docs/google-maps_google-modern-store-locator-circle.js.html +214 -0
  36. docs/google-maps_google-modern-store-locator.js.html +75 -0
  37. docs/google-maps_google-polygon.js.html +139 -0
  38. docs/google-maps_google-polyline.js.html +117 -0
  39. docs/google-maps_google-vertex-context-menu.js.html +144 -0
  40. docs/index.html +65 -0
  41. docs/info-window.js.html +159 -0
  42. docs/latlng.js.html +162 -0
  43. docs/latlngbounds.js.html +93 -0
  44. docs/map-object.js.html +134 -0
  45. docs/map-settings.js.html +222 -0
  46. docs/map.js.html +503 -0
  47. docs/maps-engine-dialog.js.html +104 -0
  48. docs/marker.js.html +318 -0
  49. docs/modern-store-locator-circle.js.html +409 -0
  50. docs/modern-store-locator.js.html +223 -0
  51. docs/module-Circle-Circle.html +319 -0
  52. docs/module-Circle.html +3611 -0
  53. docs/module-Distance.html +139 -0
  54. docs/module-Event.html +139 -0
  55. docs/module-EventDispatcher.html +139 -0
  56. docs/module-FriendlyError.html +139 -0
  57. docs/module-Geocoder.html +139 -0
  58. docs/module-GoogleCircle.html +139 -0
  59. docs/module-GoogleGeocoder.html +139 -0
  60. docs/module-GoogleInfoWindow.html +139 -0
  61. docs/module-GoogleMap.html +139 -0
  62. docs/module-GoogleMarker.html +139 -0
  63. docs/module-GoogleModernStoreLocator.html +139 -0
  64. docs/module-GoogleModernStoreLocatorCircle.html +139 -0
  65. docs/module-GooglePolygon.html +139 -0
  66. docs/module-GooglePolyline.html +139 -0
  67. docs/module-GoogleVertexContextMenu.html +139 -0
  68. docs/module-InfoWindow.html +139 -0
  69. docs/module-LatLng.html +507 -0
  70. docs/module-LatLngBounds.html +139 -0
  71. docs/module-Map.html +139 -0
  72. docs/module-MapObject.html +139 -0
  73. docs/module-MapSettings.html +139 -0
  74. docs/module-MapsEngineDialog.html +139 -0
  75. docs/module-Marker.html +139 -0
  76. docs/module-ModernStoreLocator.html +139 -0
  77. docs/module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html +661 -0
  78. docs/module-ModernStoreLocatorCircle.html +139 -0
  79. docs/module-OLCircle.html +139 -0
  80. docs/module-OLGeocoder-OLGeocoder.html +305 -0
  81. docs/module-OLGeocoder.html +2827 -0
  82. docs/module-OLInfoWindow.html +139 -0
  83. docs/module-OLMap.html +139 -0
  84. docs/module-OLMarker.html +139 -0
  85. docs/module-OLModernStoreLocator.html +139 -0
  86. docs/module-OLModernStoreLocatorCircle.html +139 -0
  87. docs/module-OLPolygon.html +139 -0
  88. docs/module-OLPolyline.html +139 -0
  89. docs/module-Polygon.html +139 -0
  90. docs/module-Polyline.html +139 -0
  91. docs/module-WPGMZA.html +7287 -0
  92. docs/open-layers_ol-circle.js.html +135 -0
  93. docs/open-layers_ol-geocoder.js.html +204 -0
  94. docs/open-layers_ol-info-window.js.html +133 -0
  95. docs/open-layers_ol-map.js.html +457 -0
  96. docs/open-layers_ol-marker.js.html +227 -0
  97. docs/open-layers_ol-modern-store-locator-circle.js.html +159 -0
  98. docs/open-layers_ol-modern-store-locator.js.html +75 -0
  99. docs/open-layers_ol-polygon.js.html +165 -0
  100. docs/open-layers_ol-polyline.js.html +178 -0
  101. docs/polygon.js.html +111 -0
  102. docs/polyline.js.html +106 -0
  103. docs/scripts/linenumber.js +25 -0
  104. docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  105. docs/scripts/prettify/lang-css.js +2 -0
  106. docs/scripts/prettify/prettify.js +28 -0
  107. docs/styles/jsdoc-default.css +354 -0
  108. docs/styles/prettify-jsdoc.css +111 -0
  109. docs/styles/prettify-tomorrow.css +132 -0
  110. docs/wp-google-maps.combined.js.html +5495 -0
  111. html/gdpr-default-notice.html.php +15 -0
  112. includes/build.log +271 -233
  113. includes/class.auto-loader.php +1 -0
  114. includes/class.crud.php +1 -1
  115. includes/class.global-settings.php +119 -47
  116. includes/class.google-maps-api-loader.php +16 -17
  117. includes/class.marker-filter.php +147 -15
  118. includes/class.marker.php +6 -0
  119. includes/class.plugin.php +54 -79
  120. includes/class.query-fragment.php +48 -0
  121. includes/class.query.php +187 -0
  122. includes/class.rest-api.php +107 -11
  123. includes/class.script-loader.php +11 -10
  124. includes/class.strings.php +1 -0
  125. includes/compat/backwards_compat_v6.php +2 -1
  126. includes/open-layers/class.ol-loader.php +1 -2
  127. includes/tables/class.admin-marker-datatable.php +106 -0
  128. includes/tables/class.ajax-table.php +319 -0
  129. includes/tables/class.datatable.php +98 -0
  130. includes/tables/class.marker-datatable.php +23 -0
  131. includes/tables/class.table.php +58 -0
  132. js/admin-basic.js +127 -124
  133. js/v8/3rd-party-integration/gutenberg/dist/gutenberg.js +178 -178
  134. js/v8/core.js +3 -0
  135. js/v8/distance.js +2 -0
  136. js/v8/google-api-error-handler.js +4 -0
  137. js/v8/google-maps/google-map.js +8 -3
  138. js/v8/google-maps/google-marker.js +1 -1
  139. js/v8/google-maps/google-modern-store-locator.js +6 -9
  140. js/v8/google-maps/google-text-overlay.js +22 -0
  141. js/v8/google-maps/google-text.js +15 -0
  142. js/v8/latlng.js +47 -0
  143. js/v8/map-settings.js +32 -20
  144. js/v8/map.js +25 -19
  145. js/v8/maps-engine-dialog.js +1 -1
  146. js/v8/marker-filter.js +45 -0
  147. js/v8/modern-store-locator.js +2 -1
  148. js/v8/open-layers/ol-geocoder.js +9 -8
  149. js/v8/open-layers/ol-map.js +6 -4
  150. js/v8/open-layers/ol-marker.js +4 -2
  151. js/v8/open-layers/ol-text.js +13 -0
  152. js/v8/popout-panel.js +1 -1
  153. js/v8/rest-api.js +7 -0
  154. js/v8/scripts.json +56 -0
  155. js/v8/store-locator.js +66 -0
  156. js/v8/tables/admin-marker-datatable.js +75 -0
  157. js/v8/tables/datatable.js +90 -0
  158. js/v8/text.js +29 -0
  159. js/v8/wp-google-maps.combined.js +707 -247
  160. js/v8/wp-google-maps.min.js +1 -1
  161. js/wpgmaps-admin-core.js +43 -106
  162. js/wpgmaps_tabs.js +12 -12
  163. legacy-core.php +8298 -0
  164. lib/codecabin/class.settings.php +120 -0
  165. lib/ol.css.map +1 -0
  166. lib/ol.js.map +1 -0
  167. readme.txt +20 -0
  168. wpGoogleMaps.php +81 -8268
cache/index.html ADDED
File without changes
constants.php ADDED
@@ -0,0 +1,17 @@
1
+ <?php
2
+
3
+ global $wpdb;
4
+
5
+ global $WPGMZA_TABLE_NAME_MARKERS;
6
+ global $WPGMZA_TABLE_NAME_MAPS;
7
+ global $WPGMZA_TABLE_NAME_POLYGONS;
8
+ global $WPGMZA_TABLE_NAME_POLYLINES;
9
+ global $WPGMZA_TABLE_NAME_CIRCLES;
10
+ global $WPGMZA_TABLE_NAME_RECTANGLES;
11
+
12
+ $WPGMZA_TABLE_NAME_MARKERS = $wpdb->prefix . 'wpgmza';
13
+ $WPGMZA_TABLE_NAME_MAPS = $wpdb->prefix . 'wpgmza_maps';
14
+ $WPGMZA_TABLE_NAME_POLYGONS = $wpdb->prefix . 'wpgmza_polygon';
15
+ $WPGMZA_TABLE_NAME_POLYLINES = $wpdb->prefix . 'wpgmza_polylines';
16
+ $WPGMZA_TABLE_NAME_CIRCLES = $wpdb->prefix . 'wpgmza_circles';
17
+ $WPGMZA_TABLE_NAME_RECTANGLES = $wpdb->prefix . 'wpgmza_rectangles';
css/open-layers.css CHANGED
@@ -53,14 +53,14 @@
53
54
.ol-marker
55
{
56
- /* position: relative; */
57
}
58
59
.ol-marker>img
60
{
61
- position: absolute;
62
bottom: 0px;
63
- transform: translateX(-50%);
64
max-width: none;
65
z-index: 2;
66
}
53
54
.ol-marker
55
{
56
+ position: relative;
57
}
58
59
.ol-marker>img
60
{
61
+ /*position: absolute;
62
bottom: 0px;
63
+ transform: translateX(-50%);*/
64
max-width: none;
65
z-index: 2;
66
}
css/wp-google-maps-admin.css CHANGED
@@ -566,4 +566,9 @@ input.cmn-toggle-yes-no:checked + label:after {
566
{
567
font-weight: bold;
568
padding-right: 0.3em;
569
}
566
{
567
font-weight: bold;
568
padding-right: 0.3em;
569
+ }
570
+
571
+ [aria-controls="wpgmza-gdpr-compliance"]
572
+ {
573
+ margin-left: 3px;
574
}
docs/circle.js.html ADDED
@@ -0,0 +1,163 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: circle.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: circle.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>/**
30
+ * @namespace WPGMZA
31
+ * @module Circle
32
+ * @requires WPGMZA.MapObject
33
+ */
34
+ (function($) {
35
+
36
+ var Parent = WPGMZA.MapObject;
37
+
38
+ /**
39
+ * @class Circle
40
+ * @summary Represents a generic circle. &lt;b>Please do not instantiate this object directly, use createInstance&lt;/b>
41
+ * @return {WPGMZA.Circle}
42
+ */
43
+ WPGMZA.Circle = function(options, engineCircle)
44
+ {
45
+ var self = this;
46
+
47
+ WPGMZA.assertInstanceOf(this, "Circle");
48
+
49
+ this.center = new WPGMZA.LatLng();
50
+ this.radius = 100;
51
+
52
+ Parent.apply(this, arguments);
53
+ }
54
+
55
+ WPGMZA.Circle.prototype = Object.create(Parent.prototype);
56
+ WPGMZA.Circle.prototype.constructor = WPGMZA.Circle;
57
+
58
+ /**
59
+ * @function createInstance
60
+ * @summary Creates an instance of a circle, &lt;b>please always use this function rather than calling the constructor directly&lt;/b>
61
+ * @param {object} options Options for the object (optional)
62
+ */
63
+ WPGMZA.Circle.createInstance = function(options)
64
+ {
65
+ var constructor;
66
+
67
+ if(WPGMZA.settings.engine == "google-maps")
68
+ constructor = WPGMZA.GoogleCircle;
69
+ else
70
+ constructor = WPGMZA.OLCircle;
71
+
72
+ return new constructor(options);
73
+ }
74
+
75
+ /**
76
+ * @function getCenter
77
+ * @returns {WPGMZA.LatLng}
78
+ */
79
+ WPGMZA.Circle.prototype.getCenter = function()
80
+ {
81
+ return this.center.clone();
82
+ }
83
+
84
+ /**
85
+ * @function setCenter
86
+ * @param {object|WPGMZA.LatLng} latLng either a literal or as a WPGMZA.LatLng
87
+ * @returns {void}
88
+ */
89
+ WPGMZA.Circle.prototype.setCenter = function(latLng)
90
+ {
91
+ this.center.lat = latLng.lat;
92
+ this.center.lng = latLng.lng;
93
+ }
94
+
95
+ /**
96
+ * @function getRadius
97
+ * @summary Returns the circles radius in kilometers
98
+ * @returns {WPGMZA.LatLng}
99
+ */
100
+ WPGMZA.Circle.prototype.getRadius = function()
101
+ {
102
+ return this.radius;
103
+ }
104
+
105
+ /**
106
+ * @function setRadius
107
+ * @param {number} The radius
108
+ * @returns {void}
109
+ */
110
+ WPGMZA.Circle.prototype.setRadius = function(radius)
111
+ {
112
+ this.radius = radius;
113
+ }
114
+
115
+ /**
116
+ * @function getMap
117
+ * @summary Returns the map that this circle is being displayed on
118
+ * @return {WPGMZA.Map}
119
+ */
120
+ WPGMZA.Circle.prototype.getMap = function()
121
+ {
122
+ return this.map;
123
+ }
124
+
125
+ /**
126
+ * @function setMap
127
+ * @param {WPGMZA.Map} The target map
128
+ * @summary Puts this circle on a map
129
+ * @return {void}
130
+ */
131
+ WPGMZA.Circle.prototype.setMap = function(map)
132
+ {
133
+ if(this.map)
134
+ this.map.removeCircle(this);
135
+
136
+ if(map)
137
+ map.addCircle(this);
138
+
139
+ }
140
+
141
+ })(jQuery);</code></pre>
142
+ </article>
143
+ </section>
144
+
145
+
146
+
147
+
148
+ </div>
149
+
150
+ <nav>
151
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Circle.html">Circle</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li></ul><h3>Classes</h3><ul><li><a href="module-Circle-Circle.html">Circle</a></li><li><a href="module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder</a></li></ul>
152
+ </nav>
153
+
154
+ <br class="clear">
155
+
156
+ <footer>
157
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed May 16 2018 13:18:38 GMT+0100 (GMT Daylight Time)
158
+ </footer>
159
+
160
+ <script> prettyPrint(); </script>
161
+ <script src="scripts/linenumber.js"> </script>
162
+ </body>
163
+ </html>
docs/core.js.html ADDED
@@ -0,0 +1,469 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: core.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: core.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>/**
30
+ * @module WPGMZA
31
+ * @summary This is the core Javascript module. Some code exists in ../core.js, the functionality there will slowly be handed over to this module.
32
+ */
33
+ (function($) {
34
+ var core = {
35
+ maps: [],
36
+ events: null,
37
+ settings: null,
38
+
39
+ loadingHTML: '&lt;div class="wpgmza-preloader">&lt;div class="wpgmza-loader">...&lt;/div>&lt;/div>',
40
+
41
+ /**
42
+ * @function guid
43
+ * @summary Utility function returns a GUID
44
+ * @static
45
+ * @return {string} The GUID
46
+ */
47
+ guid: function() { // Public Domain/MIT
48
+ var d = new Date().getTime();
49
+ if (typeof performance !== 'undefined' &amp;&amp; typeof performance.now === 'function'){
50
+ d += performance.now(); //use high-precision timer if available
51
+ }
52
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
53
+ var r = (d + Math.random() * 16) % 16 | 0;
54
+ d = Math.floor(d / 16);
55
+ return (c === 'x' ? r : (r &amp; 0x3 | 0x8)).toString(16);
56
+ });
57
+ },
58
+
59
+ /**
60
+ * @function hexOpacityToRGBA
61
+ * @summary Takes a hex string and opacity value and converts it to Openlayers RGBA format
62
+ * @param {string} colour The hex color string
63
+ * @param {number} opacity The opacity from 0.0 - 1.0
64
+ * @static
65
+ * @return {array} RGBA where color components are 0 - 255 and opacity is 0.0 - 1.0
66
+ */
67
+ hexOpacityToRGBA: function(colour, opacity)
68
+ {
69
+ hex = parseInt(colour.replace(/^#/, ""), 16);
70
+ return [
71
+ (hex &amp; 0xFF0000) >> 16,
72
+ (hex &amp; 0xFF00) >> 8,
73
+ hex &amp; 0xFF,
74
+ parseFloat(opacity)
75
+ ];
76
+ },
77
+
78
+ latLngRegexp: /^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)#x2F;,
79
+
80
+ /**
81
+ * @function isLatLngString
82
+ * @summary Utility function returns true is string is a latitude and longitude
83
+ * @param str {string} The string to attempt to parse as coordinates
84
+ * @static
85
+ * @return {array} the matched latitude and longitude or null if no match
86
+ */
87
+ isLatLngString: function(str)
88
+ {
89
+ if(typeof str != "string")
90
+ return null;
91
+
92
+ // Remove outer brackets
93
+ if(str.match(/^\(.+\)#x2F;))
94
+ str = str.replace(/^\(|\)#x2F;, "");
95
+
96
+ var m = str.match(WPGMZA.latLngRegexp);
97
+
98
+ if(!m)
99
+ return null;
100
+
101
+ return {
102
+ lat: parseFloat(m[1]),
103
+ lng: parseFloat(m[3])
104
+ };
105
+ },
106
+
107
+ /**
108
+ * @function stringToLatLng
109
+ * @summary Utility function returns a latLng literal given a valid latLng string
110
+ * @param str {string} The string to attempt to parse as coordinates
111
+ * @static
112
+ * @return {object} LatLng literal
113
+ */
114
+ stringToLatLng: function(str)
115
+ {
116
+ var result = WPGMZA.isLatLngString(str);
117
+
118
+ if(!result)
119
+ throw new Error("Not a valid latLng");
120
+
121
+ return result;
122
+ },
123
+
124
+ /**
125
+ * @function getImageDimensions
126
+ * @summary Utility function to get the dimensions of an image, caches results for best performance
127
+ * @param src {string} Image source URL
128
+ * @param callback {function} Callback to recieve image dimensions
129
+ * @static
130
+ * @return {void}
131
+ */
132
+ imageDimensionsCache: {},
133
+ getImageDimensions: function(src, callback)
134
+ {
135
+ if(WPGMZA.imageDimensionsCache[src])
136
+ {
137
+ callback(WPGMZA.imageDimensionsCache[src]);
138
+ return;
139
+ }
140
+
141
+ var img = document.createElement("img");
142
+ img.onload = function(event) {
143
+ var result = {
144
+ width: image.width,
145
+ height: image.height
146
+ };
147
+ WPGMZA.imageDimensionsCache[src] = result;
148
+ callback(result);
149
+ };
150
+ img.src = src;
151
+ },
152
+
153
+ /**
154
+ * @function isDeveloperMode
155
+ * @summary Returns true if developer mode is set
156
+ * @static
157
+ * @return {boolean} True if developer mode is on
158
+ */
159
+ isDeveloperMode: function()
160
+ {
161
+ return this.developer_mode || (window.Cookies &amp;&amp; window.Cookies.get("wpgmza-developer-mode"));
162
+ },
163
+
164
+ /**
165
+ * @function isProVersion
166
+ * @summary Returns true if the Pro add-on is active
167
+ * @static
168
+ * @return {boolean} True if the Pro add-on is active
169
+ */
170
+ isProVersion: function()
171
+ {
172
+ return (this._isProVersion == "1");
173
+ },
174
+
175
+ /**
176
+ * @function openMediaDialog
177
+ * @summary Opens the WP media dialog and returns the result to a callback
178
+ * @param {function} callback Callback to recieve the attachment ID as the first parameter and URL as the second
179
+ * @static
180
+ * @return {void}
181
+ */
182
+ openMediaDialog: function(callback) {
183
+ // Media upload
184
+ var file_frame;
185
+
186
+ // If the media frame already exists, reopen it.
187
+ if ( file_frame ) {
188
+ // Set the post ID to what we want
189
+ file_frame.uploader.uploader.param( 'post_id', set_to_post_id );
190
+ // Open frame
191
+ file_frame.open();
192
+ return;
193
+ }
194
+
195
+ // Create the media frame.
196
+ file_frame = wp.media.frames.file_frame = wp.media({
197
+ title: 'Select a image to upload',
198
+ button: {
199
+ text: 'Use this image',
200
+ },
201
+ multiple: false // Set to true to allow multiple files to be selected
202
+ });
203
+
204
+ // When an image is selected, run a callback.
205
+ file_frame.on( 'select', function() {
206
+ // We set multiple to false so only get one image from the uploader
207
+ attachment = file_frame.state().get('selection').first().toJSON();
208
+
209
+ callback(attachment.id, attachment.url);
210
+ });
211
+
212
+ // Finally, open the modal
213
+ file_frame.open();
214
+ },
215
+
216
+ /**
217
+ * @function getCurrentPosition
218
+ * @summary This function will get the users position, it first attempts to get
219
+ * high accuracy position (mobile with GPS sensors etc.), if that fails
220
+ * (desktops will time out) then it tries again without high accuracy
221
+ * enabled
222
+ * @static
223
+ * @return {object} The users position as a LatLng literal
224
+ */
225
+ getCurrentPosition: function(callback)
226
+ {
227
+ if(!navigator.geolocation)
228
+ {
229
+ console.warn("No geolocation available on this device");
230
+ return;
231
+ }
232
+
233
+ var options = {
234
+ enableHighAccuracy: true
235
+ };
236
+
237
+ navigator.geolocation.getCurrentPosition(function(position) {
238
+ callback(position);
239
+ },
240
+ function(error) {
241
+
242
+ options.enableHighAccuracy = false;
243
+
244
+ navigator.geolocation.getCurrentPosition(function(position) {
245
+ callback(position);
246
+ },
247
+ function(error) {
248
+ console.warn(error.code, error.message);
249
+ },
250
+ options);
251
+
252
+ },
253
+ options);
254
+ },
255
+
256
+ /**
257
+ * @function runCatchableTask
258
+ * @summary Runs a catchable task and displays a friendly error if the function throws an error
259
+ * @param {function} callback The function to run
260
+ * @param {HTMLElement} friendlyErrorContainer The container element to hold the error
261
+ * @static
262
+ * @return {void}
263
+ */
264
+ runCatchableTask: function(callback, friendlyErrorContainer) {
265
+
266
+ if(WPGMZA.isDeveloperMode())
267
+ callback();
268
+ else
269
+ try{
270
+ callback();
271
+ }catch(e) {
272
+ var friendlyError = new WPGMZA.FriendlyError(e);
273
+ $(friendlyErrorContainer).html("");
274
+ $(friendlyErrorContainer).append(friendlyError.element);
275
+ $(friendlyErrorContainer).show();
276
+ }
277
+ },
278
+
279
+ /**
280
+ * @function assertInstanceOf
281
+ * @summary
282
+ * This function is for checking inheritence has been setup correctly.
283
+ * For objects that have engine and Pro specific classes, it will automatically
284
+ * add the engine and pro prefix to the supplied string and if such an object
285
+ * exists it will test against that name rather than the un-prefix argument
286
+ * supplied.
287
+ *
288
+ * For example, if we are running the Pro addon with Google maps as the engine,
289
+ * if you supply Marker as the instance name the function will check to see
290
+ * if instance is an instance of GoogleProMarker
291
+ * @param {object} instance The object to check
292
+ * @param {string} instanceName The class name as a string which this object should be an instance of
293
+ * @static
294
+ * @return {void}
295
+ */
296
+ assertInstanceOf: function(instance, instanceName) {
297
+ var engine, fullInstanceName, assert;
298
+ var pro = WPGMZA.isProVersion() ? "Pro" : "";
299
+
300
+ switch(WPGMZA.settings.engine)
301
+ {
302
+ case "google-maps":
303
+ engine = "Google";
304
+ break;
305
+
306
+ default:
307
+ engine = "OL";
308
+ break;
309
+ }
310
+
311
+ if(WPGMZA[engine + pro + instanceName])
312
+ fullInstanceName = engine + pro + instanceName;
313
+ else if(WPGMZA[pro + instanceName])
314
+ fullInstanceName = pro + instanceName;
315
+ else if(WPGMZA[engine + instanceName])
316
+ fullInstanceName = engine + instanceName;
317
+ else
318
+ fullInstanceName = instanceName;
319
+
320
+ assert = instance instanceof WPGMZA[fullInstanceName];
321
+
322
+ if(!assert)
323
+ throw new Error("Object must be an instance of " + fullInstanceName + " (did you call a constructor directly, rather than createInstance?)");
324
+ },
325
+
326
+ /**
327
+ * @function getMapByID
328
+ * @param {mixed} id The ID of the map to retrieve
329
+ * @static
330
+ * @return {object} The map object, or null if no such map exists
331
+ */
332
+ getMapByID: function(id) {
333
+ for(var i = 0; i &lt; WPGMZA.maps.length; i++) {
334
+ if(WPGMZA.maps[i].id == id)
335
+ return WPGMZA.maps[i];
336
+ }
337
+
338
+ return null;
339
+ },
340
+
341
+ /**
342
+ * @function isGoogleAutocompleteSupported
343
+ * @summary Shorthand function to determine if the Places Autocomplete is available
344
+ * @static
345
+ * @return {boolean}
346
+ */
347
+ isGoogleAutocompleteSupported: function() {
348
+ return typeof google === 'object' &amp;&amp; typeof google.maps === 'object' &amp;&amp; typeof google.maps.places === 'object' &amp;&amp; typeof google.maps.places.Autocomplete === 'function';
349
+ }
350
+ };
351
+
352
+ if(window.WPGMZA)
353
+ window.WPGMZA = $.extend(window.WPGMZA, core);
354
+ else
355
+ window.WPGMZA = core;
356
+
357
+ for(var key in WPGMZA_localized_data)
358
+ {
359
+ var value = WPGMZA_localized_data[key];
360
+ WPGMZA[key] = value;
361
+ }
362
+
363
+ /*for(var key in WPGMZA_localized_data)
364
+ WPGMZA[key] = WPGMZA_localized_data[key];
365
+
366
+ $(document).ready(function(event) {
367
+ // Datatables to throw errors
368
+ if($.fn.dataTable)
369
+ $.fn.dataTable.ext.errMode = 'throw';
370
+
371
+ // Combined script warning
372
+ if($("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length)
373
+ console.warn("Minified script is out of date, using combined script instead.");
374
+
375
+ // Check for multiple jQuery versions
376
+ var elements = $("script").filter(function() {
377
+ return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i);
378
+ });
379
+
380
+ if(elements.length > 1)
381
+ console.warn("Multiple jQuery versions detected: ", elements);
382
+
383
+ // Disable map edit page preloader in developer more
384
+ if(WPGMZA.isDeveloperMode())
385
+ $("#wpgmza-map-edit-page form.wpgmza").show();
386
+
387
+ // Shortcode boxes
388
+ $(".wpgmza_copy_shortcode").on("click", function() {
389
+ var temp = $("&lt;input>");
390
+ var temp2 = $('&lt;div id="wpgmza_tmp" style="display: none;" width:100%; text-align:center;"/>');
391
+ $(document.body).append(temp);
392
+ temp.val($(this).val()).select();
393
+ document.execCommand("copy");
394
+ temp.remove();
395
+ $(this).after(temp2);
396
+ $(temp2).html(
397
+ $("[data-shortcode-copy-string]").attr("data-shortcode-copy-string")
398
+ );
399
+ $(temp2).fadeIn();
400
+ setTimeout(function() {
401
+ $(temp2).fadeOut();
402
+ }, 1000);
403
+ setTimeout(function() {
404
+ $(temp2).remove();
405
+ }, 1500);
406
+ });
407
+
408
+ // Fancy switches
409
+ // $("form.wpgmza .cmn-toggle").each(function(index, el) {
410
+ //
411
+ // $(el).wrap("&lt;div class='switch'/>");
412
+ // $(el).after("&lt;label for=""/>")
413
+ //
414
+ // });
415
+
416
+ $("form.wpgmza").on("click", ".switch label", function(event) {
417
+ var input = $(this).prev(".cmn-toggle");
418
+
419
+ if(input.prop("disabled"))
420
+ return;
421
+
422
+ var val = !input.prop("checked");
423
+
424
+ input.prop("checked", val);
425
+
426
+ if(val)
427
+ input.attr("checked", "checked");
428
+ else
429
+ input.removeAttr("checked");
430
+
431
+ input.trigger("change");
432
+ });
433
+
434
+ // Geolocation warnings
435
+ if(window.location.protocol != 'https:')
436
+ {
437
+ var warning = '&lt;span class="notice notice-warning">' + WPGMZA.localized_strings.unsecure_geolocation + "&lt;/span>";
438
+
439
+ $(".wpgmza-geolocation-setting").after(
440
+ $(warning)
441
+ );
442
+ }
443
+
444
+ // Switch off thanks for feedback message
445
+ document.cookie = "wpgmza_feedback_thanks=false; expires=Thu, 01 Jan 1970 00:00:01 GMT;";
446
+ });*/
447
+ })(jQuery);</code></pre>
448
+ </article>
449
+ </section>
450
+
451
+
452
+
453
+
454
+ </div>
455
+
456
+ <nav>
457
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Circle.html">Circle</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li></ul><h3>Classes</h3><ul><li><a href="module-Circle-Circle.html">Circle</a></li><li><a href="module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder</a></li></ul>
458
+ </nav>
459
+
460
+ <br class="clear">
461
+
462
+ <footer>
463
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed May 16 2018 13:18:38 GMT+0100 (GMT Daylight Time)
464
+ </footer>
465
+
466
+ <script> prettyPrint(); </script>
467
+ <script src="scripts/linenumber.js"> </script>
468
+ </body>
469
+ </html>
docs/distance.js.html ADDED
@@ -0,0 +1,104 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: distance.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: distance.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>/**
30
+ * @namespace WPGMZA
31
+ * @module Distance
32
+ * @requires WPGMZA
33
+ */
34
+ (function($) {
35
+
36
+ WPGMZA.Distance = {
37
+
38
+ MILES: true,
39
+ KILOMETERS: false,
40
+
41
+ MILES_PER_KILOMETER: 0.621371,
42
+ KILOMETERS_PER_MILE: 1.60934,
43
+
44
+ // TODO: Implement WPGMZA.settings.distance_units
45
+
46
+ /**
47
+ * Converts a UI distance (eg from a form control) to meters,
48
+ * accounting for the global units setting
49
+ */
50
+ uiToMeters: function(uiDistance)
51
+ {
52
+ return parseFloat(uiDistance) / (WPGMZA.settings.distance_units == WPGMZA.Distance.MILES ? WPGMZA.Distance.MILES_PER_KILOMETER : 1) * 1000;
53
+ },
54
+
55
+ /**
56
+ * Converts a UI distance (eg from a form control) to kilometers,
57
+ * accounting for the global units setting
58
+ */
59
+ uiToKilometers: function(uiDistance)
60
+ {
61
+ return WPGMZA.Distance.uiToMeters(uiDistance) * 0.001;
62
+ },
63
+
64
+ /**
65
+ * Converts a UI distance (eg from a form control) to miles,
66
+ * accounting for the global units setting
67
+ */
68
+ uiToMiles: function(uiDistance)
69
+ {
70
+ return WPGMZA.Distance.uiToKilometers(uiDistance) * WPGMZA.Distance.MILES_PER_KILOMETER;
71
+ },
72
+
73
+ kilometersToUI: function(km)
74
+ {
75
+ if(WPGMZA.settings.distance_units == WPGMZA.Distance.MILES)
76
+ return km * WPGMZA.Distance.MILES_PER_KILOMETER;
77
+ return km;
78
+ }
79
+
80
+ };
81
+
82
+ })(jQuery);</code></pre>
83
+ </article>
84
+ </section>
85
+
86
+
87
+
88
+
89
+ </div>
90
+
91
+ <nav>
92
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Circle.html">Circle</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li></ul><h3>Classes</h3><ul><li><a href="module-Circle-Circle.html">Circle</a></li><li><a href="module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder</a></li></ul>
93
+ </nav>
94
+
95
+ <br class="clear">
96
+
97
+ <footer>
98
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed May 16 2018 13:18:38 GMT+0100 (GMT Daylight Time)
99
+ </footer>
100
+
101
+ <script> prettyPrint(); </script>
102
+ <script src="scripts/linenumber.js"> </script>
103
+ </body>
104
+ </html>
docs/event-dispatcher.js.html ADDED
@@ -0,0 +1,184 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: event-dispatcher.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: event-dispatcher.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>/**
30
+ * @namespace WPGMZA
31
+ * @module EventDispatcher
32
+ * @requires WPGMZA
33
+ */
34
+ (function($) {
35
+
36
+ WPGMZA.EventDispatcher = function()
37
+ {
38
+ WPGMZA.assertInstanceOf(this, "EventDispatcher");
39
+
40
+ this._listenersByType = [];
41
+ }
42
+
43
+ WPGMZA.EventDispatcher.prototype.addEventListener = function(type, listener, thisObject, useCapture)
44
+ {
45
+ var arr;
46
+
47
+ var types = type.split(/\s+/);
48
+ if(types.length > 1)
49
+ {
50
+ for(var i = 0; i &lt; types.length; i++)
51
+ this.addEventListener(types[i], listener, thisObject, useCapture);
52
+
53
+ return;
54
+ }
55
+
56
+ if(!(listener instanceof Function))
57
+ throw new Error("Listener must be a function");
58
+
59
+ if(!(arr = this._listenersByType[type]))
60
+ arr = this._listenersByType[type] = [];
61
+
62
+ var obj = {
63
+ listener: listener,
64
+ thisObject: (thisObject ? thisObject : this),
65
+ useCapture: (useCapture ? true : false)
66
+ };
67
+
68
+ arr.push(obj);
69
+ }
70
+
71
+ WPGMZA.EventDispatcher.prototype.on = WPGMZA.EventDispatcher.prototype.addEventListener;
72
+
73
+ WPGMZA.EventDispatcher.prototype.removeEventListener = function(type, listener, thisObject, useCapture)
74
+ {
75
+ var arr, index, obj;
76
+
77
+ if(!(arr = this._listenersByType[type]))
78
+ return;
79
+
80
+ if(!thisObject)
81
+ thisObject = this;
82
+
83
+ useCapture = (useCapture ? true : false);
84
+
85
+ for(var i = 0; i &lt; arr.length; i++)
86
+ {
87
+ obj = arr[i];
88
+
89
+ if(obj.listener == listener &amp;&amp; obj.thisObject == thisObject &amp;&amp; obj.useCapture == useCapture)
90
+ {
91
+ arr.splice(i, 1);
92
+ return;
93
+ }
94
+ }
95
+ }
96
+
97
+ WPGMZA.EventDispatcher.prototype.off = WPGMZA.EventDispatcher.prototype.removeEventListener;
98
+
99
+ WPGMZA.EventDispatcher.prototype.hasEventListener = function(type)
100
+ {
101
+ return (_listenersByType[type] ? true : false);
102
+ }
103
+
104
+ WPGMZA.EventDispatcher.prototype.dispatchEvent = function(event)
105
+ {
106
+ if(!(event instanceof WPGMZA.Event))
107
+ {
108
+ if(typeof event == "string")
109
+ event = new WPGMZA.Event(event);
110
+ else
111
+ {
112
+ var src = event;
113
+ event = new WPGMZA.Event();
114
+ for(var name in src)
115
+ event[name] = src[name];
116
+ }
117
+ }
118
+
119
+ event.target = this;
120
+
121
+ var path = [];
122
+ for(var obj = this.parent; obj != null; obj = obj.parent)
123
+ path.unshift(obj);
124
+
125
+ event.phase = WPGMZA.Event.CAPTURING_PHASE;
126
+ for(var i = 0; i &lt; path.length &amp;&amp; !event._cancelled; i++)
127
+ path[i]._triggerListeners(event);
128
+
129
+ if(event._cancelled)
130
+ return;
131
+
132
+ event.phase = WPGMZA.Event.AT_TARGET;
133
+ this._triggerListeners(event);
134
+
135
+ event.phase = WPGMZA.Event.BUBBLING_PHASE;
136
+ for(i = path.length - 1; i >= 0 &amp;&amp; !event._cancelled; i--)
137
+ path[i]._triggerListeners(event);
138
+ }
139
+
140
+ WPGMZA.EventDispatcher.prototype.trigger = WPGMZA.EventDispatcher.prototype.dispatchEvent;
141
+
142
+ WPGMZA.EventDispatcher.prototype._triggerListeners = function(event)
143
+ {
144
+ var arr, obj;
145
+
146
+ if(!(arr = this._listenersByType[event.type]))
147
+ return;
148
+
149
+ for(var i = 0; i &lt; arr.length; i++)
150
+ {
151
+ obj = arr[i];
152
+
153
+ if(event.phase == WPGMZA.Event.CAPTURING_PHASE &amp;&amp; !obj.useCapture)
154
+ continue;
155
+
156
+ obj.listener.call(arr[i].thisObject, event);
157
+ }
158
+ }
159
+
160
+ WPGMZA.events = new WPGMZA.EventDispatcher();
161
+
162
+ })(jQuery);</code></pre>
163
+ </article>
164
+ </section>
165
+
166
+
167
+
168
+
169
+ </div>
170
+
171
+ <nav>
172
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Circle.html">Circle</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li></ul><h3>Classes</h3><ul><li><a href="module-Circle-Circle.html">Circle</a></li><li><a href="module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder</a></li></ul>
173
+ </nav>
174
+
175
+ <br class="clear">
176
+
177
+ <footer>
178
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed May 16 2018 13:18:38 GMT+0100 (GMT Daylight Time)
179
+ </footer>
180
+
181
+ <script> prettyPrint(); </script>
182
+ <script src="scripts/linenumber.js"> </script>
183
+ </body>
184
+ </html>
docs/event.js.html ADDED
@@ -0,0 +1,84 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Source: event.js</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"> </script>
8
+ <script src="scripts/prettify/lang-css.js"> </script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Source: event.js</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+ <article>
29
+ <pre class="prettyprint source linenums"><code>/**
30
+ * @namespace WPGMZA
31
+ * @module Event
32
+ * @requires WPGMZA
33
+ */
34
+ (function($) {
35
+
36
+ WPGMZA.Event = function(options)
37
+ {
38
+ if(typeof options == "string")
39
+ this.type = options;
40
+
41
+ this.bubbles = true;
42
+ this.cancelable = true;
43
+ this.phase = WPGMZA.Event.PHASE_CAPTURE;
44
+ this.target = null;
45
+
46
+ this._cancelled = false;
47
+
48
+ if(typeof options == "object")
49
+ for(var name in options)
50
+ this[name] = options[name];
51
+ }
52
+
53
+ WPGMZA.Event.CAPTURING_PHASE = 0;
54
+ WPGMZA.Event.AT_TARGET = 1;
55
+ WPGMZA.Event.BUBBLING_PHASE = 2;
56
+
57
+ WPGMZA.Event.prototype.stopPropagation = function()
58
+ {
59
+ this._cancelled = true;
60
+ }
61
+
62
+ })(jQuery);</code></pre>
63
+ </article>
64
+ </section>
65
+
66
+
67
+
68
+
69
+ </div>
70
+
71
+ <nav>
72
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Circle.html">Circle</a></li><li><a href="module-Distance.html">Distance</a></li><li><a href="module-Event.html">Event</a></li><li><a href="module-EventDispatcher.html">EventDispatcher</a></li><li><a href="module-FriendlyError.html">FriendlyError</a></li><li><a href="module-Geocoder.html">Geocoder</a></li><li><a href="module-GoogleCircle.html">GoogleCircle</a></li><li><a href="module-GoogleGeocoder.html">GoogleGeocoder</a></li><li><a href="module-GoogleInfoWindow.html">GoogleInfoWindow</a></li><li><a href="module-GoogleMap.html">GoogleMap</a></li><li><a href="module-GoogleMarker.html">GoogleMarker</a></li><li><a href="module-GoogleModernStoreLocator.html">GoogleModernStoreLocator</a></li><li><a href="module-GoogleModernStoreLocatorCircle.html">GoogleModernStoreLocatorCircle</a></li><li><a href="module-GooglePolygon.html">GooglePolygon</a></li><li><a href="module-GooglePolyline.html">GooglePolyline</a></li><li><a href="module-GoogleVertexContextMenu.html">GoogleVertexContextMenu</a></li><li><a href="module-InfoWindow.html">InfoWindow</a></li><li><a href="module-LatLng.html">LatLng</a></li><li><a href="module-LatLngBounds.html">LatLngBounds</a></li><li><a href="module-Map.html">Map</a></li><li><a href="module-MapObject.html">MapObject</a></li><li><a href="module-MapsEngineDialog.html">MapsEngineDialog</a></li><li><a href="module-MapSettings.html">MapSettings</a></li><li><a href="module-Marker.html">Marker</a></li><li><a href="module-ModernStoreLocator.html">ModernStoreLocator</a></li><li><a href="module-ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLCircle.html">OLCircle</a></li><li><a href="module-OLGeocoder.html">OLGeocoder</a></li><li><a href="module-OLInfoWindow.html">OLInfoWindow</a></li><li><a href="module-OLMap.html">OLMap</a></li><li><a href="module-OLMarker.html">OLMarker</a></li><li><a href="module-OLModernStoreLocator.html">OLModernStoreLocator</a></li><li><a href="module-OLModernStoreLocatorCircle.html">OLModernStoreLocatorCircle</a></li><li><a href="module-OLPolygon.html">OLPolygon</a></li><li><a href="module-OLPolyline.html">OLPolyline</a></li><li><a href="module-Polygon.html">Polygon</a></li><li><a href="module-Polyline.html">Polyline</a></li><li><a href="module-WPGMZA.html">WPGMZA</a></li></ul><h3>Classes</h3><ul><li><a href="module-Circle-Circle.html">Circle</a></li><li><a href="module-ModernStoreLocatorCircle-WPGMZA.ModernStoreLocatorCircle.html">ModernStoreLocatorCircle</a></li><li><a href="module-OLGeocoder-OLGeocoder.html">OLGeocoder</a></li></ul>
73
+ </nav>
74
+
75
+ <br class="clear">
76
+
77
+ <footer>
78
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed May 16 2018 13:18:38 GMT+0100 (GMT Daylight Time)
79
+ </footer>
80
+
81
+ <script> prettyPrint(); </script>
82
+ <script src="scripts/linenumber.js"> </script>
83
+ </body>
84
+ </html>
docs/fonts/OpenSans-Bold-webfont.eot ADDED
Binary file
docs/fonts/OpenSans-Bold-webfont.svg ADDED
@@ -0,0 +1,1830 @@