@syncfusion/ej2-maps 20.1.59 → 20.2.43

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/src/maps/maps.js CHANGED
@@ -35,8 +35,8 @@ import { createStyle } from './utils/helper';
35
35
  import { ZoomSettings, LegendSettings } from './model/base';
36
36
  import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';
37
37
  import { Marker } from './layers/marker';
38
- import { load, click, loaded, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
39
- import { getThemeStyle } from './model/theme';
38
+ import { load, click, onclick, loaded, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
39
+ import { getThemeStyle, Theme } from './model/theme';
40
40
  import { BingMap } from './layers/bing-map';
41
41
  import { LayerPanel } from './layers/layer-panel';
42
42
  import { Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';
@@ -236,6 +236,7 @@ var Maps = /** @class */ (function (_super) {
236
236
  this.renderArea();
237
237
  this.processRequestJsonData();
238
238
  this.renderComplete();
239
+ this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
239
240
  };
240
241
  /**
241
242
  * To Initialize the control rendering.
@@ -378,16 +379,7 @@ var Maps = /** @class */ (function (_super) {
378
379
  };
379
380
  Maps.prototype.renderMap = function () {
380
381
  if (this.legendModule && this.legendSettings.visible) {
381
- if (!this.isTileMap) {
382
- this.legendModule.renderLegend();
383
- }
384
- else {
385
- var layerCount = this.layersCollection.length - 1;
386
- if (!this.layersCollection[layerCount].isBaseLayer) {
387
- this.isTileMapSubLayer = true;
388
- this.legendModule.renderLegend();
389
- }
390
- }
382
+ this.legendModule.renderLegend();
391
383
  }
392
384
  this.createTile();
393
385
  if (this.zoomSettings.enable && this.zoomModule) {
@@ -470,12 +462,16 @@ var Maps = /** @class */ (function (_super) {
470
462
  bottom = svg.bottom - tile.bottom - element.offsetTop;
471
463
  top_1 = parseFloat(tileElement.style.top) + element.offsetTop;
472
464
  }
473
- top_1 = (bottom <= 11) ? top_1 : (top_1 * 2);
474
- left = (bottom <= 11) ? left : (left * 2);
465
+ top_1 = (bottom <= 11) ? top_1 : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top_1 * 2);
466
+ left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
475
467
  tileElement.style.top = top_1 + 'px';
476
468
  tileElement.style.left = left + 'px';
477
469
  tileElement1.style.top = top_1 + 'px';
478
470
  tileElement1.style.left = left + 'px';
471
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
472
+ tileElement.style.height = tileElement1.style.height = this.legendModule.legendTotalRect.height + 'px';
473
+ tileElement.style.width = tileElement1.style.width = this.legendModule.legendTotalRect.width + 'px';
474
+ }
479
475
  }
480
476
  this.arrangeTemplate();
481
477
  if (this.annotationsModule) {
@@ -601,12 +597,21 @@ var Maps = /** @class */ (function (_super) {
601
597
  this.zoomModule.layerCollectionEle = getElementByID(this.element.id + '_Layer_Collections');
602
598
  }
603
599
  if (this.isTileMap && getElementByID(this.element.id + '_Tile_SVG') && getElementByID(this.element.id + '_tile_parent')) {
604
- var tileRect = getElementByID(this.element.id + '_tile_parent').getBoundingClientRect();
605
- var tileSvgRect = getElementByID(this.element.id + '_Tile_SVG').getBoundingClientRect();
600
+ var tileElement = getElementByID(this.element.id + '_tile_parent');
601
+ var tileSvgElement = getElementByID(this.element.id + '_Tile_SVG');
602
+ var tileSvgParentElement = getElementByID(this.element.id + '_Tile_SVG_Parent');
603
+ var tileRect = tileElement.getBoundingClientRect();
604
+ var tileSvgRect = tileSvgElement.getBoundingClientRect();
606
605
  left = (tileRect.left - tileSvgRect.left);
607
606
  top = (tileRect.top - tileSvgRect.top);
608
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.left = left + 'px';
609
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.top = top + 'px';
607
+ tileSvgParentElement.style.left = left + 'px';
608
+ tileSvgParentElement.style.top = top + 'px';
609
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
610
+ tileElement.style.width = tileSvgElement.style.width = this.legendModule.legendTotalRect.width.toString();
611
+ tileElement.style.height = tileSvgElement.style.height = this.legendModule.legendTotalRect.height.toString();
612
+ tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
613
+ tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
614
+ }
610
615
  var markerTemplateElements = document.getElementsByClassName('template');
611
616
  if (!isNullOrUndefined(markerTemplateElements) && markerTemplateElements.length > 0) {
612
617
  for (var i = 0; i < markerTemplateElements.length; i++) {
@@ -624,7 +629,7 @@ var Maps = /** @class */ (function (_super) {
624
629
  if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
625
630
  for (var i = 0; i < elements.childNodes.length; i++) {
626
631
  var childElement = elements.childNodes[i];
627
- if (childElement.tagName === 'g') {
632
+ if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') == -1) {
628
633
  var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
629
634
  for (var j = 0; j < childElement.childNodes.length; j++) {
630
635
  var childNode = childElement.childNodes[j];
@@ -661,7 +666,7 @@ var Maps = /** @class */ (function (_super) {
661
666
  }
662
667
  var templateElements = document.getElementsByClassName(this.element.id + '_template');
663
668
  if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
664
- getElementByID(this.element.id + '_Layer_Collections') && this.layers[this.layers.length - 1].layerType !== 'OSM') {
669
+ getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
665
670
  for (var i = 0; i < templateElements.length; i++) {
666
671
  var offSetLetValue = 0;
667
672
  var offSetTopValue = 0;
@@ -696,10 +701,7 @@ var Maps = /** @class */ (function (_super) {
696
701
  var mainLayer = this.layersCollection[0];
697
702
  var padding = 0;
698
703
  if (mainLayer.isBaseLayer && (mainLayer.layerType === 'OSM' || mainLayer.layerType === 'Bing' ||
699
- mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google')) {
700
- if (mainLayer.layerType === 'Google') {
701
- mainLayer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
702
- }
704
+ mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google' || (!isNullOrUndefined(mainLayer.urlTemplate) && mainLayer.urlTemplate !== ''))) {
703
705
  removeElement(this.element.id + '_tile_parent');
704
706
  removeElement(this.element.id + '_tiles');
705
707
  removeElement('animated_tiles');
@@ -747,7 +749,7 @@ var Maps = /** @class */ (function (_super) {
747
749
  var baseLayer = mainLayers[i];
748
750
  if (baseLayer.visible && baseIndex === i) {
749
751
  baseLayer.isBaseLayer = true;
750
- this.isTileMap = (baseLayer.layerType === 'Geometry') ? false : true;
752
+ this.isTileMap = (baseLayer.layerType === 'Geometry' && !isNullOrUndefined(baseLayer.shapeData)) ? false : true;
751
753
  this.layersCollection.push(baseLayer);
752
754
  break;
753
755
  }
@@ -794,12 +796,19 @@ var Maps = /** @class */ (function (_super) {
794
796
  * @private
795
797
  */
796
798
  Maps.prototype.renderTitle = function (title, type, bounds, groupEle) {
797
- var style = title.textStyle;
799
+ var style = {
800
+ size: title.textStyle.size,
801
+ color: title.textStyle.color,
802
+ fontFamily: title.textStyle.fontFamily,
803
+ fontWeight: title.textStyle.fontWeight,
804
+ fontStyle: title.textStyle.fontStyle,
805
+ opacity: title.textStyle.opacity
806
+ };
798
807
  var height;
799
808
  var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
800
- style.fontFamily = this.themeStyle.fontFamily || style.fontFamily;
809
+ style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
801
810
  style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
802
- style.size = this.themeStyle.titleFontSize || style.size;
811
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
803
812
  if (title.text) {
804
813
  if (isNullOrUndefined(groupEle)) {
805
814
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -969,6 +978,7 @@ var Maps = /** @class */ (function (_super) {
969
978
  var id = event.target['id'];
970
979
  event.preventDefault();
971
980
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
981
+ this.mapAreaRect = this.legendModule.initialMapAreaRect;
972
982
  this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
973
983
  (this.legendModule.currentPage + 1);
974
984
  this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
@@ -1033,24 +1043,35 @@ var Maps = /** @class */ (function (_super) {
1033
1043
  latitude: latitude, longitude: longitude,
1034
1044
  isShapeSelected: this.SelectedElement(targetEle)
1035
1045
  };
1036
- this.trigger('click', eventArgs_1, function (mouseArgs) {
1037
- if (targetEle.id.indexOf('shapeIndex') > -1) {
1038
- _this.mergeCluster();
1039
- if (getElement(_this.element.id + '_mapsTooltip') &&
1040
- _this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
1041
- removeElement(_this.element.id + '_mapsTooltip');
1042
- }
1043
- }
1044
- if (_this.markerModule) {
1045
- _this.markerModule.markerClusterClick(e);
1046
- }
1047
- if (!eventArgs_1.cancel) {
1048
- _this.notify(click, targetEle);
1049
- }
1050
- if (!eventArgs_1.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
1051
- _this.triggerShapeSelection(targetEle);
1052
- }
1053
- });
1046
+ if (this.onclick) {
1047
+ eventArgs_1.name = onclick;
1048
+ this.trigger('onclick', eventArgs_1, function (mouseArgs) {
1049
+ _this.clickHandler(e, eventArgs_1, targetEle);
1050
+ });
1051
+ }
1052
+ else {
1053
+ this.trigger('click', eventArgs_1, function (mouseArgs) {
1054
+ _this.clickHandler(e, eventArgs_1, targetEle);
1055
+ });
1056
+ }
1057
+ }
1058
+ };
1059
+ Maps.prototype.clickHandler = function (e, eventArgs, targetEle) {
1060
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
1061
+ this.mergeCluster();
1062
+ if (getElement(this.element.id + '_mapsTooltip') &&
1063
+ this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
1064
+ removeElement(this.element.id + '_mapsTooltip');
1065
+ }
1066
+ }
1067
+ if (this.markerModule) {
1068
+ this.markerModule.markerClusterClick(e);
1069
+ }
1070
+ if (!eventArgs.cancel) {
1071
+ this.notify(click, targetEle);
1072
+ }
1073
+ if (!eventArgs.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
1074
+ this.triggerShapeSelection(targetEle);
1054
1075
  }
1055
1076
  };
1056
1077
  Maps.prototype.triggerShapeSelection = function (targetEle) {
@@ -1150,13 +1171,6 @@ var Maps = /** @class */ (function (_super) {
1150
1171
  latitude = latLongValue.latitude;
1151
1172
  longitude = latLongValue.longitude;
1152
1173
  }
1153
- var eventArgs = {
1154
- cancel: false, name: click, target: targetId, x: e.clientX, y: e.clientY,
1155
- latitude: latitude, longitude: longitude, isShapeSelected: this.SelectedElement(targetEle)
1156
- };
1157
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1158
- this.trigger('click', eventArgs, function (mouseArgs) {
1159
- });
1160
1174
  }
1161
1175
  this.titleTooltip(e, pageX, pageY, true);
1162
1176
  if (!isNullOrUndefined(this.legendModule)) {
@@ -1164,7 +1178,7 @@ var Maps = /** @class */ (function (_super) {
1164
1178
  }
1165
1179
  }
1166
1180
  this.notify(Browser.touchEndEvent, e);
1167
- if (e.cancelable) {
1181
+ if (e.cancelable && !this.isTouch) {
1168
1182
  e.preventDefault();
1169
1183
  }
1170
1184
  return false;
@@ -1330,7 +1344,7 @@ var Maps = /** @class */ (function (_super) {
1330
1344
  removeElement(this.element.id + '_EJ2_LegendTitle_Tooltip');
1331
1345
  }
1332
1346
  if ((targetId === (this.element.id + '_Map_title')) && (event.target.textContent.indexOf('...') > -1)) {
1333
- showTooltip(this.titleSettings.text, this.titleSettings.textStyle.size, x, y, this.element.offsetWidth, this.element.offsetHeight, this.element.id + '_EJ2_Title_Tooltip', getElement(this.element.id + '_Secondary_Element'), isTouch);
1347
+ showTooltip(this.titleSettings.text, this.titleSettings.textStyle.size || this.themeStyle.titleFontSize, x, y, this.element.offsetWidth, this.element.offsetHeight, this.element.id + '_EJ2_Title_Tooltip', getElement(this.element.id + '_Secondary_Element'), isTouch);
1334
1348
  }
1335
1349
  else {
1336
1350
  removeElement(this.element.id + '_EJ2_Title_Tooltip');
@@ -1442,8 +1456,10 @@ var Maps = /** @class */ (function (_super) {
1442
1456
  * @param {Object} layer - Specifies the layer for the maps.
1443
1457
  */
1444
1458
  Maps.prototype.addLayer = function (layer) {
1445
- this.layers.push(new LayerSettings(this.layers[0], 'layers', layer));
1446
- this.refresh();
1459
+ var mapsLayer = this.layers;
1460
+ mapsLayer.push(layer);
1461
+ this.isAddLayer = true;
1462
+ this.layers = mapsLayer;
1447
1463
  };
1448
1464
  /**
1449
1465
  * This method is used to remove a layer from map.
@@ -1452,8 +1468,9 @@ var Maps = /** @class */ (function (_super) {
1452
1468
  * @returns {void}
1453
1469
  */
1454
1470
  Maps.prototype.removeLayer = function (index) {
1455
- this.layers.splice(index, 1);
1456
- this.refresh();
1471
+ var mapsLayer = this.layers;
1472
+ mapsLayer.splice(index, 1);
1473
+ this.layers = mapsLayer;
1457
1474
  };
1458
1475
  /**
1459
1476
  * This method is used to add markers dynamically in the maps.
@@ -1738,6 +1755,7 @@ var Maps = /** @class */ (function (_super) {
1738
1755
  Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
1739
1756
  var render = false;
1740
1757
  var isMarker = false;
1758
+ var isLayer = false;
1741
1759
  var isStaticMapType = false;
1742
1760
  var layerEle;
1743
1761
  if (newProp['layers']) {
@@ -1758,13 +1776,15 @@ var Maps = /** @class */ (function (_super) {
1758
1776
  case 'legendSettings':
1759
1777
  case 'baseLayerIndex':
1760
1778
  if (prop === 'layers') {
1779
+ isLayer = true;
1761
1780
  var layerPropLength = Object.keys(newProp.layers).length;
1762
1781
  for (var x = 0; x < layerPropLength; x++) {
1763
1782
  if (!isNullOrUndefined(newProp.layers[x])) {
1764
1783
  var collection = Object.keys(newProp.layers[x]);
1765
1784
  for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
1766
1785
  var collectionProp = collection_1[_b];
1767
- if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
1786
+ if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') || (isNullOrUndefined(this.layers[x].shapeData)
1787
+ && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
1768
1788
  this.isReset = true;
1769
1789
  }
1770
1790
  else if (collectionProp === 'markerSettings') {
@@ -1781,7 +1801,7 @@ var Maps = /** @class */ (function (_super) {
1781
1801
  break;
1782
1802
  case 'zoomSettings':
1783
1803
  if (!isNullOrUndefined(oldProp.zoomSettings)) {
1784
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
1804
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
1785
1805
  render = false;
1786
1806
  }
1787
1807
  else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
@@ -2047,6 +2067,28 @@ var Maps = /** @class */ (function (_super) {
2047
2067
  }
2048
2068
  return null;
2049
2069
  };
2070
+ /**
2071
+ * This method is used to get the Bing maps URL.
2072
+ *
2073
+ * @param {string} url - Specifies the URL of the maps.
2074
+ * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
2075
+ */
2076
+ Maps.prototype.getBingUrlTemplate = function (url) {
2077
+ var promise = new Promise(function (resolve, reject) {
2078
+ var ajax = new Ajax({
2079
+ url: url
2080
+ });
2081
+ ajax.onSuccess = function (json) {
2082
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2083
+ var jsonObject = JSON.parse(json);
2084
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2085
+ var resource = jsonObject['resourceSets'][0]['resources'][0];
2086
+ resolve(resource['imageUrl']);
2087
+ };
2088
+ ajax.send();
2089
+ });
2090
+ return promise;
2091
+ };
2050
2092
  /**
2051
2093
  * To find visibility of layers and markers for required modules load.
2052
2094
  *
@@ -2255,6 +2297,9 @@ var Maps = /** @class */ (function (_super) {
2255
2297
  __decorate([
2256
2298
  Event()
2257
2299
  ], Maps.prototype, "click", void 0);
2300
+ __decorate([
2301
+ Event()
2302
+ ], Maps.prototype, "onclick", void 0);
2258
2303
  __decorate([
2259
2304
  Event()
2260
2305
  ], Maps.prototype, "doubleClick", void 0);
@@ -1559,6 +1559,7 @@ export interface LayerSettingsModel {
1559
1559
  * Sets and gets the Bing map type for the layer. If you use shape data with BingMapType without using layer type as Bing,
1560
1560
  * then the map will render based on shape data since default layer type will be set as Geometry.
1561
1561
  *
1562
+
1562
1563
  * @default Aerial
1563
1564
  */
1564
1565
  bingMapType?: BingMapType;
@@ -1566,6 +1567,7 @@ export interface LayerSettingsModel {
1566
1567
  /**
1567
1568
  * Sets and gets the type of the static maps.
1568
1569
  *
1570
+
1569
1571
  * @default RoadMap
1570
1572
  */
1571
1573
  staticMapType?: StaticMapType;
@@ -1573,6 +1575,7 @@ export interface LayerSettingsModel {
1573
1575
  /**
1574
1576
  * Sets and gets the key for the tile map layer in maps.
1575
1577
  *
1578
+
1576
1579
  * @default ''
1577
1580
  */
1578
1581
  key?: string;
@@ -1581,6 +1584,7 @@ export interface LayerSettingsModel {
1581
1584
  * Sets and gets the type of the layer in maps. If we use layer type with shape data property in layer of the maps
1582
1585
  * then map will render based on the provided layer type.
1583
1586
  *
1587
+
1584
1588
  * @default Geometry
1585
1589
  */
1586
1590
  layerType?: ShapeLayerType;
@@ -1588,7 +1592,7 @@ export interface LayerSettingsModel {
1588
1592
  /**
1589
1593
  * Sets and gets the template for the map using the url.
1590
1594
  *
1591
- * @default 'https://a.tile.openstreetmap.org/level/tileX/tileY.png'
1595
+ * @default ''
1592
1596
  */
1593
1597
  urlTemplate?: string;
1594
1598
 
@@ -1333,18 +1333,21 @@ export declare class LayerSettings extends ChildProperty<LayerSettings> {
1333
1333
  * Sets and gets the Bing map type for the layer. If you use shape data with BingMapType without using layer type as Bing,
1334
1334
  * then the map will render based on shape data since default layer type will be set as Geometry.
1335
1335
  *
1336
+
1336
1337
  * @default Aerial
1337
1338
  */
1338
1339
  bingMapType: BingMapType;
1339
1340
  /**
1340
1341
  * Sets and gets the type of the static maps.
1341
1342
  *
1343
+
1342
1344
  * @default RoadMap
1343
1345
  */
1344
1346
  staticMapType: StaticMapType;
1345
1347
  /**
1346
1348
  * Sets and gets the key for the tile map layer in maps.
1347
1349
  *
1350
+
1348
1351
  * @default ''
1349
1352
  */
1350
1353
  key: string;
@@ -1352,13 +1355,14 @@ export declare class LayerSettings extends ChildProperty<LayerSettings> {
1352
1355
  * Sets and gets the type of the layer in maps. If we use layer type with shape data property in layer of the maps
1353
1356
  * then map will render based on the provided layer type.
1354
1357
  *
1358
+
1355
1359
  * @default Geometry
1356
1360
  */
1357
1361
  layerType: ShapeLayerType;
1358
1362
  /**
1359
1363
  * Sets and gets the template for the map using the url.
1360
1364
  *
1361
- * @default 'https://a.tile.openstreetmap.org/level/tileX/tileY.png'
1365
+ * @default ''
1362
1366
  */
1363
1367
  urlTemplate: string;
1364
1368
  /**
@@ -525,7 +525,7 @@ var SubTitleSettings = /** @class */ (function (_super) {
525
525
  return _super !== null && _super.apply(this, arguments) || this;
526
526
  }
527
527
  __decorate([
528
- Complex({ size: Theme.mapsSubTitleFont.size, fontWeight: null }, Font)
528
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
529
529
  ], SubTitleSettings.prototype, "textStyle", void 0);
530
530
  __decorate([
531
531
  Property('Center')
@@ -542,7 +542,7 @@ var TitleSettings = /** @class */ (function (_super) {
542
542
  return _super !== null && _super.apply(this, arguments) || this;
543
543
  }
544
544
  __decorate([
545
- Complex({ size: Theme.mapsTitleFont.size, fontWeight: null }, Font)
545
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
546
546
  ], TitleSettings.prototype, "textStyle", void 0);
547
547
  __decorate([
548
548
  Property('Center')
@@ -689,7 +689,7 @@ var LegendSettings = /** @class */ (function (_super) {
689
689
  Property('')
690
690
  ], LegendSettings.prototype, "height", void 0);
691
691
  __decorate([
692
- Complex({}, Font)
692
+ Complex({ fontFamily: null }, Font)
693
693
  ], LegendSettings.prototype, "textStyle", void 0);
694
694
  __decorate([
695
695
  Property(15)
@@ -710,7 +710,7 @@ var LegendSettings = /** @class */ (function (_super) {
710
710
  Complex({}, CommonTitleSettings)
711
711
  ], LegendSettings.prototype, "title", void 0);
712
712
  __decorate([
713
- Complex(Theme.legendTitleFont, Font)
713
+ Complex({ size: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
714
714
  ], LegendSettings.prototype, "titleStyle", void 0);
715
715
  __decorate([
716
716
  Property('Bottom')
@@ -978,7 +978,7 @@ var LayerSettings = /** @class */ (function (_super) {
978
978
  Property('Geometry')
979
979
  ], LayerSettings.prototype, "layerType", void 0);
980
980
  __decorate([
981
- Property('https://a.tile.openstreetmap.org/level/tileX/tileY.png')
981
+ Property('')
982
982
  ], LayerSettings.prototype, "urlTemplate", void 0);
983
983
  __decorate([
984
984
  Property(true)
@@ -19,6 +19,12 @@ export declare const loaded: string;
19
19
  * @private
20
20
  */
21
21
  export declare const click: string;
22
+ /**
23
+ * Specifies the maps onclick event name.
24
+ *
25
+ * @private
26
+ */
27
+ export declare const onclick: string;
22
28
  /**
23
29
  * Specifies the maps right click event name.
24
30
  *
@@ -19,6 +19,12 @@ export var loaded = 'loaded';
19
19
  * @private
20
20
  */
21
21
  export var click = 'click';
22
+ /**
23
+ * Specifies the maps onclick event name.
24
+ *
25
+ * @private
26
+ */
27
+ export var onclick = 'onclick';
22
28
  /**
23
29
  * Specifies the maps right click event name.
24
30
  *
@@ -328,6 +328,7 @@ export function getThemeStyle(theme) {
328
328
  backgroundColor: color,
329
329
  areaBackgroundColor: color,
330
330
  titleFontColor: '#FFFFFF',
331
+ titleFontSize: '14px',
331
332
  subTitleFontColor: '#FFFFFF',
332
333
  legendTitleFontColor: '#DADADA',
333
334
  legendTextColor: '#DADADA',
@@ -347,6 +348,7 @@ export function getThemeStyle(theme) {
347
348
  backgroundColor: '#000000',
348
349
  areaBackgroundColor: '#000000',
349
350
  titleFontColor: '#FFFFFF',
351
+ titleFontSize: '14px',
350
352
  subTitleFontColor: '#FFFFFF',
351
353
  legendTitleFontColor: '#FFFFFF',
352
354
  legendTextColor: '#FFFFFF',
@@ -527,6 +529,7 @@ export function getThemeStyle(theme) {
527
529
  backgroundColor: '#FFFFFF',
528
530
  areaBackgroundColor: '#FFFFFF',
529
531
  titleFontColor: '#424242',
532
+ titleFontSize: '14px',
530
533
  subTitleFontColor: '#424242',
531
534
  legendTitleFontColor: '#757575',
532
535
  legendTextColor: '#757575',
@@ -54,7 +54,8 @@ var Highlight = /** @class */ (function () {
54
54
  targetEle.getAttribute('class') !== 'ShapeselectionMapStyle' && !isTouch &&
55
55
  targetEle.getAttribute('class') !== 'MarkerselectionMapStyle' &&
56
56
  targetEle.getAttribute('class') !== 'BubbleselectionMapStyle' &&
57
- targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle') {
57
+ targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle' &&
58
+ targetEle.getAttribute('class') !== 'LineselectionMapStyle') {
58
59
  layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
59
60
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
61
  var shapeData = void 0;
@@ -64,8 +65,9 @@ var Highlight = /** @class */ (function () {
64
65
  var dataIndex = void 0;
65
66
  if (targetEle.id.indexOf('shapeIndex') > -1) {
66
67
  shapeIn = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
67
- shapeData = this.maps.layers[layerIndex].shapeData['features'] ?
68
- this.maps.layers[layerIndex].shapeData['features'][shapeIn]['properties'] : null;
68
+ shapeData = this.maps.layers[layerIndex].shapeData['features'] &&
69
+ !isNullOrUndefined(this.maps.layersCollection[layerIndex].layerData[shapeIn]) ?
70
+ this.maps.layersCollection[layerIndex].layerData[shapeIn]['property'] : null;
69
71
  dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
70
72
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
71
73
  this.highlightSettings = this.maps.layers[layerIndex].highlightSettings;
@@ -137,7 +139,8 @@ var Highlight = /** @class */ (function () {
137
139
  */
138
140
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
139
141
  Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
140
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
142
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
143
+ && this.maps.legendSettings.type === 'Layers') {
141
144
  this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
142
145
  }
143
146
  var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
@@ -156,7 +159,7 @@ var Highlight = /** @class */ (function () {
156
159
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker].highlightSettings.enable;
157
160
  }
158
161
  var border = {
159
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
162
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
160
163
  width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
161
164
  opacity: this.highlightSettings.border.opacity
162
165
  };