@inlog/inlog-maps 5.0.6 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/DOCUMENTATION.md +19 -2
  2. package/_bundles/inlog-maps.js +2 -7239
  3. package/_bundles/inlog-maps.js.LICENSE.txt +20 -0
  4. package/_bundles/inlog-maps.js.map +1 -1
  5. package/_bundles/inlog-maps.min.js +2 -1
  6. package/_bundles/inlog-maps.min.js.LICENSE.txt +20 -0
  7. package/_bundles/inlog-maps.min.js.map +1 -1
  8. package/lib/index.js +46 -46
  9. package/lib/index.js.map +1 -1
  10. package/lib/map.js +1136 -1010
  11. package/lib/map.js.map +1 -1
  12. package/lib/models/apis/google/google-circles.js +133 -130
  13. package/lib/models/apis/google/google-circles.js.map +1 -1
  14. package/lib/models/apis/google/google-geojson.js +72 -71
  15. package/lib/models/apis/google/google-geojson.js.map +1 -1
  16. package/lib/models/apis/google/google-map.js +173 -90
  17. package/lib/models/apis/google/google-map.js.map +1 -1
  18. package/lib/models/apis/google/google-markers.js +324 -290
  19. package/lib/models/apis/google/google-markers.js.map +1 -1
  20. package/lib/models/apis/google/google-overlay.js +101 -96
  21. package/lib/models/apis/google/google-overlay.js.map +1 -1
  22. package/lib/models/apis/google/google-polygons.js +300 -227
  23. package/lib/models/apis/google/google-polygons.js.map +1 -1
  24. package/lib/models/apis/google/google-polylines.js +706 -596
  25. package/lib/models/apis/google/google-polylines.js.map +1 -1
  26. package/lib/models/apis/google/google-popup.js +58 -60
  27. package/lib/models/apis/google/google-popup.js.map +1 -1
  28. package/lib/models/apis/googleMaps.js +448 -354
  29. package/lib/models/apis/googleMaps.js.map +1 -1
  30. package/lib/models/apis/leaflet/leaflet-circle.js +162 -134
  31. package/lib/models/apis/leaflet/leaflet-circle.js.map +1 -1
  32. package/lib/models/apis/leaflet/leaflet-geojson.js +72 -68
  33. package/lib/models/apis/leaflet/leaflet-geojson.js.map +1 -1
  34. package/lib/models/apis/leaflet/leaflet-map.js +139 -85
  35. package/lib/models/apis/leaflet/leaflet-map.js.map +1 -1
  36. package/lib/models/apis/leaflet/leaflet-markers.js +293 -259
  37. package/lib/models/apis/leaflet/leaflet-markers.js.map +1 -1
  38. package/lib/models/apis/leaflet/leaflet-overlay.js +34 -36
  39. package/lib/models/apis/leaflet/leaflet-overlay.js.map +1 -1
  40. package/lib/models/apis/leaflet/leaflet-polygons.js +210 -212
  41. package/lib/models/apis/leaflet/leaflet-polygons.js.map +1 -1
  42. package/lib/models/apis/leaflet/leaflet-polylines.js +705 -590
  43. package/lib/models/apis/leaflet/leaflet-polylines.js.map +1 -1
  44. package/lib/models/apis/leaflet/leaflet-popup.js +73 -75
  45. package/lib/models/apis/leaflet/leaflet-popup.js.map +1 -1
  46. package/lib/models/apis/leaflet.js +463 -360
  47. package/lib/models/apis/leaflet.js.map +1 -1
  48. package/lib/models/apis/mapFunctions.js +1 -2
  49. package/lib/models/dto/event-type.js +38 -40
  50. package/lib/models/dto/event-type.js.map +1 -1
  51. package/lib/models/dto/map-type.js +5 -7
  52. package/lib/models/dto/map-type.js.map +1 -1
  53. package/lib/models/dto/polyline-type.js +6 -8
  54. package/lib/models/dto/polyline-type.js.map +1 -1
  55. package/lib/models/features/circle/circle-alter-options.js +13 -15
  56. package/lib/models/features/circle/circle-alter-options.js.map +1 -1
  57. package/lib/models/features/circle/circle-options.js +18 -20
  58. package/lib/models/features/circle/circle-options.js.map +1 -1
  59. package/lib/models/features/events/event-return.js +7 -9
  60. package/lib/models/features/events/event-return.js.map +1 -1
  61. package/lib/models/features/geojson/geojson-options.js +8 -10
  62. package/lib/models/features/geojson/geojson-options.js.map +1 -1
  63. package/lib/models/features/marker/circle-marker-options.js +11 -13
  64. package/lib/models/features/marker/circle-marker-options.js.map +1 -1
  65. package/lib/models/features/marker/circle-marker-style.js +11 -13
  66. package/lib/models/features/marker/circle-marker-style.js.map +1 -1
  67. package/lib/models/features/marker/marker-alter-options.js +9 -11
  68. package/lib/models/features/marker/marker-alter-options.js.map +1 -1
  69. package/lib/models/features/marker/marker-icon.js +9 -11
  70. package/lib/models/features/marker/marker-icon.js.map +1 -1
  71. package/lib/models/features/marker/marker-options.js +17 -19
  72. package/lib/models/features/marker/marker-options.js.map +1 -1
  73. package/lib/models/features/marker-clusterer/marker-clusterer-config.js +9 -11
  74. package/lib/models/features/marker-clusterer/marker-clusterer-config.js.map +1 -1
  75. package/lib/models/features/overlay/overlay-options.js +14 -16
  76. package/lib/models/features/overlay/overlay-options.js.map +1 -1
  77. package/lib/models/features/polygons/polygon-alter-options.js +13 -14
  78. package/lib/models/features/polygons/polygon-alter-options.js.map +1 -1
  79. package/lib/models/features/polygons/polygon-options.js +18 -19
  80. package/lib/models/features/polygons/polygon-options.js.map +1 -1
  81. package/lib/models/features/polyline/navigations-options.js +15 -15
  82. package/lib/models/features/polyline/navigations-options.js.map +1 -1
  83. package/lib/models/features/polyline/polyline-options.js +19 -21
  84. package/lib/models/features/polyline/polyline-options.js.map +1 -1
  85. package/lib/models/features/popup/popup-options.js +12 -14
  86. package/lib/models/features/popup/popup-options.js.map +1 -1
  87. package/lib/utils/maps-api-loader.service.js +88 -77
  88. package/lib/utils/maps-api-loader.service.js.map +1 -1
  89. package/lib/utils/url-builder.js +43 -45
  90. package/lib/utils/url-builder.js.map +1 -1
  91. package/lib-esm/index.js +46 -45
  92. package/lib-esm/index.js.map +1 -1
  93. package/lib-esm/map.js +1136 -1008
  94. package/lib-esm/map.js.map +1 -1
  95. package/lib-esm/models/apis/google/google-circles.js +133 -128
  96. package/lib-esm/models/apis/google/google-circles.js.map +1 -1
  97. package/lib-esm/models/apis/google/google-geojson.js +72 -69
  98. package/lib-esm/models/apis/google/google-geojson.js.map +1 -1
  99. package/lib-esm/models/apis/google/google-map.js +173 -88
  100. package/lib-esm/models/apis/google/google-map.js.map +1 -1
  101. package/lib-esm/models/apis/google/google-markers.js +324 -288
  102. package/lib-esm/models/apis/google/google-markers.js.map +1 -1
  103. package/lib-esm/models/apis/google/google-overlay.js +101 -94
  104. package/lib-esm/models/apis/google/google-overlay.js.map +1 -1
  105. package/lib-esm/models/apis/google/google-polygons.js +300 -225
  106. package/lib-esm/models/apis/google/google-polygons.js.map +1 -1
  107. package/lib-esm/models/apis/google/google-polylines.js +706 -594
  108. package/lib-esm/models/apis/google/google-polylines.js.map +1 -1
  109. package/lib-esm/models/apis/google/google-popup.js +58 -58
  110. package/lib-esm/models/apis/google/google-popup.js.map +1 -1
  111. package/lib-esm/models/apis/googleMaps.js +448 -352
  112. package/lib-esm/models/apis/googleMaps.js.map +1 -1
  113. package/lib-esm/models/apis/leaflet/leaflet-circle.js +162 -132
  114. package/lib-esm/models/apis/leaflet/leaflet-circle.js.map +1 -1
  115. package/lib-esm/models/apis/leaflet/leaflet-geojson.js +72 -66
  116. package/lib-esm/models/apis/leaflet/leaflet-geojson.js.map +1 -1
  117. package/lib-esm/models/apis/leaflet/leaflet-map.js +139 -83
  118. package/lib-esm/models/apis/leaflet/leaflet-map.js.map +1 -1
  119. package/lib-esm/models/apis/leaflet/leaflet-markers.js +293 -257
  120. package/lib-esm/models/apis/leaflet/leaflet-markers.js.map +1 -1
  121. package/lib-esm/models/apis/leaflet/leaflet-overlay.js +34 -34
  122. package/lib-esm/models/apis/leaflet/leaflet-overlay.js.map +1 -1
  123. package/lib-esm/models/apis/leaflet/leaflet-polygons.js +210 -210
  124. package/lib-esm/models/apis/leaflet/leaflet-polygons.js.map +1 -1
  125. package/lib-esm/models/apis/leaflet/leaflet-polylines.js +705 -588
  126. package/lib-esm/models/apis/leaflet/leaflet-polylines.js.map +1 -1
  127. package/lib-esm/models/apis/leaflet/leaflet-popup.js +73 -73
  128. package/lib-esm/models/apis/leaflet/leaflet-popup.js.map +1 -1
  129. package/lib-esm/models/apis/leaflet.js +463 -358
  130. package/lib-esm/models/apis/leaflet.js.map +1 -1
  131. package/lib-esm/models/apis/mapFunctions.js +1 -0
  132. package/lib-esm/models/dto/event-type.js +38 -38
  133. package/lib-esm/models/dto/map-type.js +5 -5
  134. package/lib-esm/models/dto/polyline-type.js +6 -6
  135. package/lib-esm/models/features/circle/circle-alter-options.js +13 -13
  136. package/lib-esm/models/features/circle/circle-options.js +18 -18
  137. package/lib-esm/models/features/events/event-return.js +7 -7
  138. package/lib-esm/models/features/geojson/geojson-options.js +8 -8
  139. package/lib-esm/models/features/marker/circle-marker-options.js +11 -11
  140. package/lib-esm/models/features/marker/circle-marker-style.js +11 -11
  141. package/lib-esm/models/features/marker/marker-alter-options.js +9 -9
  142. package/lib-esm/models/features/marker/marker-icon.js +9 -9
  143. package/lib-esm/models/features/marker/marker-options.js +17 -17
  144. package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.js +9 -9
  145. package/lib-esm/models/features/overlay/overlay-options.js +14 -14
  146. package/lib-esm/models/features/polygons/polygon-alter-options.js +13 -12
  147. package/lib-esm/models/features/polygons/polygon-alter-options.js.map +1 -1
  148. package/lib-esm/models/features/polygons/polygon-options.js +18 -17
  149. package/lib-esm/models/features/polygons/polygon-options.js.map +1 -1
  150. package/lib-esm/models/features/polyline/navigations-options.js +15 -13
  151. package/lib-esm/models/features/polyline/navigations-options.js.map +1 -1
  152. package/lib-esm/models/features/polyline/polyline-options.js +19 -19
  153. package/lib-esm/models/features/polyline/polyline-options.js.map +1 -1
  154. package/lib-esm/models/features/popup/popup-options.js +12 -12
  155. package/lib-esm/utils/maps-api-loader.service.js +88 -75
  156. package/lib-esm/utils/maps-api-loader.service.js.map +1 -1
  157. package/lib-esm/utils/url-builder.js +43 -43
  158. package/lib-esm/utils/url-builder.js.map +1 -1
  159. package/package.json +67 -63
  160. package/lib/index.d.ts +0 -46
  161. package/lib/map.d.ts +0 -513
  162. package/lib/models/apis/google/google-circles.d.ts +0 -18
  163. package/lib/models/apis/google/google-geojson.d.ts +0 -9
  164. package/lib/models/apis/google/google-map.d.ts +0 -15
  165. package/lib/models/apis/google/google-markers.d.ts +0 -29
  166. package/lib/models/apis/google/google-overlay.d.ts +0 -11
  167. package/lib/models/apis/google/google-polygons.d.ts +0 -29
  168. package/lib/models/apis/google/google-polylines.d.ts +0 -55
  169. package/lib/models/apis/google/google-popup.d.ts +0 -10
  170. package/lib/models/apis/googleMaps.d.ts +0 -95
  171. package/lib/models/apis/leaflet/leaflet-circle.d.ts +0 -18
  172. package/lib/models/apis/leaflet/leaflet-geojson.d.ts +0 -9
  173. package/lib/models/apis/leaflet/leaflet-map.d.ts +0 -15
  174. package/lib/models/apis/leaflet/leaflet-markers.d.ts +0 -29
  175. package/lib/models/apis/leaflet/leaflet-overlay.d.ts +0 -10
  176. package/lib/models/apis/leaflet/leaflet-polygons.d.ts +0 -23
  177. package/lib/models/apis/leaflet/leaflet-polylines.d.ts +0 -54
  178. package/lib/models/apis/leaflet/leaflet-popup.d.ts +0 -11
  179. package/lib/models/apis/leaflet.d.ts +0 -97
  180. package/lib/models/apis/mapFunctions.d.ts +0 -84
  181. package/lib/models/dto/event-type.d.ts +0 -33
  182. package/lib/models/dto/map-type.d.ts +0 -4
  183. package/lib/models/dto/polyline-type.d.ts +0 -5
  184. package/lib/models/features/circle/circle-alter-options.d.ts +0 -12
  185. package/lib/models/features/circle/circle-options.d.ts +0 -15
  186. package/lib/models/features/events/event-return.d.ts +0 -4
  187. package/lib/models/features/geojson/geojson-options.d.ts +0 -5
  188. package/lib/models/features/marker/circle-marker-options.d.ts +0 -9
  189. package/lib/models/features/marker/circle-marker-style.d.ts +0 -8
  190. package/lib/models/features/marker/marker-alter-options.d.ts +0 -8
  191. package/lib/models/features/marker/marker-icon.d.ts +0 -6
  192. package/lib/models/features/marker/marker-options.d.ts +0 -11
  193. package/lib/models/features/marker-clusterer/marker-clusterer-config.d.ts +0 -6
  194. package/lib/models/features/overlay/overlay-options.d.ts +0 -11
  195. package/lib/models/features/polygons/polygon-alter-options.d.ts +0 -13
  196. package/lib/models/features/polygons/polygon-options.d.ts +0 -15
  197. package/lib/models/features/polyline/navigations-options.d.ts +0 -11
  198. package/lib/models/features/polyline/polyline-options.d.ts +0 -18
  199. package/lib/models/features/popup/popup-options.d.ts +0 -9
  200. package/lib/utils/maps-api-loader.service.d.ts +0 -9
  201. package/lib/utils/url-builder.d.ts +0 -11
  202. package/lib-esm/index.d.ts +0 -46
  203. package/lib-esm/map.d.ts +0 -513
  204. package/lib-esm/models/apis/google/google-circles.d.ts +0 -18
  205. package/lib-esm/models/apis/google/google-geojson.d.ts +0 -9
  206. package/lib-esm/models/apis/google/google-map.d.ts +0 -15
  207. package/lib-esm/models/apis/google/google-markers.d.ts +0 -29
  208. package/lib-esm/models/apis/google/google-overlay.d.ts +0 -11
  209. package/lib-esm/models/apis/google/google-polygons.d.ts +0 -29
  210. package/lib-esm/models/apis/google/google-polylines.d.ts +0 -55
  211. package/lib-esm/models/apis/google/google-popup.d.ts +0 -10
  212. package/lib-esm/models/apis/googleMaps.d.ts +0 -95
  213. package/lib-esm/models/apis/leaflet/leaflet-circle.d.ts +0 -18
  214. package/lib-esm/models/apis/leaflet/leaflet-geojson.d.ts +0 -9
  215. package/lib-esm/models/apis/leaflet/leaflet-map.d.ts +0 -15
  216. package/lib-esm/models/apis/leaflet/leaflet-markers.d.ts +0 -29
  217. package/lib-esm/models/apis/leaflet/leaflet-overlay.d.ts +0 -10
  218. package/lib-esm/models/apis/leaflet/leaflet-polygons.d.ts +0 -23
  219. package/lib-esm/models/apis/leaflet/leaflet-polylines.d.ts +0 -54
  220. package/lib-esm/models/apis/leaflet/leaflet-popup.d.ts +0 -11
  221. package/lib-esm/models/apis/leaflet.d.ts +0 -97
  222. package/lib-esm/models/apis/mapFunctions.d.ts +0 -84
  223. package/lib-esm/models/dto/event-type.d.ts +0 -33
  224. package/lib-esm/models/dto/map-type.d.ts +0 -4
  225. package/lib-esm/models/dto/polyline-type.d.ts +0 -5
  226. package/lib-esm/models/features/circle/circle-alter-options.d.ts +0 -12
  227. package/lib-esm/models/features/circle/circle-options.d.ts +0 -15
  228. package/lib-esm/models/features/events/event-return.d.ts +0 -4
  229. package/lib-esm/models/features/geojson/geojson-options.d.ts +0 -5
  230. package/lib-esm/models/features/marker/circle-marker-options.d.ts +0 -9
  231. package/lib-esm/models/features/marker/circle-marker-style.d.ts +0 -8
  232. package/lib-esm/models/features/marker/marker-alter-options.d.ts +0 -8
  233. package/lib-esm/models/features/marker/marker-icon.d.ts +0 -6
  234. package/lib-esm/models/features/marker/marker-options.d.ts +0 -11
  235. package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.d.ts +0 -6
  236. package/lib-esm/models/features/overlay/overlay-options.d.ts +0 -11
  237. package/lib-esm/models/features/polygons/polygon-alter-options.d.ts +0 -13
  238. package/lib-esm/models/features/polygons/polygon-options.d.ts +0 -15
  239. package/lib-esm/models/features/polyline/navigations-options.d.ts +0 -11
  240. package/lib-esm/models/features/polyline/polyline-options.d.ts +0 -18
  241. package/lib-esm/models/features/popup/popup-options.d.ts +0 -9
  242. package/lib-esm/utils/maps-api-loader.service.d.ts +0 -9
  243. package/lib-esm/utils/url-builder.d.ts +0 -11
@@ -1,353 +1,449 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- return new (P || (P = Promise))(function (resolve, reject) {
3
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
4
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
5
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
6
- step((generator = generator.apply(thisArg, _arguments || [])).next());
7
- });
8
- };
9
- var __generator = (this && this.__generator) || function (thisArg, body) {
10
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
11
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
- function verb(n) { return function (v) { return step([n, v]); }; }
13
- function step(op) {
14
- if (f) throw new TypeError("Generator is already executing.");
15
- while (_) try {
16
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
17
- if (y = 0, t) op = [op[0] & 2, t.value];
18
- switch (op[0]) {
19
- case 0: case 1: t = op; break;
20
- case 4: _.label++; return { value: op[1], done: false };
21
- case 5: _.label++; y = op[1]; op = [0]; continue;
22
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
23
- default:
24
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
25
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
26
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
27
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
28
- if (t[2]) _.ops.pop();
29
- _.trys.pop(); continue;
30
- }
31
- op = body.call(thisArg, _);
32
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
33
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
34
- }
35
- };
36
- import { MapsApiLoaderService } from '../../utils/maps-api-loader.service';
37
- import GoogleCircles from './google/google-circles';
38
- import GoogleGeoJson from './google/google-geojson';
39
- import GoogleMap from './google/google-map';
40
- import GoogleMarkers from './google/google-markers';
41
- import GoogleOverlays from './google/google-overlay';
42
- import GooglePolygons from './google/google-polygons';
43
- import GooglePolylines from './google/google-polylines';
44
- import GooglePopups from './google/google-popup';
45
- var GoogleMaps = /** @class */ (function () {
46
- function GoogleMaps() {
47
- this.mapsApiLoader = new MapsApiLoaderService();
48
- }
49
- GoogleMaps.prototype.initialize = function (mapType, params, elementId) {
50
- return __awaiter(this, void 0, void 0, function () {
51
- var api, google_1, options, key, imageMapTypes_1, ids_1, map_1, trafficLayer, err_1;
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0:
55
- _a.trys.push([0, 2, , 3]);
56
- return [4 /*yield*/, this.mapsApiLoader.loadApi(mapType, params)];
57
- case 1:
58
- api = _a.sent();
59
- google_1 = api;
60
- options = {
61
- center: new google_1.maps.LatLng(-14, -54),
62
- fullscreenControl: false,
63
- keyboardShortcuts: false,
64
- mapTypeControl: true,
65
- minZoom: 4,
66
- rotateControl: false,
67
- scaleControl: false,
68
- streetViewControl: false,
69
- zoom: 4,
70
- zoomControl: true
71
- };
72
- if (params.gestureHandling) {
73
- options.gestureHandling = 'cooperative';
74
- }
75
- else {
76
- options.gestureHandling = 'greedy';
77
- }
78
- if (params.options) {
79
- for (key in params.options) {
80
- if (params.options.hasOwnProperty(key)) {
81
- options[key] = params.options[key];
82
- }
83
- }
84
- }
85
- imageMapTypes_1 = [];
86
- if (params.mapTiles) {
87
- ids_1 = [google_1.maps.MapTypeId.ROADMAP, google_1.maps.MapTypeId.SATELLITE];
88
- params.mapTiles.forEach(function (tile) {
89
- ids_1.push(tile.name);
90
- var mapTypeOptions = {
91
- getTileUrl: function (coord, zoom) {
92
- return "https://tile.openstreetmap.org/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
93
- },
94
- isPng: true,
95
- maxZoom: 19,
96
- minZoom: 0,
97
- name: 'OpenStreetMap',
98
- tileSize: new google_1.maps.Size(256, 256),
99
- };
100
- for (var key in tile) {
101
- if (tile.hasOwnProperty(key)) {
102
- mapTypeOptions[key] = tile[key];
103
- }
104
- }
105
- var imageMapType = new google_1.maps.ImageMapType(mapTypeOptions);
106
- imageMapTypes_1.push({ id: tile.name, tile: imageMapType });
107
- });
108
- options.mapTypeControlOptions = {
109
- mapTypeIds: ids_1,
110
- style: google_1.maps.MapTypeControlStyle.HORIZONTAL_BAR
111
- };
112
- }
113
- map_1 = new google_1.maps.Map(document.getElementById(elementId), options);
114
- this.googleMarkers = new GoogleMarkers(map_1, google_1);
115
- this.googlePolygons = new GooglePolygons(map_1, google_1);
116
- this.googleCircles = new GoogleCircles(map_1, google_1);
117
- this.googlePopups = new GooglePopups(map_1, google_1);
118
- this.googlePolylines = new GooglePolylines(map_1, google_1, this.googlePopups);
119
- this.googleMap = new GoogleMap(map_1, google_1);
120
- this.googleOverlays = new GoogleOverlays(map_1, google_1, this.googlePolygons);
121
- this.googleGeoJson = new GoogleGeoJson(map_1, google_1);
122
- if (imageMapTypes_1 && imageMapTypes_1.length) {
123
- imageMapTypes_1.forEach(function (image) {
124
- map_1.mapTypes.set(image.id, image.tile);
125
- });
126
- }
127
- if (params.showTraffic) {
128
- trafficLayer = new google_1.maps.TrafficLayer();
129
- trafficLayer.setMap(map_1);
130
- }
131
- return [2 /*return*/, this];
132
- case 2:
133
- err_1 = _a.sent();
134
- return [2 /*return*/, err_1];
135
- case 3: return [2 /*return*/];
136
- }
137
- });
138
- });
139
- };
140
- /* GEOJson */
141
- GoogleMaps.prototype.loadGEOJson = function (data, options, eventClick) {
142
- this.googleGeoJson.loadGEOJson(data, options, eventClick);
143
- };
144
- /* Markers */
145
- GoogleMaps.prototype.drawMarker = function (options, eventClick) {
146
- return this.googleMarkers.drawMarker(options, eventClick);
147
- };
148
- GoogleMaps.prototype.drawCircleMarker = function (options, eventClick) {
149
- return this.googleMarkers.drawCircleMarker(options, eventClick);
150
- };
151
- GoogleMaps.prototype.toggleMarkers = function (markers, show, markerClusterer) {
152
- this.googleMarkers.toggleMarkers(markers, show, markerClusterer);
153
- };
154
- GoogleMaps.prototype.alterMarkerOptions = function (markers, options) {
155
- this.googleMarkers.alterMarkerOptions(markers, options);
156
- };
157
- GoogleMaps.prototype.alterMarkerPosition = function (markers, position, addTransition) {
158
- this.googleMarkers.alterMarkerPosition(markers, position, addTransition);
159
- };
160
- GoogleMaps.prototype.fitBoundsPositions = function (markers) {
161
- this.googleMarkers.fitBoundsPositions(markers);
162
- };
163
- GoogleMaps.prototype.isMarkerOnMap = function (marker) {
164
- return this.googleMarkers.isMarkerOnMap(marker);
165
- };
166
- GoogleMaps.prototype.setCenterMarker = function (marker) {
167
- this.googleMarkers.setCenterMarker(marker);
168
- };
169
- GoogleMaps.prototype.addMarkerEvent = function (markers, eventType, eventFunction) {
170
- this.googleMarkers.addMarkerEvent(markers, eventType, eventFunction);
171
- };
172
- GoogleMaps.prototype.removeMarkerEvent = function (markers, event) {
173
- this.googleMarkers.removeMarkerEvent(markers, event);
174
- };
175
- /* Marker Clusterer */
176
- GoogleMaps.prototype.addMarkerClusterer = function (config) {
177
- return this.googleMarkers.addMarkerClusterer(config);
178
- };
179
- GoogleMaps.prototype.alterMarkerClustererConfig = function (markerClusterer, config) {
180
- this.googleMarkers.alterMarkerClustererConfig(markerClusterer, config);
181
- };
182
- GoogleMaps.prototype.refreshClusterer = function (markerClusterer) {
183
- this.googleMarkers.refreshClusterer(markerClusterer);
184
- };
185
- GoogleMaps.prototype.addMarkerOnClusterer = function (marker, markerClusterer) {
186
- this.googleMarkers.addMarkerOnClusterer(marker, markerClusterer);
187
- };
188
- GoogleMaps.prototype.removeMarkerFromClusterer = function (marker, markerClusterer) {
189
- this.googleMarkers.removeMarkerFromClusterer(marker, markerClusterer);
190
- };
191
- GoogleMaps.prototype.clearMarkersClusterer = function (markerClusterer) {
192
- this.googleMarkers.clearMarkersClusterer(markerClusterer);
193
- };
194
- GoogleMaps.prototype.countMarkersOnCluster = function (markerClusterer) {
195
- return this.googleMarkers.countMarkersOnCluster(markerClusterer);
196
- };
197
- /* Polygons */
198
- GoogleMaps.prototype.drawPolygon = function (options, eventClick) {
199
- return this.googlePolygons.drawPolygon(options, eventClick);
200
- };
201
- GoogleMaps.prototype.togglePolygons = function (polygons, show) {
202
- this.googlePolygons.togglePolygons(polygons, show);
203
- };
204
- GoogleMaps.prototype.alterPolygonOptions = function (polygons, options) {
205
- this.googlePolygons.alterPolygonOptions(polygons, options);
206
- };
207
- GoogleMaps.prototype.fitBoundsPolygons = function (polygons) {
208
- this.googlePolygons.fitBoundsPolygons(polygons);
209
- };
210
- GoogleMaps.prototype.setCenterPolygons = function (polygons) {
211
- this.googlePolygons.setCenterPolygons(polygons);
212
- };
213
- GoogleMaps.prototype.isPolygonOnMap = function (polygon) {
214
- return this.googlePolygons.isPolygonOnMap(polygon);
215
- };
216
- GoogleMaps.prototype.getPolygonPath = function (polygon) {
217
- return this.googlePolygons.getPolygonPath(polygon);
218
- };
219
- GoogleMaps.prototype.addPolygonEvent = function (polygons, eventType, eventFunction) {
220
- return this.googlePolygons.addPolygonEvent(polygons, eventType, eventFunction);
221
- };
222
- GoogleMaps.prototype.removePolygonEvent = function (polygons, event) {
223
- this.googlePolygons.removePolygonEvent(polygons, event);
224
- };
225
- /* Circles */
226
- GoogleMaps.prototype.drawCircle = function (options, eventClick) {
227
- return this.googleCircles.drawCircle(options, eventClick);
228
- };
229
- GoogleMaps.prototype.toggleCircles = function (circles, show) {
230
- this.googleCircles.toggleCircles(circles, show);
231
- };
232
- GoogleMaps.prototype.alterCircleOptions = function (circles, options) {
233
- this.googleCircles.alterCircleOptions(circles, options);
234
- };
235
- GoogleMaps.prototype.fitBoundsCircles = function (circles) {
236
- this.googleCircles.fitBoundsCircles(circles);
237
- };
238
- GoogleMaps.prototype.isCircleOnMap = function (circle) {
239
- return this.googleCircles.isCircleOnMap(circle);
240
- };
241
- GoogleMaps.prototype.getCircleCenter = function (circle) {
242
- return this.googleCircles.getCircleCenter(circle);
243
- };
244
- GoogleMaps.prototype.getCircleRadius = function (circle) {
245
- return this.googleCircles.getCircleRadius(circle);
246
- };
247
- GoogleMaps.prototype.addCircleEvent = function (circles, eventType, eventFunction) {
248
- this.googleCircles.addCircleEvent(circles, eventType, eventFunction);
249
- };
250
- GoogleMaps.prototype.removeCircleEvent = function (circles, event) {
251
- this.googleCircles.removeCircleEvent(circles, event);
252
- };
253
- /* Polylines */
254
- GoogleMaps.prototype.drawPolyline = function (options, eventClick) {
255
- return this.googlePolylines.drawPolyline(options, eventClick);
256
- };
257
- GoogleMaps.prototype.drawPolylineWithNavigation = function (options, eventClick) {
258
- return this.googlePolylines.drawPolylineWithNavigation(options, eventClick);
259
- };
260
- GoogleMaps.prototype.togglePolylines = function (polylines, show) {
261
- this.googlePolylines.togglePolylines(polylines, show);
262
- };
263
- GoogleMaps.prototype.alterPolylineOptions = function (polylines, options) {
264
- this.googlePolylines.alterPolylineOptions(polylines, options);
265
- };
266
- GoogleMaps.prototype.fitBoundsPolylines = function (polylines) {
267
- this.googlePolylines.fitBoundsPolylines(polylines);
268
- };
269
- GoogleMaps.prototype.isPolylineOnMap = function (polyline) {
270
- return this.googlePolylines.isPolylineOnMap(polyline);
271
- };
272
- GoogleMaps.prototype.addPolylinePath = function (polylines, position) {
273
- this.googlePolylines.addPolylinePath(polylines, position);
274
- };
275
- GoogleMaps.prototype.getPolylinePath = function (polyline) {
276
- return this.googlePolylines.getPolylinePath(polyline);
277
- };
278
- GoogleMaps.prototype.removePolylineHighlight = function () {
279
- this.googlePolylines.removePolylineHighlight();
280
- };
281
- GoogleMaps.prototype.addPolylineEvent = function (polylines, eventType, eventFunction) {
282
- this.googlePolylines.addPolylineEvent(polylines, eventType, eventFunction);
283
- };
284
- GoogleMaps.prototype.removePolylineEvent = function (polylines, event) {
285
- this.googlePolylines.removePolylineEvent(polylines, event);
286
- };
287
- GoogleMaps.prototype.setIndexPolylineHighlight = function (polyline, index) {
288
- this.googlePolylines.setIndexPolylineHighlight(polyline, index);
289
- };
290
- GoogleMaps.prototype.getObjectPolyline = function (polyline) {
291
- return this.googlePolylines.getObjectPolyline(polyline);
292
- };
293
- GoogleMaps.prototype.getObjectPolylineHighlight = function () {
294
- return this.googlePolylines.getObjectPolylineHighlight();
295
- };
296
- GoogleMaps.prototype.addPolylineHighlightEvent = function (eventType, eventFunction) {
297
- this.googlePolylines.addPolylineHighlightEvent(eventType, eventFunction);
298
- };
299
- GoogleMaps.prototype.getPolylineHighlightIndex = function () {
300
- return this.googlePolylines.getPolylineHighlightIndex();
301
- };
302
- /* Info Windows */
303
- GoogleMaps.prototype.drawPopup = function (options, marker) {
304
- return this.googlePopups.drawPopup(options, marker);
305
- };
306
- GoogleMaps.prototype.alterPopup = function (popup, options, marker) {
307
- return this.googlePopups.alterPopup(popup, options, marker);
308
- };
309
- GoogleMaps.prototype.alterPopupContent = function (popup, options, marker) {
310
- this.googlePopups.alterPopupContent(popup, options, marker);
311
- };
312
- GoogleMaps.prototype.closePopup = function (popup) {
313
- this.googlePopups.closePopup(popup);
314
- };
315
- /* Map */
316
- GoogleMaps.prototype.resizeMap = function () {
317
- this.googleMap.resizeMap();
318
- };
319
- GoogleMaps.prototype.addEventMap = function (eventType, eventFunction) {
320
- this.googleMap.addEventMap(eventType, eventFunction);
321
- };
322
- GoogleMaps.prototype.removeEventMap = function (eventType) {
323
- this.googleMap.removeEventMap(eventType);
324
- };
325
- GoogleMaps.prototype.getZoom = function () {
326
- return this.googleMap.getZoom();
327
- };
328
- GoogleMaps.prototype.setZoom = function (zoom) {
329
- this.googleMap.setZoom(zoom);
330
- };
331
- GoogleMaps.prototype.getCenter = function () {
332
- return this.googleMap.getCenter();
333
- };
334
- GoogleMaps.prototype.setCenter = function (position) {
335
- this.googleMap.setCenter(position);
336
- };
337
- GoogleMaps.prototype.pixelsToLatLng = function (offsetx, offsety) {
338
- return this.googleMap.pixelsToLatLng(offsetx, offsety);
339
- };
340
- GoogleMaps.prototype.fitBoundsElements = function (markers, circles, polygons, polylines) {
341
- this.googleMap.fitBoundsElements(markers, circles, polygons, polylines);
342
- };
343
- /* Overlay */
344
- GoogleMaps.prototype.drawOverlay = function (options, polygons) {
345
- return this.googleOverlays.drawOverlay(options, polygons);
346
- };
347
- GoogleMaps.prototype.toggleOverlay = function (overlays, show) {
348
- this.googleOverlays.toggleOverlay(overlays, show);
349
- };
350
- return GoogleMaps;
351
- }());
352
- export default GoogleMaps;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { MapsApiLoaderService } from "../../utils/maps-api-loader.service";
38
+ import GoogleCircles from "./google/google-circles";
39
+ import GoogleGeoJson from "./google/google-geojson";
40
+ import GoogleMap from "./google/google-map";
41
+ import GoogleMarkers from "./google/google-markers";
42
+ import GoogleOverlays from "./google/google-overlay";
43
+ import GooglePolygons from "./google/google-polygons";
44
+ import GooglePolylines from "./google/google-polylines";
45
+ import GooglePopups from "./google/google-popup";
46
+ var GoogleMaps = /** @class */ (function () {
47
+ function GoogleMaps() {
48
+ this.elementId = "";
49
+ this.googleMarkers = null;
50
+ this.googlePolygons = null;
51
+ this.googleCircles = null;
52
+ this.googlePolylines = null;
53
+ this.googlePopups = null;
54
+ this.googleMap = null;
55
+ this.googleOverlays = null;
56
+ this.googleGeoJson = null;
57
+ this.mapsApiLoader = new MapsApiLoaderService();
58
+ /* */
59
+ }
60
+ GoogleMaps.prototype.initialize = function (mapType, params, elementId) {
61
+ return __awaiter(this, void 0, void 0, function () {
62
+ var api, google_1, options, key, imageMapTypes_1, ids_1, map_1, trafficLayer, err_1;
63
+ return __generator(this, function (_a) {
64
+ switch (_a.label) {
65
+ case 0:
66
+ _a.trys.push([0, 2, , 3]);
67
+ return [4 /*yield*/, this.mapsApiLoader.loadApi(mapType, params)];
68
+ case 1:
69
+ api = _a.sent();
70
+ google_1 = api;
71
+ options = {
72
+ center: new google_1.maps.LatLng(-14, -54),
73
+ fullscreenControl: false,
74
+ keyboardShortcuts: false,
75
+ mapTypeControl: true,
76
+ minZoom: 4,
77
+ rotateControl: false,
78
+ scaleControl: false,
79
+ streetViewControl: false,
80
+ zoom: 4,
81
+ zoomControl: true,
82
+ };
83
+ if (params.gestureHandling) {
84
+ options.gestureHandling = "cooperative";
85
+ }
86
+ else {
87
+ options.gestureHandling = "greedy";
88
+ }
89
+ if (params.options) {
90
+ for (key in params.options) {
91
+ if (params.options.hasOwnProperty(key)) {
92
+ options[key] = params.options[key];
93
+ }
94
+ }
95
+ }
96
+ imageMapTypes_1 = [];
97
+ if (params.mapTiles) {
98
+ ids_1 = [
99
+ google_1.maps.MapTypeId.ROADMAP,
100
+ google_1.maps.MapTypeId.SATELLITE,
101
+ ];
102
+ params.mapTiles.forEach(function (tile) {
103
+ ids_1.push(tile.name);
104
+ var mapTypeOptions = {
105
+ getTileUrl: function (coord, zoom) {
106
+ return "https://tile.openstreetmap.org/".concat(zoom, "/").concat(coord.x, "/").concat(coord.y, ".png");
107
+ },
108
+ isPng: true,
109
+ maxZoom: 19,
110
+ minZoom: 0,
111
+ name: "OpenStreetMap",
112
+ tileSize: new google_1.maps.Size(256, 256),
113
+ };
114
+ for (var key in tile) {
115
+ if (tile.hasOwnProperty(key)) {
116
+ mapTypeOptions[key] = tile[key];
117
+ }
118
+ }
119
+ var imageMapType = new google_1.maps.ImageMapType(mapTypeOptions);
120
+ imageMapTypes_1.push({ id: tile.name, tile: imageMapType });
121
+ });
122
+ options.mapTypeControlOptions = {
123
+ mapTypeIds: ids_1,
124
+ style: google_1.maps.MapTypeControlStyle.HORIZONTAL_BAR,
125
+ };
126
+ }
127
+ map_1 = new google_1.maps.Map(document.getElementById(elementId), options);
128
+ this.elementId = elementId;
129
+ this.googleMarkers = new GoogleMarkers(map_1, google_1);
130
+ this.googlePolygons = new GooglePolygons(map_1, google_1);
131
+ this.googleCircles = new GoogleCircles(map_1, google_1);
132
+ this.googlePopups = new GooglePopups(map_1, google_1);
133
+ this.googlePolylines = new GooglePolylines(map_1, google_1, this.googlePopups);
134
+ this.googleMap = new GoogleMap(map_1, google_1);
135
+ this.googleOverlays = new GoogleOverlays(map_1, google_1, this.googlePolygons);
136
+ this.googleGeoJson = new GoogleGeoJson(map_1, google_1);
137
+ if (imageMapTypes_1 && imageMapTypes_1.length) {
138
+ imageMapTypes_1.forEach(function (image) {
139
+ map_1.mapTypes.set(image.id, image.tile);
140
+ });
141
+ }
142
+ if (params.showTraffic) {
143
+ trafficLayer = new google_1.maps.TrafficLayer();
144
+ trafficLayer.setMap(map_1);
145
+ }
146
+ return [2 /*return*/, this];
147
+ case 2:
148
+ err_1 = _a.sent();
149
+ return [2 /*return*/, err_1];
150
+ case 3: return [2 /*return*/];
151
+ }
152
+ });
153
+ });
154
+ };
155
+ /* GEOJson */
156
+ GoogleMaps.prototype.loadGEOJson = function (data, options, eventClick) {
157
+ var _a;
158
+ (_a = this.googleGeoJson) === null || _a === void 0 ? void 0 : _a.loadGEOJson(data, options, eventClick);
159
+ };
160
+ /* Markers */
161
+ GoogleMaps.prototype.drawMarker = function (options, eventClick) {
162
+ var _a;
163
+ return (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.drawMarker(options, eventClick);
164
+ };
165
+ GoogleMaps.prototype.drawCircleMarker = function (options, eventClick) {
166
+ var _a;
167
+ return (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.drawCircleMarker(options, eventClick);
168
+ };
169
+ GoogleMaps.prototype.toggleMarkers = function (markers, show, markerClusterer) {
170
+ var _a;
171
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.toggleMarkers(markers, show, markerClusterer);
172
+ };
173
+ GoogleMaps.prototype.alterMarkerOptions = function (markers, options) {
174
+ var _a;
175
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerOptions(markers, options);
176
+ };
177
+ GoogleMaps.prototype.alterMarkerPosition = function (markers, position, addTransition) {
178
+ var _a;
179
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerPosition(markers, position, addTransition);
180
+ };
181
+ GoogleMaps.prototype.fitBoundsPositions = function (markers) {
182
+ var _a;
183
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.fitBoundsPositions(markers);
184
+ };
185
+ GoogleMaps.prototype.isMarkerOnMap = function (marker) {
186
+ var _a;
187
+ return (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.isMarkerOnMap(marker);
188
+ };
189
+ GoogleMaps.prototype.setCenterMarker = function (marker) {
190
+ var _a;
191
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.setCenterMarker(marker);
192
+ };
193
+ GoogleMaps.prototype.addMarkerEvent = function (markers, eventType, eventFunction) {
194
+ var _a;
195
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerEvent(markers, eventType, eventFunction);
196
+ };
197
+ GoogleMaps.prototype.removeMarkerEvent = function (markers, event) {
198
+ var _a;
199
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.removeMarkerEvent(markers, event);
200
+ };
201
+ /* Marker Clusterer */
202
+ GoogleMaps.prototype.addMarkerClusterer = function (config) {
203
+ var _a;
204
+ return (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerClusterer(config);
205
+ };
206
+ GoogleMaps.prototype.alterMarkerClustererConfig = function (markerClusterer, config) {
207
+ var _a;
208
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.alterMarkerClustererConfig(markerClusterer, config);
209
+ };
210
+ GoogleMaps.prototype.refreshClusterer = function (markerClusterer) {
211
+ var _a;
212
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.refreshClusterer(markerClusterer);
213
+ };
214
+ GoogleMaps.prototype.addMarkerOnClusterer = function (marker, markerClusterer) {
215
+ var _a;
216
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.addMarkerOnClusterer(marker, markerClusterer);
217
+ };
218
+ GoogleMaps.prototype.removeMarkerFromClusterer = function (marker, markerClusterer) {
219
+ var _a;
220
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.removeMarkerFromClusterer(marker, markerClusterer);
221
+ };
222
+ GoogleMaps.prototype.clearMarkersClusterer = function (markerClusterer) {
223
+ var _a;
224
+ (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.clearMarkersClusterer(markerClusterer);
225
+ };
226
+ GoogleMaps.prototype.countMarkersOnCluster = function (markerClusterer) {
227
+ var _a;
228
+ return (_a = this.googleMarkers) === null || _a === void 0 ? void 0 : _a.countMarkersOnCluster(markerClusterer);
229
+ };
230
+ /* Polygons */
231
+ GoogleMaps.prototype.drawPolygon = function (options, eventClick) {
232
+ var _a;
233
+ return (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.drawPolygon(options, eventClick);
234
+ };
235
+ GoogleMaps.prototype.togglePolygons = function (polygons, show) {
236
+ var _a;
237
+ (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.togglePolygons(polygons, show);
238
+ };
239
+ GoogleMaps.prototype.alterPolygonOptions = function (polygons, options) {
240
+ var _a;
241
+ (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.alterPolygonOptions(polygons, options);
242
+ };
243
+ GoogleMaps.prototype.fitBoundsPolygons = function (polygons) {
244
+ var _a;
245
+ (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.fitBoundsPolygons(polygons);
246
+ };
247
+ GoogleMaps.prototype.setCenterPolygons = function (polygons) {
248
+ var _a;
249
+ (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.setCenterPolygons(polygons);
250
+ };
251
+ GoogleMaps.prototype.isPolygonOnMap = function (polygon) {
252
+ var _a;
253
+ return (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.isPolygonOnMap(polygon);
254
+ };
255
+ GoogleMaps.prototype.getPolygonPath = function (polygon) {
256
+ var _a;
257
+ return (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.getPolygonPath(polygon);
258
+ };
259
+ GoogleMaps.prototype.addPolygonEvent = function (polygons, eventType, eventFunction) {
260
+ var _a;
261
+ return (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.addPolygonEvent(polygons, eventType, eventFunction);
262
+ };
263
+ GoogleMaps.prototype.removePolygonEvent = function (polygons, event) {
264
+ var _a;
265
+ (_a = this.googlePolygons) === null || _a === void 0 ? void 0 : _a.removePolygonEvent(polygons, event);
266
+ };
267
+ /* Circles */
268
+ GoogleMaps.prototype.drawCircle = function (options, eventClick) {
269
+ var _a;
270
+ return (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.drawCircle(options, eventClick);
271
+ };
272
+ GoogleMaps.prototype.toggleCircles = function (circles, show) {
273
+ var _a;
274
+ (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.toggleCircles(circles, show);
275
+ };
276
+ GoogleMaps.prototype.alterCircleOptions = function (circles, options) {
277
+ var _a;
278
+ (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.alterCircleOptions(circles, options);
279
+ };
280
+ GoogleMaps.prototype.fitBoundsCircles = function (circles) {
281
+ var _a;
282
+ (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.fitBoundsCircles(circles);
283
+ };
284
+ GoogleMaps.prototype.isCircleOnMap = function (circle) {
285
+ var _a;
286
+ return (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.isCircleOnMap(circle);
287
+ };
288
+ GoogleMaps.prototype.getCircleCenter = function (circle) {
289
+ var _a;
290
+ return (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.getCircleCenter(circle);
291
+ };
292
+ GoogleMaps.prototype.getCircleRadius = function (circle) {
293
+ var _a;
294
+ return (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.getCircleRadius(circle);
295
+ };
296
+ GoogleMaps.prototype.addCircleEvent = function (circles, eventType, eventFunction) {
297
+ var _a;
298
+ (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.addCircleEvent(circles, eventType, eventFunction);
299
+ };
300
+ GoogleMaps.prototype.removeCircleEvent = function (circles, event) {
301
+ var _a;
302
+ (_a = this.googleCircles) === null || _a === void 0 ? void 0 : _a.removeCircleEvent(circles, event);
303
+ };
304
+ /* Polylines */
305
+ GoogleMaps.prototype.drawPolyline = function (options, eventClick) {
306
+ var _a;
307
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.drawPolyline(options, eventClick);
308
+ };
309
+ GoogleMaps.prototype.drawPolylineWithNavigation = function (options, eventClick) {
310
+ var _a;
311
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.drawPolylineWithNavigation(options, eventClick);
312
+ };
313
+ GoogleMaps.prototype.togglePolylines = function (polylines, show) {
314
+ var _a;
315
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.togglePolylines(polylines, show);
316
+ };
317
+ GoogleMaps.prototype.alterPolylineOptions = function (polylines, options) {
318
+ var _a;
319
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.alterPolylineOptions(polylines, options);
320
+ };
321
+ GoogleMaps.prototype.fitBoundsPolylines = function (polylines) {
322
+ var _a;
323
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.fitBoundsPolylines(polylines);
324
+ };
325
+ GoogleMaps.prototype.isPolylineOnMap = function (polyline) {
326
+ var _a;
327
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.isPolylineOnMap(polyline);
328
+ };
329
+ GoogleMaps.prototype.addPolylinePath = function (polylines, position) {
330
+ var _a;
331
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.addPolylinePath(polylines, position);
332
+ };
333
+ GoogleMaps.prototype.getPolylinePath = function (polyline) {
334
+ var _a;
335
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.getPolylinePath(polyline);
336
+ };
337
+ GoogleMaps.prototype.removePolylineHighlight = function () {
338
+ var _a;
339
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.removePolylineHighlight();
340
+ };
341
+ GoogleMaps.prototype.addPolylineEvent = function (polylines, eventType, eventFunction) {
342
+ var _a;
343
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.addPolylineEvent(polylines, eventType, eventFunction);
344
+ };
345
+ GoogleMaps.prototype.removePolylineEvent = function (polylines, event) {
346
+ var _a;
347
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.removePolylineEvent(polylines, event);
348
+ };
349
+ GoogleMaps.prototype.setIndexPolylineHighlight = function (polyline, index) {
350
+ var _a;
351
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.setIndexPolylineHighlight(polyline, index);
352
+ };
353
+ GoogleMaps.prototype.getObjectPolyline = function (polyline) {
354
+ var _a;
355
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.getObjectPolyline(polyline);
356
+ };
357
+ GoogleMaps.prototype.getObjectPolylineHighlight = function () {
358
+ var _a;
359
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.getObjectPolylineHighlight();
360
+ };
361
+ GoogleMaps.prototype.addPolylineHighlightEvent = function (eventType, eventFunction) {
362
+ var _a;
363
+ (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.addPolylineHighlightEvent(eventType, eventFunction);
364
+ };
365
+ GoogleMaps.prototype.getPolylineHighlightIndex = function () {
366
+ var _a;
367
+ return (_a = this.googlePolylines) === null || _a === void 0 ? void 0 : _a.getPolylineHighlightIndex();
368
+ };
369
+ /* Info Windows */
370
+ GoogleMaps.prototype.drawPopup = function (options, marker) {
371
+ var _a;
372
+ return (_a = this.googlePopups) === null || _a === void 0 ? void 0 : _a.drawPopup(options, marker);
373
+ };
374
+ GoogleMaps.prototype.alterPopup = function (popup, options, marker) {
375
+ var _a;
376
+ return (_a = this.googlePopups) === null || _a === void 0 ? void 0 : _a.alterPopup(popup, options, marker);
377
+ };
378
+ GoogleMaps.prototype.alterPopupContent = function (popup, options, marker) {
379
+ var _a;
380
+ (_a = this.googlePopups) === null || _a === void 0 ? void 0 : _a.alterPopupContent(popup, options, marker);
381
+ };
382
+ GoogleMaps.prototype.closePopup = function (popup) {
383
+ var _a;
384
+ (_a = this.googlePopups) === null || _a === void 0 ? void 0 : _a.closePopup(popup);
385
+ };
386
+ /* Map */
387
+ GoogleMaps.prototype.resizeMap = function () {
388
+ var _a;
389
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.resizeMap();
390
+ };
391
+ GoogleMaps.prototype.addEventMap = function (eventType, eventFunction) {
392
+ var _a;
393
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.addEventMap(eventType, eventFunction);
394
+ };
395
+ GoogleMaps.prototype.removeEventMap = function (eventType) {
396
+ var _a;
397
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.removeEventMap(eventType);
398
+ };
399
+ GoogleMaps.prototype.getZoom = function () {
400
+ var _a;
401
+ return (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.getZoom();
402
+ };
403
+ GoogleMaps.prototype.setZoom = function (zoom) {
404
+ var _a;
405
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.setZoom(zoom);
406
+ };
407
+ GoogleMaps.prototype.takeMapScreenshot = function () {
408
+ var _a;
409
+ return __awaiter(this, void 0, void 0, function () {
410
+ var image;
411
+ return __generator(this, function (_b) {
412
+ switch (_b.label) {
413
+ case 0: return [4 /*yield*/, ((_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.takeScreenShot(this.elementId))];
414
+ case 1:
415
+ image = _b.sent();
416
+ return [2 /*return*/, image];
417
+ }
418
+ });
419
+ });
420
+ };
421
+ GoogleMaps.prototype.getCenter = function () {
422
+ var _a;
423
+ return (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.getCenter();
424
+ };
425
+ GoogleMaps.prototype.setCenter = function (position) {
426
+ var _a;
427
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.setCenter(position);
428
+ };
429
+ GoogleMaps.prototype.pixelsToLatLng = function (offsetx, offsety) {
430
+ var _a;
431
+ return (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.pixelsToLatLng(offsetx, offsety);
432
+ };
433
+ GoogleMaps.prototype.fitBoundsElements = function (markers, circles, polygons, polylines) {
434
+ var _a;
435
+ (_a = this.googleMap) === null || _a === void 0 ? void 0 : _a.fitBoundsElements(markers, circles, polygons, polylines);
436
+ };
437
+ /* Overlay */
438
+ GoogleMaps.prototype.drawOverlay = function (options, polygons) {
439
+ var _a;
440
+ return (_a = this.googleOverlays) === null || _a === void 0 ? void 0 : _a.drawOverlay(options, polygons);
441
+ };
442
+ GoogleMaps.prototype.toggleOverlay = function (overlays, show) {
443
+ var _a;
444
+ (_a = this.googleOverlays) === null || _a === void 0 ? void 0 : _a.toggleOverlay(overlays, show);
445
+ };
446
+ return GoogleMaps;
447
+ }());
448
+ export default GoogleMaps;
353
449
  //# sourceMappingURL=googleMaps.js.map