@syncfusion/ej2-maps 20.3.49 → 20.4.38

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 (48) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +65 -51
  4. package/dist/ej2-maps.min.js +2 -2
  5. package/dist/ej2-maps.umd.min.js +2 -2
  6. package/dist/ej2-maps.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-maps.es2015.js +1030 -781
  8. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  9. package/dist/es6/ej2-maps.es5.js +1017 -772
  10. package/dist/es6/ej2-maps.es5.js.map +1 -1
  11. package/dist/global/ej2-maps.min.js +2 -2
  12. package/dist/global/ej2-maps.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +34 -21
  15. package/src/maps/layers/bing-map.d.ts +1 -0
  16. package/src/maps/layers/bing-map.js +1 -0
  17. package/src/maps/layers/bubble.d.ts +4 -0
  18. package/src/maps/layers/bubble.js +7 -3
  19. package/src/maps/layers/color-mapping.d.ts +5 -0
  20. package/src/maps/layers/color-mapping.js +5 -3
  21. package/src/maps/layers/data-label.d.ts +0 -1
  22. package/src/maps/layers/data-label.js +13 -14
  23. package/src/maps/layers/layer-panel.d.ts +7 -7
  24. package/src/maps/layers/layer-panel.js +119 -72
  25. package/src/maps/layers/legend.js +30 -25
  26. package/src/maps/layers/marker.d.ts +13 -0
  27. package/src/maps/layers/marker.js +133 -115
  28. package/src/maps/layers/navigation-selected-line.d.ts +5 -0
  29. package/src/maps/layers/navigation-selected-line.js +70 -65
  30. package/src/maps/maps-model.d.ts +1 -1
  31. package/src/maps/maps.d.ts +19 -0
  32. package/src/maps/maps.js +469 -382
  33. package/src/maps/model/base.js +2 -2
  34. package/src/maps/model/export-image.d.ts +4 -3
  35. package/src/maps/model/export-image.js +7 -6
  36. package/src/maps/model/export-pdf.d.ts +6 -6
  37. package/src/maps/model/export-pdf.js +8 -7
  38. package/src/maps/model/interface.d.ts +2 -2
  39. package/src/maps/model/print.d.ts +4 -2
  40. package/src/maps/model/print.js +6 -3
  41. package/src/maps/user-interaction/annotation.js +2 -3
  42. package/src/maps/user-interaction/highlight.js +37 -13
  43. package/src/maps/user-interaction/selection.js +4 -2
  44. package/src/maps/user-interaction/tooltip.js +8 -8
  45. package/src/maps/user-interaction/zoom.d.ts +5 -0
  46. package/src/maps/user-interaction/zoom.js +39 -29
  47. package/src/maps/utils/helper.d.ts +2 -0
  48. package/src/maps/utils/helper.js +58 -45
@@ -11,8 +11,6 @@ var __extends = (this && this.__extends) || (function () {
11
11
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
12
  };
13
13
  })();
14
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
15
- /* eslint-disable @typescript-eslint/no-unused-vars */
16
14
  /* eslint-disable max-len */
17
15
  /**
18
16
  * Helper functions for maps control
@@ -684,24 +682,24 @@ export function renderTextElement(option, style, color, parent, isMinus) {
684
682
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
685
683
  export function convertElement(element, markerId, data, index, mapObj) {
686
684
  var childElement = createElement('div', {
687
- id: markerId,
688
- styles: 'position: absolute;pointer-events: auto;'
685
+ id: markerId
689
686
  });
687
+ childElement.style.cssText = 'position: absolute;pointer-events: auto;';
690
688
  var elementLength = element.length;
691
689
  while (elementLength > 0) {
692
690
  childElement.appendChild(element[0]);
693
691
  elementLength--;
694
692
  }
695
693
  var templateHtml = childElement.innerHTML;
696
- var templateSplitValue;
697
694
  var properties = Object.keys(data);
695
+ var regExp = RegExp;
698
696
  for (var i = 0; i < properties.length; i++) {
699
697
  if (typeof data[properties[i]] === 'object') {
700
698
  templateHtml = convertStringToValue(templateHtml, '', data, mapObj);
701
699
  // eslint-disable-next-line @typescript-eslint/ban-types
702
700
  }
703
701
  else if (properties[i].toLowerCase() !== 'latitude' && properties[i].toLowerCase() !== 'longitude') {
704
- templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
702
+ templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
705
703
  }
706
704
  }
707
705
  childElement.innerHTML = templateHtml;
@@ -738,6 +736,7 @@ export function formatValue(value, maps) {
738
736
  export function convertStringToValue(stringTemplate, format, data, maps) {
739
737
  var templateHtml = (stringTemplate === '') ? format : stringTemplate;
740
738
  var templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
739
+ var regExp = RegExp;
741
740
  for (var i = 0; i < templateValue.length; i++) {
742
741
  if ((templateValue[i].indexOf('}}') > -1 && templateValue[i].indexOf('.') > -1) ||
743
742
  (templateValue[i].indexOf('}') > -1 && templateValue[i].search('.') > -1)) {
@@ -747,7 +746,7 @@ export function convertStringToValue(stringTemplate, format, data, maps) {
747
746
  var templateSplitValue = (getValueFromObject(data, split[j])).toString();
748
747
  templateHtml = (stringTemplate === '') ?
749
748
  templateHtml.split('${' + split[j] + '}').join(formatValue(templateSplitValue, maps)) :
750
- templateHtml.replace(new RegExp('{{:' + split[j] + '}}', 'g'), templateSplitValue);
749
+ templateHtml.replace(new regExp('{{:' + split[j] + '}}', 'g'), templateSplitValue);
751
750
  }
752
751
  }
753
752
  }
@@ -769,15 +768,17 @@ export function convertElementFromLabel(element, labelId, data, index, mapObj) {
769
768
  var templateHtml = labelEle.outerHTML;
770
769
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
771
770
  var properties = Object.keys(data);
771
+ var regExp = RegExp;
772
772
  for (var i = 0; i < properties.length; i++) {
773
773
  // eslint-disable-next-line @typescript-eslint/ban-types
774
- templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
774
+ templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
775
775
  }
776
- return createElement('div', {
776
+ var templateEle = createElement('div', {
777
777
  id: labelId,
778
- innerHTML: templateHtml,
779
- styles: 'position: absolute'
778
+ innerHTML: templateHtml
780
779
  });
780
+ templateEle.style.position = 'absolute';
781
+ return templateEle;
781
782
  }
782
783
  /**
783
784
  *
@@ -880,7 +881,7 @@ export function markerShapeChoose(eventArgs, data) {
880
881
  var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
881
882
  (getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
882
883
  data[eventArgs.shapeValuePath]);
883
- eventArgs.shape = (shape.toString() !== "") ? shape : eventArgs.shape;
884
+ eventArgs.shape = (shape.toString() !== '') ? shape : eventArgs.shape;
884
885
  if (data[eventArgs.shapeValuePath] === 'Image') {
885
886
  eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
886
887
  ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
@@ -889,7 +890,7 @@ export function markerShapeChoose(eventArgs, data) {
889
890
  }
890
891
  else {
891
892
  var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
892
- eventArgs.shape = (shapes.toString() !== "") ? shapes : eventArgs.shape;
893
+ eventArgs.shape = (shapes.toString() !== '') ? shapes : eventArgs.shape;
893
894
  var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
894
895
  ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
895
896
  data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
@@ -968,8 +969,6 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
968
969
  container['top'] : (container['bottom'] - container['top'])));
969
970
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
970
971
  var translate = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
971
- var transPoint = (maps.isTileMap) ? { x: 0, y: 0 } : (maps.translatePoint.x !== 0) ?
972
- maps.translatePoint : translate['location'];
973
972
  var dataIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_dataIndex_')[1].split('_')[0], 10);
974
973
  var markerIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
975
974
  var markerSetting = currentLayer.markerSettings[markerIndex];
@@ -1618,6 +1617,7 @@ export function drawStar(maps, options, size, location, element) {
1618
1617
  * @param {PathOption} options - Specifies the path options
1619
1618
  * @param {Size} size - Specifies the size
1620
1619
  * @param {MapLocation} location - Specifies the map location
1620
+ * @param {string} type - Specifies the type.
1621
1621
  * @param {Element} element - Specifies the element
1622
1622
  * @returns {Element} - Returns the element
1623
1623
  * @private
@@ -1730,7 +1730,6 @@ export function checkShapeDataFields(dataSource, properties, dataPath, propertyP
1730
1730
  export function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1731
1731
  if (!isNullOrUndefined(shapeData) && !isNullOrUndefined(shape)) {
1732
1732
  if (!isNullOrUndefined(shapePropertyPath)) {
1733
- var length_1;
1734
1733
  var properties = (Object.prototype.toString.call(shapePropertyPath) === '[object Array]' ?
1735
1734
  shapePropertyPath : [shapePropertyPath]);
1736
1735
  for (var i = 0; i < properties.length; i++) {
@@ -2109,7 +2108,8 @@ export function getTranslate(mapObject, layer, animate) {
2109
2108
  mapObject.zoomTranslatePoint.y = y;
2110
2109
  }
2111
2110
  else {
2112
- if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2111
+ if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1
2112
+ || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2113
2113
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2114
2114
  scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2115
2115
  mapWidth *= scaleFactor;
@@ -2127,8 +2127,10 @@ export function getTranslate(mapObject, layer, animate) {
2127
2127
  }
2128
2128
  }
2129
2129
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2130
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2131
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2130
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2131
+ mapObject.translatePoint.x : x;
2132
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2133
+ mapObject.translatePoint.y : y;
2132
2134
  }
2133
2135
  }
2134
2136
  scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
@@ -2179,9 +2181,11 @@ export function getZoomTranslate(mapObject, layer, animate) {
2179
2181
  mapObject.mapScaleValue = mapObject.zoomSettings.zoomFactor !== 1 &&
2180
2182
  mapObject.zoomSettings.zoomFactor ===
2181
2183
  mapObject.mapScaleValue ? mapObject.zoomSettings.zoomFactor :
2182
- mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ? mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
2183
- if (mapObject.zoomSettings.shouldZoomInitially) {
2184
- mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
2184
+ mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ?
2185
+ mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
2186
+ if (mapObject.zoomSettings.shouldZoomInitially && !mapObject.isZoomByPosition) {
2187
+ mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence
2188
+ || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
2185
2189
  ? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? mapObject.mapScaleValue : mapObject.markerZoomFactor;
2186
2190
  zoomFactorValue = mapObject.mapScaleValue;
2187
2191
  if (!isNullOrUndefined(mapObject.markerCenterLatitude) && !isNullOrUndefined(mapObject.markerCenterLongitude)) {
@@ -2208,12 +2212,17 @@ export function getZoomTranslate(mapObject, layer, animate) {
2208
2212
  var leftPosition = ((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) / factor;
2209
2213
  var point = checkZoomMethod ? calculateCenterFromPixel(mapObject, layer) :
2210
2214
  convertGeoToPoint(latitude, longitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
2211
- if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) && !mapObject.zoomNotApplied) {
2215
+ if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) &&
2216
+ !mapObject.zoomNotApplied) {
2212
2217
  if (mapObject.previousProjection !== mapObject.projectionType) {
2213
2218
  x = -point.x + leftPosition;
2214
2219
  y = -point.y + topPosition;
2215
2220
  }
2216
2221
  else {
2222
+ if (mapObject.isZoomByPosition) {
2223
+ mapObject.zoomTranslatePoint.x = -point.x + leftPosition;
2224
+ mapObject.zoomTranslatePoint.y = -point.y + topPosition;
2225
+ }
2217
2226
  x = mapObject.zoomTranslatePoint.x;
2218
2227
  y = mapObject.zoomTranslatePoint.y;
2219
2228
  zoomFactorValue = zoomFactor;
@@ -2224,8 +2233,10 @@ export function getZoomTranslate(mapObject, layer, animate) {
2224
2233
  y = -point.y + topPosition + mapObject.mapAreaRect.y / zoomFactor;
2225
2234
  }
2226
2235
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2227
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2228
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2236
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2237
+ mapObject.translatePoint.y : y;
2238
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2239
+ mapObject.translatePoint.x : x;
2229
2240
  }
2230
2241
  scaleFactor = zoomFactorValue !== 0 ? zoomFactorValue : 1;
2231
2242
  }
@@ -2263,8 +2274,10 @@ export function getZoomTranslate(mapObject, layer, animate) {
2263
2274
  }
2264
2275
  }
2265
2276
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2266
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : leftPosition;
2267
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : topPosition;
2277
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2278
+ mapObject.translatePoint.x : leftPosition;
2279
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2280
+ mapObject.translatePoint.y : topPosition;
2268
2281
  }
2269
2282
  }
2270
2283
  scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
@@ -2329,6 +2342,7 @@ export function Internalize(maps, value) {
2329
2342
  * Function to compile the template function for maps.
2330
2343
  *
2331
2344
  * @param {string} template - Specifies the template
2345
+ * @param {Maps} maps - Specifies the Maps instance.
2332
2346
  * @returns {Function} - Returns the function
2333
2347
  * @private
2334
2348
  */
@@ -2336,11 +2350,10 @@ export function Internalize(maps, value) {
2336
2350
  export function getTemplateFunction(template, maps) {
2337
2351
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2338
2352
  var templateFn = null;
2339
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2340
- var e;
2341
2353
  try {
2342
2354
  if (document.querySelectorAll(template).length) {
2343
2355
  templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
2356
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2344
2357
  }
2345
2358
  else if (maps.isVue || maps.isVue3) {
2346
2359
  templateFn = templateComplier(template);
@@ -2422,7 +2435,7 @@ export function triggerShapeEvent(targetId, selection, maps, eventName) {
2422
2435
  target: targetId,
2423
2436
  maps: maps
2424
2437
  };
2425
- maps.trigger(eventName, eventArgs, function (observedArgs) {
2438
+ maps.trigger(eventName, eventArgs, function () {
2426
2439
  eventArgs.border.opacity = isNullOrUndefined(eventArgs.border.opacity) ? eventArgs.opacity : eventArgs.border.opacity;
2427
2440
  });
2428
2441
  return eventArgs;
@@ -2466,7 +2479,6 @@ export function querySelector(args, elementSelector) {
2466
2479
  * @returns {Element} - Returns the element
2467
2480
  */
2468
2481
  export function getTargetElement(layerIndex, name, enable, map) {
2469
- var shapeIndex;
2470
2482
  var targetId;
2471
2483
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2472
2484
  var shapeData = map.layers[layerIndex].shapeData['features'];
@@ -2546,7 +2558,8 @@ shapeData, data) {
2546
2558
  maps: map
2547
2559
  };
2548
2560
  map.trigger('itemSelection', eventArgs, function (observedArgs) {
2549
- eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity : selectionSettings.border.opacity;
2561
+ eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
2562
+ selectionSettings.border.opacity;
2550
2563
  map.shapeSelectionItem.push(eventArgs.shapeData);
2551
2564
  if (!getElement('ShapeselectionMap')) {
2552
2565
  document.body.appendChild(createStyle('ShapeselectionMap', 'ShapeselectionMapStyle', eventArgs));
@@ -2646,16 +2659,16 @@ export function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element
2646
2659
  var demo = str[0].length;
2647
2660
  for (var i = 1; i < str.length; i++) {
2648
2661
  if (demo < str[i].length) {
2649
- demo = str[i].length;
2662
+ demo = (str[i]).length;
2650
2663
  }
2651
2664
  }
2652
2665
  if (!tooltip) {
2653
2666
  tooltip = createElement('div', {
2654
- id: id,
2655
- styles: 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2656
- 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2657
- 'font-size:12px; font-family: "Segoe UI"; text-align:center'
2667
+ id: id
2658
2668
  });
2669
+ tooltip.style.cssText = 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2670
+ 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2671
+ 'font-size:12px; font-family: "Segoe UI"; text-align:center';
2659
2672
  }
2660
2673
  if (x < (areaWidth - width)) {
2661
2674
  // eslint-disable-next-line no-self-assign
@@ -2716,7 +2729,7 @@ export function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element)
2716
2729
  // if (touches) {
2717
2730
  // touchList = [];
2718
2731
  // for (let i: number = 0, length: number = touches.length; i < length; i++) {
2719
- // touchList.push({ pageX: touches[i].clientX, pageY: touches[i].clientY, pointerId: null });
2732
+ // touchList.push({ pageX: touches[i as number].clientX, pageY: touches[i as number].clientY, pointerId: null });
2720
2733
  // }
2721
2734
  // } else {
2722
2735
  // touchList = touchList ? touchList : [];
@@ -2724,8 +2737,8 @@ export function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element)
2724
2737
  // touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
2725
2738
  // } else {
2726
2739
  // for (let i: number = 0, length: number = touchList.length; i < length; i++) {
2727
- // if (touchList[i].pointerId === e.pointerId) {
2728
- // touchList[i] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
2740
+ // if (touchList[i as number].pointerId === e.pointerId) {
2741
+ // touchList[i as number] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
2729
2742
  // } else {
2730
2743
  // touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
2731
2744
  // }
@@ -2753,13 +2766,14 @@ export function createTooltip(id, text, top, left, fontSize) {
2753
2766
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2754
2767
  if (!tooltip) {
2755
2768
  tooltip = createElement('div', {
2756
- id: id, innerHTML: '&nbsp;' + text + '&nbsp;', styles: style
2769
+ id: id, innerHTML: '&nbsp;' + text + '&nbsp;'
2757
2770
  });
2771
+ tooltip.style.cssText = style;
2758
2772
  document.body.appendChild(tooltip);
2759
2773
  }
2760
2774
  else {
2761
- tooltip.setAttribute('innerHTML', '&nbsp;' + text + '&nbsp;');
2762
- tooltip.setAttribute('styles', style);
2775
+ tooltip.innerHTML = '&nbsp;' + text + '&nbsp;';
2776
+ tooltip.style.cssText = style;
2763
2777
  }
2764
2778
  }
2765
2779
  /**
@@ -2772,7 +2786,6 @@ export function createTooltip(id, text, top, left, fontSize) {
2772
2786
  * @private
2773
2787
  */
2774
2788
  export function drawSymbol(location, shape, size, url, options) {
2775
- var functionName = 'Path';
2776
2789
  var renderer = new SvgRenderer('');
2777
2790
  var temp = renderLegendShape(location, size, shape, options, url);
2778
2791
  var htmlObject = renderer['draw' + temp.functionName](temp.renderOption);
@@ -3157,7 +3170,7 @@ export function animate(element, delay, duration, process, end) {
3157
3170
  end.call(_this, { element: element });
3158
3171
  if (element.id.indexOf('Marker') > -1) {
3159
3172
  var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3160
- markerElement.setAttribute('style', markerStyle);
3173
+ markerElement.style.cssText = markerStyle;
3161
3174
  }
3162
3175
  }
3163
3176
  };