azure-maps-control 2.1.8 → 2.1.9
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 +139 -120
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +139 -120
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +26 -0
package/dist/atlas.js
CHANGED
|
@@ -43487,7 +43487,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43487
43487
|
return Url;
|
|
43488
43488
|
}());
|
|
43489
43489
|
|
|
43490
|
-
var version = "2.1.
|
|
43490
|
+
var version = "2.1.9";
|
|
43491
43491
|
|
|
43492
43492
|
/**
|
|
43493
43493
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -46959,6 +46959,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46959
46959
|
styleOptionButton.appendChild(document.createTextNode(friendlyName));
|
|
46960
46960
|
}
|
|
46961
46961
|
styleOptionButton.addEventListener("click", function () {
|
|
46962
|
+
_this.hasMouse = false;
|
|
46963
|
+
_this.hasFocus = false;
|
|
46962
46964
|
var styleButton = _this.styleButtons[name];
|
|
46963
46965
|
if (styleButton && !styleButton.hasAttribute("disabled")) {
|
|
46964
46966
|
_this._invokeEvent("styleselected", name);
|
|
@@ -46977,7 +46979,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46977
46979
|
return styleOptionButton;
|
|
46978
46980
|
};
|
|
46979
46981
|
StyleControl.prototype.buildCurrStyleBtn = function (container, opsGrid) {
|
|
46980
|
-
var selectCurrButton = document.createElement("
|
|
46982
|
+
var selectCurrButton = document.createElement("div");
|
|
46981
46983
|
if (this.options.layout == 'icons') {
|
|
46982
46984
|
selectCurrButton.classList.add(StyleControl.Css.button);
|
|
46983
46985
|
}
|
|
@@ -46987,7 +46989,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
46987
46989
|
selectCurrButton.classList.add(StyleControl.Css.currentStyle);
|
|
46988
46990
|
selectCurrButton.setAttribute("aria-label", "Select Style");
|
|
46989
46991
|
selectCurrButton.setAttribute("alt", "Select Style");
|
|
46990
|
-
selectCurrButton.setAttribute("type", "button");
|
|
46991
46992
|
this.currStyleImage = new Image();
|
|
46992
46993
|
selectCurrButton.appendChild(this.currStyleImage);
|
|
46993
46994
|
var selectCurrButtonIcon = document.createElement("div");
|
|
@@ -49234,6 +49235,62 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
49234
49235
|
}
|
|
49235
49236
|
return geodesic;
|
|
49236
49237
|
}
|
|
49238
|
+
/**
|
|
49239
|
+
* Denormalizes path on antimeridian, this makes lines with coordinates on the opposite side of the antimeridian to always cross it. Note that the path crossing antimeridian will contain longitude outside of -180 to 180 range.
|
|
49240
|
+
* See getPathSplitByAntimeridian when this is not desired.
|
|
49241
|
+
* @param path Array of position objects or linestring to denormalize
|
|
49242
|
+
* @returns A denormalized array of position objects, path crossing antimeridian will contain longitude outside of -180 to 180 range.
|
|
49243
|
+
*/
|
|
49244
|
+
function getPathDenormalizedAtAntimerian(path) {
|
|
49245
|
+
var coords = Array.isArray(path) ? path : path.coordinates;
|
|
49246
|
+
return coords.reduce(function (targetPath, coord) {
|
|
49247
|
+
var last = targetPath.length > 0 ? targetPath[targetPath.length - 1] : null;
|
|
49248
|
+
// denormalize longitude on antimeridian crossing
|
|
49249
|
+
if (last && Math.abs(coord[0] - last[0]) > 180.0) {
|
|
49250
|
+
var denormLon = last[0] < 0 ? coord[0] - 360.0 : coord[0] + 360.0;
|
|
49251
|
+
targetPath.push([denormLon, coord[1]]);
|
|
49252
|
+
}
|
|
49253
|
+
else {
|
|
49254
|
+
targetPath.push(coord);
|
|
49255
|
+
}
|
|
49256
|
+
return targetPath;
|
|
49257
|
+
}, []);
|
|
49258
|
+
}
|
|
49259
|
+
/**
|
|
49260
|
+
* Split path on antimeridian into multiple paths.
|
|
49261
|
+
* See getPathDenormalizedAtAntimerian when this is not desired.
|
|
49262
|
+
* @param path Array of position objects or linestring to split
|
|
49263
|
+
* @returns A path split into multiple paths by antimeridian.
|
|
49264
|
+
*/
|
|
49265
|
+
function getPathSplitByAntimeridian(path) {
|
|
49266
|
+
var coords = Array.isArray(path) ? path : path.coordinates;
|
|
49267
|
+
var currentNonCrossing = [];
|
|
49268
|
+
var outputPaths = [];
|
|
49269
|
+
for (var k = 0; k < coords.length; k++) {
|
|
49270
|
+
currentNonCrossing.push(coords[k]);
|
|
49271
|
+
if (k + 1 >= coords.length) {
|
|
49272
|
+
continue;
|
|
49273
|
+
}
|
|
49274
|
+
var _a = __read(coords[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
49275
|
+
var _b = __read(coords[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
49276
|
+
// split the line by antimeridian
|
|
49277
|
+
// and break geodesic into two line segments
|
|
49278
|
+
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
49279
|
+
var denormLon2 = lon1 > 0 ? lon2 + 360.0 : lon2 - 360.0;
|
|
49280
|
+
var antiLon = lon1 > 0 ? 180.0 : -180.0;
|
|
49281
|
+
var abs = Math.abs(denormLon2 - lon1);
|
|
49282
|
+
var antiAbs = Math.abs(antiLon - lon1);
|
|
49283
|
+
var f = antiAbs / abs;
|
|
49284
|
+
var dLat = (lat2 - lat1) * f;
|
|
49285
|
+
var antiLat = lat1 + dLat;
|
|
49286
|
+
currentNonCrossing.push([antiLon, antiLat]);
|
|
49287
|
+
outputPaths.push(currentNonCrossing);
|
|
49288
|
+
currentNonCrossing = [[-antiLon, antiLat]];
|
|
49289
|
+
}
|
|
49290
|
+
}
|
|
49291
|
+
outputPaths.push(currentNonCrossing);
|
|
49292
|
+
return outputPaths;
|
|
49293
|
+
}
|
|
49237
49294
|
/**
|
|
49238
49295
|
* Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path.
|
|
49239
49296
|
* @param path Array of position objects that form a path to fill in.
|
|
@@ -49257,18 +49314,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
49257
49314
|
// Convert positions from degrees to Radians
|
|
49258
49315
|
geodesic = geodesic.concat(_constructGeodesic(locs[i], locs[i + 1], nodeSize));
|
|
49259
49316
|
}
|
|
49260
|
-
return geodesic
|
|
49261
|
-
var last = targetPath.length > 0 ? targetPath[targetPath.length - 1] : null;
|
|
49262
|
-
// denormalize longitude on antimeridian crossing
|
|
49263
|
-
if (last && Math.abs(coord[0] - last[0]) > 180.0) {
|
|
49264
|
-
var denormLon = last[0] < 0 ? coord[0] - 360.0 : coord[0] + 360.0;
|
|
49265
|
-
targetPath.push([denormLon, coord[1]]);
|
|
49266
|
-
}
|
|
49267
|
-
else {
|
|
49268
|
-
targetPath.push(coord);
|
|
49269
|
-
}
|
|
49270
|
-
return targetPath;
|
|
49271
|
-
}, []);
|
|
49317
|
+
return getPathDenormalizedAtAntimerian(geodesic);
|
|
49272
49318
|
}
|
|
49273
49319
|
/**
|
|
49274
49320
|
* 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.
|
|
@@ -49395,15 +49441,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
49395
49441
|
return null;
|
|
49396
49442
|
}
|
|
49397
49443
|
/**
|
|
49398
|
-
*
|
|
49399
|
-
* @param origin Center of the regular polygon.
|
|
49400
|
-
* @param radius Radius of the regular polygon.
|
|
49401
|
-
* @param numberOfPositions Number of positions the polygon should have.
|
|
49402
|
-
* @param units Unit of distance measurement. Default is meters.
|
|
49403
|
-
* @param offset An offset to rotate the polygon. When 0 the first position will align with North.
|
|
49404
|
-
* @returns An array of position objects that form a regular polygon.
|
|
49444
|
+
* constructs raw regular polygon path that doesn't handle antimeridian crossing
|
|
49405
49445
|
*/
|
|
49406
|
-
function
|
|
49446
|
+
function _constructRegularPolygonPath(origin, radius, numberOfPositions, units, offset) {
|
|
49407
49447
|
units = units || "meters";
|
|
49408
49448
|
offset = (offset) ? offset : 0;
|
|
49409
49449
|
origin = getPosition(origin);
|
|
@@ -49412,9 +49452,32 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
49412
49452
|
for (var i = 0; i <= numberOfPositions; i++) {
|
|
49413
49453
|
points.push(getDestination(origin, (i * centralAngle + offset) % 360, radius, units));
|
|
49414
49454
|
}
|
|
49415
|
-
// TODO: Check for crossing the antimeridian, consider splitting path by -180/180 longitude
|
|
49416
49455
|
return points;
|
|
49417
49456
|
}
|
|
49457
|
+
/**
|
|
49458
|
+
* Calculates an array of position objects that are an equal distance away from a central point to create a regular polygon.
|
|
49459
|
+
* @param origin Center of the regular polygon.
|
|
49460
|
+
* @param radius Radius of the regular polygon.
|
|
49461
|
+
* @param numberOfPositions Number of positions the polygon should have.
|
|
49462
|
+
* @param units Unit of distance measurement. Default is meters.
|
|
49463
|
+
* @param offset An offset to rotate the polygon. When 0 the first position will align with North.
|
|
49464
|
+
* @returns An array of position objects that form a regular polygon. Path crossing antimeridian will contain longitude outside of -180 to 180 range. See getRegularPolygonPaths() when this is undesired.
|
|
49465
|
+
*/
|
|
49466
|
+
function getRegularPolygonPath(origin, radius, numberOfPositions, units, offset) {
|
|
49467
|
+
return getPathDenormalizedAtAntimerian(_constructRegularPolygonPath(origin, radius, numberOfPositions, units, offset));
|
|
49468
|
+
}
|
|
49469
|
+
/**
|
|
49470
|
+
* Calculates an array of position objects that are an equal distance away from a central point to create a regular polygon broken by antimeridian into multiple sub-paths.
|
|
49471
|
+
* @param origin Center of the regular polygon.
|
|
49472
|
+
* @param radius Radius of the regular polygon.
|
|
49473
|
+
* @param numberOfPositions Number of positions the polygon should have.
|
|
49474
|
+
* @param units Unit of distance measurement. Default is meters.
|
|
49475
|
+
* @param offset An offset to rotate the polygon. When 0 the first position will align with North.
|
|
49476
|
+
* @returns An array of paths that form a regular polygon. Comparing to getRegularPolygonPath, sub-paths will always contain longitude in -180 to 180 range
|
|
49477
|
+
*/
|
|
49478
|
+
function getRegularPolygonPaths(origin, radius, numberOfPositions, units, offset) {
|
|
49479
|
+
return getPathSplitByAntimeridian(_constructRegularPolygonPath(origin, radius, numberOfPositions, units, offset));
|
|
49480
|
+
}
|
|
49418
49481
|
/**
|
|
49419
49482
|
* Calculates a position object that is a fractional distance between two position objects.
|
|
49420
49483
|
* @param origin First position to calculate mid-point between.
|
|
@@ -50735,12 +50798,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
50735
50798
|
getDestination: getDestination,
|
|
50736
50799
|
getDistanceTo: getDistanceTo,
|
|
50737
50800
|
getEarthRadius: getEarthRadius,
|
|
50801
|
+
getPathDenormalizedAtAntimerian: getPathDenormalizedAtAntimerian,
|
|
50802
|
+
getPathSplitByAntimeridian: getPathSplitByAntimeridian,
|
|
50738
50803
|
getGeodesicPath: getGeodesicPath,
|
|
50739
50804
|
getGeodesicPaths: getGeodesicPaths,
|
|
50740
50805
|
getHeading: getHeading,
|
|
50741
50806
|
getLengthOfPath: getLengthOfPath,
|
|
50742
50807
|
getPositionAlongPath: getPositionAlongPath,
|
|
50743
50808
|
getRegularPolygonPath: getRegularPolygonPath,
|
|
50809
|
+
getRegularPolygonPaths: getRegularPolygonPaths,
|
|
50744
50810
|
interpolate: interpolate,
|
|
50745
50811
|
normalizeLatitude: normalizeLatitude,
|
|
50746
50812
|
normalizeLongitude: normalizeLongitude,
|
|
@@ -68105,10 +68171,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68105
68171
|
if (!_this._rotateTimeout) {
|
|
68106
68172
|
if (Date.now() - _this._lastHeadingTime >= _this._headUpdateLimit) {
|
|
68107
68173
|
// If the min required time has already passed just do the update.
|
|
68174
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
68108
68175
|
_this._rotateTimeout = setTimeout(_this._updateHeading, CompassControl.RotationDuration + 25);
|
|
68109
68176
|
}
|
|
68110
68177
|
else {
|
|
68111
68178
|
// If the min required time hasn't passed start a timeout if doesn't already exist.
|
|
68179
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
68112
68180
|
_this._rotateTimeout = setTimeout(_this._updateHeading, _this._headUpdateLimit - (Date.now() - _this._lastHeadingTime));
|
|
68113
68181
|
}
|
|
68114
68182
|
}
|
|
@@ -68130,6 +68198,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68130
68198
|
this._onMoveEnd = function (event) {
|
|
68131
68199
|
if (event.fromControl) {
|
|
68132
68200
|
// If the move end event originated from a control element delay the response to batch control clicks.
|
|
68201
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
68133
68202
|
_this._controlTimeout = setTimeout(_this._updateCam, _this._controlEventDelay);
|
|
68134
68203
|
}
|
|
68135
68204
|
else {
|
|
@@ -68141,6 +68210,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68141
68210
|
this._onStyleData = function () {
|
|
68142
68211
|
// Use setTimeout with no delay to allow mapbox time to
|
|
68143
68212
|
// update the value of .loaded() before we check it.
|
|
68213
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
68144
68214
|
setTimeout(_this._updateStyle);
|
|
68145
68215
|
};
|
|
68146
68216
|
/** Event handler for when the mouse or touch goes down */
|
|
@@ -68960,11 +69030,33 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68960
69030
|
"Rotate 15 degrees counter clockwise: shift + left arrow.",
|
|
68961
69031
|
"Increase pitch 10 degrees: shift + up arrow.",
|
|
68962
69032
|
"Decrease pitch 10 degrees: shift + down arrow.",
|
|
68963
|
-
|
|
69033
|
+
// Interesting... i'm not sure that verbose map state was ever implemented
|
|
69034
|
+
// "Toggle verbose map state: control + alt + D.",
|
|
68964
69035
|
"Jump focus to the map: Escape."
|
|
68965
69036
|
].join("\n");
|
|
68966
69037
|
_this.map.getCanvasContainer().appendChild(_this.atlasMapKeyBindings);
|
|
68967
69038
|
_this.atlasMapKeyBindings.setAttribute("aria-live", "polite");
|
|
69039
|
+
var baseShortcutKeyCodes = [
|
|
69040
|
+
// - (zoom out)
|
|
69041
|
+
189,
|
|
69042
|
+
// = (zoom in)
|
|
69043
|
+
187,
|
|
69044
|
+
// arrow up
|
|
69045
|
+
38,
|
|
69046
|
+
// arrow left
|
|
69047
|
+
37,
|
|
69048
|
+
// arrow right
|
|
69049
|
+
39,
|
|
69050
|
+
// arrow down
|
|
69051
|
+
40
|
|
69052
|
+
];
|
|
69053
|
+
// accessibility recommendation: After using any of the map shortcut keys, NVDA should not read all the shortcut keys again.
|
|
69054
|
+
var mapCanvas = _this.map._getMap()._canvas;
|
|
69055
|
+
mapCanvas === null || mapCanvas === void 0 ? void 0 : mapCanvas.addEventListener('keyup', function (event) {
|
|
69056
|
+
if (baseShortcutKeyCodes.find(function (code) { return event.keyCode === code; })) {
|
|
69057
|
+
_this.atlasMapKeyBindings.innerHTML = '';
|
|
69058
|
+
}
|
|
69059
|
+
});
|
|
68968
69060
|
};
|
|
68969
69061
|
this.initializeMapLiveStateInfo = function () {
|
|
68970
69062
|
_this.mapViewDesc = new MapViewDescriptor(_this.map, _this.updateMapState);
|
|
@@ -68974,7 +69066,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68974
69066
|
_this.atlasMapLiveStateInfo.id = "atlas-map-state";
|
|
68975
69067
|
_this.atlasMapLiveStateInfo.classList.add("hidden-accessible-element");
|
|
68976
69068
|
_this.map.getCanvasContainer().appendChild(_this.atlasMapLiveStateInfo);
|
|
68977
|
-
|
|
69069
|
+
//this.atlasMapLiveStateInfo.setAttribute("aria-live", "polite");
|
|
68978
69070
|
};
|
|
68979
69071
|
this.initializeMapStyleInfo = function () {
|
|
68980
69072
|
_this.atlasMapStyleInfo = document.createElement("div");
|
|
@@ -69517,89 +69609,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69517
69609
|
return FocusShortcutHandler;
|
|
69518
69610
|
}());
|
|
69519
69611
|
|
|
69520
|
-
/** A handler that adds support for pitch gestures on mobile devices. */
|
|
69521
|
-
var MobilePitchHandler = /** @class */ (function () {
|
|
69522
|
-
function MobilePitchHandler(map) {
|
|
69523
|
-
var _this = this;
|
|
69524
|
-
// Constants for mobile pitch support.
|
|
69525
|
-
this.minDiffX = 70; // min x distance to recognize pitch gesture
|
|
69526
|
-
this.maxDiffY = 100; // max y distance to recognize pitch gesture
|
|
69527
|
-
this.minDiff = 30; // min distance to recognize zoom gesture
|
|
69528
|
-
this.delay = 160; // delay for pitch, in case it's a zoom gesture
|
|
69529
|
-
/** Callback for the touch start event */
|
|
69530
|
-
this._onTouchStart = function (data) {
|
|
69531
|
-
if (data.points.length === 2) {
|
|
69532
|
-
var diffY = data.points[0].y - data.points[1].y;
|
|
69533
|
-
var diffX = data.points[0].x - data.points[1].x;
|
|
69534
|
-
if (Math.abs(diffX) >= _this.minDiffX && Math.abs(diffY) <= _this.maxDiffY) {
|
|
69535
|
-
data.originalEvent.preventDefault(); // prevent browser refresh on pull down
|
|
69536
|
-
_this.map._getMap().touchZoomRotate.disable(); // disable native touch controls
|
|
69537
|
-
_this.map._getMap().dragPan.disable();
|
|
69538
|
-
_this.dpPoint = data.point;
|
|
69539
|
-
_this.dpPitch = _this.map._getMap().getPitch();
|
|
69540
|
-
_this.startTiming = Date.now();
|
|
69541
|
-
_this.startDistance = Math.hypot(diffX, diffY);
|
|
69542
|
-
_this.startEventData = data;
|
|
69543
|
-
}
|
|
69544
|
-
}
|
|
69545
|
-
};
|
|
69546
|
-
/** Callback for the touch move event */
|
|
69547
|
-
this._onTouchMove = function (data) {
|
|
69548
|
-
if (_this.dpPoint !== undefined && _this.dpPitch !== undefined) {
|
|
69549
|
-
data.preventDefault();
|
|
69550
|
-
data.originalEvent.preventDefault();
|
|
69551
|
-
var diffY = data.points[0].y - data.points[1].y;
|
|
69552
|
-
var diffX = data.points[0].x - data.points[1].x;
|
|
69553
|
-
var distance = Math.hypot(diffX, diffY);
|
|
69554
|
-
if (Math.abs(distance - _this.startDistance) >= _this.minDiff) {
|
|
69555
|
-
if (_this.dpPoint) {
|
|
69556
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
69557
|
-
_this.map._getMap().dragPan.enable();
|
|
69558
|
-
}
|
|
69559
|
-
_this.dpPoint = undefined;
|
|
69560
|
-
return;
|
|
69561
|
-
}
|
|
69562
|
-
if (Date.now() - _this.startTiming >= _this.delay) {
|
|
69563
|
-
var diff = (_this.dpPoint.y - data.point.y) * 0.5;
|
|
69564
|
-
_this.map._getMap().setPitch(_this.dpPitch + diff);
|
|
69565
|
-
}
|
|
69566
|
-
}
|
|
69567
|
-
};
|
|
69568
|
-
/** Callback for the touch end event */
|
|
69569
|
-
this._onTouchEnd = function () {
|
|
69570
|
-
if (_this.dpPoint) {
|
|
69571
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
69572
|
-
_this.map._getMap().dragPan.enable();
|
|
69573
|
-
}
|
|
69574
|
-
_this.dpPoint = undefined;
|
|
69575
|
-
};
|
|
69576
|
-
/** Callback for the touch cancel event */
|
|
69577
|
-
this._onTouchCancel = function () {
|
|
69578
|
-
if (_this.dpPoint) {
|
|
69579
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
69580
|
-
_this.map._getMap().dragPan.enable();
|
|
69581
|
-
}
|
|
69582
|
-
_this.dpPoint = undefined;
|
|
69583
|
-
};
|
|
69584
|
-
this.map = map;
|
|
69585
|
-
}
|
|
69586
|
-
/** Enables the mobile pitch gesture support. */
|
|
69587
|
-
MobilePitchHandler.prototype.enable = function () {
|
|
69588
|
-
this.map._getMap().on("touchstart", this._onTouchStart);
|
|
69589
|
-
this.map._getMap().on("touchmove", this._onTouchMove);
|
|
69590
|
-
this.map._getMap().on("touchend", this._onTouchEnd);
|
|
69591
|
-
this.map._getMap().on("touchcancel", this._onTouchCancel);
|
|
69592
|
-
};
|
|
69593
|
-
/** Disables the mobile pitch gesture support. */
|
|
69594
|
-
MobilePitchHandler.prototype.disable = function () {
|
|
69595
|
-
this.map._getMap().off("touchstart", this._onTouchStart);
|
|
69596
|
-
this.map._getMap().off("touchmove", this._onTouchMove);
|
|
69597
|
-
this.map._getMap().off("touchend", this._onTouchEnd);
|
|
69598
|
-
this.map._getMap().off("touchcancel", this._onTouchCancel);
|
|
69599
|
-
};
|
|
69600
|
-
return MobilePitchHandler;
|
|
69601
|
-
}());
|
|
69602
|
-
|
|
69603
69612
|
/** A handler that adds support for pinch and zoom gestures on devices without touch events. */
|
|
69604
69613
|
var PinchZoomHandler = /** @class */ (function () {
|
|
69605
69614
|
function PinchZoomHandler(map) {
|
|
@@ -69650,7 +69659,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69650
69659
|
function UserInteractionDelegate(map, options) {
|
|
69651
69660
|
this.added = false;
|
|
69652
69661
|
this.map = map;
|
|
69653
|
-
this.mobilePitch = new MobilePitchHandler(map);
|
|
69654
69662
|
this.focusShortcut = new FocusShortcutHandler(map);
|
|
69655
69663
|
this.pinchZoom = new PinchZoomHandler(map);
|
|
69656
69664
|
this.options = new UserInteractionOptions().merge(options);
|
|
@@ -69696,7 +69704,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69696
69704
|
this.focusShortcut.disable();
|
|
69697
69705
|
this.map._getMap().scrollZoom.disable();
|
|
69698
69706
|
this.map._getMap().touchZoomRotate.disable();
|
|
69699
|
-
this.mobilePitch.disable();
|
|
69700
69707
|
this.pinchZoom.disable();
|
|
69701
69708
|
}
|
|
69702
69709
|
else {
|
|
@@ -69748,12 +69755,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69748
69755
|
// Touch
|
|
69749
69756
|
if (options.touchInteraction) {
|
|
69750
69757
|
this.map._getMap().touchZoomRotate.enable();
|
|
69751
|
-
this.mobilePitch.enable();
|
|
69752
69758
|
this.pinchZoom.enable();
|
|
69753
69759
|
}
|
|
69754
69760
|
else {
|
|
69755
69761
|
this.map._getMap().touchZoomRotate.disable();
|
|
69756
|
-
this.mobilePitch.disable();
|
|
69757
69762
|
this.pinchZoom.enable();
|
|
69758
69763
|
}
|
|
69759
69764
|
}
|
|
@@ -72512,6 +72517,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72512
72517
|
if (!cancel) {
|
|
72513
72518
|
originalMethod.apply(context, args);
|
|
72514
72519
|
shouldCancel.set(context, true);
|
|
72520
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
72515
72521
|
setTimeout(function () { return shouldCancel.delete(context); }, duration);
|
|
72516
72522
|
}
|
|
72517
72523
|
};
|
|
@@ -75091,6 +75097,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75091
75097
|
_this._storeAccessToken(token);
|
|
75092
75098
|
clearTimeout(_this.tokenTimeOutHandle); // Clear the previous refresh timeout in case it hadn't triggered yet.
|
|
75093
75099
|
// @ts-ignore
|
|
75100
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
75094
75101
|
_this.tokenTimeOutHandle = setTimeout(_this._triggerTokenFetch, timeout * 1000);
|
|
75095
75102
|
resolve();
|
|
75096
75103
|
}
|
|
@@ -75138,6 +75145,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75138
75145
|
}
|
|
75139
75146
|
// Login and acquire a token.
|
|
75140
75147
|
// Fire it async so that users can add any listeners for token acquire events first.
|
|
75148
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
75141
75149
|
setTimeout(function () { return _this._loginAndAcquire(resolve, reject); });
|
|
75142
75150
|
}
|
|
75143
75151
|
else if (_this.options.authType === exports.AuthenticationType.anonymous) {
|
|
@@ -75226,6 +75234,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75226
75234
|
_this.options.aadAppId));
|
|
75227
75235
|
}
|
|
75228
75236
|
}
|
|
75237
|
+
// tslint:disable-next-line: no-string-based-set-interval
|
|
75229
75238
|
}, 25);
|
|
75230
75239
|
}
|
|
75231
75240
|
};
|
|
@@ -75981,6 +75990,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75981
75990
|
// This is for consistency with the case where the load event hasn't already fired.
|
|
75982
75991
|
// If the load event hasn't already fired the callback will also be executed async once it does fire.
|
|
75983
75992
|
var loadData_1 = { type: "load", map: this.map };
|
|
75993
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
75984
75994
|
setTimeout(function () { return modifiedCallback(loadData_1); });
|
|
75985
75995
|
}
|
|
75986
75996
|
else if (eventType === "ready") {
|
|
@@ -75989,6 +75999,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75989
75999
|
if (this.map._isReady()) {
|
|
75990
76000
|
// Manually execute the callback if the ready event has already fired.
|
|
75991
76001
|
var readyData_1 = { type: "ready", map: this.map };
|
|
76002
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
75992
76003
|
setTimeout(function () { return modifiedCallback(readyData_1); });
|
|
75993
76004
|
}
|
|
75994
76005
|
}
|
|
@@ -76374,6 +76385,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
76374
76385
|
timeoutId_1 = setTimeout(function () {
|
|
76375
76386
|
timedOut_1 = true;
|
|
76376
76387
|
reject("Failed to load image within specified timeout: " + _this.imageLoadTimeout + " ms.");
|
|
76388
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
76377
76389
|
}, _this.imageLoadTimeout);
|
|
76378
76390
|
}
|
|
76379
76391
|
});
|
|
@@ -78412,7 +78424,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78412
78424
|
* @internal
|
|
78413
78425
|
*/
|
|
78414
78426
|
function StyleManager(map, serviceOptions) {
|
|
78427
|
+
var _this = this;
|
|
78415
78428
|
this.apiVersion = "2.0";
|
|
78429
|
+
this._onStyleData = function () {
|
|
78430
|
+
_this.map.events.invoke("stylechanged", {
|
|
78431
|
+
style: _this._lookUp(_this.map.getStyle()).name,
|
|
78432
|
+
map: _this.map,
|
|
78433
|
+
type: "stylechanged"
|
|
78434
|
+
});
|
|
78435
|
+
};
|
|
78416
78436
|
this.map = map;
|
|
78417
78437
|
this.serviceOptions = serviceOptions;
|
|
78418
78438
|
}
|
|
@@ -78629,13 +78649,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78629
78649
|
preserveLayer(userLayer.layer.getId(), before === null || before === void 0 ? void 0 : before.id);
|
|
78630
78650
|
});
|
|
78631
78651
|
this.map.sources._syncSources(nextStyle.sources);
|
|
78632
|
-
|
|
78633
|
-
|
|
78634
|
-
|
|
78635
|
-
|
|
78636
|
-
|
|
78637
|
-
|
|
78638
|
-
});
|
|
78652
|
+
// If there was a previous styledata change event attached, remove it.
|
|
78653
|
+
// When the sprite url changes between style changes then mapbox can't perform the diff
|
|
78654
|
+
// In such cases it recalculate the style again. Removing previous attached
|
|
78655
|
+
// event listner makes sure that style changed event is not fired twice in these cases.
|
|
78656
|
+
this.map.events.remove("styledata", this._onStyleData);
|
|
78657
|
+
this.map.events.addOnce("styledata", this._onStyleData);
|
|
78639
78658
|
};
|
|
78640
78659
|
StyleManager.prototype._buildFundamentalLayerFrom = function (layers, id) {
|
|
78641
78660
|
if (layers && layers.length > 0) {
|