@syncfusion/ej2-maps 19.3.46 → 19.4.47
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +34 -1
- package/README.md +1 -1
- 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 +478 -257
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +474 -253
- 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 +7 -1
- package/src/maps/layers/data-label.js +1 -0
- package/src/maps/layers/layer-panel.d.ts +2 -1
- package/src/maps/layers/layer-panel.js +86 -50
- package/src/maps/layers/legend.js +47 -18
- package/src/maps/layers/marker.js +2 -8
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +5 -0
- package/src/maps/maps.js +42 -16
- package/src/maps/model/base-model.d.ts +7 -0
- package/src/maps/model/base.d.ts +6 -0
- package/src/maps/model/base.js +5 -2
- package/src/maps/model/interface.d.ts +1 -3
- package/src/maps/model/theme.js +62 -5
- package/src/maps/user-interaction/highlight.js +4 -4
- package/src/maps/user-interaction/selection.js +10 -9
- package/src/maps/user-interaction/tooltip.js +9 -3
- package/src/maps/user-interaction/zoom.d.ts +1 -0
- package/src/maps/user-interaction/zoom.js +76 -44
- package/src/maps/utils/enum.d.ts +3 -1
- package/src/maps/utils/helper.d.ts +4 -2
- package/src/maps/utils/helper.js +130 -98
|
@@ -48,15 +48,9 @@ var Marker = /** @class */ (function () {
|
|
|
48
48
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
49
49
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
50
50
|
};
|
|
51
|
-
eventArgs = markerColorChoose(eventArgs, data);
|
|
52
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
53
51
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
58
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
59
|
-
}
|
|
52
|
+
eventArgs = markerColorChoose(eventArgs, data);
|
|
53
|
+
eventArgs = markerShapeChoose(eventArgs, data);
|
|
60
54
|
var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
61
55
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
62
56
|
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
|
package/src/maps/maps-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Ajax } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings, Tile } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel , InitialMarkerSelectionSettingsModel} from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle } from './model/theme';import { BingMap } from './layers/bing-map';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, convertGeoToPoint, calculateZoomLevel } from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Ajax } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition, calculateSize } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings, Tile } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel , InitialMarkerSelectionSettingsModel} from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle } from './model/theme';import { BingMap } from './layers/bing-map';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, convertGeoToPoint, calculateZoomLevel } from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
package/src/maps/maps.d.ts
CHANGED
|
@@ -986,6 +986,11 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
986
986
|
* To find navigation line visibility
|
|
987
987
|
*/
|
|
988
988
|
private isNavigationVisible;
|
|
989
|
+
/**
|
|
990
|
+
* To find space between the secondary element and svg element.
|
|
991
|
+
* @private
|
|
992
|
+
*/
|
|
993
|
+
getExtraPosition(): Point;
|
|
989
994
|
/**
|
|
990
995
|
* To find marker visibility
|
|
991
996
|
*/
|
package/src/maps/maps.js
CHANGED
|
@@ -29,7 +29,7 @@ import { Component, NotifyPropertyChanges, Property, Ajax } from '@syncfusion/ej
|
|
|
29
29
|
import { EventHandler, Browser, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';
|
|
30
30
|
import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';
|
|
31
31
|
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
|
|
32
|
-
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';
|
|
33
33
|
import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle } from './utils/helper';
|
|
34
34
|
import { createStyle } from './utils/helper';
|
|
35
35
|
import { ZoomSettings, LegendSettings } from './model/base';
|
|
@@ -395,7 +395,15 @@ var Maps = /** @class */ (function (_super) {
|
|
|
395
395
|
}
|
|
396
396
|
this.mapLayerPanel.measureLayerPanel();
|
|
397
397
|
this.element.appendChild(this.svgObject);
|
|
398
|
+
var position = this.getExtraPosition();
|
|
398
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
|
+
}
|
|
399
407
|
if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
|
|
400
408
|
this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
|
|
401
409
|
var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
|
|
@@ -1233,26 +1241,28 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1233
1241
|
*/
|
|
1234
1242
|
Maps.prototype.mapsOnResize = function (e) {
|
|
1235
1243
|
var _this = this;
|
|
1236
|
-
this.isResize = true;
|
|
1244
|
+
this.isResize = this.isReset = true;
|
|
1237
1245
|
var args = {
|
|
1246
|
+
cancel: false,
|
|
1238
1247
|
name: resize,
|
|
1239
1248
|
previousSize: this.availableSize,
|
|
1240
|
-
currentSize:
|
|
1249
|
+
currentSize: calculateSize(this),
|
|
1241
1250
|
maps: this
|
|
1242
1251
|
};
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
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
|
+
}
|
|
1256
1266
|
}
|
|
1257
1267
|
return false;
|
|
1258
1268
|
};
|
|
@@ -1840,6 +1850,22 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1840
1850
|
});
|
|
1841
1851
|
return isVisible;
|
|
1842
1852
|
};
|
|
1853
|
+
/**
|
|
1854
|
+
* To find space between the secondary element and svg element.
|
|
1855
|
+
* @private
|
|
1856
|
+
*/
|
|
1857
|
+
Maps.prototype.getExtraPosition = function () {
|
|
1858
|
+
var top;
|
|
1859
|
+
var left;
|
|
1860
|
+
var svgElement = getElement(this.element.id + '_svg');
|
|
1861
|
+
if (!isNullOrUndefined(svgElement)) {
|
|
1862
|
+
var svgClientRect = svgElement.getClientRects()[0];
|
|
1863
|
+
var mapsClientRect = (getElement(this.element.id + '_Secondary_Element')).getClientRects()[0];
|
|
1864
|
+
top = svgClientRect.top - mapsClientRect.top;
|
|
1865
|
+
left = svgClientRect.left - mapsClientRect.left;
|
|
1866
|
+
}
|
|
1867
|
+
return new Point(left, top);
|
|
1868
|
+
};
|
|
1843
1869
|
/**
|
|
1844
1870
|
* To find marker visibility
|
|
1845
1871
|
*/
|
|
@@ -975,6 +975,13 @@ export interface ToggleLegendSettingsModel {
|
|
|
975
975
|
*/
|
|
976
976
|
export interface LegendSettingsModel {
|
|
977
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
|
+
|
|
978
985
|
/**
|
|
979
986
|
* Enables or disables the toggle visibility for legend in maps.
|
|
980
987
|
*
|
package/src/maps/model/base.d.ts
CHANGED
|
@@ -845,6 +845,12 @@ export declare class ToggleLegendSettings extends ChildProperty<ToggleLegendSett
|
|
|
845
845
|
* Sets and gets the options to customize the legend of the maps.
|
|
846
846
|
*/
|
|
847
847
|
export declare class LegendSettings extends ChildProperty<LegendSettings> {
|
|
848
|
+
/**
|
|
849
|
+
* Enables or disables to render the legend item based on the shapes from the data source of markers.
|
|
850
|
+
*
|
|
851
|
+
* @default false
|
|
852
|
+
*/
|
|
853
|
+
useMarkerShape: boolean;
|
|
848
854
|
/**
|
|
849
855
|
* Enables or disables the toggle visibility for legend in maps.
|
|
850
856
|
*
|
package/src/maps/model/base.js
CHANGED
|
@@ -655,6 +655,9 @@ var LegendSettings = /** @class */ (function (_super) {
|
|
|
655
655
|
function LegendSettings() {
|
|
656
656
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
657
657
|
}
|
|
658
|
+
__decorate([
|
|
659
|
+
Property(false)
|
|
660
|
+
], LegendSettings.prototype, "useMarkerShape", void 0);
|
|
658
661
|
__decorate([
|
|
659
662
|
Property(false)
|
|
660
663
|
], LegendSettings.prototype, "toggleVisibility", void 0);
|
|
@@ -707,7 +710,7 @@ var LegendSettings = /** @class */ (function (_super) {
|
|
|
707
710
|
Complex({}, CommonTitleSettings)
|
|
708
711
|
], LegendSettings.prototype, "title", void 0);
|
|
709
712
|
__decorate([
|
|
710
|
-
Complex(
|
|
713
|
+
Complex(Theme.legendTitleFont, Font)
|
|
711
714
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
712
715
|
__decorate([
|
|
713
716
|
Property('Bottom')
|
|
@@ -807,7 +810,7 @@ var ShapeSettings = /** @class */ (function (_super) {
|
|
|
807
810
|
Property(5)
|
|
808
811
|
], ShapeSettings.prototype, "circleRadius", void 0);
|
|
809
812
|
__decorate([
|
|
810
|
-
Complex({ width:
|
|
813
|
+
Complex({ width: null, color: '#000000' }, Border)
|
|
811
814
|
], ShapeSettings.prototype, "border", void 0);
|
|
812
815
|
__decorate([
|
|
813
816
|
Property('')
|
|
@@ -109,9 +109,7 @@ export interface ITooltipRenderCompleteEventArgs extends IMapsEventArgs {
|
|
|
109
109
|
/**
|
|
110
110
|
* Specifies the event arguments for the resize event in maps.
|
|
111
111
|
*/
|
|
112
|
-
export interface IResizeEventArgs {
|
|
113
|
-
/** Defines the name of the event. */
|
|
114
|
-
name: string;
|
|
112
|
+
export interface IResizeEventArgs extends IMapsEventArgs {
|
|
115
113
|
/** Defines the previous size of the maps before the resize event. */
|
|
116
114
|
previousSize: Size;
|
|
117
115
|
/** Defines the current size of the maps after the resize event. */
|
package/src/maps/model/theme.js
CHANGED
|
@@ -26,15 +26,15 @@ export var Theme;
|
|
|
26
26
|
fontWeight: 'Regular',
|
|
27
27
|
color: null,
|
|
28
28
|
fontStyle: 'Regular',
|
|
29
|
-
fontFamily:
|
|
29
|
+
fontFamily: null
|
|
30
30
|
};
|
|
31
31
|
/** @private */
|
|
32
32
|
Theme.legendTitleFont = {
|
|
33
|
-
size: '
|
|
34
|
-
fontWeight: '
|
|
33
|
+
size: '12px',
|
|
34
|
+
fontWeight: 'Medium',
|
|
35
35
|
color: null,
|
|
36
|
-
fontStyle: '
|
|
37
|
-
fontFamily:
|
|
36
|
+
fontStyle: 'Medium',
|
|
37
|
+
fontFamily: null
|
|
38
38
|
};
|
|
39
39
|
/** @private */
|
|
40
40
|
Theme.legendLabelFont = {
|
|
@@ -183,6 +183,14 @@ export function getShapeColor(theme) {
|
|
|
183
183
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
184
184
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
185
185
|
break;
|
|
186
|
+
case 'fluentui':
|
|
187
|
+
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
188
|
+
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
189
|
+
break;
|
|
190
|
+
case 'fluentuidark':
|
|
191
|
+
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
192
|
+
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
193
|
+
break;
|
|
186
194
|
default:
|
|
187
195
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
188
196
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -328,6 +336,7 @@ export function getThemeStyle(theme) {
|
|
|
328
336
|
tooltipFillColor: '#363F4C',
|
|
329
337
|
zoomFillColor: '#FFFFFF',
|
|
330
338
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
339
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
331
340
|
titleFontWeight: 'Medium',
|
|
332
341
|
zoomSelectionColor: '#e61576',
|
|
333
342
|
shapeFill: '#A6A6A6'
|
|
@@ -345,6 +354,7 @@ export function getThemeStyle(theme) {
|
|
|
345
354
|
tooltipFontColor: '#000000',
|
|
346
355
|
tooltipFillColor: '#ffffff',
|
|
347
356
|
zoomFillColor: '#FFFFFF',
|
|
357
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
348
358
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
349
359
|
titleFontWeight: 'Medium',
|
|
350
360
|
zoomSelectionColor: '#e61576',
|
|
@@ -466,6 +476,52 @@ export function getThemeStyle(theme) {
|
|
|
466
476
|
shapeFill: '#495057'
|
|
467
477
|
};
|
|
468
478
|
break;
|
|
479
|
+
case 'fluentui':
|
|
480
|
+
style = {
|
|
481
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
482
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
483
|
+
titleFontColor: '#201F1E',
|
|
484
|
+
subTitleFontColor: '#201F1E',
|
|
485
|
+
legendTitleFontColor: '#201F1E',
|
|
486
|
+
legendTextColor: '#201F1E',
|
|
487
|
+
dataLabelFontColor: '#201F1E',
|
|
488
|
+
tooltipFontColor: '#323130',
|
|
489
|
+
tooltipFillColor: '#FFFFFF',
|
|
490
|
+
zoomFillColor: '#A19F9D',
|
|
491
|
+
fontFamily: 'Segoe UI',
|
|
492
|
+
titleFontSize: '14px',
|
|
493
|
+
legendFontSize: '12px',
|
|
494
|
+
tooltipFillOpacity: 1,
|
|
495
|
+
tooltipTextOpacity: 1,
|
|
496
|
+
labelFontFamily: 'Segoe UI',
|
|
497
|
+
titleFontWeight: '600',
|
|
498
|
+
zoomSelectionColor: '#323130',
|
|
499
|
+
shapeFill: '#F3F2F1'
|
|
500
|
+
};
|
|
501
|
+
break;
|
|
502
|
+
case 'fluentuidark':
|
|
503
|
+
style = {
|
|
504
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
505
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
506
|
+
titleFontColor: '#F3F2F1',
|
|
507
|
+
subTitleFontColor: '#F3F2F1',
|
|
508
|
+
legendTitleFontColor: '#F3F2F1',
|
|
509
|
+
legendTextColor: '#F3F2F1',
|
|
510
|
+
dataLabelFontColor: '#F3F2F1',
|
|
511
|
+
tooltipFontColor: '#F3F2F1',
|
|
512
|
+
tooltipFillColor: '#252423',
|
|
513
|
+
zoomFillColor: '#484644',
|
|
514
|
+
fontFamily: 'Segoe UI',
|
|
515
|
+
titleFontSize: '14px',
|
|
516
|
+
legendFontSize: '12px',
|
|
517
|
+
tooltipFillOpacity: 1,
|
|
518
|
+
tooltipTextOpacity: 1,
|
|
519
|
+
labelFontFamily: 'Segoe UI',
|
|
520
|
+
titleFontWeight: '600',
|
|
521
|
+
zoomSelectionColor: '#F3F2F1',
|
|
522
|
+
shapeFill: '#252423'
|
|
523
|
+
};
|
|
524
|
+
break;
|
|
469
525
|
default:
|
|
470
526
|
style = {
|
|
471
527
|
backgroundColor: '#FFFFFF',
|
|
@@ -479,6 +535,7 @@ export function getThemeStyle(theme) {
|
|
|
479
535
|
tooltipFillColor: '#000000',
|
|
480
536
|
zoomFillColor: '#737373',
|
|
481
537
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
538
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
482
539
|
titleFontWeight: 'Medium',
|
|
483
540
|
zoomSelectionColor: '#e61576',
|
|
484
541
|
shapeFill: '#A6A6A6'
|
|
@@ -149,14 +149,14 @@ var Highlight = /** @class */ (function () {
|
|
|
149
149
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker].highlightSettings.enable;
|
|
150
150
|
}
|
|
151
151
|
var border = {
|
|
152
|
-
color: this.highlightSettings.border.color,
|
|
153
|
-
width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
|
|
152
|
+
color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
|
|
153
|
+
width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
|
|
154
154
|
opacity: this.highlightSettings.border.opacity
|
|
155
155
|
};
|
|
156
156
|
var eventArgs = {
|
|
157
157
|
opacity: this.highlightSettings.opacity,
|
|
158
|
-
fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
159
|
-
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
|
|
158
|
+
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
159
|
+
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
160
160
|
border: border,
|
|
161
161
|
name: itemHighlight,
|
|
162
162
|
target: targetEle.id,
|
|
@@ -122,18 +122,19 @@ var Selection = /** @class */ (function () {
|
|
|
122
122
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
123
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
124
124
|
var _this = this;
|
|
125
|
+
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
125
126
|
var parentElement;
|
|
126
127
|
var children;
|
|
127
128
|
var selectionClass;
|
|
128
129
|
var selectionsettings = this.selectionsettings;
|
|
129
130
|
var border = {
|
|
130
|
-
color: this.selectionsettings.border.color,
|
|
131
|
-
width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
|
|
131
|
+
color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
|
|
132
|
+
width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
|
|
132
133
|
opacity: this.selectionsettings.border.opacity
|
|
133
134
|
};
|
|
134
135
|
var eventArgs = {
|
|
135
136
|
opacity: this.selectionsettings.opacity,
|
|
136
|
-
fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
|
|
137
|
+
fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
|
|
137
138
|
border: border,
|
|
138
139
|
name: itemSelection,
|
|
139
140
|
target: targetElement.id,
|
|
@@ -156,9 +157,9 @@ var Selection = /** @class */ (function () {
|
|
|
156
157
|
}
|
|
157
158
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
158
159
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
159
|
-
var
|
|
160
|
-
targetElement.setAttribute('stroke-width', _this.maps.layers[
|
|
161
|
-
targetElement.setAttribute('stroke', _this.maps.layers[
|
|
160
|
+
var layerIndex_1 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
161
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString());
|
|
162
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
else {
|
|
@@ -184,9 +185,9 @@ var Selection = /** @class */ (function () {
|
|
|
184
185
|
}
|
|
185
186
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
186
187
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
187
|
-
var
|
|
188
|
-
ele.setAttribute('stroke-width', _this.maps.layers[
|
|
189
|
-
ele.setAttribute('stroke', _this.maps.layers[
|
|
188
|
+
var layerIndex_2 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
189
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex_2].navigationLineSettings[index].width.toString());
|
|
190
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
if (!getElement(_this.selectionType + 'selectionMap')) {
|
|
@@ -54,8 +54,6 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
54
54
|
if (istooltipRender) {
|
|
55
55
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
56
56
|
option = layer.tooltipSettings;
|
|
57
|
-
option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
|
|
58
|
-
option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
|
|
59
57
|
var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
60
58
|
if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
|
|
61
59
|
return;
|
|
@@ -172,9 +170,13 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
172
170
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
173
171
|
}
|
|
174
172
|
templateData = this.setTooltipContent(option, templateData);
|
|
173
|
+
var tooltipTextStyle = {
|
|
174
|
+
color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
|
|
175
|
+
fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
|
|
176
|
+
};
|
|
175
177
|
var tooltipOption = {
|
|
176
178
|
location: location, text: tooltipContent, data: templateData,
|
|
177
|
-
textStyle:
|
|
179
|
+
textStyle: tooltipTextStyle,
|
|
178
180
|
template: option.template
|
|
179
181
|
};
|
|
180
182
|
tooltipArgs = {
|
|
@@ -190,6 +192,10 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
190
192
|
_this.maps['isProtectedOnChange'] = true;
|
|
191
193
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
192
194
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
195
|
+
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
196
|
+
|| _this.maps.themeStyle.fontFamily;
|
|
197
|
+
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
198
|
+
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
193
199
|
if (tooltipArgs.cancel) {
|
|
194
200
|
_this.svgTooltip = new Tooltip({
|
|
195
201
|
enable: true,
|
|
@@ -102,6 +102,7 @@ export declare class Zoom {
|
|
|
102
102
|
processTemplate(x: number, y: number, scale: number, maps: Maps): void;
|
|
103
103
|
private dataLabelTranslate;
|
|
104
104
|
private markerTranslate;
|
|
105
|
+
private markerLineAnimation;
|
|
105
106
|
panning(direction: PanDirection, xDifference: number, yDifference: number, mouseLocation?: PointerEvent | TouchEvent): void;
|
|
106
107
|
private toAlignSublayer;
|
|
107
108
|
toolBarZooming(zoomFactor: number, type: string): void;
|