@progress/kendo-angular-map 0.3.3 → 11.0.0-develop.80

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 (113) hide show
  1. package/NOTICE.txt +3 -3
  2. package/common/collection-item.component.d.ts +1 -1
  3. package/common/collection.component.d.ts +1 -1
  4. package/common/collection.service.d.ts +1 -1
  5. package/common/configuration.service.d.ts +1 -1
  6. package/common/copy-changes.d.ts +1 -1
  7. package/common/has-parent.d.ts +1 -1
  8. package/common/map-instance-observer.d.ts +1 -1
  9. package/common/settings.component.d.ts +1 -1
  10. package/common/to-simple-changes.d.ts +1 -1
  11. package/{esm2015/common/collection-item.component.js → esm2020/common/collection-item.component.mjs} +6 -5
  12. package/{esm2015/common/collection.component.js → esm2020/common/collection.component.mjs} +6 -4
  13. package/{esm2015/common/collection.service.js → esm2020/common/collection.service.mjs} +4 -4
  14. package/{esm2015/common/configuration.service.js → esm2020/common/configuration.service.mjs} +5 -5
  15. package/{esm2015/common/copy-changes.js → esm2020/common/copy-changes.mjs} +1 -1
  16. package/{esm2015/common/has-parent.js → esm2020/common/has-parent.mjs} +1 -1
  17. package/{esm2015/common/map-instance-observer.js → esm2020/common/map-instance-observer.mjs} +1 -1
  18. package/{esm2015/common/settings.component.js → esm2020/common/settings.component.mjs} +5 -4
  19. package/{esm2015/common/to-simple-changes.js → esm2020/common/to-simple-changes.mjs} +1 -1
  20. package/{esm2015/events/base-event.js → esm2020/events/base-event.mjs} +4 -4
  21. package/{esm2015/events/before-reset-event.js → esm2020/events/before-reset-event.mjs} +1 -1
  22. package/{esm2015/events/instance-event.service.js → esm2020/events/instance-event.service.mjs} +1 -1
  23. package/{esm2015/events/map-click-event.js → esm2020/events/map-click-event.mjs} +1 -1
  24. package/{esm2015/events/marker-activate-event.js → esm2020/events/marker-activate-event.mjs} +1 -1
  25. package/{esm2015/events/marker-click-event.js → esm2020/events/marker-click-event.mjs} +1 -1
  26. package/{esm2015/events/marker-created-event.js → esm2020/events/marker-created-event.mjs} +1 -1
  27. package/{esm2015/events/pan-end-event.js → esm2020/events/pan-end-event.mjs} +1 -1
  28. package/{esm2015/events/pan-event.js → esm2020/events/pan-event.mjs} +1 -1
  29. package/{esm2015/events/preventable-event.js → esm2020/events/preventable-event.mjs} +4 -4
  30. package/{esm2015/events/reset-event.js → esm2020/events/reset-event.mjs} +1 -1
  31. package/{esm2015/events/shape-click-event.js → esm2020/events/shape-click-event.mjs} +1 -1
  32. package/{esm2015/events/shape-created-event.js → esm2020/events/shape-created-event.mjs} +1 -1
  33. package/{esm2015/events/shape-feature-created-event.js → esm2020/events/shape-feature-created-event.mjs} +1 -1
  34. package/{esm2015/events/shape-mouse-enter-event.js → esm2020/events/shape-mouse-enter-event.mjs} +1 -1
  35. package/{esm2015/events/shape-mouse-leave-event.js → esm2020/events/shape-mouse-leave-event.mjs} +1 -1
  36. package/{esm2015/events/zoom-end-event.js → esm2020/events/zoom-end-event.mjs} +1 -1
  37. package/{esm2015/events/zoom-start-event.js → esm2020/events/zoom-start-event.mjs} +1 -1
  38. package/{esm2015/events.js → esm2020/events.mjs} +1 -1
  39. package/{esm2015/main.js → esm2020/index.mjs} +1 -1
  40. package/{esm2015/map/bubble-layer.component.js → esm2020/map/bubble-layer.component.mjs} +6 -4
  41. package/{esm2015/map/layer/tooltip.component.js → esm2020/map/layer/tooltip.component.mjs} +5 -4
  42. package/{esm2015/map/layer.component.js → esm2020/map/layer.component.mjs} +7 -4
  43. package/{esm2015/map/layers.component.js → esm2020/map/layers.component.mjs} +6 -5
  44. package/{esm2015/map/marker-layer.component.js → esm2020/map/marker-layer.component.mjs} +6 -4
  45. package/{esm2015/map/shape-layer.component.js → esm2020/map/shape-layer.component.mjs} +6 -4
  46. package/{esm2015/map/tile-layer.component.js → esm2020/map/tile-layer.component.mjs} +6 -4
  47. package/{esm2015/map.component.js → esm2020/map.component.mjs} +21 -33
  48. package/{esm2015/map.directives.js → esm2020/map.directives.mjs} +1 -1
  49. package/{esm2015/map.module.js → esm2020/map.module.mjs} +5 -5
  50. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  51. package/{esm2015/kendo-angular-map.js → esm2020/progress-kendo-angular-map.mjs} +2 -2
  52. package/{esm2015/tooltip/base-tooltip.js → esm2020/tooltip/base-tooltip.mjs} +7 -4
  53. package/{esm2015/tooltip/body-factory.js → esm2020/tooltip/body-factory.mjs} +1 -1
  54. package/{esm2015/tooltip/bubble-tooltip-template.directive.js → esm2020/tooltip/bubble-tooltip-template.directive.mjs} +5 -5
  55. package/{esm2015/tooltip/bubble-tooltip.component.js → esm2020/tooltip/bubble-tooltip.component.mjs} +8 -6
  56. package/{esm2015/tooltip/marker-tooltip-template.directive.js → esm2020/tooltip/marker-tooltip-template.directive.mjs} +5 -5
  57. package/{esm2015/tooltip/marker-tooltip.component.js → esm2020/tooltip/marker-tooltip.component.mjs} +8 -6
  58. package/{esm2015/tooltip/popup-settings.interface.js → esm2020/tooltip/popup-settings.interface.mjs} +1 -1
  59. package/{esm2015/tooltip/shape-tooltip-template.directive.js → esm2020/tooltip/shape-tooltip-template.directive.mjs} +5 -5
  60. package/{esm2015/tooltip/shape-tooltip.component.js → esm2020/tooltip/shape-tooltip.component.mjs} +8 -6
  61. package/{esm2015/tooltip/tooltip-popup.component.js → esm2020/tooltip/tooltip-popup.component.mjs} +7 -5
  62. package/{esm2015/tooltip/tooltip-template.service.js → esm2020/tooltip/tooltip-template.service.mjs} +4 -4
  63. package/{esm2015/tooltip.js → esm2020/tooltip.mjs} +1 -1
  64. package/events/base-event.d.ts +1 -1
  65. package/events/before-reset-event.d.ts +1 -1
  66. package/events/instance-event.service.d.ts +1 -1
  67. package/events/map-click-event.d.ts +1 -1
  68. package/events/marker-activate-event.d.ts +1 -1
  69. package/events/marker-click-event.d.ts +1 -1
  70. package/events/marker-created-event.d.ts +1 -1
  71. package/events/pan-end-event.d.ts +1 -1
  72. package/events/pan-event.d.ts +1 -1
  73. package/events/preventable-event.d.ts +1 -1
  74. package/events/reset-event.d.ts +1 -1
  75. package/events/shape-click-event.d.ts +1 -1
  76. package/events/shape-created-event.d.ts +1 -1
  77. package/events/shape-feature-created-event.d.ts +1 -1
  78. package/events/shape-mouse-enter-event.d.ts +1 -1
  79. package/events/shape-mouse-leave-event.d.ts +1 -1
  80. package/events/zoom-end-event.d.ts +1 -1
  81. package/events/zoom-start-event.d.ts +1 -1
  82. package/events.d.ts +1 -1
  83. package/fesm2015/{kendo-angular-map.js → progress-kendo-angular-map.mjs} +99 -92
  84. package/fesm2020/progress-kendo-angular-map.mjs +1852 -0
  85. package/{main.d.ts → index.d.ts} +1 -1
  86. package/map/bubble-layer.component.d.ts +1 -1
  87. package/map/layer/tooltip.component.d.ts +1 -1
  88. package/map/layer.component.d.ts +19 -1
  89. package/map/layers.component.d.ts +1 -1
  90. package/map/marker-layer.component.d.ts +1 -1
  91. package/map/shape-layer.component.d.ts +1 -1
  92. package/map/tile-layer.component.d.ts +1 -1
  93. package/map.component.d.ts +1 -1
  94. package/map.directives.d.ts +1 -1
  95. package/map.module.d.ts +1 -1
  96. package/package-metadata.d.ts +1 -1
  97. package/package.json +30 -56
  98. package/{kendo-angular-map.d.ts → progress-kendo-angular-map.d.ts} +2 -2
  99. package/schematics/ngAdd/index.js +1 -5
  100. package/tooltip/base-tooltip.d.ts +1 -1
  101. package/tooltip/body-factory.d.ts +1 -1
  102. package/tooltip/bubble-tooltip-template.directive.d.ts +1 -1
  103. package/tooltip/bubble-tooltip.component.d.ts +1 -1
  104. package/tooltip/marker-tooltip-template.directive.d.ts +1 -1
  105. package/tooltip/marker-tooltip.component.d.ts +1 -1
  106. package/tooltip/popup-settings.interface.d.ts +1 -1
  107. package/tooltip/shape-tooltip-template.directive.d.ts +1 -1
  108. package/tooltip/shape-tooltip.component.d.ts +1 -1
  109. package/tooltip/tooltip-popup.component.d.ts +1 -1
  110. package/tooltip/tooltip-template.service.d.ts +1 -1
  111. package/tooltip.d.ts +1 -1
  112. package/bundles/kendo-angular-map.umd.js +0 -5
  113. package/schematics/ngAdd/index.js.map +0 -1
@@ -0,0 +1,1852 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2022 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, SimpleChange, Directive, TemplateRef, Component, ChangeDetectionStrategy, ContentChild, SecurityContext, Input, forwardRef, ElementRef, EventEmitter, ViewChild, Output, ContentChildren, Optional, NgModule } from '@angular/core';
7
+ import * as i3 from '@angular/platform-browser';
8
+ import { Subject, BehaviorSubject } from 'rxjs';
9
+ import * as i5 from '@progress/kendo-angular-common';
10
+ import { isDocumentAvailable, hasObservers, ResizeSensorModule } from '@progress/kendo-angular-common';
11
+ import * as i3$1 from '@progress/kendo-angular-l10n';
12
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
13
+ import { InstanceObserver, Map } from '@progress/kendo-charts';
14
+ export { Extent, Location } from '@progress/kendo-charts';
15
+ import { validatePackage } from '@progress/kendo-licensing';
16
+ import { tap } from 'rxjs/operators';
17
+ import * as i1 from '@progress/kendo-angular-popup';
18
+ import { PopupService, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
19
+ import * as i4 from '@angular/common';
20
+ import { CommonModule } from '@angular/common';
21
+
22
+ /**
23
+ * @hidden
24
+ */
25
+ class ItemChange {
26
+ constructor(sender, options) {
27
+ this.sender = sender;
28
+ this.options = options;
29
+ }
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ class CollectionService {
35
+ constructor() {
36
+ this.source = new Subject();
37
+ this.itemChanges = this.source.asObservable();
38
+ }
39
+ notify(change) {
40
+ this.source.next(change);
41
+ }
42
+ }
43
+ CollectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
44
+ CollectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionService });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionService, decorators: [{
46
+ type: Injectable
47
+ }], ctorParameters: function () { return []; } });
48
+
49
+ /**
50
+ * @hidden
51
+ */
52
+ class Change {
53
+ constructor(key, value) {
54
+ this.key = key;
55
+ this.value = value;
56
+ }
57
+ }
58
+ /**
59
+ * @hidden
60
+ */
61
+ class ConfigurationService {
62
+ constructor(ngZone) {
63
+ this.ngZone = ngZone;
64
+ this.store = {};
65
+ this.source = new BehaviorSubject({});
66
+ this.initSource();
67
+ }
68
+ initSource() {
69
+ this.changes = this.source.asObservable();
70
+ }
71
+ push(store) {
72
+ this.store = store;
73
+ this.next();
74
+ }
75
+ notify(change) {
76
+ this.set(change.key, change.value);
77
+ this.next();
78
+ }
79
+ set(field, value) {
80
+ let store = this.store;
81
+ const parts = field.split('.');
82
+ let key = parts.shift();
83
+ while (parts.length > 0) {
84
+ store = store[key] = store[key] || {};
85
+ key = parts.shift();
86
+ }
87
+ store[key] = value;
88
+ }
89
+ next() {
90
+ this.ngZone.runOutsideAngular(() => {
91
+ this.source.next(this.store);
92
+ });
93
+ }
94
+ }
95
+ ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfigurationService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
96
+ ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfigurationService });
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ConfigurationService, decorators: [{
98
+ type: Injectable
99
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
100
+
101
+ /**
102
+ * @hidden
103
+ */
104
+ function copyChanges(changes, options) {
105
+ for (const propertyName in changes) {
106
+ if (!changes.hasOwnProperty(propertyName)) {
107
+ continue;
108
+ }
109
+ const value = changes[propertyName].currentValue;
110
+ if (value === undefined) {
111
+ delete options[propertyName];
112
+ }
113
+ else {
114
+ options[propertyName] = value;
115
+ }
116
+ }
117
+ }
118
+
119
+ /**
120
+ * @hidden
121
+ */
122
+ function toSimpleChanges(changes) {
123
+ const result = {};
124
+ for (const propertyName in changes) {
125
+ if (!changes.hasOwnProperty(propertyName)) {
126
+ continue;
127
+ }
128
+ result[propertyName] = new SimpleChange(null, changes[propertyName], false);
129
+ }
130
+ return result;
131
+ }
132
+
133
+ /**
134
+ * @hidden
135
+ */
136
+ class CollectionItemComponent {
137
+ constructor(configurationService, collectionService) {
138
+ this.configurationService = configurationService;
139
+ this.collectionService = collectionService;
140
+ this.index = -1;
141
+ this.options = {};
142
+ this.subscription = configurationService.changes.subscribe(store => {
143
+ this.options = store;
144
+ this.notify();
145
+ });
146
+ }
147
+ ngOnChanges(changes) {
148
+ const store = this.configurationService.store;
149
+ copyChanges(changes, store);
150
+ this.configurationService.push(store);
151
+ }
152
+ /**
153
+ * Updates the component fields with the specified values and refreshes the Chart.
154
+ *
155
+ * Use this method when the configuration values cannot be set through the template.
156
+ *
157
+ * @example
158
+ * ```ts-no-run
159
+ * item.notifyChanges({ visible: true });
160
+ * ```
161
+ *
162
+ * @param changes An object containing the updated input fields.
163
+ */
164
+ notifyChanges(changes) {
165
+ this.ngOnChanges(toSimpleChanges(changes));
166
+ }
167
+ ngOnDestroy() {
168
+ this.subscription.unsubscribe();
169
+ }
170
+ notify() {
171
+ if (!this.collectionService) {
172
+ return;
173
+ }
174
+ this.collectionService.notify(new ItemChange(this, this.options));
175
+ }
176
+ }
177
+ CollectionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionItemComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }], target: i0.ɵɵFactoryTarget.Directive });
178
+ CollectionItemComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: CollectionItemComponent, usesOnChanges: true, ngImport: i0 });
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionItemComponent, decorators: [{
180
+ type: Directive
181
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }]; } });
182
+
183
+ /**
184
+ * @hidden
185
+ */
186
+ class SettingsComponent {
187
+ constructor(configKey, configurationService) {
188
+ this.configKey = configKey;
189
+ this.configurationService = configurationService;
190
+ this.store = {};
191
+ if (configKey === undefined) {
192
+ throw new Error('Configuration key not set');
193
+ }
194
+ }
195
+ ngOnDestroy() {
196
+ this.store = undefined;
197
+ this.notify();
198
+ }
199
+ ngOnChanges(changes) {
200
+ copyChanges(changes, this.store);
201
+ this.notify();
202
+ }
203
+ /**
204
+ * Updates the component fields with the specified values and refreshes the component.
205
+ *
206
+ * Use this method when the configuration values cannot be set through the template.
207
+ *
208
+ * @example
209
+ * ```ts-no-run
210
+ * item.notifyChanges({ visible: true });
211
+ * ```
212
+ *
213
+ * @param changes An object containing the updated input fields.
214
+ */
215
+ notifyChanges(changes) {
216
+ this.ngOnChanges(toSimpleChanges(changes));
217
+ }
218
+ markAsVisible() {
219
+ this.store.visible = true;
220
+ this.notify();
221
+ }
222
+ notify() {
223
+ this.configurationService.notify(new Change(this.configKey, this.store));
224
+ }
225
+ }
226
+ SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SettingsComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
227
+ SettingsComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: SettingsComponent, usesOnChanges: true, ngImport: i0 });
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SettingsComponent, decorators: [{
229
+ type: Directive
230
+ }], ctorParameters: function () { return [{ type: undefined }, { type: ConfigurationService }]; } });
231
+
232
+ /**
233
+ * The configuration options of the Map layer tooltip.
234
+ *
235
+ * @hidden
236
+ */
237
+ class LayerTooltipComponent extends SettingsComponent {
238
+ constructor(configurationService) {
239
+ super('tooltip', configurationService);
240
+ this.configurationService = configurationService;
241
+ }
242
+ get layerTooltipTemplateRef() {
243
+ return this.layerTooltipTemplate;
244
+ }
245
+ }
246
+ LayerTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayerTooltipComponent, deps: [{ token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
247
+ LayerTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LayerTooltipComponent, selector: "kendo-map-layer-tooltip", queries: [{ propertyName: "layerTooltipTemplate", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayerTooltipComponent, decorators: [{
249
+ type: Component,
250
+ args: [{
251
+ changeDetection: ChangeDetectionStrategy.OnPush,
252
+ selector: 'kendo-map-layer-tooltip',
253
+ template: ''
254
+ }]
255
+ }], ctorParameters: function () { return [{ type: ConfigurationService }]; }, propDecorators: { layerTooltipTemplate: [{
256
+ type: ContentChild,
257
+ args: [TemplateRef, { static: false }]
258
+ }] } });
259
+
260
+ /**
261
+ * @hidden
262
+ */
263
+ class LayerComponent extends CollectionItemComponent {
264
+ constructor(type, configurationService, collectionService, sanitizer) {
265
+ super(configurationService, collectionService);
266
+ this.type = type;
267
+ this.configurationService = configurationService;
268
+ this.collectionService = collectionService;
269
+ this.sanitizer = sanitizer;
270
+ }
271
+ ngOnChanges(changes) {
272
+ const store = this.configurationService.store;
273
+ store.type = this.type;
274
+ const attrChange = changes['attribution'];
275
+ if (attrChange && this.sanitizer) {
276
+ attrChange.currentValue = this.sanitizer.sanitize(SecurityContext.HTML, attrChange.currentValue);
277
+ }
278
+ super.ngOnChanges(changes);
279
+ }
280
+ get layerTooltipTemplateRef() {
281
+ if (this.layerTooltip) {
282
+ return this.layerTooltip.layerTooltipTemplateRef;
283
+ }
284
+ }
285
+ }
286
+ LayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayerComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
287
+ LayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LayerComponent, inputs: { attribution: "attribution", extent: "extent", maxZoom: "maxZoom", minZoom: "minZoom", opacity: "opacity", zIndex: "zIndex" }, queries: [{ propertyName: "layerTooltip", first: true, predicate: LayerTooltipComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayerComponent, decorators: [{
289
+ type: Directive
290
+ }], ctorParameters: function () { return [{ type: undefined }, { type: ConfigurationService }, { type: CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { attribution: [{
291
+ type: Input
292
+ }], extent: [{
293
+ type: Input
294
+ }], maxZoom: [{
295
+ type: Input
296
+ }], minZoom: [{
297
+ type: Input
298
+ }], opacity: [{
299
+ type: Input
300
+ }], zIndex: [{
301
+ type: Input
302
+ }], layerTooltip: [{
303
+ type: ContentChild,
304
+ args: [LayerTooltipComponent, { static: false }]
305
+ }] } });
306
+
307
+ /**
308
+ * A vector shape layer for bubble maps.
309
+ */
310
+ class BubbleLayerComponent extends LayerComponent {
311
+ constructor(configurationService, collectionService, sanitizer) {
312
+ super('bubble', configurationService, collectionService, sanitizer);
313
+ this.configurationService = configurationService;
314
+ this.collectionService = collectionService;
315
+ this.sanitizer = sanitizer;
316
+ }
317
+ }
318
+ BubbleLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleLayerComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
319
+ BubbleLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BubbleLayerComponent, selector: "kendo-map-bubble-layer", inputs: { data: "data", locationField: "locationField", valueField: "valueField", symbol: "symbol", style: "style", maxSize: "maxSize", minSize: "minSize" }, providers: [
320
+ ConfigurationService,
321
+ {
322
+ provide: LayerComponent,
323
+ useExisting: forwardRef(() => BubbleLayerComponent)
324
+ }
325
+ ], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleLayerComponent, decorators: [{
327
+ type: Component,
328
+ args: [{
329
+ changeDetection: ChangeDetectionStrategy.OnPush,
330
+ providers: [
331
+ ConfigurationService,
332
+ {
333
+ provide: LayerComponent,
334
+ useExisting: forwardRef(() => BubbleLayerComponent)
335
+ }
336
+ ],
337
+ selector: 'kendo-map-bubble-layer',
338
+ template: ''
339
+ }]
340
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { data: [{
341
+ type: Input
342
+ }], locationField: [{
343
+ type: Input
344
+ }], valueField: [{
345
+ type: Input
346
+ }], symbol: [{
347
+ type: Input
348
+ }], style: [{
349
+ type: Input
350
+ }], maxSize: [{
351
+ type: Input
352
+ }], minSize: [{
353
+ type: Input
354
+ }] } });
355
+
356
+ /**
357
+ * @hidden
358
+ */
359
+ function hasParent(element, parent) {
360
+ let current = element;
361
+ while (current && current !== parent) {
362
+ current = current.parentNode;
363
+ }
364
+ return current ? true : false;
365
+ }
366
+
367
+ /**
368
+ * @hidden
369
+ */
370
+ class MapInstanceObserver extends InstanceObserver {
371
+ constructor(instance) {
372
+ super(instance);
373
+ this.handlerMap = {
374
+ hideTooltip: 'onHideTooltip',
375
+ init: 'onInit',
376
+ render: 'onRender',
377
+ showTooltip: 'onShowTooltip',
378
+ centerChange: 'onCenterChange',
379
+ zoomChange: 'onZoomChange'
380
+ };
381
+ }
382
+ }
383
+
384
+ /**
385
+ * @hidden
386
+ */
387
+ class BaseEvent {
388
+ /**
389
+ * @hidden
390
+ */
391
+ constructor(sender) {
392
+ this.sender = sender;
393
+ }
394
+ }
395
+ BaseEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseEvent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
396
+ BaseEvent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: BaseEvent, ngImport: i0 });
397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseEvent, decorators: [{
398
+ type: Directive
399
+ }], ctorParameters: function () { return [{ type: undefined }]; } });
400
+
401
+ /**
402
+ * Fired immediately before the map is reset. This event is typically used for cleanup by layer implementers.
403
+ */
404
+ class BeforeResetEvent extends BaseEvent {
405
+ /**
406
+ * @hidden
407
+ */
408
+ constructor(_, sender) {
409
+ super(sender);
410
+ }
411
+ }
412
+
413
+ /**
414
+ * Fired when the user clicks on the map.
415
+ */
416
+ class MapClickEvent extends BaseEvent {
417
+ /**
418
+ * @hidden
419
+ */
420
+ constructor(e, sender) {
421
+ super(sender);
422
+ this.location = e.location;
423
+ this.originalEvent = e.originalEvent;
424
+ }
425
+ }
426
+
427
+ /**
428
+ * Fired when a marker has been displayed and has a DOM element assigned.
429
+ */
430
+ class MarkerActivateEvent extends BaseEvent {
431
+ /**
432
+ * @hidden
433
+ */
434
+ constructor(e, sender) {
435
+ super(sender);
436
+ this.marker = e.marker;
437
+ this.layer = e.layer;
438
+ }
439
+ }
440
+
441
+ /**
442
+ * Fired when a marker has been clicked or tapped.
443
+ */
444
+ class MarkerClickEvent extends BaseEvent {
445
+ /**
446
+ * @hidden
447
+ */
448
+ constructor(e, sender) {
449
+ super(sender);
450
+ this.marker = e.marker;
451
+ this.layer = e.layer;
452
+ }
453
+ }
454
+
455
+ /**
456
+ * @hidden
457
+ */
458
+ class PreventableEvent extends BaseEvent {
459
+ constructor() {
460
+ super(...arguments);
461
+ this.prevented = false;
462
+ }
463
+ /**
464
+ * Prevents the default action for a specified event.
465
+ * In this way, the source component suppresses
466
+ * the built-in behavior that follows the event.
467
+ */
468
+ preventDefault() {
469
+ this.prevented = true;
470
+ }
471
+ /**
472
+ * Returns `true` if the event was prevented
473
+ * by any of its subscribers.
474
+ *
475
+ * @returns `true` if the default action was prevented.
476
+ * Otherwise, returns `false`.
477
+ */
478
+ isDefaultPrevented() {
479
+ return this.prevented;
480
+ }
481
+ }
482
+ PreventableEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PreventableEvent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
483
+ PreventableEvent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: PreventableEvent, usesInheritance: true, ngImport: i0 });
484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PreventableEvent, decorators: [{
485
+ type: Directive
486
+ }] });
487
+
488
+ /**
489
+ * Fired when a marker has been created and is about to be displayed.
490
+ *
491
+ * Cancelling the event will prevent the marker from being shown.
492
+ */
493
+ class MarkerCreatedEvent extends PreventableEvent {
494
+ /**
495
+ * @hidden
496
+ */
497
+ constructor(e, sender) {
498
+ super(sender);
499
+ this.marker = e.marker;
500
+ this.layer = e.layer;
501
+ }
502
+ }
503
+
504
+ /**
505
+ * Fires after the map viewport has been moved.
506
+ */
507
+ class PanEndEvent extends BaseEvent {
508
+ /**
509
+ * @hidden
510
+ */
511
+ constructor(e, sender) {
512
+ super(sender);
513
+ this.origin = e.origin;
514
+ this.center = e.center;
515
+ this.originalEvent = e.originalEvent;
516
+ }
517
+ }
518
+
519
+ /**
520
+ * Fired while the map viewport is being moved.
521
+ */
522
+ class PanEvent extends BaseEvent {
523
+ /**
524
+ * @hidden
525
+ */
526
+ constructor(e, sender) {
527
+ super(sender);
528
+ this.origin = e.origin;
529
+ this.center = e.center;
530
+ this.originalEvent = e.originalEvent;
531
+ }
532
+ }
533
+
534
+ /**
535
+ * Fired when the map is reset.
536
+ *
537
+ * This typically occurs on initial load and after a zoom/center change.
538
+ */
539
+ class ResetEvent extends BaseEvent {
540
+ /**
541
+ * @hidden
542
+ */
543
+ constructor(_, sender) {
544
+ super(sender);
545
+ }
546
+ }
547
+
548
+ /**
549
+ * Fired when a shape is clicked or tapped.
550
+ */
551
+ class ShapeClickEvent extends BaseEvent {
552
+ /**
553
+ * @hidden
554
+ */
555
+ constructor(e, sender) {
556
+ super(sender);
557
+ this.layer = e.layer;
558
+ this.shape = e.shape;
559
+ this.originalEvent = e.originalEvent;
560
+ }
561
+ }
562
+
563
+ /**
564
+ * Fired when a shape is created, but is not rendered yet.
565
+ */
566
+ class ShapeCreatedEvent extends BaseEvent {
567
+ /**
568
+ * @hidden
569
+ */
570
+ constructor(e, sender) {
571
+ super(sender);
572
+ this.layer = e.layer;
573
+ this.shape = e.shape;
574
+ this.dataItem = e.shape.dataItem;
575
+ this.location = e.shape.location;
576
+ }
577
+ }
578
+
579
+ /**
580
+ * Fired when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
581
+ */
582
+ class ShapeFeatureCreatedEvent extends BaseEvent {
583
+ /**
584
+ * @hidden
585
+ */
586
+ constructor(e, sender) {
587
+ super(sender);
588
+ this.dataItem = e.dataItem;
589
+ this.layer = e.layer;
590
+ this.group = e.group;
591
+ this.properties = e.properties;
592
+ }
593
+ }
594
+
595
+ /**
596
+ * Fired when the mouse enters a shape.
597
+ *
598
+ * > This event will fire reliably only for shapes that have set fill color.
599
+ * > The opacity can still be set to 0 so the shapes appear to have no fill.
600
+ */
601
+ class ShapeMouseEnterEvent extends BaseEvent {
602
+ /**
603
+ * @hidden
604
+ */
605
+ constructor(e, sender) {
606
+ super(sender);
607
+ this.layer = e.layer;
608
+ this.shape = e.shape;
609
+ this.originalEvent = e.originalEvent;
610
+ }
611
+ }
612
+
613
+ /**
614
+ * Fired when the mouse leaves a shape.
615
+ *
616
+ * > This event will fire reliably only for shapes that have set fill color.
617
+ * > The opacity can still be set to 0 so the shapes appear to have no fill.
618
+ */
619
+ class ShapeMouseLeaveEvent extends BaseEvent {
620
+ /**
621
+ * @hidden
622
+ */
623
+ constructor(e, sender) {
624
+ super(sender);
625
+ this.layer = e.layer;
626
+ this.shape = e.shape;
627
+ this.originalEvent = e.originalEvent;
628
+ }
629
+ }
630
+
631
+ /**
632
+ * Fired when the map zoom level has changed.
633
+ */
634
+ class ZoomEndEvent extends BaseEvent {
635
+ /**
636
+ * @hidden
637
+ */
638
+ constructor(e, sender) {
639
+ super(sender);
640
+ this.originalEvent = e.originalEvent;
641
+ }
642
+ }
643
+
644
+ /**
645
+ * Fired when the map zoom level is about to change.
646
+ *
647
+ * Cancelling the event will prevent the user action.
648
+ */
649
+ class ZoomStartEvent extends PreventableEvent {
650
+ /**
651
+ * @hidden
652
+ */
653
+ constructor(e, sender) {
654
+ super(sender);
655
+ this.originalEvent = e.originalEvent;
656
+ }
657
+ }
658
+
659
+ const EVENT_MAP = {
660
+ beforeReset: BeforeResetEvent,
661
+ click: MapClickEvent,
662
+ markerActivate: MarkerActivateEvent,
663
+ markerClick: MarkerClickEvent,
664
+ markerCreated: MarkerCreatedEvent,
665
+ panEnd: PanEndEvent,
666
+ pan: PanEvent,
667
+ reset: ResetEvent,
668
+ shapeClick: ShapeClickEvent,
669
+ shapeCreated: ShapeCreatedEvent,
670
+ shapeFeatureCreated: ShapeFeatureCreatedEvent,
671
+ shapeMouseEnter: ShapeMouseEnterEvent,
672
+ shapeMouseLeave: ShapeMouseLeaveEvent,
673
+ zoomEnd: ZoomEndEvent,
674
+ zoomStart: ZoomStartEvent
675
+ };
676
+ /**
677
+ * @hidden
678
+ */
679
+ class InstanceEventService {
680
+ create(name, args, sender) {
681
+ if (EVENT_MAP[name]) {
682
+ return new EVENT_MAP[name](args, sender);
683
+ }
684
+ }
685
+ }
686
+
687
+ /**
688
+ * @hidden
689
+ */
690
+ const packageMetadata = {
691
+ name: '@progress/kendo-angular-map',
692
+ productName: 'Kendo UI for Angular',
693
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
694
+ publishDate: 1672394481,
695
+ version: '',
696
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
697
+ };
698
+
699
+ const POSITION_MODE = 'absolute';
700
+ const COLLISION = { horizontal: "fit", vertical: "fit" };
701
+ /**
702
+ * @hidden
703
+ */
704
+ class BaseTooltip {
705
+ constructor(popupService, localizationService) {
706
+ this.popupService = popupService;
707
+ this.localizationService = localizationService;
708
+ this.animate = true;
709
+ this.style = {
710
+ position: 'relative'
711
+ };
712
+ this.popupRef = null;
713
+ }
714
+ get active() {
715
+ return this.popupRef !== null;
716
+ }
717
+ show(e) {
718
+ const offset = this.position(e.anchor);
719
+ if (!this.popupRef) {
720
+ this.popupRef = this.popupService.open(Object.assign({
721
+ offset: offset,
722
+ popupAlign: { vertical: 'bottom', horizontal: 'center' },
723
+ animate: this.animate,
724
+ content: this.templateRef,
725
+ collision: COLLISION,
726
+ positionMode: POSITION_MODE
727
+ }, this.popupSettings));
728
+ if (this.localizationService.rtl) {
729
+ this.popupRef.popupElement.setAttribute('dir', 'rtl');
730
+ }
731
+ this.onInit();
732
+ }
733
+ else {
734
+ const popup = this.popupRef.popup.instance;
735
+ popup.offset = offset;
736
+ }
737
+ }
738
+ hide() {
739
+ if (this.popupRef) {
740
+ this.popupRef.close();
741
+ this.popupRef = null;
742
+ }
743
+ }
744
+ onInit() {
745
+ //calling on init
746
+ }
747
+ ngOnDestroy() {
748
+ this.hide();
749
+ }
750
+ position(offset) {
751
+ if (!this.popupSettings || !this.popupSettings.appendTo) {
752
+ return offset;
753
+ }
754
+ const appendTo = this.popupSettings.appendTo.element.nativeElement;
755
+ const bbox = appendTo.getBoundingClientRect();
756
+ const { scrollLeft, scrollTop } = this.scrollOffset(appendTo);
757
+ return {
758
+ left: offset.left - bbox.left - scrollLeft,
759
+ top: offset.top - bbox.top - scrollTop
760
+ };
761
+ }
762
+ scrollOffset(element) {
763
+ if (!element) {
764
+ return null;
765
+ }
766
+ let scrollLeft = element.scrollLeft;
767
+ let scrollTop = element.scrollTop;
768
+ let parent = element.parentElement;
769
+ while (parent) {
770
+ scrollLeft += parent.scrollLeft;
771
+ scrollTop += parent.scrollTop;
772
+ parent = parent.parentElement;
773
+ }
774
+ return { scrollLeft, scrollTop };
775
+ }
776
+ }
777
+ BaseTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseTooltip, deps: [{ token: i1.PopupService }, { token: i3$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
778
+ BaseTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: BaseTooltip, ngImport: i0 });
779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseTooltip, decorators: [{
780
+ type: Directive
781
+ }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i3$1.LocalizationService }]; } });
782
+
783
+ /**
784
+ * @hidden
785
+ */
786
+ class TooltipTemplateService {
787
+ constructor() {
788
+ this.templates = [];
789
+ }
790
+ registerTemplate(layerIndex, template) {
791
+ if (layerIndex > -1) {
792
+ this.templates[layerIndex] = template;
793
+ }
794
+ }
795
+ getTemplate(layerIndex) {
796
+ if (layerIndex > -1) {
797
+ return this.templates[layerIndex];
798
+ }
799
+ }
800
+ }
801
+ TooltipTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipTemplateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
802
+ TooltipTemplateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipTemplateService });
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipTemplateService, decorators: [{
804
+ type: Injectable
805
+ }] });
806
+
807
+ /**
808
+ * @hidden
809
+ */
810
+ function bodyFactory() {
811
+ if (isDocumentAvailable()) {
812
+ return new ElementRef(document.body);
813
+ }
814
+ }
815
+
816
+ /**
817
+ * @hidden
818
+ */
819
+ class TooltipPopupComponent extends BaseTooltip {
820
+ constructor(popupService, templateService, localizationService, ngZone) {
821
+ super(popupService, localizationService);
822
+ this.popupService = popupService;
823
+ this.templateService = templateService;
824
+ this.localizationService = localizationService;
825
+ this.ngZone = ngZone;
826
+ this.tooltipContext = {};
827
+ this.animate = true;
828
+ this.wrapperClass = 'k-tooltip-wrapper';
829
+ this.leave = new EventEmitter();
830
+ this.popupClasses = {};
831
+ }
832
+ show(e) {
833
+ this.tooltipTemplateRef = this.templateService.getTemplate(e.layerIndex);
834
+ if (!this.tooltipTemplateRef) {
835
+ return;
836
+ }
837
+ this.popupClasses = Object.assign({
838
+ 'k-tooltip': true,
839
+ 'k-map-tooltip': true,
840
+ [e.className]: Boolean(e.className)
841
+ }, this.classNames);
842
+ this.tooltipContext = e;
843
+ super.show(e);
844
+ }
845
+ containsElement(element) {
846
+ if (this.popupRef) {
847
+ return hasParent(element, this.popupRef.popupElement);
848
+ }
849
+ }
850
+ onInit() {
851
+ this.ngZone.runOutsideAngular(() => {
852
+ this.mouseleaveSubscription = this.popupRef.popupElement.addEventListener('mouseleave', (args) => {
853
+ this.leave.emit(args);
854
+ });
855
+ });
856
+ this.popupRef.popupElement.classList.add(this.wrapperClass);
857
+ }
858
+ hide() {
859
+ if (this.mouseleaveSubscription) {
860
+ this.mouseleaveSubscription();
861
+ this.mouseleaveSubscription = null;
862
+ }
863
+ this.tooltipTemplateRef = null;
864
+ super.hide();
865
+ }
866
+ }
867
+ TooltipPopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipPopupComponent, deps: [{ token: i1.PopupService }, { token: TooltipTemplateService }, { token: i3$1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
868
+ TooltipPopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TooltipPopupComponent, selector: "kendo-map-tooltip-popup", inputs: { animate: "animate", classNames: "classNames", popupSettings: "popupSettings", wrapperClass: "wrapperClass" }, outputs: { leave: "leave" }, providers: [PopupService, {
869
+ provide: POPUP_CONTAINER,
870
+ useFactory: bodyFactory
871
+ }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
872
+ <ng-template #content>
873
+ <div [ngClass]="popupClasses" [ngStyle]="style">
874
+ <div class="k-tooltip-content">
875
+ <ng-template [ngTemplateOutlet]="tooltipTemplateRef"
876
+ [ngTemplateOutletContext]="tooltipContext">
877
+ </ng-template>
878
+ </div>
879
+ </div>
880
+ </ng-template>
881
+ `, isInline: true, directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
882
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TooltipPopupComponent, decorators: [{
883
+ type: Component,
884
+ args: [{
885
+ providers: [PopupService, {
886
+ provide: POPUP_CONTAINER,
887
+ useFactory: bodyFactory
888
+ }],
889
+ selector: 'kendo-map-tooltip-popup',
890
+ template: `
891
+ <ng-template #content>
892
+ <div [ngClass]="popupClasses" [ngStyle]="style">
893
+ <div class="k-tooltip-content">
894
+ <ng-template [ngTemplateOutlet]="tooltipTemplateRef"
895
+ [ngTemplateOutletContext]="tooltipContext">
896
+ </ng-template>
897
+ </div>
898
+ </div>
899
+ </ng-template>
900
+ `
901
+ }]
902
+ }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: TooltipTemplateService }, { type: i3$1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { templateRef: [{
903
+ type: ViewChild,
904
+ args: ['content', { static: true }]
905
+ }], animate: [{
906
+ type: Input
907
+ }], classNames: [{
908
+ type: Input
909
+ }], popupSettings: [{
910
+ type: Input
911
+ }], wrapperClass: [{
912
+ type: Input
913
+ }], leave: [{
914
+ type: Output
915
+ }] } });
916
+
917
+ /**
918
+ * A sample component
919
+ */
920
+ class MapComponent {
921
+ constructor(configurationService, instanceEventService, element, localizationService, changeDetector, ngZone, renderer) {
922
+ this.configurationService = configurationService;
923
+ this.instanceEventService = instanceEventService;
924
+ this.element = element;
925
+ this.localizationService = localizationService;
926
+ this.changeDetector = changeDetector;
927
+ this.ngZone = ngZone;
928
+ this.renderer = renderer;
929
+ /**
930
+ * Limits the automatic resizing of the Map. Sets the maximum number of times per second
931
+ * that the component redraws its content when the size of its container changes.
932
+ * Defaults to `10`. To disable the automatic resizing, set it to `0`.
933
+ *
934
+ * @example
935
+ * ```ts
936
+ * _@Component({
937
+ * selector: 'my-app',
938
+ * template: `
939
+ * <kendo-map [resizeRateLimit]="2">
940
+ * <!-- ^^^^^^^^^^^^^^^^^^^^^^
941
+ * Will update the size of the Map up to two times a second.
942
+ * Resize the example pane or window to try it out.
943
+ * -->
944
+ * </kendo-map>
945
+ * `
946
+ * })
947
+ * export class AppComponent {
948
+ * }
949
+ * ```
950
+ */
951
+ this.resizeRateLimit = 10;
952
+ /**
953
+ * The initial zoom level.
954
+ *
955
+ * Typical web maps use zoom levels from 0 (whole world) to 19 (sub-meter features).
956
+ *
957
+ * The map size is derived from the zoom level and minScale options: `size = (2 ^ zoom) * minSize`
958
+ *
959
+ * > Map zoom rounds floating point numbers. This is done so as the majority of web maps use the whole [`zoom levels`](https://wiki.openstreetmap.org/wiki/Zoom_levels) 0 through to 19.
960
+ *
961
+ * @default 3
962
+ */
963
+ this.zoom = 3;
964
+ /**
965
+ * Fired immediately before the map is reset. This event is typically used for cleanup by layer implementers.
966
+ */
967
+ this.beforeReset = new EventEmitter();
968
+ /**
969
+ * Fired when the user clicks on the map.
970
+ */
971
+ this.mapClick = new EventEmitter();
972
+ /**
973
+ * Fired when a marker has been displayed and has a DOM element assigned.
974
+ */
975
+ this.markerActivate = new EventEmitter();
976
+ /**
977
+ * Fired when a marker has been clicked or tapped.
978
+ */
979
+ this.markerClick = new EventEmitter();
980
+ /**
981
+ * Fired when a marker has been created and is about to be displayed.
982
+ *
983
+ * Cancelling the event will prevent the marker from being shown.
984
+ */
985
+ this.markerCreated = new EventEmitter();
986
+ /**
987
+ * Fires after the map viewport has been moved.
988
+ */
989
+ this.panEnd = new EventEmitter();
990
+ /**
991
+ * Fired while the map viewport is being moved.
992
+ */
993
+ this.pan = new EventEmitter();
994
+ /**
995
+ * Fired when the map is reset.
996
+ *
997
+ * This typically occurs on initial load and after a zoom/center change.
998
+ */
999
+ this.reset = new EventEmitter();
1000
+ /**
1001
+ * Fired when a shape is clicked or tapped.
1002
+ */
1003
+ this.shapeClick = new EventEmitter();
1004
+ /**
1005
+ * Fired when a shape is created, but is not rendered yet.
1006
+ */
1007
+ this.shapeCreated = new EventEmitter();
1008
+ /**
1009
+ * Fired when a [GeoJSON Feature](https://geojson.org/geojson-spec.html#feature-objects) is created on a shape layer.
1010
+ */
1011
+ this.shapeFeatureCreated = new EventEmitter();
1012
+ /**
1013
+ * Fired when the mouse enters a shape.
1014
+ *
1015
+ * > This event will fire reliably only for shapes that have set fill color.
1016
+ * > The opacity can still be set to 0 so the shapes appear to have no fill.
1017
+ */
1018
+ this.shapeMouseEnter = new EventEmitter();
1019
+ /**
1020
+ * Fired when the mouse leaves a shape.
1021
+ *
1022
+ * > This event will fire reliably only for shapes that have set fill color.
1023
+ * > The opacity can still be set to 0 so the shapes appear to have no fill.
1024
+ */
1025
+ this.shapeMouseLeave = new EventEmitter();
1026
+ /**
1027
+ * Fired when the map zoom level is about to change.
1028
+ *
1029
+ * Cancelling the event will prevent the user action.
1030
+ */
1031
+ this.zoomStart = new EventEmitter();
1032
+ /**
1033
+ * Fired when the map zoom level has changed.
1034
+ */
1035
+ this.zoomEnd = new EventEmitter();
1036
+ /**
1037
+ * Fired when the map center has been changed.
1038
+ */
1039
+ this.centerChange = new EventEmitter();
1040
+ /**
1041
+ * Fired when the map zoom level has been changed.
1042
+ */
1043
+ this.zoomChange = new EventEmitter();
1044
+ this.theme = null;
1045
+ this.rtl = false;
1046
+ validatePackage(packageMetadata);
1047
+ }
1048
+ ngAfterViewInit() {
1049
+ if (this.canRender) {
1050
+ this.ngZone.runOutsideAngular(() => {
1051
+ const mapMouseleave = this.renderer.listen(this.surfaceElement.nativeElement, 'mouseleave', this.mapMouseleave.bind(this));
1052
+ this.domSubscriptions = () => {
1053
+ mapMouseleave();
1054
+ };
1055
+ });
1056
+ }
1057
+ this.setDirection();
1058
+ this.initConfig();
1059
+ this.subscriptions = this.localizationService.changes.subscribe(() => this.setDirection());
1060
+ }
1061
+ ngAfterViewChecked() {
1062
+ if (this.instance && this.autoResize) {
1063
+ this.ngZone.runOutsideAngular(() => {
1064
+ clearTimeout(this.resizeTimeout);
1065
+ this.resizeTimeout = setTimeout(() => {
1066
+ this.resize();
1067
+ }, 0);
1068
+ });
1069
+ }
1070
+ }
1071
+ ngOnChanges(changes) {
1072
+ if (this.instance) {
1073
+ if (changes['zoom']) {
1074
+ this.instance.zoom(changes['zoom'].currentValue);
1075
+ delete changes['zoom'];
1076
+ }
1077
+ if (changes['center']) {
1078
+ this.instance.center(changes['center'].currentValue);
1079
+ delete changes['center'];
1080
+ }
1081
+ if (Object.keys(changes).length === 0) {
1082
+ return;
1083
+ }
1084
+ }
1085
+ const store = this.configurationService.store;
1086
+ copyChanges(changes, store);
1087
+ store.popupSettings = null;
1088
+ this.configurationService.push(store);
1089
+ }
1090
+ ngOnDestroy() {
1091
+ this.destroyed = true;
1092
+ if (this.optionsChange) {
1093
+ this.optionsChange.unsubscribe();
1094
+ }
1095
+ if (this.domSubscriptions) {
1096
+ this.domSubscriptions();
1097
+ this.domSubscriptions = null;
1098
+ }
1099
+ if (this.instance) {
1100
+ this.instance.destroy();
1101
+ this.instance = null;
1102
+ }
1103
+ if (this.subscriptions) {
1104
+ this.subscriptions.unsubscribe();
1105
+ }
1106
+ }
1107
+ /**
1108
+ * The marker layers instances.
1109
+ */
1110
+ get layers() {
1111
+ return this.instance?.layers;
1112
+ }
1113
+ /**
1114
+ * Gets the extent (visible area) of the map.
1115
+ */
1116
+ get extent() {
1117
+ return this.instance?.extent();
1118
+ }
1119
+ /**
1120
+ * Sets the extent (visible area) of the map.
1121
+ */
1122
+ set extent(extent) {
1123
+ this.instance?.extent(extent);
1124
+ }
1125
+ /**
1126
+ * Detects the size of the container and redraws the Map.
1127
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
1128
+ */
1129
+ resize() {
1130
+ //this.instance?.resize();
1131
+ }
1132
+ /**
1133
+ * Retrieves the size of the visible portion of the map.
1134
+ *
1135
+ * @returns The size (width and height) of the visible portion of the map.
1136
+ */
1137
+ viewSize() {
1138
+ return this.instance?.viewSize();
1139
+ }
1140
+ /**
1141
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
1142
+ *
1143
+ * @param e The mouse event.
1144
+ * @returns The event coordinates relative to the map element.
1145
+ */
1146
+ eventOffset(e) {
1147
+ return this.instance?.eventOffset(e);
1148
+ }
1149
+ /**
1150
+ * Retrieves projected (layer) coordinates that correspond to this mouse event. Layer coordinates are absolute and change only when the zoom level is changed.
1151
+ *
1152
+ * @param e The mouse event.
1153
+ * @returns The projected (layer) coordinates that correspond to this event.
1154
+ */
1155
+ eventToLayer(e) {
1156
+ return this.instance?.eventToLayer(e);
1157
+ }
1158
+ /**
1159
+ * Retrieves the geographic location that correspond to this mouse event.
1160
+ *
1161
+ * @param e The mouse event.
1162
+ * @returns The geographic location that correspond to this mouse event.
1163
+ */
1164
+ eventToLocation(e) {
1165
+ return this.instance?.eventToLocation(e);
1166
+ }
1167
+ /**
1168
+ * Retrieves relative (view) coordinates that correspond to this mouse event. Layer elements positioned on these coordinates will appear under the mouse cursor.
1169
+ * View coordinates are no longer valid after a map reset.
1170
+ *
1171
+ * @param e The mouse event.
1172
+ * @returns The relative (view) coordinates that correspond to this mouse event.
1173
+ */
1174
+ eventToView(e) {
1175
+ return this.instance?.eventToView(e);
1176
+ }
1177
+ /**
1178
+ * Transforms layer (projected) coordinates to geographical location.
1179
+ *
1180
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
1181
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
1182
+ * @returns The geographic location that corresponds to the layer coordinates.
1183
+ */
1184
+ layerToLocation(point, zoom) {
1185
+ return this.instance?.layerToLocation(point, zoom);
1186
+ }
1187
+ /**
1188
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
1189
+ *
1190
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
1191
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
1192
+ * @returns The layer (projected) coordinates.
1193
+ */
1194
+ locationToLayer(location, zoom) {
1195
+ return this.instance?.locationToLayer(location, zoom);
1196
+ }
1197
+ /**
1198
+ * Returns the view (relative) coordinates that correspond to a geographical location.
1199
+ *
1200
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
1201
+ * @returns The view coordinates that correspond to a geographical location.
1202
+ */
1203
+ locationToView(location) {
1204
+ return this.instance?.locationToView(location);
1205
+ }
1206
+ /**
1207
+ * Returns the geographical location that correspond to the view (relative) coordinates.
1208
+ *
1209
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
1210
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
1211
+ * @returns The geographic location that corresponds to the view coordinates.
1212
+ */
1213
+ viewToLocation(point, zoom) {
1214
+ return this.instance?.viewToLocation(point, zoom);
1215
+ }
1216
+ /**
1217
+ * @hidden
1218
+ */
1219
+ onResize() {
1220
+ if (this.autoResize) {
1221
+ this.resize();
1222
+ }
1223
+ }
1224
+ get canRender() {
1225
+ return isDocumentAvailable() && Boolean(this.surfaceElement);
1226
+ }
1227
+ get autoResize() {
1228
+ return this.resizeRateLimit > 0;
1229
+ }
1230
+ init() {
1231
+ if (!this.canRender) {
1232
+ return;
1233
+ }
1234
+ const element = this.surfaceElement.nativeElement;
1235
+ const instanceObserver = new MapInstanceObserver(this);
1236
+ this.createInstance(element, instanceObserver);
1237
+ }
1238
+ initConfig() {
1239
+ if (!isDocumentAvailable()) {
1240
+ return;
1241
+ }
1242
+ this.ngZone.runOutsideAngular(() => {
1243
+ this.optionsChange = this.configurationService.changes
1244
+ .pipe(tap((result) => {
1245
+ this.options = result;
1246
+ }))
1247
+ .subscribe(() => {
1248
+ if (!this.instance) {
1249
+ this.init();
1250
+ return;
1251
+ }
1252
+ this.instance.setOptions(this.options);
1253
+ });
1254
+ });
1255
+ }
1256
+ createInstance(element, observer) {
1257
+ this.instance = new Map(element, this.options, this.theme, {
1258
+ observer: observer,
1259
+ rtl: this.rtl,
1260
+ sender: this
1261
+ });
1262
+ }
1263
+ activeEmitter(name) {
1264
+ const alias = name === 'click' ? 'mapClick' : name;
1265
+ const emitter = this[alias];
1266
+ if (emitter && emitter.emit && hasObservers(emitter)) {
1267
+ return emitter;
1268
+ }
1269
+ }
1270
+ trigger(name, e) {
1271
+ const emitter = this.activeEmitter(name);
1272
+ if (emitter) {
1273
+ const args = this.instanceEventService.create(name, e, this);
1274
+ if (!this.instance && e.sender) {
1275
+ // Ensure instance reference is populated for events trigger during initialization.
1276
+ this.instance = e.sender;
1277
+ }
1278
+ this.run(() => {
1279
+ emitter.emit(args);
1280
+ });
1281
+ return args.isDefaultPrevented && args.isDefaultPrevented();
1282
+ }
1283
+ }
1284
+ run(callback, inZone = true, detectChanges) {
1285
+ if (inZone) {
1286
+ if (detectChanges) {
1287
+ this.changeDetector.markForCheck();
1288
+ }
1289
+ this.ngZone.run(callback);
1290
+ }
1291
+ else {
1292
+ callback();
1293
+ if (detectChanges) {
1294
+ this.detectChanges();
1295
+ }
1296
+ }
1297
+ }
1298
+ detectChanges() {
1299
+ if (!this.destroyed) {
1300
+ this.changeDetector.detectChanges();
1301
+ }
1302
+ }
1303
+ setDirection() {
1304
+ this.rtl = this.isRTL;
1305
+ if (this.element) {
1306
+ this.renderer.setAttribute(this.element.nativeElement, 'dir', this.rtl ? 'rtl' : 'ltr');
1307
+ }
1308
+ }
1309
+ get isRTL() {
1310
+ return Boolean(this.localizationService.rtl);
1311
+ }
1312
+ onInit(e) {
1313
+ this.instance = e.sender;
1314
+ }
1315
+ onShowTooltip(e) {
1316
+ this.run(() => {
1317
+ this.tooltipInstance.show(e);
1318
+ }, true, true);
1319
+ }
1320
+ onHideTooltip() {
1321
+ this.run(() => {
1322
+ this.tooltipInstance.hide();
1323
+ }, true, true);
1324
+ }
1325
+ onCenterChange(e) {
1326
+ this.centerChange.next(e.center);
1327
+ }
1328
+ onZoomChange(e) {
1329
+ this.zoomChange.next(e.zoom);
1330
+ }
1331
+ /**
1332
+ * @hidden
1333
+ */
1334
+ tooltipMouseleave(e) {
1335
+ const relatedTarget = e.relatedTarget;
1336
+ const chartElement = this.element.nativeElement;
1337
+ if (this.instance && (!relatedTarget || !hasParent(relatedTarget, chartElement))) {
1338
+ this.tooltipInstance.hide();
1339
+ }
1340
+ }
1341
+ /**
1342
+ * @hidden
1343
+ */
1344
+ mapMouseleave(e) {
1345
+ const relatedTarget = e.relatedTarget;
1346
+ const chartElement = this.element.nativeElement;
1347
+ if (this.instance && (!relatedTarget || !(this.tooltipInstance.containsElement(relatedTarget) || hasParent(relatedTarget, chartElement)))) {
1348
+ this.tooltipInstance.hide();
1349
+ }
1350
+ }
1351
+ }
1352
+ MapComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapComponent, deps: [{ token: ConfigurationService }, { token: InstanceEventService }, { token: i0.ElementRef }, { token: i3$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1353
+ MapComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MapComponent, selector: "kendo-map", inputs: { resizeRateLimit: "resizeRateLimit", center: "center", controls: "controls", minZoom: "minZoom", maxZoom: "maxZoom", minSize: "minSize", pannable: "pannable", popupSettings: "popupSettings", wraparound: "wraparound", zoom: "zoom", zoomable: "zoomable" }, outputs: { beforeReset: "beforeReset", mapClick: "mapClick", markerActivate: "markerActivate", markerClick: "markerClick", markerCreated: "markerCreated", panEnd: "panEnd", pan: "pan", reset: "reset", shapeClick: "shapeClick", shapeCreated: "shapeCreated", shapeFeatureCreated: "shapeFeatureCreated", shapeMouseEnter: "shapeMouseEnter", shapeMouseLeave: "shapeMouseLeave", zoomStart: "zoomStart", zoomEnd: "zoomEnd", centerChange: "centerChange", zoomChange: "zoomChange" }, providers: [
1354
+ ConfigurationService,
1355
+ InstanceEventService,
1356
+ LocalizationService,
1357
+ TooltipTemplateService,
1358
+ {
1359
+ provide: L10N_PREFIX,
1360
+ useValue: 'kendo.map'
1361
+ }
1362
+ ], viewQueries: [{ propertyName: "surfaceElement", first: true, predicate: ["surface"], descendants: true, static: true }, { propertyName: "tooltipInstance", first: true, predicate: TooltipPopupComponent, descendants: true, static: true }], exportAs: ["kendoChart"], usesOnChanges: true, ngImport: i0, template: `
1363
+ <div #surface></div>
1364
+ <kendo-map-tooltip-popup (leave)="tooltipMouseleave($event)" [popupSettings]="popupSettings">
1365
+ </kendo-map-tooltip-popup>
1366
+ <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
1367
+ `, isInline: true, components: [{ type: TooltipPopupComponent, selector: "kendo-map-tooltip-popup", inputs: ["animate", "classNames", "popupSettings", "wrapperClass"], outputs: ["leave"] }, { type: i5.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapComponent, decorators: [{
1369
+ type: Component,
1370
+ args: [{
1371
+ selector: 'kendo-map',
1372
+ changeDetection: ChangeDetectionStrategy.OnPush,
1373
+ exportAs: 'kendoChart',
1374
+ providers: [
1375
+ ConfigurationService,
1376
+ InstanceEventService,
1377
+ LocalizationService,
1378
+ TooltipTemplateService,
1379
+ {
1380
+ provide: L10N_PREFIX,
1381
+ useValue: 'kendo.map'
1382
+ }
1383
+ ],
1384
+ template: `
1385
+ <div #surface></div>
1386
+ <kendo-map-tooltip-popup (leave)="tooltipMouseleave($event)" [popupSettings]="popupSettings">
1387
+ </kendo-map-tooltip-popup>
1388
+ <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
1389
+ `
1390
+ }]
1391
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: InstanceEventService }, { type: i0.ElementRef }, { type: i3$1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { resizeRateLimit: [{
1392
+ type: Input
1393
+ }], center: [{
1394
+ type: Input
1395
+ }], controls: [{
1396
+ type: Input
1397
+ }], minZoom: [{
1398
+ type: Input
1399
+ }], maxZoom: [{
1400
+ type: Input
1401
+ }], minSize: [{
1402
+ type: Input
1403
+ }], pannable: [{
1404
+ type: Input
1405
+ }], popupSettings: [{
1406
+ type: Input
1407
+ }], wraparound: [{
1408
+ type: Input
1409
+ }], zoom: [{
1410
+ type: Input
1411
+ }], zoomable: [{
1412
+ type: Input
1413
+ }], beforeReset: [{
1414
+ type: Output
1415
+ }], mapClick: [{
1416
+ type: Output
1417
+ }], markerActivate: [{
1418
+ type: Output
1419
+ }], markerClick: [{
1420
+ type: Output
1421
+ }], markerCreated: [{
1422
+ type: Output
1423
+ }], panEnd: [{
1424
+ type: Output
1425
+ }], pan: [{
1426
+ type: Output
1427
+ }], reset: [{
1428
+ type: Output
1429
+ }], shapeClick: [{
1430
+ type: Output
1431
+ }], shapeCreated: [{
1432
+ type: Output
1433
+ }], shapeFeatureCreated: [{
1434
+ type: Output
1435
+ }], shapeMouseEnter: [{
1436
+ type: Output
1437
+ }], shapeMouseLeave: [{
1438
+ type: Output
1439
+ }], zoomStart: [{
1440
+ type: Output
1441
+ }], zoomEnd: [{
1442
+ type: Output
1443
+ }], centerChange: [{
1444
+ type: Output
1445
+ }], zoomChange: [{
1446
+ type: Output
1447
+ }], surfaceElement: [{
1448
+ type: ViewChild,
1449
+ args: ['surface', { static: true }]
1450
+ }], tooltipInstance: [{
1451
+ type: ViewChild,
1452
+ args: [TooltipPopupComponent, { static: true }]
1453
+ }] } });
1454
+
1455
+ /**
1456
+ * @hidden
1457
+ */
1458
+ class CollectionComponent {
1459
+ constructor(configKey, configurationService, collectionService) {
1460
+ this.configKey = configKey;
1461
+ this.configurationService = configurationService;
1462
+ this.collectionService = collectionService;
1463
+ this.items = [];
1464
+ this.subscription = collectionService.itemChanges.subscribe(changes => this.processChanges(changes));
1465
+ }
1466
+ ngOnDestroy() {
1467
+ this.subscription.unsubscribe();
1468
+ }
1469
+ ngAfterContentInit() {
1470
+ this.readItems();
1471
+ this.children.changes.subscribe(() => this.readItems());
1472
+ }
1473
+ processChanges(changes) {
1474
+ if (!this.children) {
1475
+ return;
1476
+ }
1477
+ const index = this.children.toArray().indexOf(changes.sender);
1478
+ if (index < 0) {
1479
+ return;
1480
+ }
1481
+ this.items[index] = changes.options;
1482
+ changes.sender.index = index;
1483
+ this.change();
1484
+ }
1485
+ readItems() {
1486
+ this.items = this.children.map((item, index) => {
1487
+ item.index = index;
1488
+ return item.options;
1489
+ });
1490
+ this.change();
1491
+ }
1492
+ change() {
1493
+ this.configurationService.notify(new Change(this.configKey, this.items.length === 0 ? undefined : this.items));
1494
+ }
1495
+ }
1496
+ CollectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
1497
+ CollectionComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: CollectionComponent, ngImport: i0 });
1498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CollectionComponent, decorators: [{
1499
+ type: Directive
1500
+ }], ctorParameters: function () { return [{ type: undefined }, { type: ConfigurationService }, { type: CollectionService }]; } });
1501
+
1502
+ /**
1503
+ * A collection of one or more layers.
1504
+ */
1505
+ class LayersComponent extends CollectionComponent {
1506
+ constructor(configurationService, collectionService) {
1507
+ super('layers', configurationService, collectionService);
1508
+ this.configurationService = configurationService;
1509
+ this.collectionService = collectionService;
1510
+ }
1511
+ }
1512
+ LayersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayersComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }], target: i0.ɵɵFactoryTarget.Component });
1513
+ LayersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LayersComponent, selector: "kendo-map-layers", providers: [CollectionService], queries: [{ propertyName: "children", predicate: LayerComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LayersComponent, decorators: [{
1515
+ type: Component,
1516
+ args: [{
1517
+ changeDetection: ChangeDetectionStrategy.OnPush,
1518
+ providers: [CollectionService],
1519
+ selector: 'kendo-map-layers',
1520
+ template: ''
1521
+ }]
1522
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }]; }, propDecorators: { children: [{
1523
+ type: ContentChildren,
1524
+ args: [LayerComponent]
1525
+ }] } });
1526
+
1527
+ /**
1528
+ * A vector shape layer for bubble maps.
1529
+ */
1530
+ class MarkerLayerComponent extends LayerComponent {
1531
+ constructor(configurationService, collectionService, sanitizer) {
1532
+ super('marker', configurationService, collectionService, sanitizer);
1533
+ this.configurationService = configurationService;
1534
+ this.collectionService = collectionService;
1535
+ this.sanitizer = sanitizer;
1536
+ }
1537
+ }
1538
+ MarkerLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerLayerComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1539
+ MarkerLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MarkerLayerComponent, selector: "kendo-map-marker-layer", inputs: { data: "data", locationField: "locationField", titleField: "titleField", shape: "shape" }, providers: [
1540
+ ConfigurationService,
1541
+ {
1542
+ provide: LayerComponent,
1543
+ useExisting: forwardRef(() => MarkerLayerComponent)
1544
+ }
1545
+ ], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerLayerComponent, decorators: [{
1547
+ type: Component,
1548
+ args: [{
1549
+ changeDetection: ChangeDetectionStrategy.OnPush,
1550
+ providers: [
1551
+ ConfigurationService,
1552
+ {
1553
+ provide: LayerComponent,
1554
+ useExisting: forwardRef(() => MarkerLayerComponent)
1555
+ }
1556
+ ],
1557
+ selector: 'kendo-map-marker-layer',
1558
+ template: ''
1559
+ }]
1560
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { data: [{
1561
+ type: Input
1562
+ }], locationField: [{
1563
+ type: Input
1564
+ }], titleField: [{
1565
+ type: Input
1566
+ }], shape: [{
1567
+ type: Input
1568
+ }] } });
1569
+
1570
+ /**
1571
+ * Defines a vector shape layer bound to GeoJSON data.
1572
+ */
1573
+ class ShapeLayerComponent extends LayerComponent {
1574
+ constructor(configurationService, collectionService, sanitizer) {
1575
+ super('shape', configurationService, collectionService, sanitizer);
1576
+ this.configurationService = configurationService;
1577
+ this.collectionService = collectionService;
1578
+ this.sanitizer = sanitizer;
1579
+ }
1580
+ }
1581
+ ShapeLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeLayerComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1582
+ ShapeLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ShapeLayerComponent, selector: "kendo-map-shape-layer", inputs: { data: "data", style: "style" }, providers: [
1583
+ ConfigurationService,
1584
+ {
1585
+ provide: LayerComponent,
1586
+ useExisting: forwardRef(() => ShapeLayerComponent)
1587
+ }
1588
+ ], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeLayerComponent, decorators: [{
1590
+ type: Component,
1591
+ args: [{
1592
+ changeDetection: ChangeDetectionStrategy.OnPush,
1593
+ providers: [
1594
+ ConfigurationService,
1595
+ {
1596
+ provide: LayerComponent,
1597
+ useExisting: forwardRef(() => ShapeLayerComponent)
1598
+ }
1599
+ ],
1600
+ selector: 'kendo-map-shape-layer',
1601
+ template: ''
1602
+ }]
1603
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { data: [{
1604
+ type: Input
1605
+ }], style: [{
1606
+ type: Input
1607
+ }] } });
1608
+
1609
+ /**
1610
+ * Defines a vector shape layer bound to GeoJSON data.
1611
+ */
1612
+ class TileLayerComponent extends LayerComponent {
1613
+ constructor(configurationService, collectionService, sanitizer) {
1614
+ super('tile', configurationService, collectionService, sanitizer);
1615
+ this.configurationService = configurationService;
1616
+ this.collectionService = collectionService;
1617
+ this.sanitizer = sanitizer;
1618
+ }
1619
+ }
1620
+ TileLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TileLayerComponent, deps: [{ token: ConfigurationService }, { token: CollectionService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
1621
+ TileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TileLayerComponent, selector: "kendo-map-tile-layer", inputs: { tileSize: "tileSize", subdomains: "subdomains", urlTemplate: "urlTemplate" }, providers: [
1622
+ ConfigurationService,
1623
+ {
1624
+ provide: LayerComponent,
1625
+ useExisting: forwardRef(() => TileLayerComponent)
1626
+ }
1627
+ ], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TileLayerComponent, decorators: [{
1629
+ type: Component,
1630
+ args: [{
1631
+ changeDetection: ChangeDetectionStrategy.OnPush,
1632
+ providers: [
1633
+ ConfigurationService,
1634
+ {
1635
+ provide: LayerComponent,
1636
+ useExisting: forwardRef(() => TileLayerComponent)
1637
+ }
1638
+ ],
1639
+ selector: 'kendo-map-tile-layer',
1640
+ template: ''
1641
+ }]
1642
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: CollectionService }, { type: i3.DomSanitizer }]; }, propDecorators: { tileSize: [{
1643
+ type: Input
1644
+ }], subdomains: [{
1645
+ type: Input
1646
+ }], urlTemplate: [{
1647
+ type: Input
1648
+ }] } });
1649
+
1650
+ /**
1651
+ * A directive that sets a [template](link:site.data.urls.angular['templatesyntax'])
1652
+ * within the `<kendo-map-tooltip>` component for the Map
1653
+ * [Bubble layer tooltip]({% slug bubble_layers_map %}#toc-tooltip).
1654
+ *
1655
+ * The available inputs for the bubble tooltip template are:
1656
+ * * `dataItem: any`&mdash;The original data item used to create the bubble.
1657
+ * * `layerIndex: number`&mdash;The index of the layer for the tooltip.
1658
+ * * `location: Location`&mdash;The location of the bubble.
1659
+ * * `value: number`&mdash;The value of the bubble.
1660
+ */
1661
+ class BubbleTooltipTemplateDirective {
1662
+ constructor(templateRef) {
1663
+ this.templateRef = templateRef;
1664
+ }
1665
+ }
1666
+ BubbleTooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1667
+ BubbleTooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: BubbleTooltipTemplateDirective, selector: "[kendoMapBubbleTooltipTemplate]", ngImport: i0 });
1668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleTooltipTemplateDirective, decorators: [{
1669
+ type: Directive,
1670
+ args: [{
1671
+ selector: '[kendoMapBubbleTooltipTemplate]'
1672
+ }]
1673
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1674
+ type: Optional
1675
+ }] }]; } });
1676
+
1677
+ /**
1678
+ * A directive that sets a [template](link:site.data.urls.angular['templatesyntax'])
1679
+ * within the `<kendo-map-tooltip>` component for the Map
1680
+ * [Marker layer tooltip]({% slug marker_layers_map %}#toc-tooltip).
1681
+ *
1682
+ * The available inputs for the marker tooltip template are:
1683
+ * * `title: string`&mdash;The marker title.
1684
+ * * `layerIndex: number`&mdash;The index of the layer for the tooltip.
1685
+ * * `location: Location`&mdash;The marker location.
1686
+ */
1687
+ class MarkerTooltipTemplateDirective {
1688
+ constructor(templateRef) {
1689
+ this.templateRef = templateRef;
1690
+ }
1691
+ }
1692
+ MarkerTooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1693
+ MarkerTooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: MarkerTooltipTemplateDirective, selector: "[kendoMapMarkerTooltipTemplate]", ngImport: i0 });
1694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerTooltipTemplateDirective, decorators: [{
1695
+ type: Directive,
1696
+ args: [{
1697
+ selector: '[kendoMapMarkerTooltipTemplate]'
1698
+ }]
1699
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1700
+ type: Optional
1701
+ }] }]; } });
1702
+
1703
+ /**
1704
+ * A directive that sets a [template](link:site.data.urls.angular['templatesyntax'])
1705
+ * within the `<kendo-map-tooltip>` component for the Map
1706
+ * [Shape layer tooltip]({% slug shape_layers_map %}#toc-tooltip).
1707
+ *
1708
+ * The available inputs for the shape tooltip template are:
1709
+ * * `dataItem: any`&mdash;The original data item used to create the shape.
1710
+ * * `layerIndex: number`&mdash;The index of the layer for the tooltip.
1711
+ * * `location: Location`&mdash;The location of the center of the shape.
1712
+ */
1713
+ class ShapeTooltipTemplateDirective {
1714
+ constructor(templateRef) {
1715
+ this.templateRef = templateRef;
1716
+ }
1717
+ }
1718
+ ShapeTooltipTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1719
+ ShapeTooltipTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ShapeTooltipTemplateDirective, selector: "[kendoMapShapeTooltipTemplate]", ngImport: i0 });
1720
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeTooltipTemplateDirective, decorators: [{
1721
+ type: Directive,
1722
+ args: [{
1723
+ selector: '[kendoMapShapeTooltipTemplate]'
1724
+ }]
1725
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1726
+ type: Optional
1727
+ }] }]; } });
1728
+
1729
+ /**
1730
+ * The configuration options of the [Bubble Layer Tooltip]({% slug bubble_layers_map %}#toc-tooltip).
1731
+ */
1732
+ class BubbleTooltipComponent extends SettingsComponent {
1733
+ constructor(configurationService, templateService, layer) {
1734
+ super('tooltip', configurationService);
1735
+ this.configurationService = configurationService;
1736
+ this.templateService = templateService;
1737
+ this.layer = layer;
1738
+ }
1739
+ ngAfterContentChecked() {
1740
+ this.templateService.registerTemplate(this.layer.index, this.bubbleTooltipTemplate?.templateRef);
1741
+ }
1742
+ }
1743
+ BubbleTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleTooltipComponent, deps: [{ token: ConfigurationService }, { token: TooltipTemplateService }, { token: LayerComponent }], target: i0.ɵɵFactoryTarget.Component });
1744
+ BubbleTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: BubbleTooltipComponent, selector: "kendo-map-bubble-layer-tooltip", queries: [{ propertyName: "bubbleTooltipTemplate", first: true, predicate: BubbleTooltipTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
1745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BubbleTooltipComponent, decorators: [{
1746
+ type: Component,
1747
+ args: [{
1748
+ selector: 'kendo-map-bubble-layer-tooltip',
1749
+ template: ''
1750
+ }]
1751
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: TooltipTemplateService }, { type: LayerComponent }]; }, propDecorators: { bubbleTooltipTemplate: [{
1752
+ type: ContentChild,
1753
+ args: [BubbleTooltipTemplateDirective, { static: false }]
1754
+ }] } });
1755
+
1756
+ /**
1757
+ * The configuration options of the [Marker Layer Tooltip]({% slug marker_layers_map %}#toc-tooltip).
1758
+ */
1759
+ class MarkerTooltipComponent extends SettingsComponent {
1760
+ constructor(configurationService, templateService, layer) {
1761
+ super('tooltip', configurationService);
1762
+ this.configurationService = configurationService;
1763
+ this.templateService = templateService;
1764
+ this.layer = layer;
1765
+ }
1766
+ ngAfterContentChecked() {
1767
+ this.templateService.registerTemplate(this.layer.index, this.markerTooltipTemplate?.templateRef);
1768
+ }
1769
+ }
1770
+ MarkerTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerTooltipComponent, deps: [{ token: ConfigurationService }, { token: TooltipTemplateService }, { token: LayerComponent }], target: i0.ɵɵFactoryTarget.Component });
1771
+ MarkerTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MarkerTooltipComponent, selector: "kendo-map-marker-layer-tooltip", queries: [{ propertyName: "markerTooltipTemplate", first: true, predicate: MarkerTooltipTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
1772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MarkerTooltipComponent, decorators: [{
1773
+ type: Component,
1774
+ args: [{
1775
+ selector: 'kendo-map-marker-layer-tooltip',
1776
+ template: ''
1777
+ }]
1778
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: TooltipTemplateService }, { type: LayerComponent }]; }, propDecorators: { markerTooltipTemplate: [{
1779
+ type: ContentChild,
1780
+ args: [MarkerTooltipTemplateDirective, { static: false }]
1781
+ }] } });
1782
+
1783
+ /**
1784
+ * The configuration options of the [Shape Layer Tooltip]({% slug shape_layers_map %}#toc-tooltip).
1785
+ */
1786
+ class ShapeTooltipComponent extends SettingsComponent {
1787
+ constructor(configurationService, templateService, layer) {
1788
+ super('tooltip', configurationService);
1789
+ this.configurationService = configurationService;
1790
+ this.templateService = templateService;
1791
+ this.layer = layer;
1792
+ }
1793
+ ngAfterContentChecked() {
1794
+ this.templateService.registerTemplate(this.layer.index, this.shapeTooltipTemplate?.templateRef);
1795
+ }
1796
+ }
1797
+ ShapeTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeTooltipComponent, deps: [{ token: ConfigurationService }, { token: TooltipTemplateService }, { token: LayerComponent }], target: i0.ɵɵFactoryTarget.Component });
1798
+ ShapeTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ShapeTooltipComponent, selector: "kendo-map-shape-layer-tooltip", queries: [{ propertyName: "shapeTooltipTemplate", first: true, predicate: ShapeTooltipTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
1799
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShapeTooltipComponent, decorators: [{
1800
+ type: Component,
1801
+ args: [{
1802
+ selector: 'kendo-map-shape-layer-tooltip',
1803
+ template: ''
1804
+ }]
1805
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: TooltipTemplateService }, { type: LayerComponent }]; }, propDecorators: { shapeTooltipTemplate: [{
1806
+ type: ContentChild,
1807
+ args: [ShapeTooltipTemplateDirective, { static: false }]
1808
+ }] } });
1809
+
1810
+ /**
1811
+ * @hidden
1812
+ */
1813
+ const MAP_DIRECTIVES = [
1814
+ BubbleLayerComponent,
1815
+ BubbleTooltipComponent,
1816
+ BubbleTooltipTemplateDirective,
1817
+ LayerTooltipComponent,
1818
+ LayersComponent,
1819
+ MapComponent,
1820
+ MarkerLayerComponent,
1821
+ MarkerTooltipComponent,
1822
+ MarkerTooltipTemplateDirective,
1823
+ ShapeLayerComponent,
1824
+ ShapeTooltipComponent,
1825
+ ShapeTooltipTemplateDirective,
1826
+ TileLayerComponent,
1827
+ TooltipPopupComponent
1828
+ ];
1829
+
1830
+ /**
1831
+ * Sample module
1832
+ */
1833
+ class MapModule {
1834
+ }
1835
+ MapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1836
+ MapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapModule, declarations: [BubbleLayerComponent, BubbleTooltipComponent, BubbleTooltipTemplateDirective, LayerTooltipComponent, LayersComponent, MapComponent, MarkerLayerComponent, MarkerTooltipComponent, MarkerTooltipTemplateDirective, ShapeLayerComponent, ShapeTooltipComponent, ShapeTooltipTemplateDirective, TileLayerComponent, TooltipPopupComponent], imports: [CommonModule, ResizeSensorModule], exports: [BubbleLayerComponent, BubbleTooltipComponent, BubbleTooltipTemplateDirective, LayerTooltipComponent, LayersComponent, MapComponent, MarkerLayerComponent, MarkerTooltipComponent, MarkerTooltipTemplateDirective, ShapeLayerComponent, ShapeTooltipComponent, ShapeTooltipTemplateDirective, TileLayerComponent, TooltipPopupComponent] });
1837
+ MapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapModule, imports: [[CommonModule, ResizeSensorModule]] });
1838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MapModule, decorators: [{
1839
+ type: NgModule,
1840
+ args: [{
1841
+ declarations: [MAP_DIRECTIVES],
1842
+ imports: [CommonModule, ResizeSensorModule],
1843
+ exports: [MAP_DIRECTIVES]
1844
+ }]
1845
+ }] });
1846
+
1847
+ /**
1848
+ * Generated bundle index. Do not edit.
1849
+ */
1850
+
1851
+ export { BeforeResetEvent, BubbleLayerComponent, BubbleTooltipComponent, BubbleTooltipTemplateDirective, LayerTooltipComponent, LayersComponent, MapClickEvent, MapComponent, MapModule, MarkerActivateEvent, MarkerClickEvent, MarkerCreatedEvent, MarkerLayerComponent, MarkerTooltipComponent, MarkerTooltipTemplateDirective, PanEndEvent, PanEvent, ResetEvent, ShapeClickEvent, ShapeCreatedEvent, ShapeFeatureCreatedEvent, ShapeLayerComponent, ShapeMouseEnterEvent, ShapeMouseLeaveEvent, ShapeTooltipComponent, ShapeTooltipTemplateDirective, TileLayerComponent, TooltipPopupComponent, ZoomEndEvent, ZoomStartEvent, bodyFactory };
1852
+