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-core.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,
|
|
@@ -57924,10 +57990,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57924
57990
|
if (!_this._rotateTimeout) {
|
|
57925
57991
|
if (Date.now() - _this._lastHeadingTime >= _this._headUpdateLimit) {
|
|
57926
57992
|
// If the min required time has already passed just do the update.
|
|
57993
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
57927
57994
|
_this._rotateTimeout = setTimeout(_this._updateHeading, CompassControl.RotationDuration + 25);
|
|
57928
57995
|
}
|
|
57929
57996
|
else {
|
|
57930
57997
|
// If the min required time hasn't passed start a timeout if doesn't already exist.
|
|
57998
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
57931
57999
|
_this._rotateTimeout = setTimeout(_this._updateHeading, _this._headUpdateLimit - (Date.now() - _this._lastHeadingTime));
|
|
57932
58000
|
}
|
|
57933
58001
|
}
|
|
@@ -57949,6 +58017,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57949
58017
|
this._onMoveEnd = function (event) {
|
|
57950
58018
|
if (event.fromControl) {
|
|
57951
58019
|
// If the move end event originated from a control element delay the response to batch control clicks.
|
|
58020
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
57952
58021
|
_this._controlTimeout = setTimeout(_this._updateCam, _this._controlEventDelay);
|
|
57953
58022
|
}
|
|
57954
58023
|
else {
|
|
@@ -57960,6 +58029,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57960
58029
|
this._onStyleData = function () {
|
|
57961
58030
|
// Use setTimeout with no delay to allow mapbox time to
|
|
57962
58031
|
// update the value of .loaded() before we check it.
|
|
58032
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
57963
58033
|
setTimeout(_this._updateStyle);
|
|
57964
58034
|
};
|
|
57965
58035
|
/** Event handler for when the mouse or touch goes down */
|
|
@@ -58779,11 +58849,33 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58779
58849
|
"Rotate 15 degrees counter clockwise: shift + left arrow.",
|
|
58780
58850
|
"Increase pitch 10 degrees: shift + up arrow.",
|
|
58781
58851
|
"Decrease pitch 10 degrees: shift + down arrow.",
|
|
58782
|
-
|
|
58852
|
+
// Interesting... i'm not sure that verbose map state was ever implemented
|
|
58853
|
+
// "Toggle verbose map state: control + alt + D.",
|
|
58783
58854
|
"Jump focus to the map: Escape."
|
|
58784
58855
|
].join("\n");
|
|
58785
58856
|
_this.map.getCanvasContainer().appendChild(_this.atlasMapKeyBindings);
|
|
58786
58857
|
_this.atlasMapKeyBindings.setAttribute("aria-live", "polite");
|
|
58858
|
+
var baseShortcutKeyCodes = [
|
|
58859
|
+
// - (zoom out)
|
|
58860
|
+
189,
|
|
58861
|
+
// = (zoom in)
|
|
58862
|
+
187,
|
|
58863
|
+
// arrow up
|
|
58864
|
+
38,
|
|
58865
|
+
// arrow left
|
|
58866
|
+
37,
|
|
58867
|
+
// arrow right
|
|
58868
|
+
39,
|
|
58869
|
+
// arrow down
|
|
58870
|
+
40
|
|
58871
|
+
];
|
|
58872
|
+
// accessibility recommendation: After using any of the map shortcut keys, NVDA should not read all the shortcut keys again.
|
|
58873
|
+
var mapCanvas = _this.map._getMap()._canvas;
|
|
58874
|
+
mapCanvas === null || mapCanvas === void 0 ? void 0 : mapCanvas.addEventListener('keyup', function (event) {
|
|
58875
|
+
if (baseShortcutKeyCodes.find(function (code) { return event.keyCode === code; })) {
|
|
58876
|
+
_this.atlasMapKeyBindings.innerHTML = '';
|
|
58877
|
+
}
|
|
58878
|
+
});
|
|
58787
58879
|
};
|
|
58788
58880
|
this.initializeMapLiveStateInfo = function () {
|
|
58789
58881
|
_this.mapViewDesc = new MapViewDescriptor(_this.map, _this.updateMapState);
|
|
@@ -58793,7 +58885,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58793
58885
|
_this.atlasMapLiveStateInfo.id = "atlas-map-state";
|
|
58794
58886
|
_this.atlasMapLiveStateInfo.classList.add("hidden-accessible-element");
|
|
58795
58887
|
_this.map.getCanvasContainer().appendChild(_this.atlasMapLiveStateInfo);
|
|
58796
|
-
|
|
58888
|
+
//this.atlasMapLiveStateInfo.setAttribute("aria-live", "polite");
|
|
58797
58889
|
};
|
|
58798
58890
|
this.initializeMapStyleInfo = function () {
|
|
58799
58891
|
_this.atlasMapStyleInfo = document.createElement("div");
|
|
@@ -59336,89 +59428,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59336
59428
|
return FocusShortcutHandler;
|
|
59337
59429
|
}());
|
|
59338
59430
|
|
|
59339
|
-
/** A handler that adds support for pitch gestures on mobile devices. */
|
|
59340
|
-
var MobilePitchHandler = /** @class */ (function () {
|
|
59341
|
-
function MobilePitchHandler(map) {
|
|
59342
|
-
var _this = this;
|
|
59343
|
-
// Constants for mobile pitch support.
|
|
59344
|
-
this.minDiffX = 70; // min x distance to recognize pitch gesture
|
|
59345
|
-
this.maxDiffY = 100; // max y distance to recognize pitch gesture
|
|
59346
|
-
this.minDiff = 30; // min distance to recognize zoom gesture
|
|
59347
|
-
this.delay = 160; // delay for pitch, in case it's a zoom gesture
|
|
59348
|
-
/** Callback for the touch start event */
|
|
59349
|
-
this._onTouchStart = function (data) {
|
|
59350
|
-
if (data.points.length === 2) {
|
|
59351
|
-
var diffY = data.points[0].y - data.points[1].y;
|
|
59352
|
-
var diffX = data.points[0].x - data.points[1].x;
|
|
59353
|
-
if (Math.abs(diffX) >= _this.minDiffX && Math.abs(diffY) <= _this.maxDiffY) {
|
|
59354
|
-
data.originalEvent.preventDefault(); // prevent browser refresh on pull down
|
|
59355
|
-
_this.map._getMap().touchZoomRotate.disable(); // disable native touch controls
|
|
59356
|
-
_this.map._getMap().dragPan.disable();
|
|
59357
|
-
_this.dpPoint = data.point;
|
|
59358
|
-
_this.dpPitch = _this.map._getMap().getPitch();
|
|
59359
|
-
_this.startTiming = Date.now();
|
|
59360
|
-
_this.startDistance = Math.hypot(diffX, diffY);
|
|
59361
|
-
_this.startEventData = data;
|
|
59362
|
-
}
|
|
59363
|
-
}
|
|
59364
|
-
};
|
|
59365
|
-
/** Callback for the touch move event */
|
|
59366
|
-
this._onTouchMove = function (data) {
|
|
59367
|
-
if (_this.dpPoint !== undefined && _this.dpPitch !== undefined) {
|
|
59368
|
-
data.preventDefault();
|
|
59369
|
-
data.originalEvent.preventDefault();
|
|
59370
|
-
var diffY = data.points[0].y - data.points[1].y;
|
|
59371
|
-
var diffX = data.points[0].x - data.points[1].x;
|
|
59372
|
-
var distance = Math.hypot(diffX, diffY);
|
|
59373
|
-
if (Math.abs(distance - _this.startDistance) >= _this.minDiff) {
|
|
59374
|
-
if (_this.dpPoint) {
|
|
59375
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
59376
|
-
_this.map._getMap().dragPan.enable();
|
|
59377
|
-
}
|
|
59378
|
-
_this.dpPoint = undefined;
|
|
59379
|
-
return;
|
|
59380
|
-
}
|
|
59381
|
-
if (Date.now() - _this.startTiming >= _this.delay) {
|
|
59382
|
-
var diff = (_this.dpPoint.y - data.point.y) * 0.5;
|
|
59383
|
-
_this.map._getMap().setPitch(_this.dpPitch + diff);
|
|
59384
|
-
}
|
|
59385
|
-
}
|
|
59386
|
-
};
|
|
59387
|
-
/** Callback for the touch end event */
|
|
59388
|
-
this._onTouchEnd = function () {
|
|
59389
|
-
if (_this.dpPoint) {
|
|
59390
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
59391
|
-
_this.map._getMap().dragPan.enable();
|
|
59392
|
-
}
|
|
59393
|
-
_this.dpPoint = undefined;
|
|
59394
|
-
};
|
|
59395
|
-
/** Callback for the touch cancel event */
|
|
59396
|
-
this._onTouchCancel = function () {
|
|
59397
|
-
if (_this.dpPoint) {
|
|
59398
|
-
_this.map._getMap().touchZoomRotate.enable();
|
|
59399
|
-
_this.map._getMap().dragPan.enable();
|
|
59400
|
-
}
|
|
59401
|
-
_this.dpPoint = undefined;
|
|
59402
|
-
};
|
|
59403
|
-
this.map = map;
|
|
59404
|
-
}
|
|
59405
|
-
/** Enables the mobile pitch gesture support. */
|
|
59406
|
-
MobilePitchHandler.prototype.enable = function () {
|
|
59407
|
-
this.map._getMap().on("touchstart", this._onTouchStart);
|
|
59408
|
-
this.map._getMap().on("touchmove", this._onTouchMove);
|
|
59409
|
-
this.map._getMap().on("touchend", this._onTouchEnd);
|
|
59410
|
-
this.map._getMap().on("touchcancel", this._onTouchCancel);
|
|
59411
|
-
};
|
|
59412
|
-
/** Disables the mobile pitch gesture support. */
|
|
59413
|
-
MobilePitchHandler.prototype.disable = function () {
|
|
59414
|
-
this.map._getMap().off("touchstart", this._onTouchStart);
|
|
59415
|
-
this.map._getMap().off("touchmove", this._onTouchMove);
|
|
59416
|
-
this.map._getMap().off("touchend", this._onTouchEnd);
|
|
59417
|
-
this.map._getMap().off("touchcancel", this._onTouchCancel);
|
|
59418
|
-
};
|
|
59419
|
-
return MobilePitchHandler;
|
|
59420
|
-
}());
|
|
59421
|
-
|
|
59422
59431
|
/** A handler that adds support for pinch and zoom gestures on devices without touch events. */
|
|
59423
59432
|
var PinchZoomHandler = /** @class */ (function () {
|
|
59424
59433
|
function PinchZoomHandler(map) {
|
|
@@ -59469,7 +59478,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59469
59478
|
function UserInteractionDelegate(map, options) {
|
|
59470
59479
|
this.added = false;
|
|
59471
59480
|
this.map = map;
|
|
59472
|
-
this.mobilePitch = new MobilePitchHandler(map);
|
|
59473
59481
|
this.focusShortcut = new FocusShortcutHandler(map);
|
|
59474
59482
|
this.pinchZoom = new PinchZoomHandler(map);
|
|
59475
59483
|
this.options = new UserInteractionOptions().merge(options);
|
|
@@ -59515,7 +59523,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59515
59523
|
this.focusShortcut.disable();
|
|
59516
59524
|
this.map._getMap().scrollZoom.disable();
|
|
59517
59525
|
this.map._getMap().touchZoomRotate.disable();
|
|
59518
|
-
this.mobilePitch.disable();
|
|
59519
59526
|
this.pinchZoom.disable();
|
|
59520
59527
|
}
|
|
59521
59528
|
else {
|
|
@@ -59567,12 +59574,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59567
59574
|
// Touch
|
|
59568
59575
|
if (options.touchInteraction) {
|
|
59569
59576
|
this.map._getMap().touchZoomRotate.enable();
|
|
59570
|
-
this.mobilePitch.enable();
|
|
59571
59577
|
this.pinchZoom.enable();
|
|
59572
59578
|
}
|
|
59573
59579
|
else {
|
|
59574
59580
|
this.map._getMap().touchZoomRotate.disable();
|
|
59575
|
-
this.mobilePitch.disable();
|
|
59576
59581
|
this.pinchZoom.enable();
|
|
59577
59582
|
}
|
|
59578
59583
|
}
|
|
@@ -62331,6 +62336,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62331
62336
|
if (!cancel) {
|
|
62332
62337
|
originalMethod.apply(context, args);
|
|
62333
62338
|
shouldCancel.set(context, true);
|
|
62339
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
62334
62340
|
setTimeout(function () { return shouldCancel.delete(context); }, duration);
|
|
62335
62341
|
}
|
|
62336
62342
|
};
|
|
@@ -64910,6 +64916,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64910
64916
|
_this._storeAccessToken(token);
|
|
64911
64917
|
clearTimeout(_this.tokenTimeOutHandle); // Clear the previous refresh timeout in case it hadn't triggered yet.
|
|
64912
64918
|
// @ts-ignore
|
|
64919
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
64913
64920
|
_this.tokenTimeOutHandle = setTimeout(_this._triggerTokenFetch, timeout * 1000);
|
|
64914
64921
|
resolve();
|
|
64915
64922
|
}
|
|
@@ -64957,6 +64964,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64957
64964
|
}
|
|
64958
64965
|
// Login and acquire a token.
|
|
64959
64966
|
// Fire it async so that users can add any listeners for token acquire events first.
|
|
64967
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
64960
64968
|
setTimeout(function () { return _this._loginAndAcquire(resolve, reject); });
|
|
64961
64969
|
}
|
|
64962
64970
|
else if (_this.options.authType === exports.AuthenticationType.anonymous) {
|
|
@@ -65045,6 +65053,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65045
65053
|
_this.options.aadAppId));
|
|
65046
65054
|
}
|
|
65047
65055
|
}
|
|
65056
|
+
// tslint:disable-next-line: no-string-based-set-interval
|
|
65048
65057
|
}, 25);
|
|
65049
65058
|
}
|
|
65050
65059
|
};
|
|
@@ -65800,6 +65809,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65800
65809
|
// This is for consistency with the case where the load event hasn't already fired.
|
|
65801
65810
|
// If the load event hasn't already fired the callback will also be executed async once it does fire.
|
|
65802
65811
|
var loadData_1 = { type: "load", map: this.map };
|
|
65812
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
65803
65813
|
setTimeout(function () { return modifiedCallback(loadData_1); });
|
|
65804
65814
|
}
|
|
65805
65815
|
else if (eventType === "ready") {
|
|
@@ -65808,6 +65818,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65808
65818
|
if (this.map._isReady()) {
|
|
65809
65819
|
// Manually execute the callback if the ready event has already fired.
|
|
65810
65820
|
var readyData_1 = { type: "ready", map: this.map };
|
|
65821
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
65811
65822
|
setTimeout(function () { return modifiedCallback(readyData_1); });
|
|
65812
65823
|
}
|
|
65813
65824
|
}
|
|
@@ -66193,6 +66204,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
66193
66204
|
timeoutId_1 = setTimeout(function () {
|
|
66194
66205
|
timedOut_1 = true;
|
|
66195
66206
|
reject("Failed to load image within specified timeout: " + _this.imageLoadTimeout + " ms.");
|
|
66207
|
+
// tslint:disable-next-line: no-string-based-set-timeout
|
|
66196
66208
|
}, _this.imageLoadTimeout);
|
|
66197
66209
|
}
|
|
66198
66210
|
});
|
|
@@ -68231,7 +68243,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68231
68243
|
* @internal
|
|
68232
68244
|
*/
|
|
68233
68245
|
function StyleManager(map, serviceOptions) {
|
|
68246
|
+
var _this = this;
|
|
68234
68247
|
this.apiVersion = "2.0";
|
|
68248
|
+
this._onStyleData = function () {
|
|
68249
|
+
_this.map.events.invoke("stylechanged", {
|
|
68250
|
+
style: _this._lookUp(_this.map.getStyle()).name,
|
|
68251
|
+
map: _this.map,
|
|
68252
|
+
type: "stylechanged"
|
|
68253
|
+
});
|
|
68254
|
+
};
|
|
68235
68255
|
this.map = map;
|
|
68236
68256
|
this.serviceOptions = serviceOptions;
|
|
68237
68257
|
}
|
|
@@ -68448,13 +68468,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68448
68468
|
preserveLayer(userLayer.layer.getId(), before === null || before === void 0 ? void 0 : before.id);
|
|
68449
68469
|
});
|
|
68450
68470
|
this.map.sources._syncSources(nextStyle.sources);
|
|
68451
|
-
|
|
68452
|
-
|
|
68453
|
-
|
|
68454
|
-
|
|
68455
|
-
|
|
68456
|
-
|
|
68457
|
-
});
|
|
68471
|
+
// If there was a previous styledata change event attached, remove it.
|
|
68472
|
+
// When the sprite url changes between style changes then mapbox can't perform the diff
|
|
68473
|
+
// In such cases it recalculate the style again. Removing previous attached
|
|
68474
|
+
// event listner makes sure that style changed event is not fired twice in these cases.
|
|
68475
|
+
this.map.events.remove("styledata", this._onStyleData);
|
|
68476
|
+
this.map.events.addOnce("styledata", this._onStyleData);
|
|
68458
68477
|
};
|
|
68459
68478
|
StyleManager.prototype._buildFundamentalLayerFrom = function (layers, id) {
|
|
68460
68479
|
if (layers && layers.length > 0) {
|