@syncfusion/ej2-maps 19.3.44 → 19.4.42
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.
- package/.eslintrc.json +1 -1
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +36 -5
- package/README.md +4 -4
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +655 -647
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +652 -645
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/bubble.d.ts +6 -0
- package/src/maps/layers/bubble.js +10 -25
- package/src/maps/layers/data-label.js +6 -17
- package/src/maps/layers/layer-panel.d.ts +2 -1
- package/src/maps/layers/layer-panel.js +86 -72
- package/src/maps/layers/legend.js +48 -19
- package/src/maps/layers/marker.js +2 -24
- package/src/maps/maps-model.d.ts +1 -28
- package/src/maps/maps.d.ts +5 -38
- package/src/maps/maps.js +80 -102
- package/src/maps/model/base-model.d.ts +7 -5
- package/src/maps/model/base.d.ts +6 -5
- package/src/maps/model/base.js +5 -2
- package/src/maps/model/export-pdf.js +1 -1
- package/src/maps/model/interface.d.ts +1 -3
- package/src/maps/model/theme.js +116 -6
- package/src/maps/user-interaction/annotation.js +3 -7
- package/src/maps/user-interaction/highlight.js +4 -17
- package/src/maps/user-interaction/selection.js +10 -22
- package/src/maps/user-interaction/tooltip.js +61 -125
- package/src/maps/user-interaction/zoom.d.ts +1 -0
- package/src/maps/user-interaction/zoom.js +92 -110
- package/src/maps/utils/enum.d.ts +8 -2
- package/src/maps/utils/helper.d.ts +5 -3
- package/src/maps/utils/helper.js +136 -104
package/src/maps/maps.d.ts
CHANGED
|
@@ -233,56 +233,48 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
233
233
|
* Triggers when the map is on load.
|
|
234
234
|
*
|
|
235
235
|
* @event load
|
|
236
|
-
* @blazorProperty 'OnLoad'
|
|
237
236
|
*/
|
|
238
237
|
load: EmitType<ILoadEventArgs>;
|
|
239
238
|
/**
|
|
240
239
|
* Triggers before the print gets started.
|
|
241
240
|
*
|
|
242
241
|
* @event beforePrint
|
|
243
|
-
* @blazorProperty 'OnPrint'
|
|
244
242
|
*/
|
|
245
243
|
beforePrint: EmitType<IPrintEventArgs>;
|
|
246
244
|
/**
|
|
247
245
|
* Triggers after the maps gets rendered.
|
|
248
246
|
*
|
|
249
247
|
* @event loaded
|
|
250
|
-
* @blazorProperty 'Loaded'
|
|
251
248
|
*/
|
|
252
249
|
loaded: EmitType<ILoadedEventArgs>;
|
|
253
250
|
/**
|
|
254
251
|
* Triggers when clicking an element in maps.
|
|
255
252
|
*
|
|
256
253
|
* @event click
|
|
257
|
-
* @blazorProperty 'OnClick'
|
|
258
254
|
*/
|
|
259
255
|
click: EmitType<IMouseEventArgs>;
|
|
260
256
|
/**
|
|
261
257
|
* Triggers when performing the double click operation on an element in maps.
|
|
262
258
|
*
|
|
263
259
|
* @event doubleClick
|
|
264
|
-
* @blazorProperty 'OnDoubleClick'
|
|
265
260
|
*/
|
|
266
261
|
doubleClick: EmitType<IMouseEventArgs>;
|
|
267
262
|
/**
|
|
268
263
|
* Triggers when performing the right click operation on an element in maps.
|
|
269
264
|
*
|
|
270
265
|
* @event rightClick
|
|
271
|
-
* @blazorProperty 'OnRightClick'
|
|
272
266
|
*/
|
|
273
267
|
rightClick: EmitType<IMouseEventArgs>;
|
|
274
268
|
/**
|
|
275
269
|
* Triggers when resizing the maps.
|
|
276
270
|
*
|
|
277
271
|
* @event resize
|
|
278
|
-
* @blazorProperty 'Resizing'
|
|
279
272
|
*/
|
|
280
273
|
resize: EmitType<IResizeEventArgs>;
|
|
281
274
|
/**
|
|
282
275
|
* Triggers before the maps tooltip gets rendered.
|
|
283
276
|
*
|
|
284
277
|
* @event tooltipRender
|
|
285
|
-
* @blazorProperty 'TooltipRendering'
|
|
286
278
|
*/
|
|
287
279
|
tooltipRender: EmitType<ITooltipRenderEventArgs>;
|
|
288
280
|
/**
|
|
@@ -290,7 +282,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
290
282
|
*
|
|
291
283
|
* @event legendRendering
|
|
292
284
|
|
|
293
|
-
* @blazorProperty 'LegendRendering'
|
|
294
285
|
*/
|
|
295
286
|
legendRendering: EmitType<ILegendRenderingEventArgs>;
|
|
296
287
|
/**
|
|
@@ -298,56 +289,48 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
298
289
|
*
|
|
299
290
|
|
|
300
291
|
* @event tooltipRenderComplete
|
|
301
|
-
* @blazorProperty 'TooltipRenderComplete'
|
|
302
292
|
*/
|
|
303
293
|
tooltipRenderComplete: EmitType<ITooltipRenderCompleteEventArgs>;
|
|
304
294
|
/**
|
|
305
295
|
* Triggers when clicking a shape in maps.
|
|
306
296
|
*
|
|
307
297
|
* @event shapeSelected
|
|
308
|
-
* @blazorProperty 'ShapeSelected'
|
|
309
298
|
*/
|
|
310
299
|
shapeSelected: EmitType<IShapeSelectedEventArgs>;
|
|
311
300
|
/**
|
|
312
301
|
* Triggers when clicking the shape on maps and before the selection is applied.
|
|
313
302
|
*
|
|
314
303
|
* @event itemSelection
|
|
315
|
-
* @blazorProperty 'OnItemSelect'
|
|
316
304
|
*/
|
|
317
305
|
itemSelection: EmitType<ISelectionEventArgs>;
|
|
318
306
|
/**
|
|
319
307
|
* Trigger when mouse move on the shape in maps and before the shape gets highlighted.
|
|
320
308
|
*
|
|
321
309
|
* @event itemHighlight
|
|
322
|
-
* @blazorProperty 'OnItemHighlight'
|
|
323
310
|
*/
|
|
324
311
|
itemHighlight: EmitType<ISelectionEventArgs>;
|
|
325
312
|
/**
|
|
326
313
|
* Triggers when mouse move on the shape in maps and before the shape gets highlighted.
|
|
327
314
|
*
|
|
328
315
|
* @event shapeHighlight
|
|
329
|
-
* @blazorProperty 'ShapeHighlighted'
|
|
330
316
|
*/
|
|
331
317
|
shapeHighlight: EmitType<IShapeSelectedEventArgs>;
|
|
332
318
|
/**
|
|
333
319
|
* Triggers before the maps layer gets rendered.
|
|
334
320
|
*
|
|
335
321
|
* @event layerRendering
|
|
336
|
-
* @blazorProperty 'LayerRendering'
|
|
337
322
|
*/
|
|
338
323
|
layerRendering: EmitType<ILayerRenderingEventArgs>;
|
|
339
324
|
/**
|
|
340
325
|
* Triggers before the maps shape gets rendered.
|
|
341
326
|
*
|
|
342
327
|
* @event shapeRendering
|
|
343
|
-
* @blazorProperty 'ShapeRendering'
|
|
344
328
|
*/
|
|
345
329
|
shapeRendering: EmitType<IShapeRenderingEventArgs>;
|
|
346
330
|
/**
|
|
347
331
|
* Triggers before the maps marker gets rendered.
|
|
348
332
|
*
|
|
349
333
|
* @event markerRendering
|
|
350
|
-
* @blazorProperty 'MarkerRendering'
|
|
351
334
|
*/
|
|
352
335
|
markerRendering: EmitType<IMarkerRenderingEventArgs>;
|
|
353
336
|
/**
|
|
@@ -360,7 +343,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
360
343
|
* Triggers when clicking on the maps marker element.
|
|
361
344
|
*
|
|
362
345
|
* @event markerClick
|
|
363
|
-
* @blazorProperty 'OnMarkerClick'
|
|
364
346
|
*/
|
|
365
347
|
markerClick: EmitType<IMarkerClickEventArgs>;
|
|
366
348
|
/**
|
|
@@ -379,63 +361,54 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
379
361
|
* Triggers when moving the mouse over the marker element in maps.
|
|
380
362
|
*
|
|
381
363
|
* @event markerMouseMove
|
|
382
|
-
* @blazorProperty 'OnMarkerMouseMove'
|
|
383
364
|
*/
|
|
384
365
|
markerMouseMove: EmitType<IMarkerMoveEventArgs>;
|
|
385
366
|
/**
|
|
386
367
|
* Triggers before the data-label gets rendered.
|
|
387
368
|
*
|
|
388
369
|
* @event dataLabelRendering
|
|
389
|
-
* @blazorProperty 'DataLabelRendering'
|
|
390
370
|
*/
|
|
391
371
|
dataLabelRendering: EmitType<ILabelRenderingEventArgs>;
|
|
392
372
|
/**
|
|
393
373
|
* Triggers before the bubble element gets rendered on the map.
|
|
394
374
|
*
|
|
395
375
|
* @event bubbleRendering
|
|
396
|
-
* @blazorProperty 'BubbleRendering'
|
|
397
376
|
*/
|
|
398
377
|
bubbleRendering: EmitType<IBubbleRenderingEventArgs>;
|
|
399
378
|
/**
|
|
400
379
|
* Triggers when performing the click operation on the bubble element in maps.
|
|
401
380
|
*
|
|
402
381
|
* @event bubbleClick
|
|
403
|
-
* @blazorProperty 'OnBubbleClick'
|
|
404
382
|
*/
|
|
405
383
|
bubbleClick: EmitType<IBubbleClickEventArgs>;
|
|
406
384
|
/**
|
|
407
385
|
* Triggers when hovering the mouse on the bubble element in maps.
|
|
408
386
|
*
|
|
409
387
|
* @event bubbleMouseMove
|
|
410
|
-
* @blazorProperty 'OnBubbleMouseMove'
|
|
411
388
|
*/
|
|
412
389
|
bubbleMouseMove: EmitType<IBubbleMoveEventArgs>;
|
|
413
390
|
/**
|
|
414
391
|
* Triggers after the animation completed in the maps component.
|
|
415
392
|
*
|
|
416
393
|
* @event animationComplete
|
|
417
|
-
* @blazorProperty 'AnimationCompleted'
|
|
418
394
|
*/
|
|
419
395
|
animationComplete: EmitType<IAnimationCompleteEventArgs>;
|
|
420
396
|
/**
|
|
421
397
|
* Triggers before rendering the annotation in maps.
|
|
422
398
|
*
|
|
423
399
|
* @event annotationRendering
|
|
424
|
-
* @blazorProperty 'AnnotationRendering'
|
|
425
400
|
*/
|
|
426
401
|
annotationRendering: EmitType<IAnnotationRenderingEventArgs>;
|
|
427
402
|
/**
|
|
428
403
|
* Triggers before the zoom operations in the maps such as zoom in and zoom out.
|
|
429
404
|
*
|
|
430
405
|
* @event zoom
|
|
431
|
-
* @blazorProperty 'OnZoom'
|
|
432
406
|
*/
|
|
433
407
|
zoom: EmitType<IMapZoomEventArgs>;
|
|
434
408
|
/**
|
|
435
409
|
* Triggers before performing the panning operation.
|
|
436
410
|
*
|
|
437
411
|
* @event pan
|
|
438
|
-
* @blazorProperty 'OnPan'
|
|
439
412
|
*/
|
|
440
413
|
pan: EmitType<IMapPanEventArgs>;
|
|
441
414
|
/**
|
|
@@ -628,8 +601,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
628
601
|
mouseDownEvent: Object;
|
|
629
602
|
mouseClickEvent: Object;
|
|
630
603
|
/** @private */
|
|
631
|
-
isBlazor: boolean;
|
|
632
|
-
/** @private */
|
|
633
604
|
shapeSelectionClass: Element;
|
|
634
605
|
/** @private */
|
|
635
606
|
selectedElementId: string[];
|
|
@@ -711,6 +682,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
711
682
|
* @returns {void}
|
|
712
683
|
*/
|
|
713
684
|
protected preRender(): void;
|
|
685
|
+
private renderElements;
|
|
714
686
|
/**
|
|
715
687
|
* To Initialize the control rendering.
|
|
716
688
|
*
|
|
@@ -753,13 +725,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
753
725
|
* @private
|
|
754
726
|
*/
|
|
755
727
|
markerInitialSelection(layerIndex: number, markerIndex: number, markerSettings: MarkerSettingsModel, latitude: number, longitude: number): void;
|
|
756
|
-
/**
|
|
757
|
-
* To append blazor templates
|
|
758
|
-
*
|
|
759
|
-
* @returns {void}
|
|
760
|
-
* @private
|
|
761
|
-
*/
|
|
762
|
-
blazorTemplates(): void;
|
|
763
728
|
/**
|
|
764
729
|
* Render the map area border
|
|
765
730
|
*
|
|
@@ -848,7 +813,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
848
813
|
* This method is used to perform the operations when a click operation is performed on maps.
|
|
849
814
|
*
|
|
850
815
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
851
|
-
* @blazorProperty 'PerformClick'
|
|
852
816
|
*/
|
|
853
817
|
mapsOnClick(e: PointerEvent): void;
|
|
854
818
|
private getClickLocation;
|
|
@@ -877,7 +841,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
877
841
|
* This method is used to perform operations when performing the double click operation on maps.
|
|
878
842
|
*
|
|
879
843
|
* @param {PointerEvent} e - Specifies the pointer event.
|
|
880
|
-
* @blazorProperty 'PerformDoubleClick'
|
|
881
844
|
*/
|
|
882
845
|
mapsOnDoubleClick(e: PointerEvent): void;
|
|
883
846
|
/**
|
|
@@ -1023,6 +986,10 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
1023
986
|
* To find navigation line visibility
|
|
1024
987
|
*/
|
|
1025
988
|
private isNavigationVisible;
|
|
989
|
+
/**
|
|
990
|
+
* To find space between the secondary element and svg element.
|
|
991
|
+
*/
|
|
992
|
+
private getExtraPosition;
|
|
1026
993
|
/**
|
|
1027
994
|
* To find marker visibility
|
|
1028
995
|
*/
|
package/src/maps/maps.js
CHANGED
|
@@ -27,10 +27,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
27
27
|
*/
|
|
28
28
|
import { Component, NotifyPropertyChanges, Property, Ajax } from '@syncfusion/ej2-base';
|
|
29
29
|
import { EventHandler, Browser, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';
|
|
30
|
-
import { Event, remove, L10n, Collection, Internationalization, Complex
|
|
31
|
-
import { updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';
|
|
30
|
+
import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';
|
|
32
31
|
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
|
|
33
|
-
import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, getMousePosition } from './utils/helper';
|
|
32
|
+
import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, getMousePosition, calculateSize } from './utils/helper';
|
|
34
33
|
import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle } from './utils/helper';
|
|
35
34
|
import { createStyle } from './utils/helper';
|
|
36
35
|
import { ZoomSettings, LegendSettings } from './model/base';
|
|
@@ -215,20 +214,14 @@ var Maps = /** @class */ (function (_super) {
|
|
|
215
214
|
*/
|
|
216
215
|
Maps.prototype.preRender = function () {
|
|
217
216
|
this.isDevice = Browser.isDevice;
|
|
218
|
-
this.isBlazor = isBlazor();
|
|
219
217
|
this.initPrivateVariable();
|
|
220
218
|
this.allowServerDataBinding = false;
|
|
221
219
|
this.unWireEVents();
|
|
222
220
|
this.wireEVents();
|
|
223
221
|
this.setCulture();
|
|
224
222
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
*
|
|
228
|
-
* @returns {void}
|
|
229
|
-
*/
|
|
230
|
-
Maps.prototype.render = function () {
|
|
231
|
-
this.trigger(load, this.isBlazor ? {} : { maps: this });
|
|
223
|
+
Maps.prototype.renderElements = function () {
|
|
224
|
+
this.trigger(load, { maps: this });
|
|
232
225
|
this.createSVG();
|
|
233
226
|
this.findBaseAndSubLayers();
|
|
234
227
|
this.createSecondaryElement();
|
|
@@ -240,6 +233,14 @@ var Maps = /** @class */ (function (_super) {
|
|
|
240
233
|
this.processRequestJsonData();
|
|
241
234
|
this.renderComplete();
|
|
242
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* To Initialize the control rendering.
|
|
238
|
+
*
|
|
239
|
+
* @returns {void}
|
|
240
|
+
*/
|
|
241
|
+
Maps.prototype.render = function () {
|
|
242
|
+
this.renderElements();
|
|
243
|
+
};
|
|
243
244
|
Maps.prototype.processRequestJsonData = function () {
|
|
244
245
|
var _this = this;
|
|
245
246
|
var length = this.layersCollection.length - 1;
|
|
@@ -252,7 +253,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
252
253
|
if (layer.shapeData instanceof DataManager) {
|
|
253
254
|
_this.serverProcess['request']++;
|
|
254
255
|
dataModule = layer.shapeData;
|
|
255
|
-
queryModule = layer.query instanceof Query ? layer.query :
|
|
256
|
+
queryModule = layer.query instanceof Query ? layer.query : new Query();
|
|
256
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
257
258
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
258
259
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -268,7 +269,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
268
269
|
if (layer.dataSource instanceof DataManager) {
|
|
269
270
|
_this.serverProcess['request']++;
|
|
270
271
|
dataModule = layer.dataSource;
|
|
271
|
-
queryModule = layer.query instanceof Query ? layer.query :
|
|
272
|
+
queryModule = layer.query instanceof Query ? layer.query : new Query();
|
|
272
273
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
273
274
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
274
275
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -282,8 +283,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
282
283
|
if (layer.markerSettings[i].dataSource instanceof DataManager) {
|
|
283
284
|
_this.serverProcess['request']++;
|
|
284
285
|
dataModule = layer.markerSettings[i].dataSource;
|
|
285
|
-
queryModule = layer.markerSettings[i].query instanceof Query ? layer.markerSettings[i].query :
|
|
286
|
-
(new Query().requiresCount()) : new Query();
|
|
286
|
+
queryModule = layer.markerSettings[i].query instanceof Query ? layer.markerSettings[i].query : new Query();
|
|
287
287
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
288
288
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
289
289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -302,8 +302,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
302
302
|
if (layer.bubbleSettings[i].dataSource instanceof DataManager) {
|
|
303
303
|
_this.serverProcess['request']++;
|
|
304
304
|
dataModule = layer.bubbleSettings[i].dataSource;
|
|
305
|
-
queryModule = layer.bubbleSettings[i].query instanceof Query ? layer.bubbleSettings[i].query :
|
|
306
|
-
(new Query().requiresCount()) : new Query();
|
|
305
|
+
queryModule = layer.bubbleSettings[i].query instanceof Query ? layer.bubbleSettings[i].query : new Query();
|
|
307
306
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
308
307
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
309
308
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -396,7 +395,15 @@ var Maps = /** @class */ (function (_super) {
|
|
|
396
395
|
}
|
|
397
396
|
this.mapLayerPanel.measureLayerPanel();
|
|
398
397
|
this.element.appendChild(this.svgObject);
|
|
398
|
+
var position = this.getExtraPosition();
|
|
399
399
|
for (var i = 0; i < this.layers.length; i++) {
|
|
400
|
+
if (position.x !== 0 || position.y !== 0) {
|
|
401
|
+
var markerTemplate = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
402
|
+
if (!isNullOrUndefined(markerTemplate)) {
|
|
403
|
+
markerTemplate.style.top = this.mapAreaRect.y + position.y + 'px';
|
|
404
|
+
markerTemplate.style.left = this.mapAreaRect.x + position.x + 'px';
|
|
405
|
+
}
|
|
406
|
+
}
|
|
400
407
|
if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
|
|
401
408
|
this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
|
|
402
409
|
var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
|
|
@@ -465,7 +472,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
465
472
|
tileElement1.style.left = left + 'px';
|
|
466
473
|
}
|
|
467
474
|
this.arrangeTemplate();
|
|
468
|
-
var blazor = this.isBlazor ? this.blazorTemplates() : null;
|
|
469
475
|
if (this.annotationsModule) {
|
|
470
476
|
if (this.width !== '0px' && this.height !== '0px' && this.width !== '0%' && this.height !== '0%') {
|
|
471
477
|
this.annotationsModule.renderAnnotationElements();
|
|
@@ -478,7 +484,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
478
484
|
}
|
|
479
485
|
}
|
|
480
486
|
this.zoomingChange();
|
|
481
|
-
this.trigger(loaded,
|
|
487
|
+
this.trigger(loaded, { maps: this, isResized: this.isResize });
|
|
482
488
|
this.isResize = false;
|
|
483
489
|
};
|
|
484
490
|
/**
|
|
@@ -544,37 +550,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
544
550
|
}
|
|
545
551
|
}
|
|
546
552
|
};
|
|
547
|
-
/**
|
|
548
|
-
* To append blazor templates
|
|
549
|
-
*
|
|
550
|
-
* @returns {void}
|
|
551
|
-
* @private
|
|
552
|
-
*/
|
|
553
|
-
Maps.prototype.blazorTemplates = function () {
|
|
554
|
-
var _this = this;
|
|
555
|
-
for (var i = 0; i < this.layers.length; i++) {
|
|
556
|
-
var markerLength = this.layers[i].markerSettings.length - 1;
|
|
557
|
-
if (markerLength >= 0) {
|
|
558
|
-
if (this.layers[i].dataLabelSettings.visible || this.layers[i].markerSettings[markerLength].template) {
|
|
559
|
-
updateBlazorTemplate(this.element.id + '_LabelTemplate', 'LabelTemplate', this.layers[i].dataLabelSettings);
|
|
560
|
-
for (var j = 0; j < this.layers[i].markerSettings.length; j++) {
|
|
561
|
-
var markerRendered = function () {
|
|
562
|
-
for (var x = 0; x < _this.layers.length; x++) {
|
|
563
|
-
var markerTemplateEle = document.getElementById(_this.element.id + '_LayerIndex_' + x + '_Markers_Template_Group');
|
|
564
|
-
if (!isNullOrUndefined(markerTemplateEle)) {
|
|
565
|
-
for (var z = 0; z < markerTemplateEle.childElementCount; z++) {
|
|
566
|
-
var markerTemplate = markerTemplateEle.childNodes[z];
|
|
567
|
-
markerTemplate['style']['transform'] = 'translate(-50%, -50%)';
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
};
|
|
572
|
-
updateBlazorTemplate(this.element.id + '_MarkerTemplate' + j, 'MarkerTemplate', this.layers[i].markerSettings[j], undefined, markerRendered);
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
553
|
/**
|
|
579
554
|
* Render the map area border
|
|
580
555
|
*
|
|
@@ -851,12 +826,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
851
826
|
* @returns {void}
|
|
852
827
|
*/
|
|
853
828
|
Maps.prototype.createSVG = function () {
|
|
854
|
-
resetBlazorTemplate(this.element.id + '_LabelTemplate', 'LabelTemplate');
|
|
855
|
-
for (var i = 0; i < this.layers.length; i++) {
|
|
856
|
-
for (var j = 0; j < this.layers[i].markerSettings.length; j++) {
|
|
857
|
-
resetBlazorTemplate(this.element.id + '_MarkerTemplate' + j, 'MarkerTemplate');
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
829
|
this.removeSvg();
|
|
861
830
|
createSvg(this);
|
|
862
831
|
};
|
|
@@ -866,9 +835,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
866
835
|
* @returns {void}
|
|
867
836
|
*/
|
|
868
837
|
Maps.prototype.removeSvg = function () {
|
|
869
|
-
for (var i = 0; i < this.annotations.length; i++) {
|
|
870
|
-
resetBlazorTemplate(this.element.id + '_ContentTemplate_' + i, 'ContentTemplate');
|
|
871
|
-
}
|
|
872
838
|
removeElement(this.element.id + '_Secondary_Element');
|
|
873
839
|
removeElement(this.element.id + '_tile_parent');
|
|
874
840
|
removeElement(this.element.id + '_tiles');
|
|
@@ -946,7 +912,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
946
912
|
* This method is used to perform the operations when a click operation is performed on maps.
|
|
947
913
|
*
|
|
948
914
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
949
|
-
* @blazorProperty 'PerformClick'
|
|
950
915
|
*/
|
|
951
916
|
Maps.prototype.mapsOnClick = function (e) {
|
|
952
917
|
var _this = this;
|
|
@@ -1098,7 +1063,9 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1098
1063
|
}
|
|
1099
1064
|
}
|
|
1100
1065
|
this.notify(Browser.touchEndEvent, e);
|
|
1101
|
-
e.
|
|
1066
|
+
if (e.cancelable) {
|
|
1067
|
+
e.preventDefault();
|
|
1068
|
+
}
|
|
1102
1069
|
return false;
|
|
1103
1070
|
};
|
|
1104
1071
|
/**
|
|
@@ -1150,7 +1117,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1150
1117
|
* This method is used to perform operations when performing the double click operation on maps.
|
|
1151
1118
|
*
|
|
1152
1119
|
* @param {PointerEvent} e - Specifies the pointer event.
|
|
1153
|
-
* @blazorProperty 'PerformDoubleClick'
|
|
1154
1120
|
*/
|
|
1155
1121
|
Maps.prototype.mapsOnDoubleClick = function (e) {
|
|
1156
1122
|
this.notify('dblclick', e);
|
|
@@ -1176,9 +1142,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1176
1142
|
}
|
|
1177
1143
|
var doubleClickArgs = { cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
|
|
1178
1144
|
target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null };
|
|
1179
|
-
|
|
1180
|
-
target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null };
|
|
1181
|
-
this.trigger('doubleClick', this.isBlazor ? doubleClickBlazorArgs : doubleClickArgs);
|
|
1145
|
+
this.trigger('doubleClick', doubleClickArgs);
|
|
1182
1146
|
}
|
|
1183
1147
|
};
|
|
1184
1148
|
/**
|
|
@@ -1277,26 +1241,28 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1277
1241
|
*/
|
|
1278
1242
|
Maps.prototype.mapsOnResize = function (e) {
|
|
1279
1243
|
var _this = this;
|
|
1280
|
-
this.isResize = true;
|
|
1244
|
+
this.isResize = this.isReset = true;
|
|
1281
1245
|
var args = {
|
|
1246
|
+
cancel: false,
|
|
1282
1247
|
name: resize,
|
|
1283
1248
|
previousSize: this.availableSize,
|
|
1284
|
-
currentSize:
|
|
1285
|
-
maps:
|
|
1249
|
+
currentSize: calculateSize(this),
|
|
1250
|
+
maps: this
|
|
1286
1251
|
};
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1252
|
+
this.trigger(resize, args);
|
|
1253
|
+
if (!args.cancel) {
|
|
1254
|
+
if (this.resizeTo) {
|
|
1255
|
+
clearTimeout(this.resizeTo);
|
|
1256
|
+
}
|
|
1257
|
+
if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
|
|
1258
|
+
this.resizeTo = setTimeout(function () {
|
|
1259
|
+
_this.unWireEVents();
|
|
1260
|
+
_this.createSVG();
|
|
1261
|
+
_this.refreshing = true;
|
|
1262
|
+
_this.wireEVents();
|
|
1263
|
+
_this.render();
|
|
1264
|
+
}, 500);
|
|
1265
|
+
}
|
|
1300
1266
|
}
|
|
1301
1267
|
return false;
|
|
1302
1268
|
};
|
|
@@ -1556,7 +1522,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1556
1522
|
this.zoomNotApplied = true;
|
|
1557
1523
|
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
|
|
1558
1524
|
var zoomArgs = {
|
|
1559
|
-
cancel: false, name: 'zoom', type: zoomIn, maps:
|
|
1525
|
+
cancel: false, name: 'zoom', type: zoomIn, maps: this,
|
|
1560
1526
|
tileTranslatePoint: {}, translatePoint: {},
|
|
1561
1527
|
tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
|
|
1562
1528
|
scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
|
|
@@ -1706,19 +1672,21 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1706
1672
|
render = true;
|
|
1707
1673
|
break;
|
|
1708
1674
|
case 'zoomSettings':
|
|
1709
|
-
if (
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1675
|
+
if (!isNullOrUndefined(oldProp.zoomSettings)) {
|
|
1676
|
+
if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
|
|
1677
|
+
render = false;
|
|
1678
|
+
}
|
|
1679
|
+
else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
|
|
1680
|
+
this.zoomSettings.zoomFactor = 1;
|
|
1681
|
+
render = true;
|
|
1682
|
+
}
|
|
1683
|
+
else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
|
|
1684
|
+
this.zoomSettings.zoomFactor = 1;
|
|
1685
|
+
render = true;
|
|
1686
|
+
}
|
|
1687
|
+
else {
|
|
1688
|
+
render = true;
|
|
1689
|
+
}
|
|
1722
1690
|
}
|
|
1723
1691
|
break;
|
|
1724
1692
|
case 'locale':
|
|
@@ -1731,12 +1699,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1731
1699
|
if (newProp.layers && isMarker) {
|
|
1732
1700
|
removeElement(this.element.id + '_Markers_Group');
|
|
1733
1701
|
if (this.isTileMap) {
|
|
1734
|
-
|
|
1735
|
-
this.render();
|
|
1736
|
-
}
|
|
1737
|
-
else {
|
|
1738
|
-
this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
|
|
1739
|
-
}
|
|
1702
|
+
this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
|
|
1740
1703
|
}
|
|
1741
1704
|
else {
|
|
1742
1705
|
this.render();
|
|
@@ -1747,7 +1710,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1747
1710
|
}
|
|
1748
1711
|
else {
|
|
1749
1712
|
this.createSVG();
|
|
1750
|
-
this.
|
|
1713
|
+
this.renderElements();
|
|
1751
1714
|
}
|
|
1752
1715
|
}
|
|
1753
1716
|
};
|
|
@@ -1887,6 +1850,21 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1887
1850
|
});
|
|
1888
1851
|
return isVisible;
|
|
1889
1852
|
};
|
|
1853
|
+
/**
|
|
1854
|
+
* To find space between the secondary element and svg element.
|
|
1855
|
+
*/
|
|
1856
|
+
Maps.prototype.getExtraPosition = function () {
|
|
1857
|
+
var top;
|
|
1858
|
+
var left;
|
|
1859
|
+
var svgElement = getElement(this.element.id + '_svg');
|
|
1860
|
+
if (!isNullOrUndefined(svgElement)) {
|
|
1861
|
+
var svgClientRect = svgElement.getClientRects()[0];
|
|
1862
|
+
var mapsClientRect = (getElement(this.element.id + '_Secondary_Element')).getClientRects()[0];
|
|
1863
|
+
top = svgClientRect.top - mapsClientRect.top;
|
|
1864
|
+
left = svgClientRect.left - mapsClientRect.left;
|
|
1865
|
+
}
|
|
1866
|
+
return new Point(left, top);
|
|
1867
|
+
};
|
|
1890
1868
|
/**
|
|
1891
1869
|
* To find marker visibility
|
|
1892
1870
|
*/
|
|
@@ -375,7 +375,6 @@ export interface ColorMappingSettingsModel {
|
|
|
375
375
|
*
|
|
376
376
|
* @aspDefaultValueIgnore
|
|
377
377
|
* @default null
|
|
378
|
-
* @isBlazorNullableType true
|
|
379
378
|
*/
|
|
380
379
|
from?: number;
|
|
381
380
|
|
|
@@ -384,7 +383,6 @@ export interface ColorMappingSettingsModel {
|
|
|
384
383
|
*
|
|
385
384
|
* @aspDefaultValueIgnore
|
|
386
385
|
* @default null
|
|
387
|
-
* @isBlazorNullableType true
|
|
388
386
|
*/
|
|
389
387
|
to?: number;
|
|
390
388
|
|
|
@@ -834,7 +832,6 @@ export interface ZoomSettingsModel {
|
|
|
834
832
|
* Sets and gets the orientation of the zoom toolbar.
|
|
835
833
|
*
|
|
836
834
|
* @default Horizontal
|
|
837
|
-
* @blazorProperty 'ToolbarOrientation'
|
|
838
835
|
*/
|
|
839
836
|
toolBarOrientation?: Orientation;
|
|
840
837
|
|
|
@@ -883,7 +880,6 @@ export interface ZoomSettingsModel {
|
|
|
883
880
|
* Enables or disables the double click zooming in maps.
|
|
884
881
|
*
|
|
885
882
|
* @default false
|
|
886
|
-
* @blazorProperty 'ZoomOnDoubleClick'
|
|
887
883
|
*/
|
|
888
884
|
doubleClickZoom?: boolean;
|
|
889
885
|
|
|
@@ -979,6 +975,13 @@ export interface ToggleLegendSettingsModel {
|
|
|
979
975
|
*/
|
|
980
976
|
export interface LegendSettingsModel {
|
|
981
977
|
|
|
978
|
+
/**
|
|
979
|
+
* Enables or disables to render the legend item based on the shapes from the data source of markers.
|
|
980
|
+
*
|
|
981
|
+
* @default false
|
|
982
|
+
*/
|
|
983
|
+
useMarkerShape?: boolean;
|
|
984
|
+
|
|
982
985
|
/**
|
|
983
986
|
* Enables or disables the toggle visibility for legend in maps.
|
|
984
987
|
*
|
|
@@ -1142,7 +1145,6 @@ export interface LegendSettingsModel {
|
|
|
1142
1145
|
* Sets and gets the path for the legend from the data source to be shown.
|
|
1143
1146
|
*
|
|
1144
1147
|
* @default null
|
|
1145
|
-
* @blazorProperty 'LegendPath'
|
|
1146
1148
|
*/
|
|
1147
1149
|
showLegendPath?: string;
|
|
1148
1150
|
|