azure-maps-control 2.1.2 → 2.1.6
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/dist/atlas-core.js +489 -186
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +58 -21
- package/dist/atlas.js +641 -293
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +97 -78
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +59 -4
package/dist/atlas-core.js
CHANGED
|
@@ -77,7 +77,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
var azuremapsMaplibreGlUnminified = createCommonjsModule(function (module, exports) {
|
|
80
|
-
/* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.14.0-
|
|
80
|
+
/* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.14.0-rc4/LICENSE.txt */
|
|
81
81
|
(function (global, factory) {
|
|
82
82
|
module.exports = factory() ;
|
|
83
83
|
}(commonjsGlobal, (function () {
|
|
@@ -109,7 +109,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
109
109
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
var version = "1.14.0-
|
|
112
|
+
var version = "1.14.0-rc4";
|
|
113
113
|
|
|
114
114
|
var unitbezier = UnitBezier;
|
|
115
115
|
function UnitBezier(p1x, p1y, p2x, p2y) {
|
|
@@ -15831,7 +15831,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15831
15831
|
}
|
|
15832
15832
|
queue.sort(compareX);
|
|
15833
15833
|
for (i = 0; i < queue.length; i++) {
|
|
15834
|
-
eliminateHole(queue[i], outerNode);
|
|
15834
|
+
outerNode = eliminateHole(queue[i], outerNode);
|
|
15835
15835
|
outerNode = filterPoints(outerNode, outerNode.next);
|
|
15836
15836
|
}
|
|
15837
15837
|
return outerNode;
|
|
@@ -15840,12 +15840,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15840
15840
|
return a.x - b.x;
|
|
15841
15841
|
}
|
|
15842
15842
|
function eliminateHole(hole, outerNode) {
|
|
15843
|
-
|
|
15844
|
-
if (
|
|
15845
|
-
|
|
15846
|
-
filterPoints(outerNode, outerNode.next);
|
|
15847
|
-
filterPoints(b, b.next);
|
|
15843
|
+
var bridge = findHoleBridge(hole, outerNode);
|
|
15844
|
+
if (!bridge) {
|
|
15845
|
+
return outerNode;
|
|
15848
15846
|
}
|
|
15847
|
+
var bridgeReverse = splitPolygon(bridge, hole);
|
|
15848
|
+
var filteredBridge = filterPoints(bridge, bridge.next);
|
|
15849
|
+
filterPoints(bridgeReverse, bridgeReverse.next);
|
|
15850
|
+
return outerNode === bridge ? filteredBridge : outerNode;
|
|
15849
15851
|
}
|
|
15850
15852
|
function findHoleBridge(hole, outerNode) {
|
|
15851
15853
|
var p = outerNode, hx = hole.x, hy = hole.y, qx = -Infinity, m;
|
|
@@ -24086,11 +24088,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24086
24088
|
}
|
|
24087
24089
|
}
|
|
24088
24090
|
function rewindRing(ring, dir) {
|
|
24089
|
-
var area = 0;
|
|
24091
|
+
var area = 0, err = 0;
|
|
24090
24092
|
for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {
|
|
24091
|
-
|
|
24093
|
+
var k = (ring[i][0] - ring[j][0]) * (ring[j][1] + ring[i][1]);
|
|
24094
|
+
var m = area + k;
|
|
24095
|
+
err += Math.abs(area) >= Math.abs(k) ? area - m + k : k - m + area;
|
|
24096
|
+
area = m;
|
|
24092
24097
|
}
|
|
24093
|
-
if (area >= 0 !== !!dir) {
|
|
24098
|
+
if (area + err >= 0 !== !!dir) {
|
|
24094
24099
|
ring.reverse();
|
|
24095
24100
|
}
|
|
24096
24101
|
}
|
|
@@ -24264,14 +24269,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24264
24269
|
var keycache = context.keycache;
|
|
24265
24270
|
var valuecache = context.valuecache;
|
|
24266
24271
|
for (var key in feature.properties) {
|
|
24272
|
+
var value = feature.properties[key];
|
|
24267
24273
|
var keyIndex = keycache[key];
|
|
24274
|
+
if (value === null) {
|
|
24275
|
+
continue;
|
|
24276
|
+
}
|
|
24268
24277
|
if (typeof keyIndex === 'undefined') {
|
|
24269
24278
|
keys.push(key);
|
|
24270
24279
|
keyIndex = keys.length - 1;
|
|
24271
24280
|
keycache[key] = keyIndex;
|
|
24272
24281
|
}
|
|
24273
24282
|
pbf.writeVarint(keyIndex);
|
|
24274
|
-
var value = feature.properties[key];
|
|
24275
24283
|
var type = typeof value;
|
|
24276
24284
|
if (type !== 'string' && type !== 'boolean' && type !== 'number') {
|
|
24277
24285
|
value = JSON.stringify(value);
|
|
@@ -33067,7 +33075,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
33067
33075
|
}
|
|
33068
33076
|
};
|
|
33069
33077
|
Style.prototype.update = function update(parameters) {
|
|
33070
|
-
if (!this.
|
|
33078
|
+
if (!this._loaded) {
|
|
33071
33079
|
return;
|
|
33072
33080
|
}
|
|
33073
33081
|
var changed = this._changed;
|
|
@@ -33088,6 +33096,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
33088
33096
|
this._updateTilesForChangedImages();
|
|
33089
33097
|
for (var id$1 in this._updatedPaintProps) {
|
|
33090
33098
|
this._layers[id$1].updateTransitions(parameters);
|
|
33099
|
+
this._serializedLayers[id$1] = this._layers[id$1].serialize();
|
|
33091
33100
|
}
|
|
33092
33101
|
this.light.updateTransitions(parameters);
|
|
33093
33102
|
this._resetUpdates();
|
|
@@ -33468,6 +33477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
33468
33477
|
return;
|
|
33469
33478
|
}
|
|
33470
33479
|
layer.setLayoutProperty(name, value, options);
|
|
33480
|
+
this._serializedLayers[layerId] = layer.serialize();
|
|
33471
33481
|
this._updateLayer(layer);
|
|
33472
33482
|
};
|
|
33473
33483
|
Style.prototype.getLayoutProperty = function getLayoutProperty(layerId, name) {
|
|
@@ -43477,7 +43487,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43477
43487
|
return Url;
|
|
43478
43488
|
}());
|
|
43479
43489
|
|
|
43480
|
-
var version = "2.1.
|
|
43490
|
+
var version = "2.1.6";
|
|
43481
43491
|
|
|
43482
43492
|
/**
|
|
43483
43493
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -43509,6 +43519,70 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43509
43519
|
return Version;
|
|
43510
43520
|
}());
|
|
43511
43521
|
|
|
43522
|
+
/** The vertical distance between the tooltip and its target */
|
|
43523
|
+
var tooltipVerticalOffset = 4;
|
|
43524
|
+
/**
|
|
43525
|
+
* Creates tooltip content element
|
|
43526
|
+
*/
|
|
43527
|
+
var buildAccessibleTooltip = function (name) {
|
|
43528
|
+
var tooltipContent = document.createElement("span");
|
|
43529
|
+
tooltipContent.innerText = name;
|
|
43530
|
+
tooltipContent.classList.add('tooltiptext');
|
|
43531
|
+
// mimics default edge tooltip theming
|
|
43532
|
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
43533
|
+
tooltipContent.classList.add('dark');
|
|
43534
|
+
}
|
|
43535
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (e) {
|
|
43536
|
+
var isDark = e.matches;
|
|
43537
|
+
if (isDark && !tooltipContent.classList.contains('dark')) {
|
|
43538
|
+
tooltipContent.classList.add('dark');
|
|
43539
|
+
}
|
|
43540
|
+
else if (!isDark && tooltipContent.classList.contains('dark')) {
|
|
43541
|
+
tooltipContent.classList.remove('dark');
|
|
43542
|
+
}
|
|
43543
|
+
});
|
|
43544
|
+
return tooltipContent;
|
|
43545
|
+
};
|
|
43546
|
+
/**
|
|
43547
|
+
* Determines tooltip position
|
|
43548
|
+
* @param tooltip tooltip to position
|
|
43549
|
+
* @param eventTarget target element that tooltip is bound to
|
|
43550
|
+
* @param forceAbsolute position:fixed is generally desired, however since tooltip is positioned alongside the target,
|
|
43551
|
+
* the runtime transform of the parent container(maplibre marker) will apply to tooltip as well, in such case resort to position:absolute
|
|
43552
|
+
*/
|
|
43553
|
+
var positionTooltip = function (tooltip, eventTarget, forceAbsolute) {
|
|
43554
|
+
if (forceAbsolute === void 0) { forceAbsolute = false; }
|
|
43555
|
+
var positionTooltip = function (event) {
|
|
43556
|
+
var buttonRect = eventTarget.getBoundingClientRect();
|
|
43557
|
+
var tooltipRect = tooltip.getBoundingClientRect();
|
|
43558
|
+
var left, top;
|
|
43559
|
+
if ((buttonRect.x + tooltipRect.width) > window.innerWidth) {
|
|
43560
|
+
// the tooltip body may not fit the visible window width
|
|
43561
|
+
left = window.innerWidth - tooltipRect.width;
|
|
43562
|
+
}
|
|
43563
|
+
else {
|
|
43564
|
+
left = buttonRect.x;
|
|
43565
|
+
}
|
|
43566
|
+
if ((buttonRect.y + buttonRect.height + tooltipRect.height + tooltipVerticalOffset) > window.innerHeight) {
|
|
43567
|
+
// the tooltip body may not fit the visible window height
|
|
43568
|
+
// position above the target element
|
|
43569
|
+
top = buttonRect.y - tooltipRect.height - tooltipVerticalOffset;
|
|
43570
|
+
}
|
|
43571
|
+
else {
|
|
43572
|
+
top = buttonRect.y + buttonRect.height + tooltipVerticalOffset;
|
|
43573
|
+
}
|
|
43574
|
+
if (forceAbsolute && eventTarget.parentElement) {
|
|
43575
|
+
var parentRect = eventTarget.parentElement ? eventTarget.parentElement.getBoundingClientRect() : null;
|
|
43576
|
+
tooltip.style.position = 'absolute';
|
|
43577
|
+
left = left - parentRect.x;
|
|
43578
|
+
top = top - parentRect.y;
|
|
43579
|
+
}
|
|
43580
|
+
tooltip.style.transform = "translate(" + left + "px, " + top + "px)";
|
|
43581
|
+
};
|
|
43582
|
+
eventTarget.addEventListener("mouseover", positionTooltip);
|
|
43583
|
+
eventTarget.addEventListener("focusin", positionTooltip);
|
|
43584
|
+
};
|
|
43585
|
+
|
|
43512
43586
|
(function (ControlPosition) {
|
|
43513
43587
|
/**
|
|
43514
43588
|
* Places the control in the top left of the map.
|
|
@@ -43846,6 +43920,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43846
43920
|
var container = this.buildContainer(map, this.options.style, "Rotation Control");
|
|
43847
43921
|
var rotationButton = this.constructRotationButton(map);
|
|
43848
43922
|
var grid = this.constructRotationGrid(map, options);
|
|
43923
|
+
var tooltip = buildAccessibleTooltip("Reset to Default Rotation");
|
|
43849
43924
|
container.addEventListener("mouseover", function (event) {
|
|
43850
43925
|
_this.lastActiveTime = _this.lastActiveTime || event.timeStamp;
|
|
43851
43926
|
_this.hasMouse = true;
|
|
@@ -43881,9 +43956,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43881
43956
|
if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
|
|
43882
43957
|
container.appendChild(grid);
|
|
43883
43958
|
container.appendChild(rotationButton);
|
|
43959
|
+
container.appendChild(tooltip);
|
|
43960
|
+
positionTooltip(tooltip, rotationButton);
|
|
43884
43961
|
}
|
|
43885
43962
|
else {
|
|
43886
43963
|
container.appendChild(rotationButton);
|
|
43964
|
+
container.appendChild(tooltip);
|
|
43965
|
+
positionTooltip(tooltip, rotationButton);
|
|
43887
43966
|
container.appendChild(grid);
|
|
43888
43967
|
}
|
|
43889
43968
|
return container;
|
|
@@ -43894,13 +43973,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43894
43973
|
grid.classList.add("hidden-accessible-element");
|
|
43895
43974
|
var rotationRightButton = this.constructRightRotationButton(map);
|
|
43896
43975
|
var rotationLeftButton = this.constructLeftRotationButton(map);
|
|
43976
|
+
var tooltipLeft = buildAccessibleTooltip("Rotate Left");
|
|
43977
|
+
var tooltipRight = buildAccessibleTooltip("Rotate Right");
|
|
43897
43978
|
if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
|
|
43898
43979
|
grid.appendChild(rotationRightButton);
|
|
43980
|
+
grid.appendChild(tooltipRight);
|
|
43981
|
+
positionTooltip(tooltipRight, rotationRightButton);
|
|
43899
43982
|
grid.appendChild(rotationLeftButton);
|
|
43983
|
+
grid.appendChild(tooltipLeft);
|
|
43984
|
+
positionTooltip(tooltipLeft, rotationLeftButton);
|
|
43900
43985
|
}
|
|
43901
43986
|
else {
|
|
43902
43987
|
grid.appendChild(rotationLeftButton);
|
|
43988
|
+
grid.appendChild(tooltipLeft);
|
|
43989
|
+
positionTooltip(tooltipLeft, rotationLeftButton);
|
|
43903
43990
|
grid.appendChild(rotationRightButton);
|
|
43991
|
+
grid.appendChild(tooltipRight);
|
|
43992
|
+
positionTooltip(tooltipRight, rotationRightButton);
|
|
43904
43993
|
}
|
|
43905
43994
|
return grid;
|
|
43906
43995
|
};
|
|
@@ -43909,7 +43998,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43909
43998
|
var rotationButton = document.createElement("button");
|
|
43910
43999
|
rotationButton.classList.add("azure-maps-control-button");
|
|
43911
44000
|
rotationButton.classList.add("rotation");
|
|
43912
|
-
rotationButton.setAttribute("
|
|
44001
|
+
rotationButton.setAttribute("aria-label", "Reset to Default Rotation");
|
|
43913
44002
|
rotationButton.setAttribute("alt", "Reset to Default Rotation");
|
|
43914
44003
|
rotationButton.setAttribute("type", "button");
|
|
43915
44004
|
var icon = document.createElement("div");
|
|
@@ -43932,7 +44021,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43932
44021
|
var rotationRightButton = document.createElement("button");
|
|
43933
44022
|
rotationRightButton.classList.add("azure-maps-control-button");
|
|
43934
44023
|
rotationRightButton.classList.add("rotation-right");
|
|
43935
|
-
rotationRightButton.setAttribute("
|
|
44024
|
+
rotationRightButton.setAttribute("aria-label", "Rotate Right");
|
|
43936
44025
|
rotationRightButton.setAttribute("alt", "Rotate Right");
|
|
43937
44026
|
rotationRightButton.setAttribute("type", "button");
|
|
43938
44027
|
rotationRightButton.addEventListener("click", function () {
|
|
@@ -43949,7 +44038,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43949
44038
|
var rotationLeftButton = document.createElement("button");
|
|
43950
44039
|
rotationLeftButton.classList.add("azure-maps-control-button");
|
|
43951
44040
|
rotationLeftButton.classList.add("rotation-left");
|
|
43952
|
-
rotationLeftButton.setAttribute("
|
|
44041
|
+
rotationLeftButton.setAttribute("aria-label", "Rotate Left");
|
|
43953
44042
|
rotationLeftButton.setAttribute("alt", "Rotate Left");
|
|
43954
44043
|
rotationLeftButton.setAttribute("type", "button");
|
|
43955
44044
|
rotationLeftButton.addEventListener("click", function () {
|
|
@@ -44033,6 +44122,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44033
44122
|
var container = this.buildContainer(map, this.options.style, "Pitch Control");
|
|
44034
44123
|
var pitchButton = this.constructPitchButton(map);
|
|
44035
44124
|
var grid = this.constructPitchGrid(map, options);
|
|
44125
|
+
var tooltip = buildAccessibleTooltip("Reset to Default Pitch");
|
|
44036
44126
|
container.addEventListener("mouseover", function (event) {
|
|
44037
44127
|
_this.lastActiveTime = _this.lastActiveTime || event.timeStamp;
|
|
44038
44128
|
_this.hasMouse = true;
|
|
@@ -44068,9 +44158,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44068
44158
|
if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
|
|
44069
44159
|
container.appendChild(grid);
|
|
44070
44160
|
container.appendChild(pitchButton);
|
|
44161
|
+
container.appendChild(tooltip);
|
|
44162
|
+
positionTooltip(tooltip, container);
|
|
44071
44163
|
}
|
|
44072
44164
|
else {
|
|
44073
44165
|
container.appendChild(pitchButton);
|
|
44166
|
+
container.appendChild(tooltip);
|
|
44167
|
+
positionTooltip(tooltip, container);
|
|
44074
44168
|
container.appendChild(grid);
|
|
44075
44169
|
}
|
|
44076
44170
|
this.map = map;
|
|
@@ -44096,13 +44190,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44096
44190
|
grid.classList.add("hidden-accessible-element");
|
|
44097
44191
|
this.pitchIncrementButton = this.constructPitchIncrementButton(map);
|
|
44098
44192
|
this.pitchDecrementButton = this.constructPitchDecrementButton(map);
|
|
44193
|
+
var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
|
|
44194
|
+
var tooltipDecrease = buildAccessibleTooltip("Decrease Pitch");
|
|
44099
44195
|
if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
|
|
44100
44196
|
grid.appendChild(this.pitchDecrementButton);
|
|
44197
|
+
grid.appendChild(tooltipDecrease);
|
|
44198
|
+
positionTooltip(tooltipDecrease, this.pitchDecrementButton);
|
|
44101
44199
|
grid.appendChild(this.pitchIncrementButton);
|
|
44200
|
+
grid.appendChild(tooltipIncrement);
|
|
44201
|
+
positionTooltip(tooltipIncrement, this.pitchIncrementButton);
|
|
44102
44202
|
}
|
|
44103
44203
|
else {
|
|
44104
44204
|
grid.appendChild(this.pitchIncrementButton);
|
|
44205
|
+
grid.appendChild(tooltipIncrement);
|
|
44206
|
+
positionTooltip(tooltipIncrement, this.pitchIncrementButton);
|
|
44105
44207
|
grid.appendChild(this.pitchDecrementButton);
|
|
44208
|
+
grid.appendChild(tooltipDecrease);
|
|
44209
|
+
positionTooltip(tooltipDecrease, this.pitchDecrementButton);
|
|
44106
44210
|
}
|
|
44107
44211
|
return grid;
|
|
44108
44212
|
};
|
|
@@ -44111,7 +44215,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44111
44215
|
var pitchButton = document.createElement("button");
|
|
44112
44216
|
pitchButton.classList.add("azure-maps-control-button");
|
|
44113
44217
|
pitchButton.classList.add("pitch");
|
|
44114
|
-
pitchButton.setAttribute("
|
|
44218
|
+
pitchButton.setAttribute("aria-label", "Reset to Default Pitch");
|
|
44115
44219
|
pitchButton.setAttribute("alt", "Reset to Default Pitch");
|
|
44116
44220
|
pitchButton.setAttribute("type", "button");
|
|
44117
44221
|
pitchButton.addEventListener("click", function () {
|
|
@@ -44129,7 +44233,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44129
44233
|
var pitchDecrementButton = document.createElement("button");
|
|
44130
44234
|
pitchDecrementButton.classList.add("azure-maps-control-button");
|
|
44131
44235
|
pitchDecrementButton.classList.add("pitch-down");
|
|
44132
|
-
pitchDecrementButton.setAttribute("
|
|
44236
|
+
pitchDecrementButton.setAttribute("aria-label", "Decrease Pitch");
|
|
44133
44237
|
pitchDecrementButton.setAttribute("alt", "Decrease Pitch");
|
|
44134
44238
|
pitchDecrementButton.setAttribute("type", "button");
|
|
44135
44239
|
pitchDecrementButton.addEventListener("click", function () {
|
|
@@ -44146,7 +44250,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44146
44250
|
var pitchIncrementButton = document.createElement("button");
|
|
44147
44251
|
pitchIncrementButton.classList.add("azure-maps-control-button");
|
|
44148
44252
|
pitchIncrementButton.classList.add("pitch-up");
|
|
44149
|
-
pitchIncrementButton.setAttribute("
|
|
44253
|
+
pitchIncrementButton.setAttribute("aria-label", "Increase Pitch");
|
|
44150
44254
|
pitchIncrementButton.setAttribute("alt", "Increase Pitch");
|
|
44151
44255
|
pitchIncrementButton.setAttribute("type", "button");
|
|
44152
44256
|
pitchIncrementButton.addEventListener("click", function () {
|
|
@@ -46734,6 +46838,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46734
46838
|
var container = this.buildContainer(map, this.options.style, "Map Style Control");
|
|
46735
46839
|
var styleOpsGrid = this.buildStyleOpsGrid(container);
|
|
46736
46840
|
var currStyleButton = this.buildCurrStyleBtn(container, styleOpsGrid);
|
|
46841
|
+
var tooltip = buildAccessibleTooltip("Select Style");
|
|
46737
46842
|
container.addEventListener("mouseover", function () {
|
|
46738
46843
|
_this.hasMouse = true;
|
|
46739
46844
|
container.classList.add(StyleControl.Css.inUse);
|
|
@@ -46763,9 +46868,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46763
46868
|
if (options && StyleControl.InvertOrderPositions.includes(options.position)) {
|
|
46764
46869
|
container.appendChild(styleOpsGrid);
|
|
46765
46870
|
container.appendChild(currStyleButton);
|
|
46871
|
+
container.appendChild(tooltip);
|
|
46872
|
+
positionTooltip(tooltip, currStyleButton);
|
|
46766
46873
|
}
|
|
46767
46874
|
else {
|
|
46768
46875
|
container.appendChild(currStyleButton);
|
|
46876
|
+
container.appendChild(tooltip);
|
|
46877
|
+
positionTooltip(tooltip, currStyleButton);
|
|
46769
46878
|
container.appendChild(styleOpsGrid);
|
|
46770
46879
|
}
|
|
46771
46880
|
return container;
|
|
@@ -46821,7 +46930,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46821
46930
|
var _this = this;
|
|
46822
46931
|
var styleOptionButton = document.createElement("button");
|
|
46823
46932
|
var friendlyName = this.mapToFriendlyStyleName(name);
|
|
46824
|
-
styleOptionButton.setAttribute("title", friendlyName);
|
|
46825
46933
|
styleOptionButton.setAttribute("alt", friendlyName);
|
|
46826
46934
|
styleOptionButton.setAttribute("type", "button");
|
|
46827
46935
|
var styleIconImage = new Image();
|
|
@@ -46841,15 +46949,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46841
46949
|
if (_this.options.autoSelectionMode) {
|
|
46842
46950
|
_this.map.setStyle({ style: name });
|
|
46843
46951
|
}
|
|
46952
|
+
Object.entries(_this.styleButtons).forEach(function (_a) {
|
|
46953
|
+
var _b = __read(_a, 2), styleName = _b[0], button = _b[1];
|
|
46954
|
+
return button.setAttribute('aria-current', styleName === name ? 'true' : 'false');
|
|
46955
|
+
});
|
|
46844
46956
|
}
|
|
46845
46957
|
});
|
|
46958
|
+
var iconDiv = document.createElement('div');
|
|
46959
|
+
iconDiv.classList.add('selected-icon');
|
|
46960
|
+
styleOptionButton.appendChild(iconDiv);
|
|
46846
46961
|
return styleOptionButton;
|
|
46847
46962
|
};
|
|
46848
46963
|
StyleControl.prototype.buildCurrStyleBtn = function (container, opsGrid) {
|
|
46849
46964
|
var selectCurrButton = document.createElement("button");
|
|
46850
46965
|
selectCurrButton.classList.add(StyleControl.Css.button);
|
|
46851
46966
|
selectCurrButton.classList.add(StyleControl.Css.currentStyle);
|
|
46852
|
-
selectCurrButton.setAttribute("
|
|
46967
|
+
selectCurrButton.setAttribute("aria-label", "Select Style");
|
|
46853
46968
|
selectCurrButton.setAttribute("alt", "Select Style");
|
|
46854
46969
|
selectCurrButton.setAttribute("type", "button");
|
|
46855
46970
|
this.currStyleImage = new Image();
|
|
@@ -46912,6 +47027,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46912
47027
|
var styleOptionButton = _this.buildSelectStyleBtn(styleName, iconUrl);
|
|
46913
47028
|
styleOpsGrid.appendChild(styleOptionButton);
|
|
46914
47029
|
_this.styleButtons[styleName] = styleOptionButton;
|
|
47030
|
+
var tooltip = buildAccessibleTooltip(_this.mapToFriendlyStyleName(styleName));
|
|
47031
|
+
styleOpsGrid.appendChild(tooltip);
|
|
47032
|
+
positionTooltip(tooltip, styleOptionButton);
|
|
46915
47033
|
});
|
|
46916
47034
|
}
|
|
46917
47035
|
else {
|
|
@@ -46920,8 +47038,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46920
47038
|
var styleOptionButton = _this.buildSelectStyleBtn(styleName, iconUrl);
|
|
46921
47039
|
styleOpsGrid.appendChild(styleOptionButton);
|
|
46922
47040
|
_this.styleButtons[styleName] = styleOptionButton;
|
|
47041
|
+
var tooltip = buildAccessibleTooltip(_this.mapToFriendlyStyleName(styleName));
|
|
47042
|
+
styleOpsGrid.appendChild(tooltip);
|
|
47043
|
+
positionTooltip(tooltip, styleOptionButton);
|
|
46923
47044
|
});
|
|
46924
47045
|
}
|
|
47046
|
+
Object.entries(_this.styleButtons).forEach(function (_a) {
|
|
47047
|
+
var _b = __read(_a, 2), styleName = _b[0], button = _b[1];
|
|
47048
|
+
return button.setAttribute('aria-current', styleName === currStyle ? 'true' : 'false');
|
|
47049
|
+
});
|
|
46925
47050
|
_this.map.events.add("styledata", _this.onStyleChange);
|
|
46926
47051
|
});
|
|
46927
47052
|
return styleOpsGrid;
|
|
@@ -46958,11 +47083,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46958
47083
|
}(ControlBase));
|
|
46959
47084
|
|
|
46960
47085
|
/**
|
|
46961
|
-
* The options for
|
|
47086
|
+
* The options for setting traffic on the map.
|
|
46962
47087
|
*/
|
|
46963
|
-
var
|
|
46964
|
-
__extends(
|
|
46965
|
-
function
|
|
47088
|
+
var TrafficOptions = /** @class */ (function (_super) {
|
|
47089
|
+
__extends(TrafficOptions, _super);
|
|
47090
|
+
function TrafficOptions() {
|
|
46966
47091
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
46967
47092
|
/**
|
|
46968
47093
|
* The type of traffic flow to display:
|
|
@@ -46971,16 +47096,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46971
47096
|
* <p>"absolute" is the absolute speed of the road</p>
|
|
46972
47097
|
* <p>"relative-delay" displays relative speed only where they differ from free-flow;
|
|
46973
47098
|
* false to stop displaying the traffic flow.</p>
|
|
46974
|
-
* default `"
|
|
46975
|
-
* @default "
|
|
47099
|
+
* default `"none"``
|
|
47100
|
+
* @default "none"
|
|
46976
47101
|
*/
|
|
46977
|
-
_this.flow = "
|
|
47102
|
+
_this.flow = "none";
|
|
46978
47103
|
/**
|
|
46979
47104
|
* Whether to display incidents on the map.
|
|
46980
|
-
* default `
|
|
46981
|
-
* @default
|
|
47105
|
+
* default `false`
|
|
47106
|
+
* @default false
|
|
46982
47107
|
*/
|
|
46983
|
-
_this.incidents =
|
|
47108
|
+
_this.incidents = false;
|
|
47109
|
+
return _this;
|
|
47110
|
+
}
|
|
47111
|
+
return TrafficOptions;
|
|
47112
|
+
}(Options));
|
|
47113
|
+
|
|
47114
|
+
/**
|
|
47115
|
+
* The options for a TrafficControl object.
|
|
47116
|
+
*/
|
|
47117
|
+
var TrafficControlOptions = /** @class */ (function (_super) {
|
|
47118
|
+
__extends(TrafficControlOptions, _super);
|
|
47119
|
+
function TrafficControlOptions() {
|
|
47120
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
46984
47121
|
/**
|
|
46985
47122
|
* Specifies if the control is in the active state (displaying traffic).
|
|
46986
47123
|
* Default: false
|
|
@@ -46996,7 +47133,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46996
47133
|
return _this;
|
|
46997
47134
|
}
|
|
46998
47135
|
return TrafficControlOptions;
|
|
46999
|
-
}(
|
|
47136
|
+
}(TrafficOptions));
|
|
47000
47137
|
|
|
47001
47138
|
/**
|
|
47002
47139
|
* A control that toggles traffic data on the map.
|
|
@@ -47011,9 +47148,49 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47011
47148
|
var _this = _super.call(this) || this;
|
|
47012
47149
|
_this.hasMouse = false;
|
|
47013
47150
|
_this.hasFocus = false;
|
|
47014
|
-
|
|
47151
|
+
// desired map traffic state when control is enabled
|
|
47152
|
+
_this.options = new TrafficOptions().merge({
|
|
47153
|
+
flow: 'relative',
|
|
47154
|
+
incidents: true
|
|
47155
|
+
});
|
|
47156
|
+
_this.style = exports.ControlStyle.light;
|
|
47157
|
+
_this.container = null;
|
|
47158
|
+
_this.trafficButton = null;
|
|
47159
|
+
_this.map = null;
|
|
47160
|
+
if (options) {
|
|
47161
|
+
_this.initIsActive = options.isActive || false;
|
|
47162
|
+
_this.options.flow = options.flow || 'relative';
|
|
47163
|
+
_this.options.incidents = options.incidents || true;
|
|
47164
|
+
_this.style = options.style || exports.ControlStyle.light;
|
|
47165
|
+
}
|
|
47015
47166
|
return _this;
|
|
47016
47167
|
}
|
|
47168
|
+
Object.defineProperty(TrafficControl.prototype, "isActive", {
|
|
47169
|
+
/**
|
|
47170
|
+
* Current control state (is traffic information displayed?)
|
|
47171
|
+
*/
|
|
47172
|
+
get: function () {
|
|
47173
|
+
if (!this.map) {
|
|
47174
|
+
return false;
|
|
47175
|
+
}
|
|
47176
|
+
var trafficState = this.map.getTraffic();
|
|
47177
|
+
return trafficState.flow !== "none" || trafficState.incidents;
|
|
47178
|
+
},
|
|
47179
|
+
/**
|
|
47180
|
+
* Sets the control state
|
|
47181
|
+
*/
|
|
47182
|
+
set: function (newValue) {
|
|
47183
|
+
if (!this.map) {
|
|
47184
|
+
return;
|
|
47185
|
+
}
|
|
47186
|
+
this.map.setTraffic({
|
|
47187
|
+
flow: newValue ? this.options.flow : 'none',
|
|
47188
|
+
incidents: newValue ? this.options.incidents : false
|
|
47189
|
+
});
|
|
47190
|
+
},
|
|
47191
|
+
enumerable: false,
|
|
47192
|
+
configurable: true
|
|
47193
|
+
});
|
|
47017
47194
|
/**
|
|
47018
47195
|
* Initialization method for the control which is called when added to the map.
|
|
47019
47196
|
* @param map The map that the control will be added to.
|
|
@@ -47021,49 +47198,63 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47021
47198
|
* @return An HTMLElement to be placed on the map for the control.
|
|
47022
47199
|
*/
|
|
47023
47200
|
TrafficControl.prototype.onAdd = function (map) {
|
|
47024
|
-
this.
|
|
47201
|
+
this.map = map;
|
|
47202
|
+
var trafficState = map.getTraffic();
|
|
47203
|
+
// bring map traffic state in sync with desired if initIsActive have been set
|
|
47204
|
+
if (this.initIsActive !== undefined) {
|
|
47205
|
+
this.isActive = this.initIsActive;
|
|
47206
|
+
}
|
|
47207
|
+
this.container = this.buildContainer(map, this.style, "Traffic Control");
|
|
47025
47208
|
this.container.style.flexDirection = "column";
|
|
47026
47209
|
var trafficButton = this.constructTrafficButton(map);
|
|
47027
47210
|
this.container.appendChild(trafficButton);
|
|
47211
|
+
var tooltip = buildAccessibleTooltip("Toggle Traffic Display");
|
|
47212
|
+
this.container.appendChild(tooltip);
|
|
47213
|
+
positionTooltip(tooltip, trafficButton);
|
|
47028
47214
|
return this.container;
|
|
47029
47215
|
};
|
|
47216
|
+
TrafficControl.prototype.onRemove = function () {
|
|
47217
|
+
this.map = null;
|
|
47218
|
+
};
|
|
47030
47219
|
/**
|
|
47031
47220
|
* Get the TrafficControlOptions
|
|
47032
47221
|
*/
|
|
47033
47222
|
TrafficControl.prototype.getOptions = function () {
|
|
47034
|
-
return
|
|
47223
|
+
return new TrafficControlOptions().merge({
|
|
47224
|
+
isActive: this.isActive,
|
|
47225
|
+
flow: this.options.flow,
|
|
47226
|
+
incidents: this.options.incidents,
|
|
47227
|
+
style: this.style
|
|
47228
|
+
});
|
|
47229
|
+
};
|
|
47230
|
+
/**
|
|
47231
|
+
* Updates the button state according to current traffic state
|
|
47232
|
+
* This is invoked on init in constructTrafficButton and on each Map.setTraffic()
|
|
47233
|
+
*/
|
|
47234
|
+
TrafficControl.prototype.updateButtonState = function () {
|
|
47235
|
+
if (this.isActive) {
|
|
47236
|
+
this.container.classList.add("in-use");
|
|
47237
|
+
}
|
|
47238
|
+
else {
|
|
47239
|
+
this.container.classList.remove("in-use");
|
|
47240
|
+
}
|
|
47241
|
+
if (this.trafficButton) {
|
|
47242
|
+
this.trafficButton.setAttribute("aria-pressed", this.isActive ? "true" : "false");
|
|
47243
|
+
}
|
|
47035
47244
|
};
|
|
47036
47245
|
TrafficControl.prototype.constructTrafficButton = function (map) {
|
|
47037
47246
|
var _this = this;
|
|
47038
47247
|
var trafficButton = document.createElement("button");
|
|
47039
47248
|
trafficButton.classList.add("azure-maps-control-button");
|
|
47040
47249
|
trafficButton.classList.add("traffic");
|
|
47041
|
-
trafficButton.setAttribute("
|
|
47042
|
-
trafficButton.setAttribute("alt", "
|
|
47250
|
+
trafficButton.setAttribute("aria-label", "Toggle Traffic Display");
|
|
47251
|
+
trafficButton.setAttribute("alt", "Toggle Traffic Display");
|
|
47043
47252
|
trafficButton.setAttribute("type", "button");
|
|
47253
|
+
this.trafficButton = trafficButton;
|
|
47254
|
+
this.updateButtonState();
|
|
47044
47255
|
// toggle button
|
|
47045
47256
|
trafficButton.addEventListener("click", function () {
|
|
47046
|
-
|
|
47047
|
-
_this.options.isActive = !(t.flow !== "none" || t.incidents);
|
|
47048
|
-
if (_this.options.isActive) {
|
|
47049
|
-
map.setTraffic({
|
|
47050
|
-
flow: _this.options.flow,
|
|
47051
|
-
incidents: _this.options.incidents
|
|
47052
|
-
});
|
|
47053
|
-
_this.container.classList.add("in-use");
|
|
47054
|
-
}
|
|
47055
|
-
else {
|
|
47056
|
-
map.setTraffic({
|
|
47057
|
-
flow: "none",
|
|
47058
|
-
incidents: false
|
|
47059
|
-
});
|
|
47060
|
-
_this.container.classList.remove("in-use");
|
|
47061
|
-
}
|
|
47062
|
-
});
|
|
47063
|
-
map.events.addOnce("styledata", function () {
|
|
47064
|
-
if (_this.options.isActive) {
|
|
47065
|
-
trafficButton.dispatchEvent(new Event("click"));
|
|
47066
|
-
}
|
|
47257
|
+
_this.isActive = !_this.isActive;
|
|
47067
47258
|
});
|
|
47068
47259
|
return trafficButton;
|
|
47069
47260
|
};
|
|
@@ -47101,18 +47292,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47101
47292
|
var e_1, _a, e_2, _b;
|
|
47102
47293
|
var trafficLegend = document.createElement("div");
|
|
47103
47294
|
trafficLegend.classList.add("traffic-legend", "hidden");
|
|
47104
|
-
trafficLegend.setAttribute("title", "Traffic Legend");
|
|
47105
47295
|
trafficLegend.setAttribute("alt", "Traffic Legend");
|
|
47106
47296
|
var trafficLegendTable = document.createElement("table");
|
|
47107
47297
|
// legend table title
|
|
47108
47298
|
var tr1 = document.createElement("tr");
|
|
47109
47299
|
var td = document.createElement("td");
|
|
47110
|
-
td.setAttribute("title", "Traffic");
|
|
47111
47300
|
td.setAttribute("alt", "Traffic");
|
|
47112
47301
|
td.appendChild(document.createTextNode("Traffic"));
|
|
47302
|
+
var tooltip = buildAccessibleTooltip("Traffic");
|
|
47113
47303
|
td.classList.add("traffic-legend-title");
|
|
47114
47304
|
td.colSpan = 6;
|
|
47115
47305
|
tr1.appendChild(td);
|
|
47306
|
+
tr1.appendChild(tooltip);
|
|
47307
|
+
positionTooltip(tooltip, td);
|
|
47116
47308
|
trafficLegendTable.appendChild(tr1);
|
|
47117
47309
|
// legend table contents
|
|
47118
47310
|
var tr2 = document.createElement("tr");
|
|
@@ -47121,13 +47313,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47121
47313
|
var col = _d.value;
|
|
47122
47314
|
var data = document.createElement("td");
|
|
47123
47315
|
if (col === "Fast" || col === "Slow") {
|
|
47124
|
-
data.setAttribute("title", col);
|
|
47125
47316
|
data.setAttribute("alt", col);
|
|
47126
47317
|
data.appendChild(document.createTextNode(col));
|
|
47127
47318
|
data.classList.add("traffic-legend-text");
|
|
47128
47319
|
}
|
|
47129
47320
|
else {
|
|
47130
47321
|
data.classList.add("traffic-legend-colors");
|
|
47322
|
+
data.setAttribute("aria-label", "Traffic Legend");
|
|
47323
|
+
data.setAttribute("role", "img");
|
|
47131
47324
|
try {
|
|
47132
47325
|
for (var col_1 = (e_2 = void 0, __values(col)), col_1_1 = col_1.next(); !col_1_1.done; col_1_1 = col_1.next()) {
|
|
47133
47326
|
var color = col_1_1.value;
|
|
@@ -47145,6 +47338,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47145
47338
|
}
|
|
47146
47339
|
}
|
|
47147
47340
|
tr2.appendChild(data);
|
|
47341
|
+
var tooltip_1 = buildAccessibleTooltip(col instanceof Array ? "Traffic Legend" : col);
|
|
47342
|
+
tr2.appendChild(tooltip_1);
|
|
47343
|
+
positionTooltip(tooltip_1, data);
|
|
47148
47344
|
}
|
|
47149
47345
|
}
|
|
47150
47346
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -48095,6 +48291,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
48095
48291
|
* Cached array of powers of 10. This will be faster than call Math.pow.
|
|
48096
48292
|
*/
|
|
48097
48293
|
var POWERS_OF_10 = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000];
|
|
48294
|
+
/**
|
|
48295
|
+
* Maximum latitude as defined in WebMercator
|
|
48296
|
+
*/
|
|
48297
|
+
var WEBMERCATOR_MAXLAT = 85.0511;
|
|
48098
48298
|
//////////////////////
|
|
48099
48299
|
/// Private Functions
|
|
48100
48300
|
//////////////////////
|
|
@@ -48969,11 +49169,42 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
48969
49169
|
var normalUnit = _normalizeDistanceUnit(units);
|
|
48970
49170
|
return convertDistance(EARTH_RADIUS_SEMI_MAJOR_AXIS, DistanceUnits.meters, normalUnit);
|
|
48971
49171
|
}
|
|
49172
|
+
/**
|
|
49173
|
+
* constructs raw geodesic path that doesn't handle antimeridian crossing
|
|
49174
|
+
*/
|
|
49175
|
+
function _constructGeodesic(position, nextPosition, nodeSize) {
|
|
49176
|
+
var geodesic = [];
|
|
49177
|
+
// Convert positions from degrees to Radians
|
|
49178
|
+
var lat1 = _toRadians(position[1]);
|
|
49179
|
+
var lon1 = _toRadians(position[0]);
|
|
49180
|
+
var lat2 = _toRadians(nextPosition[1]);
|
|
49181
|
+
var lon2 = _toRadians(nextPosition[0]);
|
|
49182
|
+
// Calculate the total extent of the route
|
|
49183
|
+
var d = 2 * Math.asin(Math.sqrt(Math.pow((Math.sin((lat1 - lat2) / 2)), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow((Math.sin((lon1 - lon2) / 2)), 2)));
|
|
49184
|
+
// Calculate positions at fixed intervals along the route
|
|
49185
|
+
for (var k = 0; k <= nodeSize; k++) {
|
|
49186
|
+
var f = (k / nodeSize);
|
|
49187
|
+
var A = Math.sin((1 - f) * d) / Math.sin(d);
|
|
49188
|
+
var B = Math.sin(f * d) / Math.sin(d);
|
|
49189
|
+
// Obtain 3D Cartesian coordinates of each point
|
|
49190
|
+
var x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
|
|
49191
|
+
var y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
|
|
49192
|
+
var z = A * Math.sin(lat1) + B * Math.sin(lat2);
|
|
49193
|
+
// Convert these to latitude/longitude
|
|
49194
|
+
var lat = Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
|
|
49195
|
+
var lon = Math.atan2(y, x);
|
|
49196
|
+
lat = _clip(_toDegrees(lat), -85, 85);
|
|
49197
|
+
lon = _toDegrees(lon);
|
|
49198
|
+
// Add this to the array
|
|
49199
|
+
geodesic.push([lon, lat]);
|
|
49200
|
+
}
|
|
49201
|
+
return geodesic;
|
|
49202
|
+
}
|
|
48972
49203
|
/**
|
|
48973
49204
|
* Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path.
|
|
48974
49205
|
* @param path Array of position objects that form a path to fill in.
|
|
48975
49206
|
* @param nodeSize Number of nodes to insert between each position. Default: 15
|
|
48976
|
-
* @returns An array of position objects that form a geodesic paths.
|
|
49207
|
+
* @returns An array of position objects that form a geodesic paths, geodesic path crossing antimeridian will contain longitude outside of -180 to 180 range. See getGeodesicPaths() when this is undesired.
|
|
48977
49208
|
*/
|
|
48978
49209
|
function getGeodesicPath(path, nodeSize) {
|
|
48979
49210
|
if (!nodeSize || nodeSize <= 0) {
|
|
@@ -48987,34 +49218,70 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
48987
49218
|
locs = path.coordinates;
|
|
48988
49219
|
}
|
|
48989
49220
|
var len = locs.length - 1;
|
|
48990
|
-
var
|
|
49221
|
+
var geodesic = [];
|
|
48991
49222
|
for (var i = 0; i < len; i++) {
|
|
48992
49223
|
// Convert positions from degrees to Radians
|
|
48993
|
-
|
|
48994
|
-
|
|
48995
|
-
|
|
48996
|
-
var
|
|
48997
|
-
//
|
|
48998
|
-
|
|
48999
|
-
|
|
49000
|
-
|
|
49001
|
-
|
|
49002
|
-
|
|
49003
|
-
|
|
49004
|
-
// Obtain 3D Cartesian coordinates of each point
|
|
49005
|
-
var x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
|
|
49006
|
-
var y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
|
|
49007
|
-
var z = A * Math.sin(lat1) + B * Math.sin(lat2);
|
|
49008
|
-
// Convert these to latitude/longitude
|
|
49009
|
-
var lat = Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
|
|
49010
|
-
var lon = Math.atan2(y, x);
|
|
49011
|
-
lat = _clip(_toDegrees(lat), -85, 85);
|
|
49012
|
-
lon = _toDegrees(lon);
|
|
49013
|
-
// Add this to the array
|
|
49014
|
-
outputLocs.push([lon, lat]);
|
|
49224
|
+
geodesic = geodesic.concat(_constructGeodesic(locs[i], locs[i + 1], nodeSize));
|
|
49225
|
+
}
|
|
49226
|
+
return geodesic.reduce(function (targetPath, coord) {
|
|
49227
|
+
var last = targetPath.length > 0 ? targetPath[targetPath.length - 1] : null;
|
|
49228
|
+
// denormalize longitude on antimeridian crossing
|
|
49229
|
+
if (last && Math.abs(coord[0] - last[0]) > 180.0) {
|
|
49230
|
+
var denormLon = last[0] < 0 ? coord[0] - 360.0 : coord[0] + 360.0;
|
|
49231
|
+
targetPath.push([denormLon, coord[1]]);
|
|
49232
|
+
}
|
|
49233
|
+
else {
|
|
49234
|
+
targetPath.push(coord);
|
|
49015
49235
|
}
|
|
49236
|
+
return targetPath;
|
|
49237
|
+
}, []);
|
|
49238
|
+
}
|
|
49239
|
+
/**
|
|
49240
|
+
* Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path broken by antimeridian into multiple sub-paths.
|
|
49241
|
+
* @param path Array of position objects that form a path to fill in.
|
|
49242
|
+
* @param nodeSize Number of nodes to insert between each position. Default: 15
|
|
49243
|
+
* @returns An array of paths that form geodesic paths, Comparing to getGeodesicPath, sub-paths will always contain longitude in -180 to 180 range
|
|
49244
|
+
*/
|
|
49245
|
+
function getGeodesicPaths(path, nodeSize) {
|
|
49246
|
+
if (!nodeSize || nodeSize <= 0) {
|
|
49247
|
+
nodeSize = 15;
|
|
49016
49248
|
}
|
|
49017
|
-
|
|
49249
|
+
var locs;
|
|
49250
|
+
if (Array.isArray(path)) {
|
|
49251
|
+
locs = path;
|
|
49252
|
+
}
|
|
49253
|
+
else if (path.type && path.type === "LineString") {
|
|
49254
|
+
locs = path.coordinates;
|
|
49255
|
+
}
|
|
49256
|
+
var len = locs.length - 1;
|
|
49257
|
+
var currentNonCrossing = [];
|
|
49258
|
+
var outputLocs = [];
|
|
49259
|
+
for (var i = 0; i < len; i++) {
|
|
49260
|
+
var geodesic = _constructGeodesic(locs[i], locs[i + 1], nodeSize);
|
|
49261
|
+
for (var k = 0; k < geodesic.length; k++) {
|
|
49262
|
+
currentNonCrossing.push(geodesic[k]);
|
|
49263
|
+
if (k + 1 >= geodesic.length) {
|
|
49264
|
+
continue;
|
|
49265
|
+
}
|
|
49266
|
+
var _a = __read(geodesic[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
49267
|
+
var _b = __read(geodesic[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
49268
|
+
// split the line by antimeridian
|
|
49269
|
+
// and break geodesic into two line segments
|
|
49270
|
+
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
49271
|
+
var denormLon2 = lon1 > 0 ? lon2 + 360.0 : lon2 - 360.0;
|
|
49272
|
+
var antiLon = lon1 > 0 ? 180.0 : -180.0;
|
|
49273
|
+
var abs = Math.abs(denormLon2 - lon1);
|
|
49274
|
+
var antiAbs = Math.abs(antiLon - lon1);
|
|
49275
|
+
var f = antiAbs / abs;
|
|
49276
|
+
var dLat = (lat2 - lat1) * f;
|
|
49277
|
+
var antiLat = lat1 + dLat;
|
|
49278
|
+
currentNonCrossing.push([antiLon, antiLat]);
|
|
49279
|
+
outputLocs.push(currentNonCrossing);
|
|
49280
|
+
currentNonCrossing = [[-antiLon, antiLat]];
|
|
49281
|
+
}
|
|
49282
|
+
}
|
|
49283
|
+
}
|
|
49284
|
+
outputLocs.push(currentNonCrossing);
|
|
49018
49285
|
return outputLocs;
|
|
49019
49286
|
}
|
|
49020
49287
|
/**
|
|
@@ -50421,6 +50688,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
50421
50688
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
50422
50689
|
__proto__: null,
|
|
50423
50690
|
AffineTransform: AffineTransform,
|
|
50691
|
+
WEBMERCATOR_MAXLAT: WEBMERCATOR_MAXLAT,
|
|
50424
50692
|
_precision: _precision,
|
|
50425
50693
|
get AreaUnits () { return AreaUnits; },
|
|
50426
50694
|
get DistanceUnits () { return DistanceUnits; },
|
|
@@ -50434,6 +50702,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
50434
50702
|
getDistanceTo: getDistanceTo,
|
|
50435
50703
|
getEarthRadius: getEarthRadius,
|
|
50436
50704
|
getGeodesicPath: getGeodesicPath,
|
|
50705
|
+
getGeodesicPaths: getGeodesicPaths,
|
|
50437
50706
|
getHeading: getHeading,
|
|
50438
50707
|
getLengthOfPath: getLengthOfPath,
|
|
50439
50708
|
getPositionAlongPath: getPositionAlongPath,
|
|
@@ -51563,8 +51832,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
51563
51832
|
this.container.style.flexDirection = "column";
|
|
51564
51833
|
this.zoomInButton = this.constructZoomInButton(map);
|
|
51565
51834
|
this.zoomOutButton = this.constructZoomOutButton(map);
|
|
51835
|
+
var tooltipZoomIn = buildAccessibleTooltip("Zoom In");
|
|
51836
|
+
var tooltipZoomOut = buildAccessibleTooltip("Zoom Out");
|
|
51566
51837
|
this.container.appendChild(this.zoomInButton);
|
|
51838
|
+
this.container.appendChild(tooltipZoomIn);
|
|
51567
51839
|
this.container.appendChild(this.zoomOutButton);
|
|
51840
|
+
this.container.appendChild(tooltipZoomOut);
|
|
51841
|
+
positionTooltip(tooltipZoomIn, this.zoomInButton);
|
|
51842
|
+
positionTooltip(tooltipZoomOut, this.zoomOutButton);
|
|
51568
51843
|
map.events.add('zoom', this.zoomChanged);
|
|
51569
51844
|
map.events.add('minzoomchanged', this.minZoomChanged);
|
|
51570
51845
|
map.events.add('maxzoomchanged', this.maxZoomChanged);
|
|
@@ -51590,8 +51865,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
51590
51865
|
// small values need special handling, since depending on the height of the map view
|
|
51591
51866
|
// the actual zoom we can zoom out to can be above or below 0 when the entire map fits the height into the view
|
|
51592
51867
|
// use web mercator bounds to check if entire latitude range is visible
|
|
51593
|
-
var reachedLatitudeBoundaries = BoundingBox.getSouth(this.map.getCamera().bounds) <= -
|
|
51594
|
-
&& BoundingBox.getNorth(this.map.getCamera().bounds) >=
|
|
51868
|
+
var reachedLatitudeBoundaries = BoundingBox.getSouth(this.map.getCamera().bounds) <= -WEBMERCATOR_MAXLAT
|
|
51869
|
+
&& BoundingBox.getNorth(this.map.getCamera().bounds) >= WEBMERCATOR_MAXLAT;
|
|
51595
51870
|
var zoomOutDisabled = this.map.getCamera().zoom <= this.map._getMap().getMinZoom() || reachedLatitudeBoundaries;
|
|
51596
51871
|
if (this.zoomInButton && this.zoomInButton.disabled != zoomInDisabled) {
|
|
51597
51872
|
this.zoomInButton.disabled = zoomInDisabled;
|
|
@@ -51605,7 +51880,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
51605
51880
|
var zoomInButton = document.createElement("button");
|
|
51606
51881
|
zoomInButton.classList.add("azure-maps-control-button");
|
|
51607
51882
|
zoomInButton.classList.add("zoom-in");
|
|
51608
|
-
zoomInButton.setAttribute("
|
|
51883
|
+
zoomInButton.setAttribute("aria-label", "Zoom In");
|
|
51609
51884
|
zoomInButton.setAttribute("alt", "Zoom In");
|
|
51610
51885
|
zoomInButton.setAttribute("type", "button");
|
|
51611
51886
|
zoomInButton.addEventListener("click", function () {
|
|
@@ -51622,7 +51897,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
51622
51897
|
var zoomOutButton = document.createElement("button");
|
|
51623
51898
|
zoomOutButton.classList.add("azure-maps-control-button");
|
|
51624
51899
|
zoomOutButton.classList.add("zoom-out");
|
|
51625
|
-
zoomOutButton.setAttribute("
|
|
51900
|
+
zoomOutButton.setAttribute("aria-label", "Zoom Out");
|
|
51626
51901
|
zoomOutButton.setAttribute("alt", "Zoom Out");
|
|
51627
51902
|
zoomOutButton.setAttribute("type", "button");
|
|
51628
51903
|
zoomOutButton.addEventListener("click", function () {
|
|
@@ -51634,7 +51909,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
51634
51909
|
});
|
|
51635
51910
|
return zoomOutButton;
|
|
51636
51911
|
};
|
|
51637
|
-
ZoomControl.WEBMERCATOR_MAXLAT = 85.0511;
|
|
51638
51912
|
ZoomControl.ZOOM_DURATION_MS = 200;
|
|
51639
51913
|
return ZoomControl;
|
|
51640
51914
|
}(ControlBase));
|
|
@@ -52497,6 +52771,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
52497
52771
|
if (value instanceof Source) {
|
|
52498
52772
|
return value;
|
|
52499
52773
|
}
|
|
52774
|
+
else {
|
|
52775
|
+
return undefined;
|
|
52776
|
+
}
|
|
52500
52777
|
};
|
|
52501
52778
|
return LayerOptions;
|
|
52502
52779
|
}(Options));
|
|
@@ -52753,6 +53030,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
52753
53030
|
if (value instanceof Source) {
|
|
52754
53031
|
return value;
|
|
52755
53032
|
}
|
|
53033
|
+
else {
|
|
53034
|
+
return undefined;
|
|
53035
|
+
}
|
|
52756
53036
|
};
|
|
52757
53037
|
return HeatMapLayerOptions;
|
|
52758
53038
|
}(LayerOptions));
|
|
@@ -52948,6 +53228,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
52948
53228
|
if (value instanceof Source) {
|
|
52949
53229
|
return value;
|
|
52950
53230
|
}
|
|
53231
|
+
else {
|
|
53232
|
+
return undefined;
|
|
53233
|
+
}
|
|
52951
53234
|
};
|
|
52952
53235
|
return ImageLayerOptions;
|
|
52953
53236
|
}(MediaLayerOptions));
|
|
@@ -54735,6 +55018,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54735
55018
|
if (_this.options.closeButton) {
|
|
54736
55019
|
_this.closeBtn = _this._createCloseButton();
|
|
54737
55020
|
_this.contentDiv.appendChild(_this.closeBtn);
|
|
55021
|
+
var tooltip = buildAccessibleTooltip("close");
|
|
55022
|
+
_this.contentDiv.appendChild(tooltip);
|
|
55023
|
+
positionTooltip(tooltip, _this.closeBtn, true);
|
|
54738
55024
|
}
|
|
54739
55025
|
return _this;
|
|
54740
55026
|
}
|
|
@@ -54768,6 +55054,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54768
55054
|
if (newOptions.closeButton && !this.closeBtn) {
|
|
54769
55055
|
this.closeBtn = this._createCloseButton();
|
|
54770
55056
|
this.contentDiv.appendChild(this.closeBtn);
|
|
55057
|
+
var tooltip = buildAccessibleTooltip("close");
|
|
55058
|
+
this.contentDiv.appendChild(tooltip);
|
|
55059
|
+
positionTooltip(tooltip, this.closeBtn, true);
|
|
54771
55060
|
}
|
|
54772
55061
|
else if (!newOptions.closeButton && this.closeBtn) {
|
|
54773
55062
|
this.contentDiv.removeChild(this.closeBtn);
|
|
@@ -54945,7 +55234,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54945
55234
|
ele.addEventListener("click", this.close);
|
|
54946
55235
|
ele.classList.add(Popup.Css.close);
|
|
54947
55236
|
ele.setAttribute("aria-label", "close");
|
|
54948
|
-
ele.setAttribute("title", "close");
|
|
54949
55237
|
ele.setAttribute("tabindex", "0");
|
|
54950
55238
|
ele.innerHTML = "×";
|
|
54951
55239
|
return ele;
|
|
@@ -55208,6 +55496,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55208
55496
|
// They must use setOptions(...).
|
|
55209
55497
|
return cloneDeepWith_1(this.options, HtmlMarkerOptions._cloneCustomizer);
|
|
55210
55498
|
};
|
|
55499
|
+
/**
|
|
55500
|
+
* Returns the underlying `Marker`'s HTML element.
|
|
55501
|
+
*/
|
|
55502
|
+
HtmlMarker.prototype.getElement = function () {
|
|
55503
|
+
return this.marker.getElement();
|
|
55504
|
+
};
|
|
55211
55505
|
/**
|
|
55212
55506
|
* Sets the options of the marker.
|
|
55213
55507
|
* @param options The options for the marker.
|
|
@@ -55232,7 +55526,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55232
55526
|
(newOptions.color !== this.options.color ||
|
|
55233
55527
|
newOptions.text !== this.options.text ||
|
|
55234
55528
|
newOptions.secondaryColor !== this.options.secondaryColor)) {
|
|
55235
|
-
this.element.innerHTML = this._getSubbedHtmlString(newOptions);
|
|
55529
|
+
this.element.innerHTML = this._getSubbedHtmlString(newOptions) || "";
|
|
55236
55530
|
}
|
|
55237
55531
|
if (newOptions.draggable !== this.options.draggable) {
|
|
55238
55532
|
this._setDraggable(newOptions.draggable);
|
|
@@ -55327,7 +55621,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55327
55621
|
// Must converts a HTML string to a HTMLElement (div with innerHTML == htmlContent).
|
|
55328
55622
|
// Must also handle the substitution of HTML string placeholders.
|
|
55329
55623
|
if (typeof options.htmlContent === "string") {
|
|
55330
|
-
var subbedContent = this._getSubbedHtmlString(options);
|
|
55624
|
+
var subbedContent = this._getSubbedHtmlString(options) || "";
|
|
55331
55625
|
this.element = Html.convertHtmlString(subbedContent);
|
|
55332
55626
|
}
|
|
55333
55627
|
else {
|
|
@@ -55378,6 +55672,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55378
55672
|
.replace(/{secondaryColor}/ig, options.secondaryColor || "")
|
|
55379
55673
|
.replace(/{text}/ig, options.text || "");
|
|
55380
55674
|
}
|
|
55675
|
+
else {
|
|
55676
|
+
return null;
|
|
55677
|
+
}
|
|
55381
55678
|
};
|
|
55382
55679
|
/**
|
|
55383
55680
|
* Returns the element that should contain all the markers.
|
|
@@ -57053,16 +57350,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57053
57350
|
}
|
|
57054
57351
|
this.options.copyrightContent = newOptions.copyrightContent;
|
|
57055
57352
|
}
|
|
57056
|
-
if (!newOptions.showLogo && this.
|
|
57353
|
+
if (!newOptions.showLogo && this.logoAnchor) {
|
|
57057
57354
|
this.addRemoveLogo(false);
|
|
57058
57355
|
}
|
|
57059
|
-
else if (newOptions.showLogo && !this.
|
|
57356
|
+
else if (newOptions.showLogo && !this.logoAnchor) {
|
|
57060
57357
|
this.addRemoveLogo(true);
|
|
57061
57358
|
}
|
|
57062
|
-
if (!newOptions.showFeedbackLink && this.
|
|
57359
|
+
if (!newOptions.showFeedbackLink && this.feedbackAnchor) {
|
|
57063
57360
|
this.addRemoveFeedbackDiv(false);
|
|
57064
57361
|
}
|
|
57065
|
-
else if (newOptions.showFeedbackLink && !this.
|
|
57362
|
+
else if (newOptions.showFeedbackLink && !this.feedbackAnchor) {
|
|
57066
57363
|
this.addRemoveFeedbackDiv(true);
|
|
57067
57364
|
}
|
|
57068
57365
|
this.options = newOptions;
|
|
@@ -57081,56 +57378,45 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57081
57378
|
return copyright;
|
|
57082
57379
|
};
|
|
57083
57380
|
CopyrightControl.prototype.buildFeedbackLink = function () {
|
|
57084
|
-
var _this = this;
|
|
57085
57381
|
var link = document.createElement("a");
|
|
57382
|
+
link.setAttribute("alt", "Give Feedback");
|
|
57383
|
+
link.setAttribute("aria-label", "Give Feedback");
|
|
57086
57384
|
link.href = "https://feedback.azuremaps.com";
|
|
57087
57385
|
link.target = "_blank";
|
|
57088
57386
|
link.rel = "noopener";
|
|
57089
57387
|
link.className = "azure-map-feedback";
|
|
57090
|
-
link.onmouseover = function () {
|
|
57091
|
-
_this.tooltip.style.visibility = "visible";
|
|
57092
|
-
};
|
|
57093
|
-
link.onmouseout = function () {
|
|
57094
|
-
_this.tooltip.style.visibility = "hidden";
|
|
57095
|
-
};
|
|
57096
57388
|
return link;
|
|
57097
57389
|
};
|
|
57098
|
-
CopyrightControl.prototype.addToolTip = function () {
|
|
57099
|
-
var tooltip = document.createElement("div");
|
|
57100
|
-
var tooltipText = document.createElement("div");
|
|
57101
|
-
tooltipText.innerText = "Give Feedback";
|
|
57102
|
-
tooltipText.className = "azure-map-feedback-tooltip";
|
|
57103
|
-
var tooltipBeak = document.createElement("div");
|
|
57104
|
-
tooltipBeak.className = "azure-map-feedback-tooltip-beak";
|
|
57105
|
-
tooltip.appendChild(tooltipText);
|
|
57106
|
-
tooltip.appendChild(tooltipBeak);
|
|
57107
|
-
tooltip.style.visibility = "hidden";
|
|
57108
|
-
tooltip.style.zIndex = "1000";
|
|
57109
|
-
return tooltip;
|
|
57110
|
-
};
|
|
57111
57390
|
CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
|
|
57112
57391
|
if (add) {
|
|
57113
|
-
this.
|
|
57114
|
-
this.
|
|
57115
|
-
this.
|
|
57392
|
+
this.feedbackAnchor = this.buildFeedbackLink();
|
|
57393
|
+
this.tooltip = buildAccessibleTooltip("Give Feedback");
|
|
57394
|
+
this.container.appendChild(this.feedbackAnchor);
|
|
57116
57395
|
this.container.appendChild(this.tooltip);
|
|
57396
|
+
positionTooltip(this.tooltip, this.feedbackAnchor);
|
|
57117
57397
|
}
|
|
57118
57398
|
else {
|
|
57119
|
-
this.
|
|
57399
|
+
this.feedbackAnchor.remove();
|
|
57120
57400
|
this.tooltip.remove();
|
|
57121
57401
|
delete this.tooltip;
|
|
57122
|
-
delete this.
|
|
57402
|
+
delete this.feedbackAnchor;
|
|
57123
57403
|
}
|
|
57124
57404
|
};
|
|
57125
57405
|
CopyrightControl.prototype.addRemoveLogo = function (add) {
|
|
57126
57406
|
if (add) {
|
|
57127
|
-
this.
|
|
57128
|
-
this.
|
|
57129
|
-
this.
|
|
57407
|
+
this.logoAnchor = document.createElement("a");
|
|
57408
|
+
this.logoAnchor.className = "azure-map-logo";
|
|
57409
|
+
this.logoAnchor.href = "https://microsoft.com";
|
|
57410
|
+
this.logoAnchor.setAttribute("aria-label", "Microsoft");
|
|
57411
|
+
this.container.appendChild(this.logoAnchor);
|
|
57412
|
+
this.logoTooltip = buildAccessibleTooltip("Visit microsoft.com");
|
|
57413
|
+
this.container.appendChild(this.logoTooltip);
|
|
57414
|
+
positionTooltip(this.logoTooltip, this.logoAnchor);
|
|
57130
57415
|
}
|
|
57131
57416
|
else {
|
|
57132
|
-
this.
|
|
57133
|
-
|
|
57417
|
+
this.logoAnchor.remove();
|
|
57418
|
+
this.logoTooltip.remove();
|
|
57419
|
+
delete this.logoAnchor;
|
|
57134
57420
|
}
|
|
57135
57421
|
};
|
|
57136
57422
|
return CopyrightControl;
|
|
@@ -58183,6 +58469,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58183
58469
|
if (this._getCanonicalZoom(this._lastCam.zoom) !== this._getCanonicalZoom(cam.zoom)) {
|
|
58184
58470
|
msg.push("to " + this._getCanonicalZoom(cam.zoom) + " level");
|
|
58185
58471
|
}
|
|
58472
|
+
// announce maximum zoom reached
|
|
58473
|
+
if (cam.zoom >= cam.maxZoom) {
|
|
58474
|
+
msg.push("Zoom In button disabled, maximum zoom level reached");
|
|
58475
|
+
}
|
|
58476
|
+
var reachedLatitudeBoundaries = BoundingBox.getSouth(cam.bounds) <= -WEBMERCATOR_MAXLAT
|
|
58477
|
+
&& BoundingBox.getNorth(cam.bounds) >= WEBMERCATOR_MAXLAT;
|
|
58478
|
+
// annouce minimum zoom level reached
|
|
58479
|
+
if (cam.zoom <= cam.minZoom || reachedLatitudeBoundaries) {
|
|
58480
|
+
msg.push("Zoom Out button disabled, minimum zoom level reached");
|
|
58481
|
+
}
|
|
58186
58482
|
// Add the complete message to the actions array.
|
|
58187
58483
|
actions.push(msg.join(" "));
|
|
58188
58484
|
}
|
|
@@ -58683,14 +58979,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58683
58979
|
var titleEl = document.createElement("div");
|
|
58684
58980
|
titleEl.classList.add("incident-popup-title");
|
|
58685
58981
|
titleEl.classList.add("font-segoeui-b");
|
|
58686
|
-
titleEl.setAttribute("tabindex", "0");
|
|
58687
58982
|
titleEl.innerText = incident.properties.incidentType;
|
|
58688
58983
|
titleEl.setAttribute("aria-label", "Incident Type " + incident.properties.incidentType);
|
|
58689
58984
|
var subtitleEl = document.createElement("div");
|
|
58690
58985
|
subtitleEl.classList.add("incident-popup-subtitle");
|
|
58691
58986
|
subtitleEl.classList.add("font-segoeui-b");
|
|
58692
58987
|
subtitleEl.setAttribute("aria-label", "Incident Description " + incident.properties.description);
|
|
58693
|
-
subtitleEl.setAttribute("tabindex", "0");
|
|
58694
58988
|
subtitleEl.innerText = incident.properties.description;
|
|
58695
58989
|
var headerEl = document.createElement("div");
|
|
58696
58990
|
headerEl.classList.add("incident-popup-header");
|
|
@@ -58750,7 +59044,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58750
59044
|
messageEl.classList.add("message");
|
|
58751
59045
|
messageEl.classList.add("font-segoeui");
|
|
58752
59046
|
messageEl.setAttribute("aria-label", "Incident " + iconName + " " + message);
|
|
58753
|
-
messageEl.setAttribute("tabindex", "0");
|
|
58754
59047
|
messageEl.innerText = message;
|
|
58755
59048
|
infoSectionEl.appendChild(iconEl);
|
|
58756
59049
|
infoSectionEl.appendChild(messageEl);
|
|
@@ -59047,9 +59340,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59047
59340
|
if (_this.dpPoint) {
|
|
59048
59341
|
_this.map._getMap().touchZoomRotate.enable();
|
|
59049
59342
|
_this.map._getMap().dragPan.enable();
|
|
59050
|
-
_this.map._getMap().touchZoomRotate.onStart(Date.now() - _this.startTiming >= _this.delay
|
|
59051
|
-
? data.originalEvent
|
|
59052
|
-
: _this.startEventData.originalEvent);
|
|
59053
59343
|
}
|
|
59054
59344
|
_this.dpPoint = undefined;
|
|
59055
59345
|
return;
|
|
@@ -62051,7 +62341,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62051
62341
|
this.minZoom !== undefined ? "minzoom=" + this.minZoom : '',
|
|
62052
62342
|
this.maxZoom !== undefined ? "maxzoom=" + this.maxZoom : '',
|
|
62053
62343
|
this.geometry !== undefined ? this.element.attributes.getNamedItem('data-azure-maps-attribution-geometry').value : '',
|
|
62054
|
-
this.tilesetId !== undefined
|
|
62344
|
+
this.tilesetId !== undefined ? "tilesetId=" + this.tilesetId : '',
|
|
62345
|
+
this.dynamic ? "dynamic" : ''
|
|
62055
62346
|
].filter(function (comp) { return comp.length > 0; }).join(';');
|
|
62056
62347
|
},
|
|
62057
62348
|
enumerable: false,
|
|
@@ -62337,16 +62628,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62337
62628
|
this.loadAttributionOnceSourcesLoaded = function () {
|
|
62338
62629
|
var sources = _this.getMapStyleSources();
|
|
62339
62630
|
Promise.all(sources.map(function (source) { return new Promise(function (resolve, reject) {
|
|
62340
|
-
|
|
62341
|
-
|
|
62342
|
-
|
|
62343
|
-
|
|
62344
|
-
|
|
62345
|
-
|
|
62346
|
-
|
|
62347
|
-
|
|
62348
|
-
|
|
62349
|
-
|
|
62631
|
+
if ('tiles' in source) {
|
|
62632
|
+
resolve(source);
|
|
62633
|
+
}
|
|
62634
|
+
else {
|
|
62635
|
+
source.on('data', function sourceDataListener(event) {
|
|
62636
|
+
if (event.sourceDataType == 'metadata') {
|
|
62637
|
+
source.off('data', sourceDataListener);
|
|
62638
|
+
resolve(source);
|
|
62639
|
+
}
|
|
62640
|
+
});
|
|
62641
|
+
source.on('error', function tilejsonLoadError(event) {
|
|
62642
|
+
source.off('error', tilejsonLoadError);
|
|
62643
|
+
reject(event);
|
|
62644
|
+
});
|
|
62645
|
+
}
|
|
62350
62646
|
})
|
|
62351
62647
|
// mimics https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
|
|
62352
62648
|
// until wider availability (https://caniuse.com/?search=allSettled)
|
|
@@ -64780,6 +65076,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64780
65076
|
else if (this.options.authType === exports.AuthenticationType.subscriptionKey) {
|
|
64781
65077
|
return this.options.subscriptionKey;
|
|
64782
65078
|
}
|
|
65079
|
+
else {
|
|
65080
|
+
return undefined;
|
|
65081
|
+
}
|
|
64783
65082
|
};
|
|
64784
65083
|
/**
|
|
64785
65084
|
* Given a token, calculate the time left for token expiry
|
|
@@ -65516,7 +65815,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65516
65815
|
*/
|
|
65517
65816
|
EventManager.prototype._invokeListeners = function (eventType, layer, args) {
|
|
65518
65817
|
var _this = this;
|
|
65519
|
-
|
|
65818
|
+
// copy event callbacks in order to prevent being mutated during iteration below (even callbacks added as part of other event callbacks)
|
|
65819
|
+
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
65520
65820
|
if (callbacks) {
|
|
65521
65821
|
callbacks.forEach(function (_a, callback) {
|
|
65522
65822
|
var _b = __read(_a, 2), _ = _b[0], once = _b[1];
|
|
@@ -65830,11 +66130,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65830
66130
|
var timedOut_1 = false;
|
|
65831
66131
|
// Use the map to send the request so transformRequest is used.
|
|
65832
66132
|
_this.map._sendRequest(imageSrc, "Image").then(function (response) {
|
|
65833
|
-
|
|
65834
|
-
return response.blob();
|
|
65835
|
-
}
|
|
66133
|
+
return !timedOut_1 ? response.blob() : undefined;
|
|
65836
66134
|
}).then(function (blob) {
|
|
65837
|
-
if (!timedOut_1) {
|
|
66135
|
+
if (!timedOut_1 && blob) {
|
|
65838
66136
|
clearTimeout(timeoutId_1);
|
|
65839
66137
|
var imageEle_1 = new Image();
|
|
65840
66138
|
// Wait for the blob to load into the element.
|
|
@@ -67595,35 +67893,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67595
67893
|
return StyleOptions;
|
|
67596
67894
|
}(Options));
|
|
67597
67895
|
|
|
67598
|
-
/**
|
|
67599
|
-
* The options for setting traffic on the map.
|
|
67600
|
-
*/
|
|
67601
|
-
var TrafficOptions = /** @class */ (function (_super) {
|
|
67602
|
-
__extends(TrafficOptions, _super);
|
|
67603
|
-
function TrafficOptions() {
|
|
67604
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67605
|
-
/**
|
|
67606
|
-
* The type of traffic flow to display:
|
|
67607
|
-
* <p>"none" is to display no traffic flow data</p>
|
|
67608
|
-
* <p>"relative" is the speed of the road relative to free-flow</p>
|
|
67609
|
-
* <p>"absolute" is the absolute speed of the road</p>
|
|
67610
|
-
* <p>"relative-delay" displays relative speed only where they differ from free-flow;
|
|
67611
|
-
* false to stop displaying the traffic flow.</p>
|
|
67612
|
-
* default `"none"``
|
|
67613
|
-
* @default "none"
|
|
67614
|
-
*/
|
|
67615
|
-
_this.flow = "none";
|
|
67616
|
-
/**
|
|
67617
|
-
* Whether to display incidents on the map.
|
|
67618
|
-
* default `false`
|
|
67619
|
-
* @default false
|
|
67620
|
-
*/
|
|
67621
|
-
_this.incidents = false;
|
|
67622
|
-
return _this;
|
|
67623
|
-
}
|
|
67624
|
-
return TrafficOptions;
|
|
67625
|
-
}(Options));
|
|
67626
|
-
|
|
67627
67896
|
var composeTransformers = function (transformers) { return transformers.length == 0
|
|
67628
67897
|
? undefined
|
|
67629
67898
|
: transformers.slice(1).reduce(function (chained, transform) {
|
|
@@ -67745,6 +68014,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67745
68014
|
* By default, it is set to half the number of CPU cores (capped at 6).
|
|
67746
68015
|
*/
|
|
67747
68016
|
_this.workerCount = getWorkerCount();
|
|
68017
|
+
/**
|
|
68018
|
+
* Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds.
|
|
68019
|
+
* This setting affects all symbol layers.
|
|
68020
|
+
* This setting does not affect the duration of runtime styling transitions or raster tile cross-fading.
|
|
68021
|
+
* @default 300
|
|
68022
|
+
*/
|
|
68023
|
+
_this.fadeDuration = 300;
|
|
68024
|
+
/**
|
|
68025
|
+
* Defines a CSS font-family for locally overriding generation of glyphs in the
|
|
68026
|
+
* 'CJK Unified Ideographs', 'Hiragana', 'Katakana' and 'Hangul Syllables' ranges.
|
|
68027
|
+
* In these ranges, font settings from the map's style will be ignored,
|
|
68028
|
+
* except for font-weight keywords (light/regular/medium/bold). Set to false,
|
|
68029
|
+
* to enable font settings from the map's style for these glyph ranges.
|
|
68030
|
+
* The purpose of this option is to avoid bandwidth-intensive glyph server requests.
|
|
68031
|
+
* @default 'sans-serif'
|
|
68032
|
+
*/
|
|
68033
|
+
_this.localIdeographFontFamily = 'sans-serif';
|
|
67748
68034
|
return _this;
|
|
67749
68035
|
}
|
|
67750
68036
|
/**
|
|
@@ -67881,13 +68167,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67881
68167
|
var _a, _b;
|
|
67882
68168
|
var layerId = (_b = (_a = layer) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : layer;
|
|
67883
68169
|
if (!layerId.startsWith("microsoft.")) {
|
|
67884
|
-
return;
|
|
68170
|
+
return undefined;
|
|
67885
68171
|
}
|
|
67886
68172
|
var idTokens = layerId.split('.');
|
|
67887
68173
|
if (idTokens.length >= 4) {
|
|
67888
68174
|
return idTokens[3];
|
|
67889
68175
|
}
|
|
67890
|
-
return;
|
|
68176
|
+
return undefined;
|
|
67891
68177
|
};
|
|
67892
68178
|
return LayerGroupComparator;
|
|
67893
68179
|
}());
|
|
@@ -68008,6 +68294,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68008
68294
|
*/
|
|
68009
68295
|
StyleManager.prototype._stylePatch = function (previousStyle, nextStyle, preserveLayer, updatePaintProperty, updateLayoutProperty, updateFilter) {
|
|
68010
68296
|
var _this = this;
|
|
68297
|
+
// Layers in the next style with default properties that do not align with current StyleOptions
|
|
68298
|
+
// should be modified before they are applied to the map.
|
|
68299
|
+
var styleOptions = this.map.getStyle();
|
|
68300
|
+
var trafficOptions = this.map.getTraffic();
|
|
68301
|
+
// force a replacement of language placeholder in the tileset url to avoid resolution to a same cache with placeholders on language change
|
|
68302
|
+
nextStyle.sources = Object.entries(nextStyle.sources).reduce(function (newSources, _a) {
|
|
68303
|
+
var _b = __read(_a, 2), sourceKey = _b[0], source = _b[1];
|
|
68304
|
+
var newSource = __assign({}, source);
|
|
68305
|
+
if ('url' in newSource && typeof newSource.url === 'string') {
|
|
68306
|
+
if (newSource.url.includes(constants.languagePlaceHolder)) {
|
|
68307
|
+
newSource.url = newSource.url.replace(constants.languagePlaceHolder, styleOptions.language);
|
|
68308
|
+
}
|
|
68309
|
+
}
|
|
68310
|
+
newSources[sourceKey] = newSource;
|
|
68311
|
+
return newSources;
|
|
68312
|
+
}, {});
|
|
68011
68313
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
68012
68314
|
var previousLayers = this.map.layers.getLayers();
|
|
68013
68315
|
var nextLayers = [];
|
|
@@ -68018,10 +68320,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68018
68320
|
currentLayerGroupId = nextLayerGroup;
|
|
68019
68321
|
currentLayerGroupLayers = [];
|
|
68020
68322
|
};
|
|
68021
|
-
// Layers in the next style with default properties that do not align with current StyleOptions
|
|
68022
|
-
// should be modified before they are applied to the map.
|
|
68023
|
-
var styleOptions = this.map.getStyle();
|
|
68024
|
-
var trafficOptions = this.map.getTraffic();
|
|
68025
68323
|
nextStyle.layers.forEach(function (nextLayer) {
|
|
68026
68324
|
var _a, _b, _c;
|
|
68027
68325
|
var layerGroup = LayerGroupComparator.getLayerGroup(nextLayer.id);
|
|
@@ -68284,6 +68582,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68284
68582
|
var mapboxMapOptions = {
|
|
68285
68583
|
attributionControl: false,
|
|
68286
68584
|
container: container,
|
|
68585
|
+
fadeDuration: _this.serviceOptions.fadeDuration,
|
|
68586
|
+
localIdeographFontFamily: _this.serviceOptions.localIdeographFontFamily,
|
|
68287
68587
|
preserveDrawingBuffer: _this.styleOptions.preserveDrawingBuffer,
|
|
68288
68588
|
refreshExpiredTiles: _this.serviceOptions.refreshExpiredTiles,
|
|
68289
68589
|
renderWorldCopies: _this.styleOptions.renderWorldCopies,
|
|
@@ -69118,6 +69418,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69118
69418
|
var previousIncidentsOption = this.trafficOptions.incidents;
|
|
69119
69419
|
var previousFlowOption = this.trafficOptions.flow;
|
|
69120
69420
|
this.trafficOptions = new TrafficOptions().merge(this.trafficOptions, options);
|
|
69421
|
+
this.controls.getControls().filter(function (control) { return control instanceof TrafficControl; }).forEach(function (control) {
|
|
69422
|
+
return control.updateButtonState();
|
|
69423
|
+
});
|
|
69121
69424
|
if (this.incidentDelegate) {
|
|
69122
69425
|
if (this.trafficOptions.incidents) {
|
|
69123
69426
|
if (!previousIncidentsOption) {
|