From b6b4a309d85d0610cda3e14d368518ca64d6ddc0 Mon Sep 17 00:00:00 2001 From: TuxCoder Date: Mon, 22 Jul 2019 19:35:01 +0200 Subject: [PATCH] add layer management in url --- dist/main.js | 65842 ++++++++++++++++++++++----------------------- dist/main.js.map | 2 +- src/app.js | 63 +- 3 files changed, 32099 insertions(+), 33808 deletions(-) diff --git a/dist/main.js b/dist/main.js index 3f3fa2d..42520a2 100644 --- a/dist/main.js +++ b/dist/main.js @@ -81,1250 +81,13 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 117); +/******/ return __webpack_require__(__webpack_require__.s = 25); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return boundingExtent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return buffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return clone; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return closestSquaredDistanceXY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return containsCoordinate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return containsExtent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return containsXY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return coordinateRelationship; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return createEmpty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createOrUpdate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return createOrUpdateEmpty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return createOrUpdateFromCoordinate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return createOrUpdateFromCoordinates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return createOrUpdateFromFlatCoordinates; }); -/* unused harmony export createOrUpdateFromRings */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return equals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return extend; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return extendCoordinate; }); -/* unused harmony export extendCoordinates */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return extendFlatCoordinates; }); -/* unused harmony export extendRings */ -/* unused harmony export extendXY */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return forEachCorner; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getArea; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getBottomLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getBottomRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getCenter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getCorner; }); -/* unused harmony export getEnlargedArea */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getForViewAndSize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getHeight; }); -/* unused harmony export getIntersectionArea */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getIntersection; }); -/* unused harmony export getMargin */ -/* unused harmony export getSize */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getTopLeft; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getTopRight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return intersects; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return isEmpty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return returnOrUpdate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return scaleFromCenter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return intersectsSegment; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyTransform; }); -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); -/* harmony import */ var _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67); -/* harmony import */ var _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31); -/** - * @module ol/extent - */ - - - - - -/** - * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. - * @typedef {Array} Extent - * @api - */ - -/** - * Build an extent that includes all given coordinates. - * - * @param {Array} coordinates Coordinates. - * @return {Extent} Bounding extent. - * @api - */ -function boundingExtent(coordinates) { - var extent = createEmpty(); - for (var i = 0, ii = coordinates.length; i < ii; ++i) { - extendCoordinate(extent, coordinates[i]); - } - return extent; -} - - -/** - * @param {Array} xs Xs. - * @param {Array} ys Ys. - * @param {Extent=} opt_extent Destination extent. - * @private - * @return {Extent} Extent. - */ -function _boundingExtentXYs(xs, ys, opt_extent) { - var minX = Math.min.apply(null, xs); - var minY = Math.min.apply(null, ys); - var maxX = Math.max.apply(null, xs); - var maxY = Math.max.apply(null, ys); - return createOrUpdate(minX, minY, maxX, maxY, opt_extent); -} - - -/** - * Return extent increased by the provided value. - * @param {Extent} extent Extent. - * @param {number} value The amount by which the extent should be buffered. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - * @api - */ -function buffer(extent, value, opt_extent) { - if (opt_extent) { - opt_extent[0] = extent[0] - value; - opt_extent[1] = extent[1] - value; - opt_extent[2] = extent[2] + value; - opt_extent[3] = extent[3] + value; - return opt_extent; - } else { - return [ - extent[0] - value, - extent[1] - value, - extent[2] + value, - extent[3] + value - ]; - } -} - - -/** - * Creates a clone of an extent. - * - * @param {Extent} extent Extent to clone. - * @param {Extent=} opt_extent Extent. - * @return {Extent} The clone. - */ -function clone(extent, opt_extent) { - if (opt_extent) { - opt_extent[0] = extent[0]; - opt_extent[1] = extent[1]; - opt_extent[2] = extent[2]; - opt_extent[3] = extent[3]; - return opt_extent; - } else { - return extent.slice(); - } -} - - -/** - * @param {Extent} extent Extent. - * @param {number} x X. - * @param {number} y Y. - * @return {number} Closest squared distance. - */ -function closestSquaredDistanceXY(extent, x, y) { - var dx, dy; - if (x < extent[0]) { - dx = extent[0] - x; - } else if (extent[2] < x) { - dx = x - extent[2]; - } else { - dx = 0; - } - if (y < extent[1]) { - dy = extent[1] - y; - } else if (extent[3] < y) { - dy = y - extent[3]; - } else { - dy = 0; - } - return dx * dx + dy * dy; -} - - -/** - * Check if the passed coordinate is contained or on the edge of the extent. - * - * @param {Extent} extent Extent. - * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. - * @return {boolean} The coordinate is contained in the extent. - * @api - */ -function containsCoordinate(extent, coordinate) { - return containsXY(extent, coordinate[0], coordinate[1]); -} - - -/** - * Check if one extent contains another. - * - * An extent is deemed contained if it lies completely within the other extent, - * including if they share one or more edges. - * - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent 2. - * @return {boolean} The second extent is contained by or on the edge of the - * first. - * @api - */ -function containsExtent(extent1, extent2) { - return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] && - extent1[1] <= extent2[1] && extent2[3] <= extent1[3]; -} - - -/** - * Check if the passed coordinate is contained or on the edge of the extent. - * - * @param {Extent} extent Extent. - * @param {number} x X coordinate. - * @param {number} y Y coordinate. - * @return {boolean} The x, y values are contained in the extent. - * @api - */ -function containsXY(extent, x, y) { - return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3]; -} - - -/** - * Get the relationship between a coordinate and extent. - * @param {Extent} extent The extent. - * @param {import("./coordinate.js").Coordinate} coordinate The coordinate. - * @return {Relationship} The relationship (bitwise compare with - * import("./extent/Relationship.js").Relationship). - */ -function coordinateRelationship(extent, coordinate) { - var minX = extent[0]; - var minY = extent[1]; - var maxX = extent[2]; - var maxY = extent[3]; - var x = coordinate[0]; - var y = coordinate[1]; - var relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].UNKNOWN; - if (x < minX) { - relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].LEFT; - } else if (x > maxX) { - relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].RIGHT; - } - if (y < minY) { - relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].BELOW; - } else if (y > maxY) { - relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].ABOVE; - } - if (relationship === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].UNKNOWN) { - relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].INTERSECTING; - } - return relationship; -} - - -/** - * Create an empty extent. - * @return {Extent} Empty extent. - * @api - */ -function createEmpty() { - return [Infinity, Infinity, -Infinity, -Infinity]; -} - - -/** - * Create a new extent or update the provided extent. - * @param {number} minX Minimum X. - * @param {number} minY Minimum Y. - * @param {number} maxX Maximum X. - * @param {number} maxY Maximum Y. - * @param {Extent=} opt_extent Destination extent. - * @return {Extent} Extent. - */ -function createOrUpdate(minX, minY, maxX, maxY, opt_extent) { - if (opt_extent) { - opt_extent[0] = minX; - opt_extent[1] = minY; - opt_extent[2] = maxX; - opt_extent[3] = maxY; - return opt_extent; - } else { - return [minX, minY, maxX, maxY]; - } -} - - -/** - * Create a new empty extent or make the provided one empty. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function createOrUpdateEmpty(opt_extent) { - return createOrUpdate( - Infinity, Infinity, -Infinity, -Infinity, opt_extent); -} - - -/** - * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function createOrUpdateFromCoordinate(coordinate, opt_extent) { - var x = coordinate[0]; - var y = coordinate[1]; - return createOrUpdate(x, y, x, y, opt_extent); -} - - -/** - * @param {Array} coordinates Coordinates. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function createOrUpdateFromCoordinates(coordinates, opt_extent) { - var extent = createOrUpdateEmpty(opt_extent); - return extendCoordinates(extent, coordinates); -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) { - var extent = createOrUpdateEmpty(opt_extent); - return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride); -} - -/** - * @param {Array>} rings Rings. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function createOrUpdateFromRings(rings, opt_extent) { - var extent = createOrUpdateEmpty(opt_extent); - return extendRings(extent, rings); -} - - -/** - * Determine if two extents are equivalent. - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent 2. - * @return {boolean} The two extents are equivalent. - * @api - */ -function equals(extent1, extent2) { - return extent1[0] == extent2[0] && extent1[2] == extent2[2] && - extent1[1] == extent2[1] && extent1[3] == extent2[3]; -} - - -/** - * Modify an extent to include another extent. - * @param {Extent} extent1 The extent to be modified. - * @param {Extent} extent2 The extent that will be included in the first. - * @return {Extent} A reference to the first (extended) extent. - * @api - */ -function extend(extent1, extent2) { - if (extent2[0] < extent1[0]) { - extent1[0] = extent2[0]; - } - if (extent2[2] > extent1[2]) { - extent1[2] = extent2[2]; - } - if (extent2[1] < extent1[1]) { - extent1[1] = extent2[1]; - } - if (extent2[3] > extent1[3]) { - extent1[3] = extent2[3]; - } - return extent1; -} - - -/** - * @param {Extent} extent Extent. - * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. - */ -function extendCoordinate(extent, coordinate) { - if (coordinate[0] < extent[0]) { - extent[0] = coordinate[0]; - } - if (coordinate[0] > extent[2]) { - extent[2] = coordinate[0]; - } - if (coordinate[1] < extent[1]) { - extent[1] = coordinate[1]; - } - if (coordinate[1] > extent[3]) { - extent[3] = coordinate[1]; - } -} - - -/** - * @param {Extent} extent Extent. - * @param {Array} coordinates Coordinates. - * @return {Extent} Extent. - */ -function extendCoordinates(extent, coordinates) { - for (var i = 0, ii = coordinates.length; i < ii; ++i) { - extendCoordinate(extent, coordinates[i]); - } - return extent; -} - - -/** - * @param {Extent} extent Extent. - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @return {Extent} Extent. - */ -function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) { - for (; offset < end; offset += stride) { - extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]); - } - return extent; -} - - -/** - * @param {Extent} extent Extent. - * @param {Array>} rings Rings. - * @return {Extent} Extent. - */ -function extendRings(extent, rings) { - for (var i = 0, ii = rings.length; i < ii; ++i) { - extendCoordinates(extent, rings[i]); - } - return extent; -} - - -/** - * @param {Extent} extent Extent. - * @param {number} x X. - * @param {number} y Y. - */ -function extendXY(extent, x, y) { - extent[0] = Math.min(extent[0], x); - extent[1] = Math.min(extent[1], y); - extent[2] = Math.max(extent[2], x); - extent[3] = Math.max(extent[3], y); -} - - -/** - * This function calls `callback` for each corner of the extent. If the - * callback returns a truthy value the function returns that value - * immediately. Otherwise the function returns `false`. - * @param {Extent} extent Extent. - * @param {function(this:T, import("./coordinate.js").Coordinate): S} callback Callback. - * @param {T=} opt_this Value to use as `this` when executing `callback`. - * @return {S|boolean} Value. - * @template S, T - */ -function forEachCorner(extent, callback, opt_this) { - var val; - val = callback.call(opt_this, getBottomLeft(extent)); - if (val) { - return val; - } - val = callback.call(opt_this, getBottomRight(extent)); - if (val) { - return val; - } - val = callback.call(opt_this, getTopRight(extent)); - if (val) { - return val; - } - val = callback.call(opt_this, getTopLeft(extent)); - if (val) { - return val; - } - return false; -} - - -/** - * Get the size of an extent. - * @param {Extent} extent Extent. - * @return {number} Area. - * @api - */ -function getArea(extent) { - var area = 0; - if (!isEmpty(extent)) { - area = getWidth(extent) * getHeight(extent); - } - return area; -} - - -/** - * Get the bottom left coordinate of an extent. - * @param {Extent} extent Extent. - * @return {import("./coordinate.js").Coordinate} Bottom left coordinate. - * @api - */ -function getBottomLeft(extent) { - return [extent[0], extent[1]]; -} - - -/** - * Get the bottom right coordinate of an extent. - * @param {Extent} extent Extent. - * @return {import("./coordinate.js").Coordinate} Bottom right coordinate. - * @api - */ -function getBottomRight(extent) { - return [extent[2], extent[1]]; -} - - -/** - * Get the center coordinate of an extent. - * @param {Extent} extent Extent. - * @return {import("./coordinate.js").Coordinate} Center. - * @api - */ -function getCenter(extent) { - return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2]; -} - - -/** - * Get a corner coordinate of an extent. - * @param {Extent} extent Extent. - * @param {Corner} corner Corner. - * @return {import("./coordinate.js").Coordinate} Corner coordinate. - */ -function getCorner(extent, corner) { - var coordinate; - if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].BOTTOM_LEFT) { - coordinate = getBottomLeft(extent); - } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].BOTTOM_RIGHT) { - coordinate = getBottomRight(extent); - } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].TOP_LEFT) { - coordinate = getTopLeft(extent); - } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].TOP_RIGHT) { - coordinate = getTopRight(extent); - } else { - Object(_asserts_js__WEBPACK_IMPORTED_MODULE_0__[/* assert */ "a"])(false, 13); // Invalid corner - } - return coordinate; -} - - -/** - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent 2. - * @return {number} Enlarged area. - */ -function getEnlargedArea(extent1, extent2) { - var minX = Math.min(extent1[0], extent2[0]); - var minY = Math.min(extent1[1], extent2[1]); - var maxX = Math.max(extent1[2], extent2[2]); - var maxY = Math.max(extent1[3], extent2[3]); - return (maxX - minX) * (maxY - minY); -} - - -/** - * @param {import("./coordinate.js").Coordinate} center Center. - * @param {number} resolution Resolution. - * @param {number} rotation Rotation. - * @param {import("./size.js").Size} size Size. - * @param {Extent=} opt_extent Destination extent. - * @return {Extent} Extent. - */ -function getForViewAndSize(center, resolution, rotation, size, opt_extent) { - var dx = resolution * size[0] / 2; - var dy = resolution * size[1] / 2; - var cosRotation = Math.cos(rotation); - var sinRotation = Math.sin(rotation); - var xCos = dx * cosRotation; - var xSin = dx * sinRotation; - var yCos = dy * cosRotation; - var ySin = dy * sinRotation; - var x = center[0]; - var y = center[1]; - var x0 = x - xCos + ySin; - var x1 = x - xCos - ySin; - var x2 = x + xCos - ySin; - var x3 = x + xCos + ySin; - var y0 = y - xSin - yCos; - var y1 = y - xSin + yCos; - var y2 = y + xSin + yCos; - var y3 = y + xSin - yCos; - return createOrUpdate( - Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), - Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), - opt_extent); -} - - -/** - * Get the height of an extent. - * @param {Extent} extent Extent. - * @return {number} Height. - * @api - */ -function getHeight(extent) { - return extent[3] - extent[1]; -} - - -/** - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent 2. - * @return {number} Intersection area. - */ -function getIntersectionArea(extent1, extent2) { - var intersection = getIntersection(extent1, extent2); - return getArea(intersection); -} - - -/** - * Get the intersection of two extents. - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent 2. - * @param {Extent=} opt_extent Optional extent to populate with intersection. - * @return {Extent} Intersecting extent. - * @api - */ -function getIntersection(extent1, extent2, opt_extent) { - var intersection = opt_extent ? opt_extent : createEmpty(); - if (intersects(extent1, extent2)) { - if (extent1[0] > extent2[0]) { - intersection[0] = extent1[0]; - } else { - intersection[0] = extent2[0]; - } - if (extent1[1] > extent2[1]) { - intersection[1] = extent1[1]; - } else { - intersection[1] = extent2[1]; - } - if (extent1[2] < extent2[2]) { - intersection[2] = extent1[2]; - } else { - intersection[2] = extent2[2]; - } - if (extent1[3] < extent2[3]) { - intersection[3] = extent1[3]; - } else { - intersection[3] = extent2[3]; - } - } else { - createOrUpdateEmpty(intersection); - } - return intersection; -} - - -/** - * @param {Extent} extent Extent. - * @return {number} Margin. - */ -function getMargin(extent) { - return getWidth(extent) + getHeight(extent); -} - - -/** - * Get the size (width, height) of an extent. - * @param {Extent} extent The extent. - * @return {import("./size.js").Size} The extent size. - * @api - */ -function getSize(extent) { - return [extent[2] - extent[0], extent[3] - extent[1]]; -} - - -/** - * Get the top left coordinate of an extent. - * @param {Extent} extent Extent. - * @return {import("./coordinate.js").Coordinate} Top left coordinate. - * @api - */ -function getTopLeft(extent) { - return [extent[0], extent[3]]; -} - - -/** - * Get the top right coordinate of an extent. - * @param {Extent} extent Extent. - * @return {import("./coordinate.js").Coordinate} Top right coordinate. - * @api - */ -function getTopRight(extent) { - return [extent[2], extent[3]]; -} - - -/** - * Get the width of an extent. - * @param {Extent} extent Extent. - * @return {number} Width. - * @api - */ -function getWidth(extent) { - return extent[2] - extent[0]; -} - - -/** - * Determine if one extent intersects another. - * @param {Extent} extent1 Extent 1. - * @param {Extent} extent2 Extent. - * @return {boolean} The two extents intersect. - * @api - */ -function intersects(extent1, extent2) { - return extent1[0] <= extent2[2] && - extent1[2] >= extent2[0] && - extent1[1] <= extent2[3] && - extent1[3] >= extent2[1]; -} - - -/** - * Determine if an extent is empty. - * @param {Extent} extent Extent. - * @return {boolean} Is empty. - * @api - */ -function isEmpty(extent) { - return extent[2] < extent[0] || extent[3] < extent[1]; -} - - -/** - * @param {Extent} extent Extent. - * @param {Extent=} opt_extent Extent. - * @return {Extent} Extent. - */ -function returnOrUpdate(extent, opt_extent) { - if (opt_extent) { - opt_extent[0] = extent[0]; - opt_extent[1] = extent[1]; - opt_extent[2] = extent[2]; - opt_extent[3] = extent[3]; - return opt_extent; - } else { - return extent; - } -} - - -/** - * @param {Extent} extent Extent. - * @param {number} value Value. - */ -function scaleFromCenter(extent, value) { - var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1); - var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1); - extent[0] -= deltaX; - extent[2] += deltaX; - extent[1] -= deltaY; - extent[3] += deltaY; -} - - -/** - * Determine if the segment between two coordinates intersects (crosses, - * touches, or is contained by) the provided extent. - * @param {Extent} extent The extent. - * @param {import("./coordinate.js").Coordinate} start Segment start coordinate. - * @param {import("./coordinate.js").Coordinate} end Segment end coordinate. - * @return {boolean} The segment intersects the extent. - */ -function intersectsSegment(extent, start, end) { - var intersects = false; - var startRel = coordinateRelationship(extent, start); - var endRel = coordinateRelationship(extent, end); - if (startRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].INTERSECTING || - endRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].INTERSECTING) { - intersects = true; - } else { - var minX = extent[0]; - var minY = extent[1]; - var maxX = extent[2]; - var maxY = extent[3]; - var startX = start[0]; - var startY = start[1]; - var endX = end[0]; - var endY = end[1]; - var slope = (endY - startY) / (endX - startX); - var x, y; - if (!!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].ABOVE) && - !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].ABOVE)) { - // potentially intersects top - x = endX - ((endY - maxY) / slope); - intersects = x >= minX && x <= maxX; - } - if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].RIGHT) && - !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].RIGHT)) { - // potentially intersects right - y = endY - ((endX - maxX) * slope); - intersects = y >= minY && y <= maxY; - } - if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].BELOW) && - !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].BELOW)) { - // potentially intersects bottom - x = endX - ((endY - minY) / slope); - intersects = x >= minX && x <= maxX; - } - if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].LEFT) && - !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].LEFT)) { - // potentially intersects left - y = endY - ((endX - minX) * slope); - intersects = y >= minY && y <= maxY; - } - - } - return intersects; -} - - -/** - * Apply a transform function to the extent. - * @param {Extent} extent Extent. - * @param {import("./proj.js").TransformFunction} transformFn Transform function. - * Called with `[minX, minY, maxX, maxY]` extent coordinates. - * @param {Extent=} opt_extent Destination extent. - * @return {Extent} Extent. - * @api - */ -function applyTransform(extent, transformFn, opt_extent) { - var coordinates = [ - extent[0], extent[1], - extent[0], extent[3], - extent[2], extent[1], - extent[2], extent[3] - ]; - transformFn(coordinates, coordinates, 2); - var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]]; - var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]]; - return _boundingExtentXYs(xs, ys, opt_extent); -} - -//# sourceMappingURL=extent.js.map - -/***/ }), -/* 1 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return ONE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return SRC_ALPHA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return COLOR_ATTACHMENT0; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return COLOR_BUFFER_BIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return TRIANGLES; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return TRIANGLE_STRIP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return ONE_MINUS_SRC_ALPHA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ARRAY_BUFFER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return ELEMENT_ARRAY_BUFFER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return STREAM_DRAW; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return STATIC_DRAW; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return DYNAMIC_DRAW; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return CULL_FACE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return BLEND; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return STENCIL_TEST; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return DEPTH_TEST; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return SCISSOR_TEST; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return UNSIGNED_BYTE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return UNSIGNED_SHORT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return UNSIGNED_INT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return FLOAT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return RGBA; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return FRAGMENT_SHADER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return VERTEX_SHADER; }); -/* unused harmony export LINK_STATUS */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return LINEAR; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return TEXTURE_MAG_FILTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return TEXTURE_MIN_FILTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return TEXTURE_WRAP_S; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return TEXTURE_WRAP_T; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return TEXTURE_2D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return TEXTURE0; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CLAMP_TO_EDGE; }); -/* unused harmony export COMPILE_STATUS */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return FRAMEBUFFER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return DEBUG; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return HAS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return MAX_TEXTURE_SIZE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return EXTENSIONS; }); -/** - * @module ol/webgl - */ - - -/** - * Constants taken from goog.webgl - */ - - -/** - * @const - * @type {number} - */ -var ONE = 1; - - -/** - * @const - * @type {number} - */ -var SRC_ALPHA = 0x0302; - - -/** - * @const - * @type {number} - */ -var COLOR_ATTACHMENT0 = 0x8CE0; - - -/** - * @const - * @type {number} - */ -var COLOR_BUFFER_BIT = 0x00004000; - - -/** - * @const - * @type {number} - */ -var TRIANGLES = 0x0004; - - -/** - * @const - * @type {number} - */ -var TRIANGLE_STRIP = 0x0005; - - -/** - * @const - * @type {number} - */ -var ONE_MINUS_SRC_ALPHA = 0x0303; - - -/** - * @const - * @type {number} - */ -var ARRAY_BUFFER = 0x8892; - - -/** - * @const - * @type {number} - */ -var ELEMENT_ARRAY_BUFFER = 0x8893; - - -/** - * @const - * @type {number} - */ -var STREAM_DRAW = 0x88E0; - - -/** - * @const - * @type {number} - */ -var STATIC_DRAW = 0x88E4; - - -/** - * @const - * @type {number} - */ -var DYNAMIC_DRAW = 0x88E8; - - -/** - * @const - * @type {number} - */ -var CULL_FACE = 0x0B44; - - -/** - * @const - * @type {number} - */ -var BLEND = 0x0BE2; - - -/** - * @const - * @type {number} - */ -var STENCIL_TEST = 0x0B90; - - -/** - * @const - * @type {number} - */ -var DEPTH_TEST = 0x0B71; - - -/** - * @const - * @type {number} - */ -var SCISSOR_TEST = 0x0C11; - - -/** - * @const - * @type {number} - */ -var UNSIGNED_BYTE = 0x1401; - - -/** - * @const - * @type {number} - */ -var UNSIGNED_SHORT = 0x1403; - - -/** - * @const - * @type {number} - */ -var UNSIGNED_INT = 0x1405; - - -/** - * @const - * @type {number} - */ -var FLOAT = 0x1406; - - -/** - * @const - * @type {number} - */ -var RGBA = 0x1908; - - -/** - * @const - * @type {number} - */ -var FRAGMENT_SHADER = 0x8B30; - - -/** - * @const - * @type {number} - */ -var VERTEX_SHADER = 0x8B31; - - -/** - * @const - * @type {number} - */ -var LINK_STATUS = 0x8B82; - - -/** - * @const - * @type {number} - */ -var LINEAR = 0x2601; - - -/** - * @const - * @type {number} - */ -var TEXTURE_MAG_FILTER = 0x2800; - - -/** - * @const - * @type {number} - */ -var TEXTURE_MIN_FILTER = 0x2801; - - -/** - * @const - * @type {number} - */ -var TEXTURE_WRAP_S = 0x2802; - - -/** - * @const - * @type {number} - */ -var TEXTURE_WRAP_T = 0x2803; - - -/** - * @const - * @type {number} - */ -var TEXTURE_2D = 0x0DE1; - - -/** - * @const - * @type {number} - */ -var TEXTURE0 = 0x84C0; - - -/** - * @const - * @type {number} - */ -var CLAMP_TO_EDGE = 0x812F; - - -/** - * @const - * @type {number} - */ -var COMPILE_STATUS = 0x8B81; - - -/** - * @const - * @type {number} - */ -var FRAMEBUFFER = 0x8D40; - - -/** end of goog.webgl constants - */ - - -/** - * @const - * @type {Array} - */ -var CONTEXT_IDS = [ - 'experimental-webgl', - 'webgl', - 'webkit-3d', - 'moz-webgl' -]; - - -/** - * @param {HTMLCanvasElement} canvas Canvas. - * @param {Object=} opt_attributes Attributes. - * @return {WebGLRenderingContext} WebGL rendering context. - */ -function getContext(canvas, opt_attributes) { - var ii = CONTEXT_IDS.length; - for (var i = 0; i < ii; ++i) { - try { - var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes); - if (context) { - return /** @type {!WebGLRenderingContext} */ (context); - } - } catch (e) { - // pass - } - } - return null; -} - - -/** - * Include debuggable shader sources. Default is `true`. This should be set to - * `false` for production builds. - * @type {boolean} - */ -var DEBUG = true; - - -/** - * The maximum supported WebGL texture size in pixels. If WebGL is not - * supported, the value is set to `undefined`. - * @type {number|undefined} - */ -var MAX_TEXTURE_SIZE; // value is set below - - -/** - * List of supported WebGL extensions. - * @type {Array} - */ -var EXTENSIONS; // value is set below - - -/** - * True if both OpenLayers and browser support WebGL. - * @type {boolean} - * @api - */ -var HAS = false; - -//TODO Remove side effects -if (typeof window !== 'undefined' && 'WebGLRenderingContext' in window) { - try { - var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas')); - var gl = getContext(canvas, {failIfMajorPerformanceCaveat: true}); - if (gl) { - HAS = true; - MAX_TEXTURE_SIZE = /** @type {number} */ (gl.getParameter(gl.MAX_TEXTURE_SIZE)); - EXTENSIONS = gl.getSupportedExtensions(); - } - } catch (e) { - // pass - } -} - - - -//# sourceMappingURL=webgl.js.map - -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return abstract; }); /* unused harmony export inherits */ @@ -1401,7 +164,7 @@ var VERSION = '5.3.3'; //# sourceMappingURL=util.js.map /***/ }), -/* 3 */ +/* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1413,7 +176,7 @@ var VERSION = '5.3.3'; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unlisten; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return unlistenByKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return unlistenAll; }); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); /** * @module ol/events */ @@ -1690,706 +453,7 @@ function unlistenAll(target) { //# sourceMappingURL=events.js.map /***/ }), -/* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return create; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return multiply; }); -/* unused harmony export set */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setFromArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return apply; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return rotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return scale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return translate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return compose; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return invert; }); -/* unused harmony export determinant */ -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); -/** - * @module ol/transform - */ - - - -/** - * An array representing an affine 2d transformation for use with - * {@link module:ol/transform} functions. The array has 6 elements. - * @typedef {!Array} Transform - */ - - -/** - * Collection of affine 2d transformation functions. The functions work on an - * array of 6 elements. The element order is compatible with the [SVGMatrix - * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is - * a subset (elements a to f) of a 3×3 matrix: - * ``` - * [ a c e ] - * [ b d f ] - * [ 0 0 1 ] - * ``` - */ - - -/** - * @private - * @type {Transform} - */ -var tmp_ = new Array(6); - - -/** - * Create an identity transform. - * @return {!Transform} Identity transform. - */ -function create() { - return [1, 0, 0, 1, 0, 0]; -} - - -/** - * Resets the given transform to an identity transform. - * @param {!Transform} transform Transform. - * @return {!Transform} Transform. - */ -function reset(transform) { - return set(transform, 1, 0, 0, 1, 0, 0); -} - - -/** - * Multiply the underlying matrices of two transforms and return the result in - * the first transform. - * @param {!Transform} transform1 Transform parameters of matrix 1. - * @param {!Transform} transform2 Transform parameters of matrix 2. - * @return {!Transform} transform1 multiplied with transform2. - */ -function multiply(transform1, transform2) { - var a1 = transform1[0]; - var b1 = transform1[1]; - var c1 = transform1[2]; - var d1 = transform1[3]; - var e1 = transform1[4]; - var f1 = transform1[5]; - var a2 = transform2[0]; - var b2 = transform2[1]; - var c2 = transform2[2]; - var d2 = transform2[3]; - var e2 = transform2[4]; - var f2 = transform2[5]; - - transform1[0] = a1 * a2 + c1 * b2; - transform1[1] = b1 * a2 + d1 * b2; - transform1[2] = a1 * c2 + c1 * d2; - transform1[3] = b1 * c2 + d1 * d2; - transform1[4] = a1 * e2 + c1 * f2 + e1; - transform1[5] = b1 * e2 + d1 * f2 + f1; - - return transform1; -} - -/** - * Set the transform components a-f on a given transform. - * @param {!Transform} transform Transform. - * @param {number} a The a component of the transform. - * @param {number} b The b component of the transform. - * @param {number} c The c component of the transform. - * @param {number} d The d component of the transform. - * @param {number} e The e component of the transform. - * @param {number} f The f component of the transform. - * @return {!Transform} Matrix with transform applied. - */ -function set(transform, a, b, c, d, e, f) { - transform[0] = a; - transform[1] = b; - transform[2] = c; - transform[3] = d; - transform[4] = e; - transform[5] = f; - return transform; -} - - -/** - * Set transform on one matrix from another matrix. - * @param {!Transform} transform1 Matrix to set transform to. - * @param {!Transform} transform2 Matrix to set transform from. - * @return {!Transform} transform1 with transform from transform2 applied. - */ -function setFromArray(transform1, transform2) { - transform1[0] = transform2[0]; - transform1[1] = transform2[1]; - transform1[2] = transform2[2]; - transform1[3] = transform2[3]; - transform1[4] = transform2[4]; - transform1[5] = transform2[5]; - return transform1; -} - - -/** - * Transforms the given coordinate with the given transform returning the - * resulting, transformed coordinate. The coordinate will be modified in-place. - * - * @param {Transform} transform The transformation. - * @param {import("./coordinate.js").Coordinate|import("./pixel.js").Pixel} coordinate The coordinate to transform. - * @return {import("./coordinate.js").Coordinate|import("./pixel.js").Pixel} return coordinate so that operations can be - * chained together. - */ -function apply(transform, coordinate) { - var x = coordinate[0]; - var y = coordinate[1]; - coordinate[0] = transform[0] * x + transform[2] * y + transform[4]; - coordinate[1] = transform[1] * x + transform[3] * y + transform[5]; - return coordinate; -} - - -/** - * Applies rotation to the given transform. - * @param {!Transform} transform Transform. - * @param {number} angle Angle in radians. - * @return {!Transform} The rotated transform. - */ -function rotate(transform, angle) { - var cos = Math.cos(angle); - var sin = Math.sin(angle); - return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0)); -} - - -/** - * Applies scale to a given transform. - * @param {!Transform} transform Transform. - * @param {number} x Scale factor x. - * @param {number} y Scale factor y. - * @return {!Transform} The scaled transform. - */ -function scale(transform, x, y) { - return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0)); -} - - -/** - * Applies translation to the given transform. - * @param {!Transform} transform Transform. - * @param {number} dx Translation x. - * @param {number} dy Translation y. - * @return {!Transform} The translated transform. - */ -function translate(transform, dx, dy) { - return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy)); -} - - -/** - * Creates a composite transform given an initial translation, scale, rotation, and - * final translation (in that order only, not commutative). - * @param {!Transform} transform The transform (will be modified in place). - * @param {number} dx1 Initial translation x. - * @param {number} dy1 Initial translation y. - * @param {number} sx Scale factor x. - * @param {number} sy Scale factor y. - * @param {number} angle Rotation (in counter-clockwise radians). - * @param {number} dx2 Final translation x. - * @param {number} dy2 Final translation y. - * @return {!Transform} The composite transform. - */ -function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) { - var sin = Math.sin(angle); - var cos = Math.cos(angle); - transform[0] = sx * cos; - transform[1] = sy * sin; - transform[2] = -sx * sin; - transform[3] = sy * cos; - transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1; - transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1; - return transform; -} - - -/** - * Invert the given transform. - * @param {!Transform} transform Transform. - * @return {!Transform} Inverse of the transform. - */ -function invert(transform) { - var det = determinant(transform); - Object(_asserts_js__WEBPACK_IMPORTED_MODULE_0__[/* assert */ "a"])(det !== 0, 32); // Transformation matrix cannot be inverted - - var a = transform[0]; - var b = transform[1]; - var c = transform[2]; - var d = transform[3]; - var e = transform[4]; - var f = transform[5]; - - transform[0] = d / det; - transform[1] = -b / det; - transform[2] = -c / det; - transform[3] = a / det; - transform[4] = (c * f - d * e) / det; - transform[5] = -(a * f - b * e) / det; - - return transform; -} - - -/** - * Returns the determinant of the given matrix. - * @param {!Transform} mat Matrix. - * @return {number} Determinant. - */ -function determinant(mat) { - return mat[0] * mat[3] - mat[1] * mat[2]; -} - -//# sourceMappingURL=transform.js.map - -/***/ }), -/* 5 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/geom/GeometryType - */ - -/** - * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`, - * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`, - * `'GeometryCollection'`, `'Circle'`. - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - POINT: 'Point', - LINE_STRING: 'LineString', - LINEAR_RING: 'LinearRing', - POLYGON: 'Polygon', - MULTI_POINT: 'MultiPoint', - MULTI_LINE_STRING: 'MultiLineString', - MULTI_POLYGON: 'MultiPolygon', - GEOMETRY_COLLECTION: 'GeometryCollection', - CIRCLE: 'Circle' -}); - -//# sourceMappingURL=GeometryType.js.map - -/***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return defaultFont; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return defaultFillStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return defaultLineCap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return defaultLineDash; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return defaultLineDashOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return defaultLineJoin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return defaultMiterLimit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return defaultStrokeStyle; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return defaultTextAlign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return defaultTextBaseline; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return defaultPadding; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return defaultLineWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return labelCache; }); -/* unused harmony export checkedFonts */ -/* unused harmony export textHeights */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return checkFont; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return measureTextHeight; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return measureTextWidth; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rotateAtOffset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return resetTransform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return drawImage; }); -/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); -/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10); -/* harmony import */ var _structs_LRUCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4); -/** - * @module ol/render/canvas - */ - - - - - - - -/** - * @typedef {Object} FillState - * @property {import("../colorlike.js").ColorLike} fillStyle - */ - - -/** - * @typedef {Object} FillStrokeState - * @property {import("../colorlike.js").ColorLike} [currentFillStyle] - * @property {import("../colorlike.js").ColorLike} [currentStrokeStyle] - * @property {string} [currentLineCap] - * @property {Array} currentLineDash - * @property {number} [currentLineDashOffset] - * @property {string} [currentLineJoin] - * @property {number} [currentLineWidth] - * @property {number} [currentMiterLimit] - * @property {number} [lastStroke] - * @property {import("../colorlike.js").ColorLike} [fillStyle] - * @property {import("../colorlike.js").ColorLike} [strokeStyle] - * @property {string} [lineCap] - * @property {Array} lineDash - * @property {number} [lineDashOffset] - * @property {string} [lineJoin] - * @property {number} [lineWidth] - * @property {number} [miterLimit] - */ - - -/** - * @typedef {Object} StrokeState - * @property {string} lineCap - * @property {Array} lineDash - * @property {number} lineDashOffset - * @property {string} lineJoin - * @property {number} lineWidth - * @property {number} miterLimit - * @property {import("../colorlike.js").ColorLike} strokeStyle - */ - - -/** - * @typedef {Object} TextState - * @property {string} font - * @property {string} [textAlign] - * @property {string} textBaseline - * @property {string} [placement] - * @property {number} [maxAngle] - * @property {boolean} [overflow] - * @property {import("../style/Fill.js").default} [backgroundFill] - * @property {import("../style/Stroke.js").default} [backgroundStroke] - * @property {number} [scale] - * @property {Array} [padding] - */ - - -/** - * Container for decluttered replay instructions that need to be rendered or - * omitted together, i.e. when styles render both an image and text, or for the - * characters that form text along lines. The basic elements of this array are - * `[minX, minY, maxX, maxY, count]`, where the first four entries are the - * rendered extent of the group in pixel space. `count` is the number of styles - * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise. - * In addition to these four elements, declutter instruction arrays (i.e. the - * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array. - * @typedef {Array<*>} DeclutterGroup - */ - - -/** - * @const - * @type {string} - */ -var defaultFont = '10px sans-serif'; - - -/** - * @const - * @type {import("../color.js").Color} - */ -var defaultFillStyle = [0, 0, 0, 1]; - - -/** - * @const - * @type {string} - */ -var defaultLineCap = 'round'; - - -/** - * @const - * @type {Array} - */ -var defaultLineDash = []; - - -/** - * @const - * @type {number} - */ -var defaultLineDashOffset = 0; - - -/** - * @const - * @type {string} - */ -var defaultLineJoin = 'round'; - - -/** - * @const - * @type {number} - */ -var defaultMiterLimit = 10; - - -/** - * @const - * @type {import("../color.js").Color} - */ -var defaultStrokeStyle = [0, 0, 0, 1]; - - -/** - * @const - * @type {string} - */ -var defaultTextAlign = 'center'; - - -/** - * @const - * @type {string} - */ -var defaultTextBaseline = 'middle'; - - -/** - * @const - * @type {Array} - */ -var defaultPadding = [0, 0, 0, 0]; - - -/** - * @const - * @type {number} - */ -var defaultLineWidth = 1; - - -/** - * The label cache for text rendering. To change the default cache size of 2048 - * entries, use {@link module:ol/structs/LRUCache#setSize}. - * @type {LRUCache} - * @api - */ -var labelCache = new _structs_LRUCache_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"](); - - -/** - * @type {!Object} - */ -var checkedFonts = {}; - - -/** - * @type {CanvasRenderingContext2D} - */ -var measureContext = null; - - -/** - * @type {!Object} - */ -var textHeights = {}; - - -/** - * Clears the label cache when a font becomes available. - * @param {string} fontSpec CSS font spec. - */ -var checkFont = (function() { - var retries = 60; - var checked = checkedFonts; - var size = '32px '; - var referenceFonts = ['monospace', 'serif']; - var len = referenceFonts.length; - var text = 'wmytzilWMYTZIL@#/&?$%10\uF013'; - var interval, referenceWidth; - - function isAvailable(font) { - var context = getMeasureContext(); - // Check weight ranges according to - // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights - for (var weight = 100; weight <= 700; weight += 300) { - var fontWeight = weight + ' '; - var available = true; - for (var i = 0; i < len; ++i) { - var referenceFont = referenceFonts[i]; - context.font = fontWeight + size + referenceFont; - referenceWidth = context.measureText(text).width; - if (font != referenceFont) { - context.font = fontWeight + size + font + ',' + referenceFont; - var width = context.measureText(text).width; - // If width and referenceWidth are the same, then the fallback was used - // instead of the font we wanted, so the font is not available. - available = available && width != referenceWidth; - } - } - if (available) { - // Consider font available when it is available in one weight range. - //FIXME With this we miss rare corner cases, so we should consider - //FIXME checking availability for each requested weight range. - return true; - } - } - return false; - } - - function check() { - var done = true; - for (var font in checked) { - if (checked[font] < retries) { - if (isAvailable(font)) { - checked[font] = retries; - Object(_obj_js__WEBPACK_IMPORTED_MODULE_2__[/* clear */ "b"])(textHeights); - // Make sure that loaded fonts are picked up by Safari - measureContext = null; - labelCache.clear(); - } else { - ++checked[font]; - done = false; - } - } - } - if (done) { - clearInterval(interval); - interval = undefined; - } - } - - return function(fontSpec) { - var fontFamilies = Object(_css_js__WEBPACK_IMPORTED_MODULE_0__[/* getFontFamilies */ "e"])(fontSpec); - if (!fontFamilies) { - return; - } - for (var i = 0, ii = fontFamilies.length; i < ii; ++i) { - var fontFamily = fontFamilies[i]; - if (!(fontFamily in checked)) { - checked[fontFamily] = retries; - if (!isAvailable(fontFamily)) { - checked[fontFamily] = 0; - if (interval === undefined) { - interval = setInterval(check, 32); - } - } - } - } - }; -})(); - - -/** - * @return {CanvasRenderingContext2D} Measure context. - */ -function getMeasureContext() { - if (!measureContext) { - measureContext = Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__[/* createCanvasContext2D */ "a"])(1, 1); - } - return measureContext; -} - - -/** - * @param {string} font Font to use for measuring. - * @return {import("../size.js").Size} Measurement. - */ -var measureTextHeight = (function() { - var span; - var heights = textHeights; - return function(font) { - var height = heights[font]; - if (height == undefined) { - if (!span) { - span = document.createElement('span'); - span.textContent = 'M'; - span.style.margin = span.style.padding = '0 !important'; - span.style.position = 'absolute !important'; - span.style.left = '-99999px !important'; - } - span.style.font = font; - document.body.appendChild(span); - height = heights[font] = span.offsetHeight; - document.body.removeChild(span); - } - return height; - }; -})(); - - -/** - * @param {string} font Font. - * @param {string} text Text. - * @return {number} Width. - */ -function measureTextWidth(font, text) { - var measureContext = getMeasureContext(); - if (font != measureContext.font) { - measureContext.font = font; - } - return measureContext.measureText(text).width; -} - - -/** - * @param {CanvasRenderingContext2D} context Context. - * @param {number} rotation Rotation. - * @param {number} offsetX X offset. - * @param {number} offsetY Y offset. - */ -function rotateAtOffset(context, rotation, offsetX, offsetY) { - if (rotation !== 0) { - context.translate(offsetX, offsetY); - context.rotate(rotation); - context.translate(-offsetX, -offsetY); - } -} - - -var resetTransform = Object(_transform_js__WEBPACK_IMPORTED_MODULE_4__[/* create */ "c"])(); - - -/** - * @param {CanvasRenderingContext2D} context Context. - * @param {import("../transform.js").Transform|null} transform Transform. - * @param {number} opacity Opacity. - * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image. - * @param {number} originX Origin X. - * @param {number} originY Origin Y. - * @param {number} w Width. - * @param {number} h Height. - * @param {number} x X. - * @param {number} y Y. - * @param {number} scale Scale. - */ -function drawImage(context, - transform, opacity, image, originX, originY, w, h, x, y, scale) { - var alpha; - if (opacity != 1) { - alpha = context.globalAlpha; - context.globalAlpha = alpha * opacity; - } - if (transform) { - context.setTransform.apply(context, transform); - } - - context.drawImage(image, originX, originY, w, h, x, y, w * scale, h * scale); - - if (alpha) { - context.globalAlpha = alpha; - } - if (transform) { - context.setTransform.apply(context, resetTransform); - } -} - -//# sourceMappingURL=canvas.js.map - -/***/ }), -/* 7 */ +/* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2436,251 +500,7 @@ function drawImage(context, //# sourceMappingURL=EventType.js.map /***/ }), -/* 8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/TileState - */ - -/** - * @enum {number} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - IDLE: 0, - LOADING: 1, - LOADED: 2, - /** - * Indicates that tile loading failed - * @type {number} - */ - ERROR: 3, - EMPTY: 4, - ABORT: 5 -}); - -//# sourceMappingURL=TileState.js.map - -/***/ }), -/* 9 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return clamp; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return cosh; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return roundUpToPowerOfTwo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return squaredSegmentDistance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return squaredDistance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return solveLinearSystem; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return toDegrees; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return toRadians; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return modulo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return lerp; }); -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); -/** - * @module ol/math - */ - - -/** - * Takes a number and clamps it to within the provided bounds. - * @param {number} value The input number. - * @param {number} min The minimum value to return. - * @param {number} max The maximum value to return. - * @return {number} The input number if it is within bounds, or the nearest - * number within the bounds. - */ -function clamp(value, min, max) { - return Math.min(Math.max(value, min), max); -} - - -/** - * Return the hyperbolic cosine of a given number. The method will use the - * native `Math.cosh` function if it is available, otherwise the hyperbolic - * cosine will be calculated via the reference implementation of the Mozilla - * developer network. - * - * @param {number} x X. - * @return {number} Hyperbolic cosine of x. - */ -var cosh = (function() { - // Wrapped in a iife, to save the overhead of checking for the native - // implementation on every invocation. - var cosh; - if ('cosh' in Math) { - // The environment supports the native Math.cosh function, use it… - cosh = Math.cosh; - } else { - // … else, use the reference implementation of MDN: - cosh = function(x) { - var y = /** @type {Math} */ (Math).exp(x); - return (y + 1 / y) / 2; - }; - } - return cosh; -}()); - - -/** - * @param {number} x X. - * @return {number} The smallest power of two greater than or equal to x. - */ -function roundUpToPowerOfTwo(x) { - Object(_asserts_js__WEBPACK_IMPORTED_MODULE_0__[/* assert */ "a"])(0 < x, 29); // `x` must be greater than `0` - return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2)); -} - - -/** - * Returns the square of the closest distance between the point (x, y) and the - * line segment (x1, y1) to (x2, y2). - * @param {number} x X. - * @param {number} y Y. - * @param {number} x1 X1. - * @param {number} y1 Y1. - * @param {number} x2 X2. - * @param {number} y2 Y2. - * @return {number} Squared distance. - */ -function squaredSegmentDistance(x, y, x1, y1, x2, y2) { - var dx = x2 - x1; - var dy = y2 - y1; - if (dx !== 0 || dy !== 0) { - var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy); - if (t > 1) { - x1 = x2; - y1 = y2; - } else if (t > 0) { - x1 += dx * t; - y1 += dy * t; - } - } - return squaredDistance(x, y, x1, y1); -} - - -/** - * Returns the square of the distance between the points (x1, y1) and (x2, y2). - * @param {number} x1 X1. - * @param {number} y1 Y1. - * @param {number} x2 X2. - * @param {number} y2 Y2. - * @return {number} Squared distance. - */ -function squaredDistance(x1, y1, x2, y2) { - var dx = x2 - x1; - var dy = y2 - y1; - return dx * dx + dy * dy; -} - - -/** - * Solves system of linear equations using Gaussian elimination method. - * - * @param {Array>} mat Augmented matrix (n x n + 1 column) - * in row-major order. - * @return {Array} The resulting vector. - */ -function solveLinearSystem(mat) { - var n = mat.length; - - for (var i = 0; i < n; i++) { - // Find max in the i-th column (ignoring i - 1 first rows) - var maxRow = i; - var maxEl = Math.abs(mat[i][i]); - for (var r = i + 1; r < n; r++) { - var absValue = Math.abs(mat[r][i]); - if (absValue > maxEl) { - maxEl = absValue; - maxRow = r; - } - } - - if (maxEl === 0) { - return null; // matrix is singular - } - - // Swap max row with i-th (current) row - var tmp = mat[maxRow]; - mat[maxRow] = mat[i]; - mat[i] = tmp; - - // Subtract the i-th row to make all the remaining rows 0 in the i-th column - for (var j = i + 1; j < n; j++) { - var coef = -mat[j][i] / mat[i][i]; - for (var k = i; k < n + 1; k++) { - if (i == k) { - mat[j][k] = 0; - } else { - mat[j][k] += coef * mat[i][k]; - } - } - } - } - - // Solve Ax=b for upper triangular matrix A (mat) - var x = new Array(n); - for (var l = n - 1; l >= 0; l--) { - x[l] = mat[l][n] / mat[l][l]; - for (var m = l - 1; m >= 0; m--) { - mat[m][n] -= mat[m][l] * x[l]; - } - } - return x; -} - - -/** - * Converts radians to to degrees. - * - * @param {number} angleInRadians Angle in radians. - * @return {number} Angle in degrees. - */ -function toDegrees(angleInRadians) { - return angleInRadians * 180 / Math.PI; -} - - -/** - * Converts degrees to radians. - * - * @param {number} angleInDegrees Angle in degrees. - * @return {number} Angle in radians. - */ -function toRadians(angleInDegrees) { - return angleInDegrees * Math.PI / 180; -} - -/** - * Returns the modulo of a / b, depending on the sign of b. - * - * @param {number} a Dividend. - * @param {number} b Divisor. - * @return {number} Modulo. - */ -function modulo(a, b) { - var r = a % b; - return r * b < 0 ? r + b : r; -} - -/** - * Calculates the linearly interpolated value of x between a and b. - * - * @param {number} a Number - * @param {number} b Number - * @param {number} x Value to be interpolated. - * @return {number} Interpolated value. - */ -function lerp(a, b, x) { - return a + x * (b - a); -} - -//# sourceMappingURL=math.js.map - -/***/ }), -/* 10 */ +/* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2766,1519 +586,7 @@ function isEmpty(object) { //# sourceMappingURL=obj.js.map /***/ }), -/* 11 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return binarySearch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return numberSafeCompareFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return includes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return linearFindNearest; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return reverseSubArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return extend; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return remove; }); -/* unused harmony export find */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return equals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return stableSort; }); -/* unused harmony export findIndex */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isSorted; }); -/** - * @module ol/array - */ - - -/** - * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1. - * https://github.com/darkskyapp/binary-search - * - * @param {Array<*>} haystack Items to search through. - * @param {*} needle The item to look for. - * @param {Function=} opt_comparator Comparator function. - * @return {number} The index of the item if found, -1 if not. - */ -function binarySearch(haystack, needle, opt_comparator) { - var mid, cmp; - var comparator = opt_comparator || numberSafeCompareFunction; - var low = 0; - var high = haystack.length; - var found = false; - - while (low < high) { - /* Note that "(low + high) >>> 1" may overflow, and results in a typecast - * to double (which gives the wrong results). */ - mid = low + (high - low >> 1); - cmp = +comparator(haystack[mid], needle); - - if (cmp < 0.0) { /* Too low. */ - low = mid + 1; - - } else { /* Key found or too high */ - high = mid; - found = !cmp; - } - } - - /* Key not found. */ - return found ? low : ~low; -} - - -/** - * Compare function for array sort that is safe for numbers. - * @param {*} a The first object to be compared. - * @param {*} b The second object to be compared. - * @return {number} A negative number, zero, or a positive number as the first - * argument is less than, equal to, or greater than the second. - */ -function numberSafeCompareFunction(a, b) { - return a > b ? 1 : a < b ? -1 : 0; -} - - -/** - * Whether the array contains the given object. - * @param {Array<*>} arr The array to test for the presence of the element. - * @param {*} obj The object for which to test. - * @return {boolean} The object is in the array. - */ -function includes(arr, obj) { - return arr.indexOf(obj) >= 0; -} - - -/** - * @param {Array} arr Array. - * @param {number} target Target. - * @param {number} direction 0 means return the nearest, > 0 - * means return the largest nearest, < 0 means return the - * smallest nearest. - * @return {number} Index. - */ -function linearFindNearest(arr, target, direction) { - var n = arr.length; - if (arr[0] <= target) { - return 0; - } else if (target <= arr[n - 1]) { - return n - 1; - } else { - var i; - if (direction > 0) { - for (i = 1; i < n; ++i) { - if (arr[i] < target) { - return i - 1; - } - } - } else if (direction < 0) { - for (i = 1; i < n; ++i) { - if (arr[i] <= target) { - return i; - } - } - } else { - for (i = 1; i < n; ++i) { - if (arr[i] == target) { - return i; - } else if (arr[i] < target) { - if (arr[i - 1] - target < target - arr[i]) { - return i - 1; - } else { - return i; - } - } - } - } - return n - 1; - } -} - - -/** - * @param {Array<*>} arr Array. - * @param {number} begin Begin index. - * @param {number} end End index. - */ -function reverseSubArray(arr, begin, end) { - while (begin < end) { - var tmp = arr[begin]; - arr[begin] = arr[end]; - arr[end] = tmp; - ++begin; - --end; - } -} - - -/** - * @param {Array} arr The array to modify. - * @param {!Array|VALUE} data The elements or arrays of elements to add to arr. - * @template VALUE - */ -function extend(arr, data) { - var extension = Array.isArray(data) ? data : [data]; - var length = extension.length; - for (var i = 0; i < length; i++) { - arr[arr.length] = extension[i]; - } -} - - -/** - * @param {Array} arr The array to modify. - * @param {VALUE} obj The element to remove. - * @template VALUE - * @return {boolean} If the element was removed. - */ -function remove(arr, obj) { - var i = arr.indexOf(obj); - var found = i > -1; - if (found) { - arr.splice(i, 1); - } - return found; -} - - -/** - * @param {Array} arr The array to search in. - * @param {function(VALUE, number, ?) : boolean} func The function to compare. - * @template VALUE - * @return {VALUE|null} The element found or null. - */ -function find(arr, func) { - var length = arr.length >>> 0; - var value; - - for (var i = 0; i < length; i++) { - value = arr[i]; - if (func(value, i, arr)) { - return value; - } - } - return null; -} - - -/** - * @param {Array|Uint8ClampedArray} arr1 The first array to compare. - * @param {Array|Uint8ClampedArray} arr2 The second array to compare. - * @return {boolean} Whether the two arrays are equal. - */ -function equals(arr1, arr2) { - var len1 = arr1.length; - if (len1 !== arr2.length) { - return false; - } - for (var i = 0; i < len1; i++) { - if (arr1[i] !== arr2[i]) { - return false; - } - } - return true; -} - - -/** - * Sort the passed array such that the relative order of equal elements is preverved. - * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details. - * @param {Array<*>} arr The array to sort (modifies original). - * @param {!function(*, *): number} compareFnc Comparison function. - * @api - */ -function stableSort(arr, compareFnc) { - var length = arr.length; - var tmp = Array(arr.length); - var i; - for (i = 0; i < length; i++) { - tmp[i] = {index: i, value: arr[i]}; - } - tmp.sort(function(a, b) { - return compareFnc(a.value, b.value) || a.index - b.index; - }); - for (i = 0; i < arr.length; i++) { - arr[i] = tmp[i].value; - } -} - - -/** - * @param {Array<*>} arr The array to search in. - * @param {Function} func Comparison function. - * @return {number} Return index. - */ -function findIndex(arr, func) { - var index; - var found = !arr.every(function(el, idx) { - index = idx; - return !func(el, idx, arr); - }); - return found ? index : -1; -} - - -/** - * @param {Array<*>} arr The array to test. - * @param {Function=} opt_func Comparison function. - * @param {boolean=} opt_strict Strictly sorted (default false). - * @return {boolean} Return index. - */ -function isSorted(arr, opt_func, opt_strict) { - var compare = opt_func || numberSafeCompareFunction; - return arr.every(function(currentVal, index) { - if (index === 0) { - return true; - } - var res = compare(arr[index - 1], currentVal); - return !(res > 0 || opt_strict && res === 0); - }); -} - -//# sourceMappingURL=array.js.map - -/***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/render/ReplayType - */ - -/** - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - CIRCLE: 'Circle', - DEFAULT: 'Default', - IMAGE: 'Image', - LINE_STRING: 'LineString', - POLYGON: 'Polygon', - TEXT: 'Text' -}); - -//# sourceMappingURL=ReplayType.js.map - -/***/ }), -/* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/ViewHint - */ - -/** - * @enum {number} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - ANIMATING: 0, - INTERACTING: 1 -}); - -//# sourceMappingURL=ViewHint.js.map - -/***/ }), -/* 14 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assert; }); -/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79); -/** - * @module ol/asserts - */ - - -/** - * @param {*} assertion Assertion we expected to be truthy. - * @param {number} errorCode Error code. - */ -function assert(assertion, errorCode) { - if (!assertion) { - throw new _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"](errorCode); - } -} - -//# sourceMappingURL=asserts.js.map - -/***/ }), -/* 15 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXTERNAL MODULE: ./node_modules/ol/sphere.js -var sphere = __webpack_require__(76); - -// EXTERNAL MODULE: ./node_modules/ol/extent.js -var ol_extent = __webpack_require__(0); - -// EXTERNAL MODULE: ./node_modules/ol/math.js -var math = __webpack_require__(9); - -// EXTERNAL MODULE: ./node_modules/ol/proj/Units.js -var Units = __webpack_require__(32); - -// CONCATENATED MODULE: ./node_modules/ol/proj/Projection.js -/** - * @module ol/proj/Projection - */ - - - -/** - * @typedef {Object} Options - * @property {string} code The SRS identifier code, e.g. `EPSG:4326`. - * @property {import("./Units.js").default|string} [units] Units. Required unless a - * proj4 projection is defined for `code`. - * @property {import("../extent.js").Extent} [extent] The validity extent for the SRS. - * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4. - * @property {boolean} [global=false] Whether the projection is valid for the whole globe. - * @property {number} [metersPerUnit] The meters per unit for the SRS. - * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT} - * lookup table. - * @property {import("../extent.js").Extent} [worldExtent] The world extent for the SRS. - * @property {function(number, import("../coordinate.js").Coordinate):number} [getPointResolution] - * Function to determine resolution at a point. The function is called with a - * `{number}` view resolution and an `{import("../coordinate.js").Coordinate}` as arguments, and returns - * the `{number}` resolution at the passed coordinate. If this is `undefined`, - * the default {@link module:ol/proj#getPointResolution} function will be used. - */ - - -/** - * @classdesc - * Projection definition class. One of these is created for each projection - * supported in the application and stored in the {@link module:ol/proj} namespace. - * You can use these in applications, but this is not required, as API params - * and options use {@link module:ol/proj~ProjectionLike} which means the simple string - * code will suffice. - * - * You can use {@link module:ol/proj~get} to retrieve the object for a particular - * projection. - * - * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together - * with the following aliases: - * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, - * urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84, - * http://www.opengis.net/gml/srs/epsg.xml#4326, - * urn:x-ogc:def:crs:EPSG:4326 - * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913, - * urn:ogc:def:crs:EPSG:6.18:3:3857, - * http://www.opengis.net/gml/srs/epsg.xml#3857 - * - * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can - * be added using `proj4.defs()`. After all required projection definitions are - * added, call the {@link module:ol/proj/proj4~register} function. - * - * @api - */ -var Projection_Projection = function Projection(options) { - /** - * @private - * @type {string} - */ - this.code_ = options.code; - - /** - * Units of projected coordinates. When set to `TILE_PIXELS`, a - * `this.extent_` and `this.worldExtent_` must be configured properly for each - * tile. - * @private - * @type {import("./Units.js").default} - */ - this.units_ = /** @type {import("./Units.js").default} */ (options.units); - - /** - * Validity extent of the projection in projected coordinates. For projections - * with `TILE_PIXELS` units, this is the extent of the tile in - * tile pixel space. - * @private - * @type {import("../extent.js").Extent} - */ - this.extent_ = options.extent !== undefined ? options.extent : null; - - /** - * Extent of the world in EPSG:4326. For projections with - * `TILE_PIXELS` units, this is the extent of the tile in - * projected coordinate space. - * @private - * @type {import("../extent.js").Extent} - */ - this.worldExtent_ = options.worldExtent !== undefined ? - options.worldExtent : null; - - /** - * @private - * @type {string} - */ - this.axisOrientation_ = options.axisOrientation !== undefined ? - options.axisOrientation : 'enu'; - - /** - * @private - * @type {boolean} - */ - this.global_ = options.global !== undefined ? options.global : false; - - /** - * @private - * @type {boolean} - */ - this.canWrapX_ = !!(this.global_ && this.extent_); - - /** - * @private - * @type {function(number, import("../coordinate.js").Coordinate):number|undefined} - */ - this.getPointResolutionFunc_ = options.getPointResolution; - - /** - * @private - * @type {import("../tilegrid/TileGrid.js").default} - */ - this.defaultTileGrid_ = null; - - /** - * @private - * @type {number|undefined} - */ - this.metersPerUnit_ = options.metersPerUnit; -}; - -/** - * @return {boolean} The projection is suitable for wrapping the x-axis - */ -Projection_Projection.prototype.canWrapX = function canWrapX () { - return this.canWrapX_; -}; - -/** - * Get the code for this projection, e.g. 'EPSG:4326'. - * @return {string} Code. - * @api - */ -Projection_Projection.prototype.getCode = function getCode () { - return this.code_; -}; - -/** - * Get the validity extent for this projection. - * @return {import("../extent.js").Extent} Extent. - * @api - */ -Projection_Projection.prototype.getExtent = function getExtent () { - return this.extent_; -}; - -/** - * Get the units of this projection. - * @return {import("./Units.js").default} Units. - * @api - */ -Projection_Projection.prototype.getUnits = function getUnits () { - return this.units_; -}; - -/** - * Get the amount of meters per unit of this projection.If the projection is - * not configured with `metersPerUnit` or a units identifier, the return is - * `undefined`. - * @return {number|undefined} Meters. - * @api - */ -Projection_Projection.prototype.getMetersPerUnit = function getMetersPerUnit () { - return this.metersPerUnit_ || Units["a" /* METERS_PER_UNIT */][this.units_]; -}; - -/** - * Get the world extent for this projection. - * @return {import("../extent.js").Extent} Extent. - * @api - */ -Projection_Projection.prototype.getWorldExtent = function getWorldExtent () { - return this.worldExtent_; -}; - -/** - * Get the axis orientation of this projection. - * Example values are: - * enu - the default easting, northing, elevation. - * neu - northing, easting, up - useful for "lat/long" geographic coordinates, - * or south orientated transverse mercator. - * wnu - westing, northing, up - some planetary coordinate systems have - * "west positive" coordinate systems - * @return {string} Axis orientation. - * @api - */ -Projection_Projection.prototype.getAxisOrientation = function getAxisOrientation () { - return this.axisOrientation_; -}; - -/** - * Is this projection a global projection which spans the whole world? - * @return {boolean} Whether the projection is global. - * @api - */ -Projection_Projection.prototype.isGlobal = function isGlobal () { - return this.global_; -}; - -/** - * Set if the projection is a global projection which spans the whole world - * @param {boolean} global Whether the projection is global. - * @api - */ -Projection_Projection.prototype.setGlobal = function setGlobal (global) { - this.global_ = global; - this.canWrapX_ = !!(global && this.extent_); -}; - -/** - * @return {import("../tilegrid/TileGrid.js").default} The default tile grid. - */ -Projection_Projection.prototype.getDefaultTileGrid = function getDefaultTileGrid () { - return this.defaultTileGrid_; -}; - -/** - * @param {import("../tilegrid/TileGrid.js").default} tileGrid The default tile grid. - */ -Projection_Projection.prototype.setDefaultTileGrid = function setDefaultTileGrid (tileGrid) { - this.defaultTileGrid_ = tileGrid; -}; - -/** - * Set the validity extent for this projection. - * @param {import("../extent.js").Extent} extent Extent. - * @api - */ -Projection_Projection.prototype.setExtent = function setExtent (extent) { - this.extent_ = extent; - this.canWrapX_ = !!(this.global_ && extent); -}; - -/** - * Set the world extent for this projection. - * @param {import("../extent.js").Extent} worldExtent World extent - * [minlon, minlat, maxlon, maxlat]. - * @api - */ -Projection_Projection.prototype.setWorldExtent = function setWorldExtent (worldExtent) { - this.worldExtent_ = worldExtent; -}; - -/** - * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution} - * for this projection. - * @param {function(number, import("../coordinate.js").Coordinate):number} func Function - * @api - */ -Projection_Projection.prototype.setGetPointResolution = function setGetPointResolution (func) { - this.getPointResolutionFunc_ = func; -}; - -/** - * Get the custom point resolution function for this projection (if set). - * @return {function(number, import("../coordinate.js").Coordinate):number|undefined} The custom point - * resolution function (if set). - */ -Projection_Projection.prototype.getPointResolutionFunc = function getPointResolutionFunc () { - return this.getPointResolutionFunc_; -}; - -/* harmony default export */ var proj_Projection = (Projection_Projection); - -//# sourceMappingURL=Projection.js.map -// CONCATENATED MODULE: ./node_modules/ol/proj/epsg3857.js -/** - * @module ol/proj/epsg3857 - */ - - - - - -/** - * Radius of WGS84 sphere - * - * @const - * @type {number} - */ -var RADIUS = 6378137; - - -/** - * @const - * @type {number} - */ -var HALF_SIZE = Math.PI * RADIUS; - - -/** - * @const - * @type {import("../extent.js").Extent} - */ -var EXTENT = [ - -HALF_SIZE, -HALF_SIZE, - HALF_SIZE, HALF_SIZE -]; - - -/** - * @const - * @type {import("../extent.js").Extent} - */ -var WORLD_EXTENT = [-180, -85, 180, 85]; - - -/** - * @classdesc - * Projection object for web/spherical Mercator (EPSG:3857). - */ -var epsg3857_EPSG3857Projection = /*@__PURE__*/(function (Projection) { - function EPSG3857Projection(code) { - Projection.call(this, { - code: code, - units: Units["b" /* default */].METERS, - extent: EXTENT, - global: true, - worldExtent: WORLD_EXTENT, - getPointResolution: function(resolution, point) { - return resolution / Object(math["b" /* cosh */])(point[1] / RADIUS); - } - }); - - } - - if ( Projection ) EPSG3857Projection.__proto__ = Projection; - EPSG3857Projection.prototype = Object.create( Projection && Projection.prototype ); - EPSG3857Projection.prototype.constructor = EPSG3857Projection; - - return EPSG3857Projection; -}(proj_Projection)); - - -/** - * Projections equal to EPSG:3857. - * - * @const - * @type {Array} - */ -var PROJECTIONS = [ - new epsg3857_EPSG3857Projection('EPSG:3857'), - new epsg3857_EPSG3857Projection('EPSG:102100'), - new epsg3857_EPSG3857Projection('EPSG:102113'), - new epsg3857_EPSG3857Projection('EPSG:900913'), - new epsg3857_EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'), - new epsg3857_EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'), - new epsg3857_EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857') -]; - - -/** - * Transformation from EPSG:4326 to EPSG:3857. - * - * @param {Array} input Input array of coordinate values. - * @param {Array=} opt_output Output array of coordinate values. - * @param {number=} opt_dimension Dimension (default is `2`). - * @return {Array} Output array of coordinate values. - */ -function fromEPSG4326(input, opt_output, opt_dimension) { - var length = input.length; - var dimension = opt_dimension > 1 ? opt_dimension : 2; - var output = opt_output; - if (output === undefined) { - if (dimension > 2) { - // preserve values beyond second dimension - output = input.slice(); - } else { - output = new Array(length); - } - } - var halfSize = HALF_SIZE; - for (var i = 0; i < length; i += dimension) { - output[i] = halfSize * input[i] / 180; - var y = RADIUS * - Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360)); - if (y > halfSize) { - y = halfSize; - } else if (y < -halfSize) { - y = -halfSize; - } - output[i + 1] = y; - } - return output; -} - - -/** - * Transformation from EPSG:3857 to EPSG:4326. - * - * @param {Array} input Input array of coordinate values. - * @param {Array=} opt_output Output array of coordinate values. - * @param {number=} opt_dimension Dimension (default is `2`). - * @return {Array} Output array of coordinate values. - */ -function epsg3857_toEPSG4326(input, opt_output, opt_dimension) { - var length = input.length; - var dimension = opt_dimension > 1 ? opt_dimension : 2; - var output = opt_output; - if (output === undefined) { - if (dimension > 2) { - // preserve values beyond second dimension - output = input.slice(); - } else { - output = new Array(length); - } - } - for (var i = 0; i < length; i += dimension) { - output[i] = 180 * input[i] / HALF_SIZE; - output[i + 1] = 360 * Math.atan( - Math.exp(input[i + 1] / RADIUS)) / Math.PI - 90; - } - return output; -} - -//# sourceMappingURL=epsg3857.js.map -// CONCATENATED MODULE: ./node_modules/ol/proj/epsg4326.js -/** - * @module ol/proj/epsg4326 - */ - - - - -/** - * Semi-major radius of the WGS84 ellipsoid. - * - * @const - * @type {number} - */ -var epsg4326_RADIUS = 6378137; - - -/** - * Extent of the EPSG:4326 projection which is the whole world. - * - * @const - * @type {import("../extent.js").Extent} - */ -var epsg4326_EXTENT = [-180, -90, 180, 90]; - - -/** - * @const - * @type {number} - */ -var METERS_PER_UNIT = Math.PI * epsg4326_RADIUS / 180; - - -/** - * @classdesc - * Projection object for WGS84 geographic coordinates (EPSG:4326). - * - * Note that OpenLayers does not strictly comply with the EPSG definition. - * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x). - * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates. - */ -var epsg4326_EPSG4326Projection = /*@__PURE__*/(function (Projection) { - function EPSG4326Projection(code, opt_axisOrientation) { - Projection.call(this, { - code: code, - units: Units["b" /* default */].DEGREES, - extent: epsg4326_EXTENT, - axisOrientation: opt_axisOrientation, - global: true, - metersPerUnit: METERS_PER_UNIT, - worldExtent: epsg4326_EXTENT - }); - - } - - if ( Projection ) EPSG4326Projection.__proto__ = Projection; - EPSG4326Projection.prototype = Object.create( Projection && Projection.prototype ); - EPSG4326Projection.prototype.constructor = EPSG4326Projection; - - return EPSG4326Projection; -}(proj_Projection)); - - -/** - * Projections equal to EPSG:4326. - * - * @const - * @type {Array} - */ -var epsg4326_PROJECTIONS = [ - new epsg4326_EPSG4326Projection('CRS:84'), - new epsg4326_EPSG4326Projection('EPSG:4326', 'neu'), - new epsg4326_EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'), - new epsg4326_EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'), - new epsg4326_EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'), - new epsg4326_EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'), - new epsg4326_EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'), - new epsg4326_EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu') -]; - -//# sourceMappingURL=epsg4326.js.map -// CONCATENATED MODULE: ./node_modules/ol/proj/projections.js -/** - * @module ol/proj/projections - */ - - -/** - * @type {Object} - */ -var cache = {}; - - -/** - * Clear the projections cache. - */ -function clear() { - cache = {}; -} - - -/** - * Get a cached projection by code. - * @param {string} code The code for the projection. - * @return {import("./Projection.js").default} The projection (if cached). - */ -function get(code) { - return cache[code] || null; -} - - -/** - * Add a projection to the cache. - * @param {string} code The projection code. - * @param {import("./Projection.js").default} projection The projection to cache. - */ -function add(code, projection) { - cache[code] = projection; -} - -//# sourceMappingURL=projections.js.map -// EXTERNAL MODULE: ./node_modules/ol/obj.js -var obj = __webpack_require__(10); - -// CONCATENATED MODULE: ./node_modules/ol/proj/transforms.js -/** - * @module ol/proj/transforms - */ - - - -/** - * @private - * @type {!Object>} - */ -var transforms = {}; - - -/** - * Clear the transform cache. - */ -function transforms_clear() { - transforms = {}; -} - - -/** - * Registers a conversion function to convert coordinates from the source - * projection to the destination projection. - * - * @param {import("./Projection.js").default} source Source. - * @param {import("./Projection.js").default} destination Destination. - * @param {import("../proj.js").TransformFunction} transformFn Transform. - */ -function transforms_add(source, destination, transformFn) { - var sourceCode = source.getCode(); - var destinationCode = destination.getCode(); - if (!(sourceCode in transforms)) { - transforms[sourceCode] = {}; - } - transforms[sourceCode][destinationCode] = transformFn; -} - - -/** - * Unregisters the conversion function to convert coordinates from the source - * projection to the destination projection. This method is used to clean up - * cached transforms during testing. - * - * @param {import("./Projection.js").default} source Source projection. - * @param {import("./Projection.js").default} destination Destination projection. - * @return {import("../proj.js").TransformFunction} transformFn The unregistered transform. - */ -function remove(source, destination) { - var sourceCode = source.getCode(); - var destinationCode = destination.getCode(); - var transform = transforms[sourceCode][destinationCode]; - delete transforms[sourceCode][destinationCode]; - if (Object(obj["d" /* isEmpty */])(transforms[sourceCode])) { - delete transforms[sourceCode]; - } - return transform; -} - - -/** - * Get a transform given a source code and a destination code. - * @param {string} sourceCode The code for the source projection. - * @param {string} destinationCode The code for the destination projection. - * @return {import("../proj.js").TransformFunction|undefined} The transform function (if found). - */ -function transforms_get(sourceCode, destinationCode) { - var transform; - if (sourceCode in transforms && destinationCode in transforms[sourceCode]) { - transform = transforms[sourceCode][destinationCode]; - } - return transform; -} - -//# sourceMappingURL=transforms.js.map -// CONCATENATED MODULE: ./node_modules/ol/proj.js -/* unused harmony export cloneTransform */ -/* unused harmony export identityTransform */ -/* unused harmony export addProjection */ -/* unused harmony export addProjections */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return proj_get; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getPointResolution; }); -/* unused harmony export addEquivalentProjections */ -/* unused harmony export addEquivalentTransforms */ -/* unused harmony export clearAllProjections */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createProjection; }); -/* unused harmony export createTransformFromCoordinateTransform */ -/* unused harmony export addCoordinateTransforms */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fromLonLat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return toLonLat; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return equivalent; }); -/* unused harmony export getTransformFromProjections */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getTransform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return proj_transform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return transformExtent; }); -/* unused harmony export transformWithProjections */ -/* unused harmony export addCommon */ -/* concated harmony reexport METERS_PER_UNIT */__webpack_require__.d(__webpack_exports__, "a", function() { return Units["a" /* METERS_PER_UNIT */]; }); -/* unused concated harmony import Projection */ -/** - * @module ol/proj - */ - -/** - * The ol/proj module stores: - * * a list of {@link module:ol/proj/Projection} - * objects, one for each projection supported by the application - * * a list of transform functions needed to convert coordinates in one projection - * into another. - * - * The static functions are the methods used to maintain these. - * Each transform function can handle not only simple coordinate pairs, but also - * large arrays of coordinates such as vector geometries. - * - * When loaded, the library adds projection objects for EPSG:4326 (WGS84 - * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used - * for example by Bing Maps or OpenStreetMap), together with the relevant - * transform functions. - * - * Additional transforms may be added by using the http://proj4js.org/ - * library (version 2.2 or later). You can use the full build supplied by - * Proj4js, or create a custom build to support those projections you need; see - * the Proj4js website for how to do this. You also need the Proj4js definitions - * for the required projections. These definitions can be obtained from - * https://epsg.io/, and are a JS function, so can be loaded in a script - * tag (as in the examples) or pasted into your application. - * - * After all required projection definitions are added to proj4's registry (by - * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4` - * package. Existing transforms are not changed by this function. See - * examples/wms-image-custom-proj for an example of this. - * - * Additional projection definitions can be registered with `proj4.defs()` any - * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't - * know in advance what projections are needed, you can initially load minimal - * support and then load whichever are requested. - * - * Note that Proj4js does not support projection extents. If you want to add - * one for creating default tile grids, you can add it after the Projection - * object has been created with `setExtent`, for example, - * `get('EPSG:1234').setExtent(extent)`. - * - * In addition to Proj4js support, any transform functions can be added with - * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create - * a {@link module:ol/proj/Projection} object for the new projection and add it with - * {@link module:ol/proj~addProjection}. You can then add the forward and inverse - * functions with {@link module:ol/proj~addCoordinateTransforms}. See - * examples/wms-custom-proj for an example of this. - * - * Note that if no transforms are needed and you only need to define the - * projection, just add a {@link module:ol/proj/Projection} with - * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of - * this. - */ - - - - - - - - - - - -/** - * A projection as {@link module:ol/proj/Projection}, SRS identifier - * string or undefined. - * @typedef {Projection|string|undefined} ProjectionLike - * @api - */ - - -/** - * A transform function accepts an array of input coordinate values, an optional - * output array, and an optional dimension (default should be 2). The function - * transforms the input coordinate values, populates the output array, and - * returns the output array. - * - * @typedef {function(Array, Array=, number=): Array} TransformFunction - * @api - */ - - - - - - -/** - * @param {Array} input Input coordinate array. - * @param {Array=} opt_output Output array of coordinate values. - * @param {number=} opt_dimension Dimension. - * @return {Array} Output coordinate array (new array, same coordinate - * values). - */ -function cloneTransform(input, opt_output, opt_dimension) { - var output; - if (opt_output !== undefined) { - for (var i = 0, ii = input.length; i < ii; ++i) { - opt_output[i] = input[i]; - } - output = opt_output; - } else { - output = input.slice(); - } - return output; -} - - -/** - * @param {Array} input Input coordinate array. - * @param {Array=} opt_output Output array of coordinate values. - * @param {number=} opt_dimension Dimension. - * @return {Array} Input coordinate array (same array as input). - */ -function identityTransform(input, opt_output, opt_dimension) { - if (opt_output !== undefined && input !== opt_output) { - for (var i = 0, ii = input.length; i < ii; ++i) { - opt_output[i] = input[i]; - } - input = opt_output; - } - return input; -} - - -/** - * Add a Projection object to the list of supported projections that can be - * looked up by their code. - * - * @param {Projection} projection Projection instance. - * @api - */ -function addProjection(projection) { - add(projection.getCode(), projection); - transforms_add(projection, projection, cloneTransform); -} - - -/** - * @param {Array} projections Projections. - */ -function addProjections(projections) { - projections.forEach(addProjection); -} - - -/** - * Fetches a Projection object for the code specified. - * - * @param {ProjectionLike} projectionLike Either a code string which is - * a combination of authority and identifier such as "EPSG:4326", or an - * existing projection object, or undefined. - * @return {Projection} Projection object, or null if not in list. - * @api - */ -function proj_get(projectionLike) { - return typeof projectionLike === 'string' ? - get(/** @type {string} */ (projectionLike)) : - (/** @type {Projection} */ (projectionLike) || null); -} - - -/** - * Get the resolution of the point in degrees or distance units. - * For projections with degrees as the unit this will simply return the - * provided resolution. For other projections the point resolution is - * by default estimated by transforming the 'point' pixel to EPSG:4326, - * measuring its width and height on the normal sphere, - * and taking the average of the width and height. - * A custom function can be provided for a specific projection, either - * by setting the `getPointResolution` option in the - * {@link module:ol/proj/Projection~Projection} constructor or by using - * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing - * projection object. - * @param {ProjectionLike} projection The projection. - * @param {number} resolution Nominal resolution in projection units. - * @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at. - * @param {Units=} opt_units Units to get the point resolution in. - * Default is the projection's units. - * @return {number} Point resolution. - * @api - */ -function getPointResolution(projection, resolution, point, opt_units) { - projection = proj_get(projection); - var pointResolution; - var getter = projection.getPointResolutionFunc(); - if (getter) { - pointResolution = getter(resolution, point); - } else { - var units = projection.getUnits(); - if (units == Units["b" /* default */].DEGREES && !opt_units || opt_units == Units["b" /* default */].DEGREES) { - pointResolution = resolution; - } else { - // Estimate point resolution by transforming the center pixel to EPSG:4326, - // measuring its width and height on the normal sphere, and taking the - // average of the width and height. - var toEPSG4326 = getTransformFromProjections(projection, proj_get('EPSG:4326')); - var vertices = [ - point[0] - resolution / 2, point[1], - point[0] + resolution / 2, point[1], - point[0], point[1] - resolution / 2, - point[0], point[1] + resolution / 2 - ]; - vertices = toEPSG4326(vertices, vertices, 2); - var width = Object(sphere["a" /* getDistance */])(vertices.slice(0, 2), vertices.slice(2, 4)); - var height = Object(sphere["a" /* getDistance */])(vertices.slice(4, 6), vertices.slice(6, 8)); - pointResolution = (width + height) / 2; - var metersPerUnit = opt_units ? - Units["a" /* METERS_PER_UNIT */][opt_units] : - projection.getMetersPerUnit(); - if (metersPerUnit !== undefined) { - pointResolution /= metersPerUnit; - } - } - } - return pointResolution; -} - - -/** - * Registers transformation functions that don't alter coordinates. Those allow - * to transform between projections with equal meaning. - * - * @param {Array} projections Projections. - * @api - */ -function addEquivalentProjections(projections) { - addProjections(projections); - projections.forEach(function(source) { - projections.forEach(function(destination) { - if (source !== destination) { - transforms_add(source, destination, cloneTransform); - } - }); - }); -} - - -/** - * Registers transformation functions to convert coordinates in any projection - * in projection1 to any projection in projection2. - * - * @param {Array} projections1 Projections with equal - * meaning. - * @param {Array} projections2 Projections with equal - * meaning. - * @param {TransformFunction} forwardTransform Transformation from any - * projection in projection1 to any projection in projection2. - * @param {TransformFunction} inverseTransform Transform from any projection - * in projection2 to any projection in projection1.. - */ -function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) { - projections1.forEach(function(projection1) { - projections2.forEach(function(projection2) { - transforms_add(projection1, projection2, forwardTransform); - transforms_add(projection2, projection1, inverseTransform); - }); - }); -} - - -/** - * Clear all cached projections and transforms. - */ -function clearAllProjections() { - clear(); - transforms_clear(); -} - - -/** - * @param {Projection|string|undefined} projection Projection. - * @param {string} defaultCode Default code. - * @return {Projection} Projection. - */ -function createProjection(projection, defaultCode) { - if (!projection) { - return proj_get(defaultCode); - } else if (typeof projection === 'string') { - return proj_get(projection); - } else { - return ( - /** @type {Projection} */ (projection) - ); - } -} - - -/** - * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform - * function. - * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} coordTransform Coordinate - * transform. - * @return {TransformFunction} Transform function. - */ -function createTransformFromCoordinateTransform(coordTransform) { - return ( - /** - * @param {Array} input Input. - * @param {Array=} opt_output Output. - * @param {number=} opt_dimension Dimension. - * @return {Array} Output. - */ - function(input, opt_output, opt_dimension) { - var length = input.length; - var dimension = opt_dimension !== undefined ? opt_dimension : 2; - var output = opt_output !== undefined ? opt_output : new Array(length); - for (var i = 0; i < length; i += dimension) { - var point = coordTransform([input[i], input[i + 1]]); - output[i] = point[0]; - output[i + 1] = point[1]; - for (var j = dimension - 1; j >= 2; --j) { - output[i + j] = input[i + j]; - } - } - return output; - }); -} - - -/** - * Registers coordinate transform functions to convert coordinates between the - * source projection and the destination projection. - * The forward and inverse functions convert coordinate pairs; this function - * converts these into the functions used internally which also handle - * extents and coordinate arrays. - * - * @param {ProjectionLike} source Source projection. - * @param {ProjectionLike} destination Destination projection. - * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} forward The forward transform - * function (that is, from the source projection to the destination - * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns - * the transformed {@link module:ol/coordinate~Coordinate}. - * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} inverse The inverse transform - * function (that is, from the destination projection to the source - * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns - * the transformed {@link module:ol/coordinate~Coordinate}. - * @api - */ -function addCoordinateTransforms(source, destination, forward, inverse) { - var sourceProj = proj_get(source); - var destProj = proj_get(destination); - transforms_add(sourceProj, destProj, createTransformFromCoordinateTransform(forward)); - transforms_add(destProj, sourceProj, createTransformFromCoordinateTransform(inverse)); -} - - -/** - * Transforms a coordinate from longitude/latitude to a different projection. - * @param {import("./coordinate.js").Coordinate} coordinate Coordinate as longitude and latitude, i.e. - * an array with longitude as 1st and latitude as 2nd element. - * @param {ProjectionLike=} opt_projection Target projection. The - * default is Web Mercator, i.e. 'EPSG:3857'. - * @return {import("./coordinate.js").Coordinate} Coordinate projected to the target projection. - * @api - */ -function fromLonLat(coordinate, opt_projection) { - return proj_transform(coordinate, 'EPSG:4326', - opt_projection !== undefined ? opt_projection : 'EPSG:3857'); -} - - -/** - * Transforms a coordinate to longitude/latitude. - * @param {import("./coordinate.js").Coordinate} coordinate Projected coordinate. - * @param {ProjectionLike=} opt_projection Projection of the coordinate. - * The default is Web Mercator, i.e. 'EPSG:3857'. - * @return {import("./coordinate.js").Coordinate} Coordinate as longitude and latitude, i.e. an array - * with longitude as 1st and latitude as 2nd element. - * @api - */ -function toLonLat(coordinate, opt_projection) { - var lonLat = proj_transform(coordinate, - opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326'); - var lon = lonLat[0]; - if (lon < -180 || lon > 180) { - lonLat[0] = Object(math["d" /* modulo */])(lon + 180, 360) - 180; - } - return lonLat; -} - - -/** - * Checks if two projections are the same, that is every coordinate in one - * projection does represent the same geographic point as the same coordinate in - * the other projection. - * - * @param {Projection} projection1 Projection 1. - * @param {Projection} projection2 Projection 2. - * @return {boolean} Equivalent. - * @api - */ -function equivalent(projection1, projection2) { - if (projection1 === projection2) { - return true; - } - var equalUnits = projection1.getUnits() === projection2.getUnits(); - if (projection1.getCode() === projection2.getCode()) { - return equalUnits; - } else { - var transformFunc = getTransformFromProjections(projection1, projection2); - return transformFunc === cloneTransform && equalUnits; - } -} - - -/** - * Searches in the list of transform functions for the function for converting - * coordinates from the source projection to the destination projection. - * - * @param {Projection} sourceProjection Source Projection object. - * @param {Projection} destinationProjection Destination Projection - * object. - * @return {TransformFunction} Transform function. - */ -function getTransformFromProjections(sourceProjection, destinationProjection) { - var sourceCode = sourceProjection.getCode(); - var destinationCode = destinationProjection.getCode(); - var transformFunc = transforms_get(sourceCode, destinationCode); - if (!transformFunc) { - transformFunc = identityTransform; - } - return transformFunc; -} - - -/** - * Given the projection-like objects, searches for a transformation - * function to convert a coordinates array from the source projection to the - * destination projection. - * - * @param {ProjectionLike} source Source. - * @param {ProjectionLike} destination Destination. - * @return {TransformFunction} Transform function. - * @api - */ -function getTransform(source, destination) { - var sourceProjection = proj_get(source); - var destinationProjection = proj_get(destination); - return getTransformFromProjections(sourceProjection, destinationProjection); -} - - -/** - * Transforms a coordinate from source projection to destination projection. - * This returns a new coordinate (and does not modify the original). - * - * See {@link module:ol/proj~transformExtent} for extent transformation. - * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its - * subclasses for geometry transforms. - * - * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. - * @param {ProjectionLike} source Source projection-like. - * @param {ProjectionLike} destination Destination projection-like. - * @return {import("./coordinate.js").Coordinate} Coordinate. - * @api - */ -function proj_transform(coordinate, source, destination) { - var transformFunc = getTransform(source, destination); - return transformFunc(coordinate, undefined, coordinate.length); -} - - -/** - * Transforms an extent from source projection to destination projection. This - * returns a new extent (and does not modify the original). - * - * @param {import("./extent.js").Extent} extent The extent to transform. - * @param {ProjectionLike} source Source projection-like. - * @param {ProjectionLike} destination Destination projection-like. - * @return {import("./extent.js").Extent} The transformed extent. - * @api - */ -function transformExtent(extent, source, destination) { - var transformFunc = getTransform(source, destination); - return Object(ol_extent["a" /* applyTransform */])(extent, transformFunc); -} - - -/** - * Transforms the given point to the destination projection. - * - * @param {import("./coordinate.js").Coordinate} point Point. - * @param {Projection} sourceProjection Source projection. - * @param {Projection} destinationProjection Destination projection. - * @return {import("./coordinate.js").Coordinate} Point. - */ -function transformWithProjections(point, sourceProjection, destinationProjection) { - var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection); - return transformFunc(point); -} - -/** - * Add transforms to and from EPSG:4326 and EPSG:3857. This function is called - * by when this module is executed and should only need to be called again after - * `clearAllProjections()` is called (e.g. in tests). - */ -function addCommon() { - // Add transformations that don't alter coordinates to convert within set of - // projections with equal meaning. - addEquivalentProjections(PROJECTIONS); - addEquivalentProjections(epsg4326_PROJECTIONS); - // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like - // coordinates and back. - addEquivalentTransforms(epsg4326_PROJECTIONS, PROJECTIONS, fromEPSG4326, epsg3857_toEPSG4326); -} - -addCommon(); - -//# sourceMappingURL=proj.js.map - -/***/ }), -/* 16 */ +/* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4373,7 +681,7 @@ function removeChildren(node) { //# sourceMappingURL=dom.js.map /***/ }), -/* 17 */ +/* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4410,192 +718,17 @@ function VOID() {} //# sourceMappingURL=functions.js.map /***/ }), -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); -/** - * @module ol/MapBrowserEventType - */ - - -/** - * Constants for event names. - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - - /** - * A true single click with no dragging and no double click. Note that this - * event is delayed by 250 ms to ensure that it is not a double click. - * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick - * @api - */ - SINGLECLICK: 'singleclick', - - /** - * A click with no dragging. A double click will fire two of this. - * @event module:ol/MapBrowserEvent~MapBrowserEvent#click - * @api - */ - CLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].CLICK, - - /** - * A true double click, with no dragging. - * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick - * @api - */ - DBLCLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].DBLCLICK, - - /** - * Triggered when a pointer is dragged. - * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag - * @api - */ - POINTERDRAG: 'pointerdrag', - - /** - * Triggered when a pointer is moved. Note that on touch devices this is - * triggered when the map is panned, so is not the same as mousemove. - * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove - * @api - */ - POINTERMOVE: 'pointermove', - - POINTERDOWN: 'pointerdown', - POINTERUP: 'pointerup', - POINTEROVER: 'pointerover', - POINTEROUT: 'pointerout', - POINTERENTER: 'pointerenter', - POINTERLEAVE: 'pointerleave', - POINTERCANCEL: 'pointercancel' -}); - -//# sourceMappingURL=MapBrowserEventType.js.map - -/***/ }), -/* 19 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return FIREFOX; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return SAFARI; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return WEBKIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return MAC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DEVICE_PIXEL_RATIO; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CANVAS_LINE_DASH; }); -/* unused harmony export GEOLOCATION */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return TOUCH; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return POINTER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return MSPOINTER; }); -/** - * @module ol/has - */ - -var ua = typeof navigator !== 'undefined' ? - navigator.userAgent.toLowerCase() : ''; - -/** - * User agent string says we are dealing with Firefox as browser. - * @type {boolean} - */ -var FIREFOX = ua.indexOf('firefox') !== -1; - -/** - * User agent string says we are dealing with Safari as browser. - * @type {boolean} - */ -var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1; - -/** - * User agent string says we are dealing with a WebKit engine. - * @type {boolean} - */ -var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1; - -/** - * User agent string says we are dealing with a Mac as platform. - * @type {boolean} - */ -var MAC = ua.indexOf('macintosh') !== -1; - - -/** - * The ratio between physical pixels and device-independent pixels - * (dips) on the device (`window.devicePixelRatio`). - * @const - * @type {number} - * @api - */ -var DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1; - - -/** - * True if the browser's Canvas implementation implements {get,set}LineDash. - * @type {boolean} - */ -var CANVAS_LINE_DASH = function() { - var has = false; - try { - has = !!document.createElement('canvas').getContext('2d').setLineDash; - } catch (e) { - // pass - } - return has; -}(); - - -/** - * Is HTML5 geolocation supported in the current browser? - * @const - * @type {boolean} - * @api - */ -var GEOLOCATION = 'geolocation' in navigator; - - -/** - * True if browser supports touch events. - * @const - * @type {boolean} - * @api - */ -var TOUCH = 'ontouchstart' in window; - - -/** - * True if browser supports pointer events. - * @const - * @type {boolean} - */ -var POINTER = 'PointerEvent' in window; - - -/** - * True if browser supports ms pointer events (IE 10). - * @const - * @type {boolean} - */ -var MSPOINTER = !!(navigator.msPointerEnabled); - - - - -//# sourceMappingURL=has.js.map - -/***/ }), -/* 20 */ +/* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export ObjectEvent */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getChangeEventType; }); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49); -/* harmony import */ var _Observable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74); -/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); +/* harmony import */ var _Observable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3); /** * @module ol/Object */ @@ -4825,355 +958,7 @@ function getChangeEventType(key) { //# sourceMappingURL=Object.js.map /***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return transform2D; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return translate; }); -/** - * @module ol/geom/flat/transform - */ - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {import("../../transform.js").Transform} transform Transform. - * @param {Array=} opt_dest Destination. - * @return {Array} Transformed coordinates. - */ -function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) { - var dest = opt_dest ? opt_dest : []; - var i = 0; - for (var j = offset; j < end; j += stride) { - var x = flatCoordinates[j]; - var y = flatCoordinates[j + 1]; - dest[i++] = transform[0] * x + transform[2] * y + transform[4]; - dest[i++] = transform[1] * x + transform[3] * y + transform[5]; - } - if (opt_dest && dest.length != i) { - dest.length = i; - } - return dest; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {number} angle Angle. - * @param {Array} anchor Rotation anchor point. - * @param {Array=} opt_dest Destination. - * @return {Array} Transformed coordinates. - */ -function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) { - var dest = opt_dest ? opt_dest : []; - var cos = Math.cos(angle); - var sin = Math.sin(angle); - var anchorX = anchor[0]; - var anchorY = anchor[1]; - var i = 0; - for (var j = offset; j < end; j += stride) { - var deltaX = flatCoordinates[j] - anchorX; - var deltaY = flatCoordinates[j + 1] - anchorY; - dest[i++] = anchorX + deltaX * cos - deltaY * sin; - dest[i++] = anchorY + deltaX * sin + deltaY * cos; - for (var k = j + 2; k < j + stride; ++k) { - dest[i++] = flatCoordinates[k]; - } - } - if (opt_dest && dest.length != i) { - dest.length = i; - } - return dest; -} - - -/** - * Scale the coordinates. - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {number} sx Scale factor in the x-direction. - * @param {number} sy Scale factor in the y-direction. - * @param {Array} anchor Scale anchor point. - * @param {Array=} opt_dest Destination. - * @return {Array} Transformed coordinates. - */ -function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) { - var dest = opt_dest ? opt_dest : []; - var anchorX = anchor[0]; - var anchorY = anchor[1]; - var i = 0; - for (var j = offset; j < end; j += stride) { - var deltaX = flatCoordinates[j] - anchorX; - var deltaY = flatCoordinates[j + 1] - anchorY; - dest[i++] = anchorX + sx * deltaX; - dest[i++] = anchorY + sy * deltaY; - for (var k = j + 2; k < j + stride; ++k) { - dest[i++] = flatCoordinates[k]; - } - } - if (opt_dest && dest.length != i) { - dest.length = i; - } - return dest; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {number} deltaX Delta X. - * @param {number} deltaY Delta Y. - * @param {Array=} opt_dest Destination. - * @return {Array} Transformed coordinates. - */ -function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) { - var dest = opt_dest ? opt_dest : []; - var i = 0; - for (var j = offset; j < end; j += stride) { - dest[i++] = flatCoordinates[j] + deltaX; - dest[i++] = flatCoordinates[j + 1] + deltaY; - for (var k = j + 2; k < j + stride; ++k) { - dest[i++] = flatCoordinates[k]; - } - } - if (opt_dest && dest.length != i) { - dest.length = i; - } - return dest; -} - -//# sourceMappingURL=transform.js.map - -/***/ }), -/* 22 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/geom/GeometryLayout - */ - -/** - * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z') - * or measure ('M') coordinate is available. Supported values are `'XY'`, - * `'XYZ'`, `'XYM'`, `'XYZM'`. - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - XY: 'XY', - XYZ: 'XYZ', - XYM: 'XYM', - XYZM: 'XYZM' -}); - -//# sourceMappingURL=GeometryLayout.js.map - -/***/ }), -/* 23 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/layer/Property - */ - -/** - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - OPACITY: 'opacity', - VISIBLE: 'visible', - EXTENT: 'extent', - Z_INDEX: 'zIndex', - MAX_RESOLUTION: 'maxResolution', - MIN_RESOLUTION: 'minResolution', - SOURCE: 'source' -}); - -//# sourceMappingURL=Property.js.map - -/***/ }), -/* 24 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CLASS_HIDDEN; }); -/* unused harmony export CLASS_SELECTABLE */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CLASS_UNSELECTABLE; }); -/* unused harmony export CLASS_UNSUPPORTED */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CLASS_CONTROL; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CLASS_COLLAPSED; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getFontFamilies; }); -/** - * @module ol/css - */ - - -/** - * The CSS class for hidden feature. - * - * @const - * @type {string} - */ -var CLASS_HIDDEN = 'ol-hidden'; - - -/** - * The CSS class that we'll give the DOM elements to have them selectable. - * - * @const - * @type {string} - */ -var CLASS_SELECTABLE = 'ol-selectable'; - - -/** - * The CSS class that we'll give the DOM elements to have them unselectable. - * - * @const - * @type {string} - */ -var CLASS_UNSELECTABLE = 'ol-unselectable'; - - -/** - * The CSS class for unsupported feature. - * - * @const - * @type {string} - */ -var CLASS_UNSUPPORTED = 'ol-unsupported'; - - -/** - * The CSS class for controls. - * - * @const - * @type {string} - */ -var CLASS_CONTROL = 'ol-control'; - - -/** - * The CSS class that we'll give the DOM elements that are collapsed, i.e. - * to those elements which usually can be expanded. - * - * @const - * @type {string} - */ -var CLASS_COLLAPSED = 'ol-collapsed'; - - -/** - * Get the list of font families from a font spec. Note that this doesn't work - * for font families that have commas in them. - * @param {string} The CSS font property. - * @return {Object} The font families (or null if the input spec is invalid). - */ -var getFontFamilies = (function() { - var style; - var cache = {}; - return function(font) { - if (!style) { - style = document.createElement('div').style; - } - if (!(font in cache)) { - style.font = font; - var family = style.fontFamily; - style.font = ''; - if (!family) { - return null; - } - cache[font] = family.split(/,\s?/); - } - return cache[font]; - }; -})(); - -//# sourceMappingURL=css.js.map - -/***/ }), -/* 25 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ORDER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TEXT_ALIGN; }); -/* harmony import */ var _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); -/** - * @module ol/render/replay - */ - - - -/** - * @const - * @type {Array} - */ -var ORDER = [ - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].POLYGON, - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].CIRCLE, - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].LINE_STRING, - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].IMAGE, - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].TEXT, - _ReplayType_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].DEFAULT -]; - -/** - * @const - * @enum {number} - */ -var TEXT_ALIGN = {}; -TEXT_ALIGN['left'] = 0; -TEXT_ALIGN['end'] = 0; -TEXT_ALIGN['center'] = 0.5; -TEXT_ALIGN['right'] = 1; -TEXT_ALIGN['start'] = 1; -TEXT_ALIGN['top'] = 0; -TEXT_ALIGN['middle'] = 0.5; -TEXT_ALIGN['hanging'] = 0.2; -TEXT_ALIGN['alphabetic'] = 0.8; -TEXT_ALIGN['ideographic'] = 0.8; -TEXT_ALIGN['bottom'] = 1; - -//# sourceMappingURL=replay.js.map - -/***/ }), -/* 26 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/ImageState - */ - -/** - * @enum {number} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - IDLE: 0, - LOADING: 1, - LOADED: 2, - ERROR: 3 -}); - -//# sourceMappingURL=ImageState.js.map - -/***/ }), -/* 27 */ +/* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5252,2084 +1037,14 @@ function preventDefault(evt) { //# sourceMappingURL=Event.js.map /***/ }), -/* 28 */ +/* 8 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * @module ol/LayerType - */ - -/** - * A layer type used when creating layer renderers. - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - IMAGE: 'IMAGE', - TILE: 'TILE', - VECTOR_TILE: 'VECTOR_TILE', - VECTOR: 'VECTOR' -}); - -//# sourceMappingURL=LayerType.js.map - -/***/ }), -/* 29 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return easeIn; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return easeOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return inAndOut; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return linear; }); -/* unused harmony export upAndDown */ -/** - * @module ol/easing - */ - - -/** - * Start slow and speed up. - * @param {number} t Input between 0 and 1. - * @return {number} Output between 0 and 1. - * @api - */ -function easeIn(t) { - return Math.pow(t, 3); -} - - -/** - * Start fast and slow down. - * @param {number} t Input between 0 and 1. - * @return {number} Output between 0 and 1. - * @api - */ -function easeOut(t) { - return 1 - easeIn(1 - t); -} - - -/** - * Start slow, speed up, and then slow down again. - * @param {number} t Input between 0 and 1. - * @return {number} Output between 0 and 1. - * @api - */ -function inAndOut(t) { - return 3 * t * t - 2 * t * t * t; -} - - -/** - * Maintain a constant speed over time. - * @param {number} t Input between 0 and 1. - * @return {number} Output between 0 and 1. - * @api - */ -function linear(t) { - return t; -} - - -/** - * Start slow, speed up, and at the very end slow down again. This has the - * same general behavior as {@link module:ol/easing~inAndOut}, but the final - * slowdown is delayed. - * @param {number} t Input between 0 and 1. - * @return {number} Output between 0 and 1. - * @api - */ -function upAndDown(t) { - if (t < 0.5) { - return inAndOut(2 * t); - } else { - return 1 - inAndOut(2 * (t - 0.5)); - } -} - -//# sourceMappingURL=easing.js.map - -/***/ }), -/* 30 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/render/EventType - */ - -/** - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - /** - * @event module:ol/render/Event~RenderEvent#postcompose - * @api - */ - POSTCOMPOSE: 'postcompose', - /** - * @event module:ol/render/Event~RenderEvent#precompose - * @api - */ - PRECOMPOSE: 'precompose', - /** - * @event module:ol/render/Event~RenderEvent#render - * @api - */ - RENDER: 'render', - /** - * Triggered when rendering is complete, i.e. all sources and tiles have - * finished loading for the current viewport, and all tiles are faded in. - * @event module:ol/render/Event~RenderEvent#rendercomplete - * @api - */ - RENDERCOMPLETE: 'rendercomplete' -}); - -//# sourceMappingURL=EventType.js.map - -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/extent/Relationship - */ - -/** - * Relationship to an extent. - * @enum {number} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - UNKNOWN: 0, - INTERSECTING: 1, - ABOVE: 2, - RIGHT: 4, - BELOW: 8, - LEFT: 16 -}); - -//# sourceMappingURL=Relationship.js.map - -/***/ }), -/* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return METERS_PER_UNIT; }); -/** - * @module ol/proj/Units - */ - -/** - * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or - * `'us-ft'`. - * @enum {string} - */ -var Units = { - DEGREES: 'degrees', - FEET: 'ft', - METERS: 'm', - PIXELS: 'pixels', - TILE_PIXELS: 'tile-pixels', - USFEET: 'us-ft' -}; - - -/** - * Meters per unit lookup table. - * @const - * @type {Object} - * @api - */ -var METERS_PER_UNIT = {}; -// use the radius of the Normal sphere -METERS_PER_UNIT[Units.DEGREES] = 2 * Math.PI * 6370997 / 360; -METERS_PER_UNIT[Units.FEET] = 0.3048; -METERS_PER_UNIT[Units.METERS] = 1; -METERS_PER_UNIT[Units.USFEET] = 1200 / 3937; - -/* harmony default export */ __webpack_exports__["b"] = (Units); - -//# sourceMappingURL=Units.js.map - -/***/ }), -/* 33 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return asString; }); -/* unused harmony export fromString */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asArray; }); -/* unused harmony export normalize */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return toString; }); -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); -/** - * @module ol/color - */ - - - - -/** - * A color represented as a short array [red, green, blue, alpha]. - * red, green, and blue should be integers in the range 0..255 inclusive. - * alpha should be a float in the range 0..1 inclusive. If no alpha value is - * given then `1` will be used. - * @typedef {Array} Color - * @api - */ - - -/** - * This RegExp matches # followed by 3, 4, 6, or 8 hex digits. - * @const - * @type {RegExp} - * @private - */ -var HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i; - - -/** - * Regular expression for matching potential named color style strings. - * @const - * @type {RegExp} - * @private - */ -var NAMED_COLOR_RE_ = /^([a-z]*)$/i; - - -/** - * Return the color as an rgba string. - * @param {Color|string} color Color. - * @return {string} Rgba string. - * @api - */ -function asString(color) { - if (typeof color === 'string') { - return color; - } else { - return toString(color); - } -} - -/** - * Return named color as an rgba string. - * @param {string} color Named color. - * @return {string} Rgb string. - */ -function fromNamed(color) { - var el = document.createElement('div'); - el.style.color = color; - if (el.style.color !== '') { - document.body.appendChild(el); - var rgb = getComputedStyle(el).color; - document.body.removeChild(el); - return rgb; - } else { - return ''; - } -} - - -/** - * @param {string} s String. - * @return {Color} Color. - */ -var fromString = ( - function() { - - // We maintain a small cache of parsed strings. To provide cheap LRU-like - // semantics, whenever the cache grows too large we simply delete an - // arbitrary 25% of the entries. - - /** - * @const - * @type {number} - */ - var MAX_CACHE_SIZE = 1024; - - /** - * @type {Object} - */ - var cache = {}; - - /** - * @type {number} - */ - var cacheSize = 0; - - return ( - /** - * @param {string} s String. - * @return {Color} Color. - */ - function(s) { - var color; - if (cache.hasOwnProperty(s)) { - color = cache[s]; - } else { - if (cacheSize >= MAX_CACHE_SIZE) { - var i = 0; - for (var key in cache) { - if ((i++ & 3) === 0) { - delete cache[key]; - --cacheSize; - } - } - } - color = fromStringInternal_(s); - cache[s] = color; - ++cacheSize; - } - return color; - } - ); - - })(); - -/** - * Return the color as an array. This function maintains a cache of calculated - * arrays which means the result should not be modified. - * @param {Color|string} color Color. - * @return {Color} Color. - * @api - */ -function asArray(color) { - if (Array.isArray(color)) { - return color; - } else { - return fromString(color); - } -} - -/** - * @param {string} s String. - * @private - * @return {Color} Color. - */ -function fromStringInternal_(s) { - var r, g, b, a, color; - - if (NAMED_COLOR_RE_.exec(s)) { - s = fromNamed(s); - } - - if (HEX_COLOR_RE_.exec(s)) { // hex - var n = s.length - 1; // number of hex digits - var d; // number of digits per channel - if (n <= 4) { - d = 1; - } else { - d = 2; - } - var hasAlpha = n === 4 || n === 8; - r = parseInt(s.substr(1 + 0 * d, d), 16); - g = parseInt(s.substr(1 + 1 * d, d), 16); - b = parseInt(s.substr(1 + 2 * d, d), 16); - if (hasAlpha) { - a = parseInt(s.substr(1 + 3 * d, d), 16); - } else { - a = 255; - } - if (d == 1) { - r = (r << 4) + r; - g = (g << 4) + g; - b = (b << 4) + b; - if (hasAlpha) { - a = (a << 4) + a; - } - } - color = [r, g, b, a / 255]; - } else if (s.indexOf('rgba(') == 0) { // rgba() - color = s.slice(5, -1).split(',').map(Number); - normalize(color); - } else if (s.indexOf('rgb(') == 0) { // rgb() - color = s.slice(4, -1).split(',').map(Number); - color.push(1); - normalize(color); - } else { - Object(_asserts_js__WEBPACK_IMPORTED_MODULE_0__[/* assert */ "a"])(false, 14); // Invalid color - } - return color; -} - - -/** - * TODO this function is only used in the test, we probably shouldn't export it - * @param {Color} color Color. - * @return {Color} Clamped color. - */ -function normalize(color) { - color[0] = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "a"])((color[0] + 0.5) | 0, 0, 255); - color[1] = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "a"])((color[1] + 0.5) | 0, 0, 255); - color[2] = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "a"])((color[2] + 0.5) | 0, 0, 255); - color[3] = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "a"])(color[3], 0, 1); - return color; -} - - -/** - * @param {Color} color Color. - * @return {string} String. - */ -function toString(color) { - var r = color[0]; - if (r != (r | 0)) { - r = (r + 0.5) | 0; - } - var g = color[1]; - if (g != (g | 0)) { - g = (g + 0.5) | 0; - } - var b = color[2]; - if (b != (b | 0)) { - b = (b + 0.5) | 0; - } - var a = color[3] === undefined ? 1 : color[3]; - return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; -} - -//# sourceMappingURL=color.js.map - -/***/ }), -/* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/CollectionEventType - */ - -/** - * @enum {string} - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - /** - * Triggered when an item is added to the collection. - * @event module:ol/Collection.CollectionEvent#add - * @api - */ - ADD: 'add', - /** - * Triggered when an item is removed from the collection. - * @event module:ol/Collection.CollectionEvent#remove - * @api - */ - REMOVE: 'remove' -}); - -//# sourceMappingURL=CollectionEventType.js.map - -/***/ }), -/* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defaultOrder; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getSquaredTolerance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getTolerance; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return renderFeature; }); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26); -/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); -/* harmony import */ var _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); -/** - * @module ol/renderer/vector - */ - - - - - - -/** - * Tolerance for geometry simplification in device pixels. - * @type {number} - */ -var SIMPLIFY_TOLERANCE = 0.5; - - -/** - * @const - * @type {Object} - */ -var GEOMETRY_RENDERERS = { - 'Point': renderPointGeometry, - 'LineString': renderLineStringGeometry, - 'Polygon': renderPolygonGeometry, - 'MultiPoint': renderMultiPointGeometry, - 'MultiLineString': renderMultiLineStringGeometry, - 'MultiPolygon': renderMultiPolygonGeometry, - 'GeometryCollection': renderGeometryCollectionGeometry, - 'Circle': renderCircleGeometry -}; - - -/** - * @param {import("../Feature.js").FeatureLike} feature1 Feature 1. - * @param {import("../Feature.js").FeatureLike} feature2 Feature 2. - * @return {number} Order. - */ -function defaultOrder(feature1, feature2) { - return parseInt(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[/* getUid */ "c"])(feature1), 10) - parseInt(Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[/* getUid */ "c"])(feature2), 10); -} - - -/** - * @param {number} resolution Resolution. - * @param {number} pixelRatio Pixel ratio. - * @return {number} Squared pixel tolerance. - */ -function getSquaredTolerance(resolution, pixelRatio) { - var tolerance = getTolerance(resolution, pixelRatio); - return tolerance * tolerance; -} - - -/** - * @param {number} resolution Resolution. - * @param {number} pixelRatio Pixel ratio. - * @return {number} Pixel tolerance. - */ -function getTolerance(resolution, pixelRatio) { - return SIMPLIFY_TOLERANCE * resolution / pixelRatio; -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/Circle.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").default} feature Feature. - */ -function renderCircleGeometry(replayGroup, geometry, style, feature) { - var fillStyle = style.getFill(); - var strokeStyle = style.getStroke(); - if (fillStyle || strokeStyle) { - var circleReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].CIRCLE); - circleReplay.setFillStrokeStyle(fillStyle, strokeStyle); - circleReplay.drawCircle(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../Feature.js").FeatureLike} feature Feature. - * @param {import("../style/Style.js").default} style Style. - * @param {number} squaredTolerance Squared tolerance. - * @param {function(this: T, import("../events/Event.js").default)} listener Listener function. - * @param {T} thisArg Value to use as `this` when executing `listener`. - * @return {boolean} `true` if style is loading. - * @template T - */ -function renderFeature(replayGroup, feature, style, squaredTolerance, listener, thisArg) { - var loading = false; - var imageStyle = style.getImage(); - if (imageStyle) { - var imageState = imageStyle.getImageState(); - if (imageState == _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].LOADED || imageState == _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].ERROR) { - imageStyle.unlistenImageChange(listener, thisArg); - } else { - if (imageState == _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].IDLE) { - imageStyle.load(); - } - imageState = imageStyle.getImageState(); - imageStyle.listenImageChange(listener, thisArg); - loading = true; - } - } - renderFeatureInternal(replayGroup, feature, style, squaredTolerance); - - return loading; -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../Feature.js").FeatureLike} feature Feature. - * @param {import("../style/Style.js").default} style Style. - * @param {number} squaredTolerance Squared tolerance. - */ -function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) { - var geometry = style.getGeometryFunction()(feature); - if (!geometry) { - return; - } - var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance); - var renderer = style.getRenderer(); - if (renderer) { - renderGeometry(replayGroup, simplifiedGeometry, style, feature); - } else { - var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()]; - geometryRenderer(replayGroup, simplifiedGeometry, style, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/Geometry.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderGeometry(replayGroup, geometry, style, feature) { - if (geometry.getType() == _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].GEOMETRY_COLLECTION) { - var geometries = /** @type {import("../geom/GeometryCollection.js").default} */ (geometry).getGeometries(); - for (var i = 0, ii = geometries.length; i < ii; ++i) { - renderGeometry(replayGroup, geometries[i], style, feature); - } - return; - } - var replay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].DEFAULT); - replay.drawCustom(/** @type {import("../geom/SimpleGeometry.js").default} */ (geometry), feature, style.getRenderer()); -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/GeometryCollection.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").default} feature Feature. - */ -function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) { - var geometries = geometry.getGeometriesArray(); - var i, ii; - for (i = 0, ii = geometries.length; i < ii; ++i) { - var geometryRenderer = - GEOMETRY_RENDERERS[geometries[i].getType()]; - geometryRenderer(replayGroup, geometries[i], style, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/LineString.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderLineStringGeometry(replayGroup, geometry, style, feature) { - var strokeStyle = style.getStroke(); - if (strokeStyle) { - var lineStringReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].LINE_STRING); - lineStringReplay.setFillStrokeStyle(null, strokeStyle); - lineStringReplay.drawLineString(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/MultiLineString.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) { - var strokeStyle = style.getStroke(); - if (strokeStyle) { - var lineStringReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].LINE_STRING); - lineStringReplay.setFillStrokeStyle(null, strokeStyle); - lineStringReplay.drawMultiLineString(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/MultiPolygon.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").default} feature Feature. - */ -function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) { - var fillStyle = style.getFill(); - var strokeStyle = style.getStroke(); - if (strokeStyle || fillStyle) { - var polygonReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].POLYGON); - polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle); - polygonReplay.drawMultiPolygon(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/Point.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderPointGeometry(replayGroup, geometry, style, feature) { - var imageStyle = style.getImage(); - if (imageStyle) { - if (imageStyle.getImageState() != _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].LOADED) { - return; - } - var imageReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].IMAGE); - imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false)); - imageReplay.drawPoint(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/MultiPoint.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderMultiPointGeometry(replayGroup, geometry, style, feature) { - var imageStyle = style.getImage(); - if (imageStyle) { - if (imageStyle.getImageState() != _ImageState_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].LOADED) { - return; - } - var imageReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].IMAGE); - imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false)); - imageReplay.drawMultiPoint(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle)); - textReplay.drawText(geometry, feature); - } -} - - -/** - * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. - * @param {import("../geom/Polygon.js").default|import("../render/Feature.js").default} geometry Geometry. - * @param {import("../style/Style.js").default} style Style. - * @param {import("../Feature.js").FeatureLike} feature Feature. - */ -function renderPolygonGeometry(replayGroup, geometry, style, feature) { - var fillStyle = style.getFill(); - var strokeStyle = style.getStroke(); - if (fillStyle || strokeStyle) { - var polygonReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].POLYGON); - polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle); - polygonReplay.drawPolygon(geometry, feature); - } - var textStyle = style.getText(); - if (textStyle) { - var textReplay = replayGroup.getReplay(style.getZIndex(), _render_ReplayType_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].TEXT); - textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false)); - textReplay.drawText(geometry, feature); - } -} - -//# sourceMappingURL=vector.js.map - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asColorLike; }); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33); -/** - * @module ol/colorlike - */ - - - -/** - * A type accepted by CanvasRenderingContext2D.fillStyle - * or CanvasRenderingContext2D.strokeStyle. - * Represents a color, pattern, or gradient. The origin for patterns and - * gradients as fill style is an increment of 512 css pixels from map coordinate - * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image - * must be a factor of two (2, 4, 8, ..., 512). - * - * @typedef {string|CanvasPattern|CanvasGradient} ColorLike - * @api - */ - - -/** - * @param {import("./color.js").Color|ColorLike} color Color. - * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}. - * @api - */ -function asColorLike(color) { - if (Array.isArray(color)) { - return Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[/* toString */ "c"])(color); - } else { - return color; - } -} - -//# sourceMappingURL=colorlike.js.map - -/***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return visibleAtResolution; }); -/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); -/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2); -/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20); -/* harmony import */ var _Base_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80); -/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10); -/* harmony import */ var _render_EventType_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30); -/* harmony import */ var _source_State_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43); -/** - * @module ol/layer/Layer - */ - - - - - - - - - - - -/** - * @typedef {Object} Options - * @property {number} [opacity=1] Opacity (0, 1). - * @property {boolean} [visible=true] Visibility. - * @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be - * rendered outside of this extent. - * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers - * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed - * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` - * method was used. - * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be - * visible. - * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will - * be visible. - * @property {import("../source/Source.js").default} [source] Source for this layer. If not provided to the constructor, - * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after - * construction. - * @property {import("../PluggableMap.js").default} [map] Map. - */ - - -/** - * @typedef {Object} State - * @property {import("./Base.js").default} layer - * @property {number} opacity - * @property {SourceState} sourceState - * @property {boolean} visible - * @property {boolean} managed - * @property {import("../extent.js").Extent} [extent] - * @property {number} zIndex - * @property {number} maxResolution - * @property {number} minResolution - */ - -/** - * @classdesc - * Abstract base class; normally only used for creating subclasses and not - * instantiated in apps. - * A visual representation of raster or vector map data. - * Layers group together those properties that pertain to how the data is to be - * displayed, irrespective of the source of that data. - * - * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components - * like {@link module:ol/interaction/Select~Select} use unmanaged layers - * internally. These unmanaged layers are associated with the map using - * {@link module:ol/layer/Layer~Layer#setMap} instead. - * - * A generic `change` event is fired when the state of the source changes. - * - * @fires import("../render/Event.js").RenderEvent - */ -var Layer = /*@__PURE__*/(function (BaseLayer) { - function Layer(options) { - - var baseOptions = Object(_obj_js__WEBPACK_IMPORTED_MODULE_6__[/* assign */ "a"])({}, options); - delete baseOptions.source; - - BaseLayer.call(this, baseOptions); - - /** - * @private - * @type {?import("../events.js").EventsKey} - */ - this.mapPrecomposeKey_ = null; - - /** - * @private - * @type {?import("../events.js").EventsKey} - */ - this.mapRenderKey_ = null; - - /** - * @private - * @type {?import("../events.js").EventsKey} - */ - this.sourceChangeKey_ = null; - - if (options.map) { - this.setMap(options.map); - } - - Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* listen */ "a"])(this, - Object(_Object_js__WEBPACK_IMPORTED_MODULE_3__[/* getChangeEventType */ "b"])(_Property_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].SOURCE), - this.handleSourcePropertyChange_, this); - - var source = options.source ? options.source : null; - this.setSource(source); - } - - if ( BaseLayer ) Layer.__proto__ = BaseLayer; - Layer.prototype = Object.create( BaseLayer && BaseLayer.prototype ); - Layer.prototype.constructor = Layer; - - /** - * @inheritDoc - */ - Layer.prototype.getLayersArray = function getLayersArray (opt_array) { - var array = opt_array ? opt_array : []; - array.push(this); - return array; - }; - - /** - * @inheritDoc - */ - Layer.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) { - var states = opt_states ? opt_states : []; - states.push(this.getLayerState()); - return states; - }; - - /** - * Get the layer source. - * @return {import("../source/Source.js").default} The layer source (or `null` if not yet set). - * @observable - * @api - */ - Layer.prototype.getSource = function getSource () { - var source = this.get(_Property_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].SOURCE); - return ( - /** @type {import("../source/Source.js").default} */ (source) || null - ); - }; - - /** - * @inheritDoc - */ - Layer.prototype.getSourceState = function getSourceState () { - var source = this.getSource(); - return !source ? _source_State_js__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].UNDEFINED : source.getState(); - }; - - /** - * @private - */ - Layer.prototype.handleSourceChange_ = function handleSourceChange_ () { - this.changed(); - }; - - /** - * @private - */ - Layer.prototype.handleSourcePropertyChange_ = function handleSourcePropertyChange_ () { - if (this.sourceChangeKey_) { - Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* unlistenByKey */ "e"])(this.sourceChangeKey_); - this.sourceChangeKey_ = null; - } - var source = this.getSource(); - if (source) { - this.sourceChangeKey_ = Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* listen */ "a"])(source, - _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CHANGE, this.handleSourceChange_, this); - } - this.changed(); - }; - - /** - * Sets the layer to be rendered on top of other layers on a map. The map will - * not manage this layer in its layers collection, and the callback in - * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This - * is useful for temporary layers. To remove an unmanaged layer from the map, - * use `#setMap(null)`. - * - * To add the layer to a map and have it managed by the map, use - * {@link module:ol/Map#addLayer} instead. - * @param {import("../PluggableMap.js").default} map Map. - * @api - */ - Layer.prototype.setMap = function setMap (map) { - if (this.mapPrecomposeKey_) { - Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* unlistenByKey */ "e"])(this.mapPrecomposeKey_); - this.mapPrecomposeKey_ = null; - } - if (!map) { - this.changed(); - } - if (this.mapRenderKey_) { - Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* unlistenByKey */ "e"])(this.mapRenderKey_); - this.mapRenderKey_ = null; - } - if (map) { - this.mapPrecomposeKey_ = Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* listen */ "a"])(map, _render_EventType_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].PRECOMPOSE, function(evt) { - var renderEvent = /** @type {import("../render/Event.js").default} */ (evt); - var layerState = this.getLayerState(); - layerState.managed = false; - if (this.getZIndex() === undefined) { - layerState.zIndex = Infinity; - } - renderEvent.frameState.layerStatesArray.push(layerState); - renderEvent.frameState.layerStates[Object(_util_js__WEBPACK_IMPORTED_MODULE_2__[/* getUid */ "c"])(this)] = layerState; - }, this); - this.mapRenderKey_ = Object(_events_js__WEBPACK_IMPORTED_MODULE_0__[/* listen */ "a"])(this, _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].CHANGE, map.render, map); - this.changed(); - } - }; - - /** - * Set the layer source. - * @param {import("../source/Source.js").default} source The layer source. - * @observable - * @api - */ - Layer.prototype.setSource = function setSource (source) { - this.set(_Property_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].SOURCE, source); - }; - - return Layer; -}(_Base_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])); - - -/** - * Return `true` if the layer is visible, and if the passed resolution is - * between the layer's minResolution and maxResolution. The comparison is - * inclusive for `minResolution` and exclusive for `maxResolution`. - * @param {State} layerState Layer state. - * @param {number} resolution Resolution. - * @return {boolean} The layer is visible at the given resolution. - */ -function visibleAtResolution(layerState, resolution) { - return layerState.visible && resolution >= layerState.minResolution && - resolution < layerState.maxResolution; -} - - -/* harmony default export */ __webpack_exports__["a"] = (Layer); - -//# sourceMappingURL=Layer.js.map - -/***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createOrUpdate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getKeyZXY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fromKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return hash; }); -/* unused harmony export quadKey */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return withinExtentAndZ; }); -/** - * @module ol/tilecoord - */ - - -/** - * An array of three numbers representing the location of a tile in a tile - * grid. The order is `z`, `x`, and `y`. `z` is the zoom level. - * @typedef {Array} TileCoord - * @api - */ - - -/** - * @param {number} z Z. - * @param {number} x X. - * @param {number} y Y. - * @param {TileCoord=} opt_tileCoord Tile coordinate. - * @return {TileCoord} Tile coordinate. - */ -function createOrUpdate(z, x, y, opt_tileCoord) { - if (opt_tileCoord !== undefined) { - opt_tileCoord[0] = z; - opt_tileCoord[1] = x; - opt_tileCoord[2] = y; - return opt_tileCoord; - } else { - return [z, x, y]; - } -} - - -/** - * @param {number} z Z. - * @param {number} x X. - * @param {number} y Y. - * @return {string} Key. - */ -function getKeyZXY(z, x, y) { - return z + '/' + x + '/' + y; -} - - -/** - * Get the key for a tile coord. - * @param {TileCoord} tileCoord The tile coord. - * @return {string} Key. - */ -function getKey(tileCoord) { - return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]); -} - - -/** - * Get a tile coord given a key. - * @param {string} key The tile coord key. - * @return {TileCoord} The tile coord. - */ -function fromKey(key) { - return key.split('/').map(Number); -} - - -/** - * @param {TileCoord} tileCoord Tile coord. - * @return {number} Hash. - */ -function hash(tileCoord) { - return (tileCoord[1] << tileCoord[0]) + tileCoord[2]; -} - - -/** - * @param {TileCoord} tileCoord Tile coord. - * @return {string} Quad key. - */ -function quadKey(tileCoord) { - var z = tileCoord[0]; - var digits = new Array(z); - var mask = 1 << (z - 1); - var i, charCode; - for (i = 0; i < z; ++i) { - // 48 is charCode for 0 - '0'.charCodeAt(0) - charCode = 48; - if (tileCoord[1] & mask) { - charCode += 1; - } - if (tileCoord[2] & mask) { - charCode += 2; - } - digits[i] = String.fromCharCode(charCode); - mask >>= 1; - } - return digits.join(''); -} - - -/** - * @param {TileCoord} tileCoord Tile coordinate. - * @param {!import("./tilegrid/TileGrid.js").default} tileGrid Tile grid. - * @return {boolean} Tile coordinate is within extent and zoom level range. - */ -function withinExtentAndZ(tileCoord, tileGrid) { - var z = tileCoord[0]; - var x = tileCoord[1]; - var y = tileCoord[2]; - - if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) { - return false; - } - var extent = tileGrid.getExtent(); - var tileRange; - if (!extent) { - tileRange = tileGrid.getFullTileRange(z); - } else { - tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z); - } - if (!tileRange) { - return true; - } else { - return tileRange.containsXY(x, y); - } -} - -//# sourceMappingURL=tilecoord.js.map - -/***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export CollectionEvent */ -/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79); -/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); -/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20); -/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27); -/** - * @module ol/Collection - */ - - - - - - -/** - * @enum {string} - * @private - */ -var Property = { - LENGTH: 'length' -}; - - -/** - * @classdesc - * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this - * type. - */ -var CollectionEvent = /*@__PURE__*/(function (Event) { - function CollectionEvent(type, opt_element) { - Event.call(this, type); - - /** - * The element that is added to or removed from the collection. - * @type {*} - * @api - */ - this.element = opt_element; - - } - - if ( Event ) CollectionEvent.__proto__ = Event; - CollectionEvent.prototype = Object.create( Event && Event.prototype ); - CollectionEvent.prototype.constructor = CollectionEvent; - - return CollectionEvent; -}(_events_Event_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])); - - -/** - * @typedef {Object} Options - * @property {boolean} [unique=false] Disallow the same item from being added to - * the collection twice. - */ - -/** - * @classdesc - * An expanded version of standard JS Array, adding convenience methods for - * manipulation. Add and remove changes to the Collection trigger a Collection - * event. Note that this does not cover changes to the objects _within_ the - * Collection; they trigger events on the appropriate object, not on the - * Collection as a whole. - * - * @fires CollectionEvent - * - * @template T - * @api - */ -var Collection = /*@__PURE__*/(function (BaseObject) { - function Collection(opt_array, opt_options) { - - BaseObject.call(this); - - var options = opt_options || {}; - - /** - * @private - * @type {boolean} - */ - this.unique_ = !!options.unique; - - /** - * @private - * @type {!Array} - */ - this.array_ = opt_array ? opt_array : []; - - if (this.unique_) { - for (var i = 0, ii = this.array_.length; i < ii; ++i) { - this.assertUnique_(this.array_[i], i); - } - } - - this.updateLength_(); - - } - - if ( BaseObject ) Collection.__proto__ = BaseObject; - Collection.prototype = Object.create( BaseObject && BaseObject.prototype ); - Collection.prototype.constructor = Collection; - - /** - * Remove all elements from the collection. - * @api - */ - Collection.prototype.clear = function clear () { - while (this.getLength() > 0) { - this.pop(); - } - }; - - /** - * Add elements to the collection. This pushes each item in the provided array - * to the end of the collection. - * @param {!Array} arr Array. - * @return {Collection} This collection. - * @api - */ - Collection.prototype.extend = function extend (arr) { - for (var i = 0, ii = arr.length; i < ii; ++i) { - this.push(arr[i]); - } - return this; - }; - - /** - * Iterate over each element, calling the provided callback. - * @param {function(T, number, Array): *} f The function to call - * for every element. This function takes 3 arguments (the element, the - * index and the array). The return value is ignored. - * @api - */ - Collection.prototype.forEach = function forEach (f) { - var array = this.array_; - for (var i = 0, ii = array.length; i < ii; ++i) { - f(array[i], i, array); - } - }; - - /** - * Get a reference to the underlying Array object. Warning: if the array - * is mutated, no events will be dispatched by the collection, and the - * collection's "length" property won't be in sync with the actual length - * of the array. - * @return {!Array} Array. - * @api - */ - Collection.prototype.getArray = function getArray () { - return this.array_; - }; - - /** - * Get the element at the provided index. - * @param {number} index Index. - * @return {T} Element. - * @api - */ - Collection.prototype.item = function item (index) { - return this.array_[index]; - }; - - /** - * Get the length of this collection. - * @return {number} The length of the array. - * @observable - * @api - */ - Collection.prototype.getLength = function getLength () { - return this.get(Property.LENGTH); - }; - - /** - * Insert an element at the provided index. - * @param {number} index Index. - * @param {T} elem Element. - * @api - */ - Collection.prototype.insertAt = function insertAt (index, elem) { - if (this.unique_) { - this.assertUnique_(elem); - } - this.array_.splice(index, 0, elem); - this.updateLength_(); - this.dispatchEvent( - new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].ADD, elem)); - }; - - /** - * Remove the last element of the collection and return it. - * Return `undefined` if the collection is empty. - * @return {T|undefined} Element. - * @api - */ - Collection.prototype.pop = function pop () { - return this.removeAt(this.getLength() - 1); - }; - - /** - * Insert the provided element at the end of the collection. - * @param {T} elem Element. - * @return {number} New length of the collection. - * @api - */ - Collection.prototype.push = function push (elem) { - if (this.unique_) { - this.assertUnique_(elem); - } - var n = this.getLength(); - this.insertAt(n, elem); - return this.getLength(); - }; - - /** - * Remove the first occurrence of an element from the collection. - * @param {T} elem Element. - * @return {T|undefined} The removed element or undefined if none found. - * @api - */ - Collection.prototype.remove = function remove (elem) { - var arr = this.array_; - for (var i = 0, ii = arr.length; i < ii; ++i) { - if (arr[i] === elem) { - return this.removeAt(i); - } - } - return undefined; - }; - - /** - * Remove the element at the provided index and return it. - * Return `undefined` if the collection does not contain this index. - * @param {number} index Index. - * @return {T|undefined} Value. - * @api - */ - Collection.prototype.removeAt = function removeAt (index) { - var prev = this.array_[index]; - this.array_.splice(index, 1); - this.updateLength_(); - this.dispatchEvent(new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].REMOVE, prev)); - return prev; - }; - - /** - * Set the element at the provided index. - * @param {number} index Index. - * @param {T} elem Element. - * @api - */ - Collection.prototype.setAt = function setAt (index, elem) { - var n = this.getLength(); - if (index < n) { - if (this.unique_) { - this.assertUnique_(elem, index); - } - var prev = this.array_[index]; - this.array_[index] = elem; - this.dispatchEvent( - new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].REMOVE, prev)); - this.dispatchEvent( - new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].ADD, elem)); - } else { - for (var j = n; j < index; ++j) { - this.insertAt(j, undefined); - } - this.insertAt(index, elem); - } - }; - - /** - * @private - */ - Collection.prototype.updateLength_ = function updateLength_ () { - this.set(Property.LENGTH, this.array_.length); - }; - - /** - * @private - * @param {T} elem Element. - * @param {number=} opt_except Optional index to ignore. - */ - Collection.prototype.assertUnique_ = function assertUnique_ (elem, opt_except) { - for (var i = 0, ii = this.array_.length; i < ii; ++i) { - if (this.array_[i] === elem && i !== opt_except) { - throw new _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"](58); - } - } - }; - - return Collection; -}(_Object_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])); - - -/* harmony default export */ __webpack_exports__["a"] = (Collection); - -//# sourceMappingURL=Collection.js.map - -/***/ }), -/* 40 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ERROR_THRESHOLD; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ENABLE_RASTER_REPROJECTION; }); -/** - * @module ol/reproj/common - */ - -/** - * Default maximum allowed threshold (in pixels) for reprojection - * triangulation. - * @type {number} - */ -var ERROR_THRESHOLD = 0.5; - -/** - * Enable automatic reprojection of raster sources. Default is `true`. - * TODO: decide if we want to expose this as a build flag or remove it - * @type {boolean} - */ -var ENABLE_RASTER_REPROJECTION = true; - -//# sourceMappingURL=common.js.map - -/***/ }), -/* 41 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export buffer */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasArea; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return scale; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return toSize; }); -/** - * @module ol/size - */ - - -/** - * An array of numbers representing a size: `[width, height]`. - * @typedef {Array} Size - * @api - */ - - -/** - * Returns a buffered size. - * @param {Size} size Size. - * @param {number} num The amount by which to buffer. - * @param {Size=} opt_size Optional reusable size array. - * @return {Size} The buffered size. - */ -function buffer(size, num, opt_size) { - if (opt_size === undefined) { - opt_size = [0, 0]; - } - opt_size[0] = size[0] + 2 * num; - opt_size[1] = size[1] + 2 * num; - return opt_size; -} - - -/** - * Determines if a size has a positive area. - * @param {Size} size The size to test. - * @return {boolean} The size has a positive area. - */ -function hasArea(size) { - return size[0] > 0 && size[1] > 0; -} - - -/** - * Returns a size scaled by a ratio. The result will be an array of integers. - * @param {Size} size Size. - * @param {number} ratio Ratio. - * @param {Size=} opt_size Optional reusable size array. - * @return {Size} The scaled size. - */ -function scale(size, ratio, opt_size) { - if (opt_size === undefined) { - opt_size = [0, 0]; - } - opt_size[0] = (size[0] * ratio + 0.5) | 0; - opt_size[1] = (size[1] * ratio + 0.5) | 0; - return opt_size; -} - - -/** - * Returns an `Size` array for the passed in number (meaning: square) or - * `Size` array. - * (meaning: non-square), - * @param {number|Size} size Width and height. - * @param {Size=} opt_size Optional reusable size array. - * @return {Size} Size. - * @api - */ -function toSize(size, opt_size) { - if (Array.isArray(size)) { - return size; - } else { - if (opt_size === undefined) { - opt_size = [size, size]; - } else { - opt_size[0] = opt_size[1] = /** @type {number} */ (size); - } - return opt_size; - } -} - -//# sourceMappingURL=size.js.map - -/***/ }), -/* 42 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/** - * @module ol/style/Stroke - */ - - - -/** - * @typedef {Object} Options - * @property {import("../color.js").Color|import("../colorlike.js").ColorLike} [color] A color, gradient or pattern. - * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats. - * Default null; if null, the Canvas/renderer default black will be used. - * @property {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`. - * @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`. - * @property {Array} [lineDash] Line dash pattern. Default is `undefined` (no dash). - * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on - * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers. - * @property {number} [lineDashOffset=0] Line dash offset. - * @property {number} [miterLimit=10] Miter limit. - * @property {number} [width] Width. - */ - - -/** - * @classdesc - * Set stroke style for vector features. - * Note that the defaults given are the Canvas defaults, which will be used if - * option is not defined. The `get` functions return whatever was entered in - * the options; they will not return the default. - * @api - */ -var Stroke = function Stroke(opt_options) { - - var options = opt_options || {}; - - /** - * @private - * @type {import("../color.js").Color|import("../colorlike.js").ColorLike} - */ - this.color_ = options.color !== undefined ? options.color : null; - - /** - * @private - * @type {string|undefined} - */ - this.lineCap_ = options.lineCap; - - /** - * @private - * @type {Array} - */ - this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null; - - /** - * @private - * @type {number|undefined} - */ - this.lineDashOffset_ = options.lineDashOffset; - - /** - * @private - * @type {string|undefined} - */ - this.lineJoin_ = options.lineJoin; - - /** - * @private - * @type {number|undefined} - */ - this.miterLimit_ = options.miterLimit; - - /** - * @private - * @type {number|undefined} - */ - this.width_ = options.width; - - /** - * @private - * @type {string|undefined} - */ - this.checksum_ = undefined; -}; - -/** - * Clones the style. - * @return {Stroke} The cloned style. - * @api - */ -Stroke.prototype.clone = function clone () { - var color = this.getColor(); - return new Stroke({ - color: Array.isArray(color) ? color.slice() : color || undefined, - lineCap: this.getLineCap(), - lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined, - lineDashOffset: this.getLineDashOffset(), - lineJoin: this.getLineJoin(), - miterLimit: this.getMiterLimit(), - width: this.getWidth() - }); -}; - -/** - * Get the stroke color. - * @return {import("../color.js").Color|import("../colorlike.js").ColorLike} Color. - * @api - */ -Stroke.prototype.getColor = function getColor () { - return this.color_; -}; - -/** - * Get the line cap type for the stroke. - * @return {string|undefined} Line cap. - * @api - */ -Stroke.prototype.getLineCap = function getLineCap () { - return this.lineCap_; -}; - -/** - * Get the line dash style for the stroke. - * @return {Array} Line dash. - * @api - */ -Stroke.prototype.getLineDash = function getLineDash () { - return this.lineDash_; -}; - -/** - * Get the line dash offset for the stroke. - * @return {number|undefined} Line dash offset. - * @api - */ -Stroke.prototype.getLineDashOffset = function getLineDashOffset () { - return this.lineDashOffset_; -}; - -/** - * Get the line join type for the stroke. - * @return {string|undefined} Line join. - * @api - */ -Stroke.prototype.getLineJoin = function getLineJoin () { - return this.lineJoin_; -}; - -/** - * Get the miter limit for the stroke. - * @return {number|undefined} Miter limit. - * @api - */ -Stroke.prototype.getMiterLimit = function getMiterLimit () { - return this.miterLimit_; -}; - -/** - * Get the stroke width. - * @return {number|undefined} Width. - * @api - */ -Stroke.prototype.getWidth = function getWidth () { - return this.width_; -}; - -/** - * Set the color. - * - * @param {import("../color.js").Color|import("../colorlike.js").ColorLike} color Color. - * @api - */ -Stroke.prototype.setColor = function setColor (color) { - this.color_ = color; - this.checksum_ = undefined; -}; - -/** - * Set the line cap. - * - * @param {string|undefined} lineCap Line cap. - * @api - */ -Stroke.prototype.setLineCap = function setLineCap (lineCap) { - this.lineCap_ = lineCap; - this.checksum_ = undefined; -}; - -/** - * Set the line dash. - * - * Please note that Internet Explorer 10 and lower [do not support][mdn] the - * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this - * property will have no visual effect in these browsers. - * - * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility - * - * @param {Array} lineDash Line dash. - * @api - */ -Stroke.prototype.setLineDash = function setLineDash (lineDash) { - this.lineDash_ = lineDash; - this.checksum_ = undefined; -}; - -/** - * Set the line dash offset. - * - * @param {number|undefined} lineDashOffset Line dash offset. - * @api - */ -Stroke.prototype.setLineDashOffset = function setLineDashOffset (lineDashOffset) { - this.lineDashOffset_ = lineDashOffset; - this.checksum_ = undefined; -}; - -/** - * Set the line join. - * - * @param {string|undefined} lineJoin Line join. - * @api - */ -Stroke.prototype.setLineJoin = function setLineJoin (lineJoin) { - this.lineJoin_ = lineJoin; - this.checksum_ = undefined; -}; - -/** - * Set the miter limit. - * - * @param {number|undefined} miterLimit Miter limit. - * @api - */ -Stroke.prototype.setMiterLimit = function setMiterLimit (miterLimit) { - this.miterLimit_ = miterLimit; - this.checksum_ = undefined; -}; - -/** - * Set the width. - * - * @param {number|undefined} width Width. - * @api - */ -Stroke.prototype.setWidth = function setWidth (width) { - this.width_ = width; - this.checksum_ = undefined; -}; - -/** - * @return {string} The checksum. - */ -Stroke.prototype.getChecksum = function getChecksum () { - if (this.checksum_ === undefined) { - this.checksum_ = 's'; - if (this.color_) { - if (typeof this.color_ === 'string') { - this.checksum_ += this.color_; - } else { - this.checksum_ += Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[/* getUid */ "c"])(this.color_); - } - } else { - this.checksum_ += '-'; - } - this.checksum_ += ',' + - (this.lineCap_ !== undefined ? - this.lineCap_.toString() : '-') + ',' + - (this.lineDash_ ? - this.lineDash_.toString() : '-') + ',' + - (this.lineDashOffset_ !== undefined ? - this.lineDashOffset_ : '-') + ',' + - (this.lineJoin_ !== undefined ? - this.lineJoin_ : '-') + ',' + - (this.miterLimit_ !== undefined ? - this.miterLimit_.toString() : '-') + ',' + - (this.width_ !== undefined ? - this.width_.toString() : '-'); - } - - return this.checksum_; -}; - -/* harmony default export */ __webpack_exports__["a"] = (Stroke); - -//# sourceMappingURL=Stroke.js.map - -/***/ }), -/* 43 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * @module ol/source/State - */ - -/** - * @enum {string} - * State of the source, one of 'undefined', 'loading', 'ready' or 'error'. - */ -/* harmony default export */ __webpack_exports__["a"] = ({ - UNDEFINED: 'undefined', - LOADING: 'loading', - READY: 'ready', - ERROR: 'error' -}); - -//# sourceMappingURL=State.js.map - -/***/ }), -/* 44 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33); -/** - * @module ol/style/Fill - */ - - - - -/** - * @typedef {Object} Options - * @property {import("../color.js").Color|import("../colorlike.js").ColorLike} [color] A color, gradient or pattern. - * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats. - * Default null; if null, the Canvas/renderer default black will be used. - */ - - -/** - * @classdesc - * Set fill style for vector features. - * @api - */ -var Fill = function Fill(opt_options) { - - var options = opt_options || {}; - - /** - * @private - * @type {import("../color.js").Color|import("../colorlike.js").ColorLike} - */ - this.color_ = options.color !== undefined ? options.color : null; - - /** - * @private - * @type {string|undefined} - */ - this.checksum_ = undefined; -}; - -/** - * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}. - * @return {Fill} The cloned style. - * @api - */ -Fill.prototype.clone = function clone () { - var color = this.getColor(); - return new Fill({ - color: Array.isArray(color) ? color.slice() : color || undefined - }); -}; - -/** - * Get the fill color. - * @return {import("../color.js").Color|import("../colorlike.js").ColorLike} Color. - * @api - */ -Fill.prototype.getColor = function getColor () { - return this.color_; -}; - -/** - * Set the color. - * - * @param {import("../color.js").Color|import("../colorlike.js").ColorLike} color Color. - * @api - */ -Fill.prototype.setColor = function setColor (color) { - this.color_ = color; - this.checksum_ = undefined; -}; - -/** - * @return {string} The checksum. - */ -Fill.prototype.getChecksum = function getChecksum () { - if (this.checksum_ === undefined) { - var color = this.color_; - if (color) { - if (Array.isArray(color) || typeof color == 'string') { - this.checksum_ = 'f' + Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[/* asString */ "b"])(/** @type {import("../color.js").Color|string} */ (color)); - } else { - this.checksum_ = Object(_util_js__WEBPACK_IMPORTED_MODULE_0__[/* getUid */ "c"])(this.color_); - } - } else { - this.checksum_ = 'f-'; - } - } - - return this.checksum_; -}; - -/* harmony default export */ __webpack_exports__["a"] = (Fill); - -//# sourceMappingURL=Fill.js.map - -/***/ }), -/* 45 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); -/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17); -/* harmony import */ var _Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27); +/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); +/* harmony import */ var _Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7); /** * @module ol/events/Target */ @@ -7505,1258 +1220,7 @@ var Target = /*@__PURE__*/(function (Disposable) { //# sourceMappingURL=Target.js.map /***/ }), -/* 46 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return linearRingContainsExtent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return linearRingContainsXY; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return linearRingsContainsXY; }); -/* unused harmony export linearRingssContainsXY */ -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); -/** - * @module ol/geom/flat/contains - */ - - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {import("../../extent.js").Extent} extent Extent. - * @return {boolean} Contains extent. - */ -function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) { - var outside = Object(_extent_js__WEBPACK_IMPORTED_MODULE_0__[/* forEachCorner */ "t"])(extent, - /** - * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. - * @return {boolean} Contains (x, y). - */ - function(coordinate) { - return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]); - }); - return !outside; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {number} x X. - * @param {number} y Y. - * @return {boolean} Contains (x, y). - */ -function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) { - // http://geomalgorithms.com/a03-_inclusion.html - // Copyright 2000 softSurfer, 2012 Dan Sunday - // This code may be freely used and modified for any purpose - // providing that this copyright notice is included with it. - // SoftSurfer makes no warranty for this code, and cannot be held - // liable for any real or imagined damage resulting from its use. - // Users of this code must verify correctness for their application. - var wn = 0; - var x1 = flatCoordinates[end - stride]; - var y1 = flatCoordinates[end - stride + 1]; - for (; offset < end; offset += stride) { - var x2 = flatCoordinates[offset]; - var y2 = flatCoordinates[offset + 1]; - if (y1 <= y) { - if (y2 > y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) > 0) { - wn++; - } - } else if (y2 <= y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) < 0) { - wn--; - } - x1 = x2; - y1 = y2; - } - return wn !== 0; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array} ends Ends. - * @param {number} stride Stride. - * @param {number} x X. - * @param {number} y Y. - * @return {boolean} Contains (x, y). - */ -function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) { - if (ends.length === 0) { - return false; - } - if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) { - return false; - } - for (var i = 1, ii = ends.length; i < ii; ++i) { - if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) { - return false; - } - } - return true; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array>} endss Endss. - * @param {number} stride Stride. - * @param {number} x X. - * @param {number} y Y. - * @return {boolean} Contains (x, y). - */ -function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) { - if (endss.length === 0) { - return false; - } - for (var i = 0, ii = endss.length; i < ii; ++i) { - var ends = endss[i]; - if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) { - return true; - } - offset = ends[ends.length - 1]; - } - return false; -} - -//# sourceMappingURL=contains.js.map - -/***/ }), -/* 47 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXTERNAL MODULE: ./node_modules/ol/math.js -var math = __webpack_require__(9); - -// CONCATENATED MODULE: ./node_modules/ol/string.js -/** - * @module ol/string - */ - -/** - * @param {number} number Number to be formatted - * @param {number} width The desired width - * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places) - * @returns {string} Formatted string - */ -function padNumber(number, width, opt_precision) { - var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number; - var decimal = numberString.indexOf('.'); - decimal = decimal === -1 ? numberString.length : decimal; - return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString; -} - - -/** - * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js - * @param {string|number} v1 First version - * @param {string|number} v2 Second version - * @returns {number} Value - */ -function compareVersions(v1, v2) { - var s1 = ('' + v1).split('.'); - var s2 = ('' + v2).split('.'); - - for (var i = 0; i < Math.max(s1.length, s2.length); i++) { - var n1 = parseInt(s1[i] || '0', 10); - var n2 = parseInt(s2[i] || '0', 10); - - if (n1 > n2) { - return 1; - } - if (n2 > n1) { - return -1; - } - } - - return 0; -} - -//# sourceMappingURL=string.js.map -// CONCATENATED MODULE: ./node_modules/ol/coordinate.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return add; }); -/* unused harmony export closestOnCircle */ -/* unused harmony export closestOnSegment */ -/* unused harmony export createStringXY */ -/* unused harmony export degreesToStringHDMS */ -/* unused harmony export format */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return equals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return rotate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return scale; }); -/* unused harmony export squaredDistance */ -/* unused harmony export distance */ -/* unused harmony export squaredDistanceToSegment */ -/* unused harmony export toStringHDMS */ -/* unused harmony export toStringXY */ -/** - * @module ol/coordinate - */ - - - - -/** - * An array of numbers representing an xy coordinate. Example: `[16, 48]`. - * @typedef {Array} Coordinate - * @api - */ - - -/** - * A function that takes a {@link module:ol/coordinate~Coordinate} and - * transforms it into a `{string}`. - * - * @typedef {function((Coordinate|undefined)): string} CoordinateFormat - * @api - */ - - -/** - * Add `delta` to `coordinate`. `coordinate` is modified in place and returned - * by the function. - * - * Example: - * - * import {add} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * add(coord, [-2, 4]); - * // coord is now [5.85, 51.983333] - * - * @param {Coordinate} coordinate Coordinate. - * @param {Coordinate} delta Delta. - * @return {Coordinate} The input coordinate adjusted by - * the given delta. - * @api - */ -function add(coordinate, delta) { - coordinate[0] += delta[0]; - coordinate[1] += delta[1]; - return coordinate; -} - - -/** - * Calculates the point closest to the passed coordinate on the passed circle. - * - * @param {Coordinate} coordinate The coordinate. - * @param {import("./geom/Circle.js").default} circle The circle. - * @return {Coordinate} Closest point on the circumference. - */ -function closestOnCircle(coordinate, circle) { - var r = circle.getRadius(); - var center = circle.getCenter(); - var x0 = center[0]; - var y0 = center[1]; - var x1 = coordinate[0]; - var y1 = coordinate[1]; - - var dx = x1 - x0; - var dy = y1 - y0; - if (dx === 0 && dy === 0) { - dx = 1; - } - var d = Math.sqrt(dx * dx + dy * dy); - - var x = x0 + r * dx / d; - var y = y0 + r * dy / d; - - return [x, y]; -} - - -/** - * Calculates the point closest to the passed coordinate on the passed segment. - * This is the foot of the perpendicular of the coordinate to the segment when - * the foot is on the segment, or the closest segment coordinate when the foot - * is outside the segment. - * - * @param {Coordinate} coordinate The coordinate. - * @param {Array} segment The two coordinates - * of the segment. - * @return {Coordinate} The foot of the perpendicular of - * the coordinate to the segment. - */ -function closestOnSegment(coordinate, segment) { - var x0 = coordinate[0]; - var y0 = coordinate[1]; - var start = segment[0]; - var end = segment[1]; - var x1 = start[0]; - var y1 = start[1]; - var x2 = end[0]; - var y2 = end[1]; - var dx = x2 - x1; - var dy = y2 - y1; - var along = (dx === 0 && dy === 0) ? 0 : - ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0); - var x, y; - if (along <= 0) { - x = x1; - y = y1; - } else if (along >= 1) { - x = x2; - y = y2; - } else { - x = x1 + along * dx; - y = y1 + along * dy; - } - return [x, y]; -} - - -/** - * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be - * used to format - * a {Coordinate} to a string. - * - * Example without specifying the fractional digits: - * - * import {createStringXY} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var stringifyFunc = createStringXY(); - * var out = stringifyFunc(coord); - * // out is now '8, 48' - * - * Example with explicitly specifying 2 fractional digits: - * - * import {createStringXY} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var stringifyFunc = createStringXY(2); - * var out = stringifyFunc(coord); - * // out is now '7.85, 47.98' - * - * @param {number=} opt_fractionDigits The number of digits to include - * after the decimal point. Default is `0`. - * @return {CoordinateFormat} Coordinate format. - * @api - */ -function createStringXY(opt_fractionDigits) { - return ( - /** - * @param {Coordinate} coordinate Coordinate. - * @return {string} String XY. - */ - function(coordinate) { - return toStringXY(coordinate, opt_fractionDigits); - } - ); -} - - -/** - * @param {string} hemispheres Hemispheres. - * @param {number} degrees Degrees. - * @param {number=} opt_fractionDigits The number of digits to include - * after the decimal point. Default is `0`. - * @return {string} String. - */ -function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) { - var normalizedDegrees = Object(math["d" /* modulo */])(degrees + 180, 360) - 180; - var x = Math.abs(3600 * normalizedDegrees); - var dflPrecision = opt_fractionDigits || 0; - var precision = Math.pow(10, dflPrecision); - - var deg = Math.floor(x / 3600); - var min = Math.floor((x - deg * 3600) / 60); - var sec = x - (deg * 3600) - (min * 60); - sec = Math.ceil(sec * precision) / precision; - - if (sec >= 60) { - sec = 0; - min += 1; - } - - if (min >= 60) { - min = 0; - deg += 1; - } - - return deg + '\u00b0 ' + padNumber(min, 2) + '\u2032 ' + - padNumber(sec, 2, dflPrecision) + '\u2033' + - (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)); -} - - -/** - * Transforms the given {@link module:ol/coordinate~Coordinate} to a string - * using the given string template. The strings `{x}` and `{y}` in the template - * will be replaced with the first and second coordinate values respectively. - * - * Example without specifying the fractional digits: - * - * import {format} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var template = 'Coordinate is ({x}|{y}).'; - * var out = format(coord, template); - * // out is now 'Coordinate is (8|48).' - * - * Example explicitly specifying the fractional digits: - * - * import {format} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var template = 'Coordinate is ({x}|{y}).'; - * var out = format(coord, template, 2); - * // out is now 'Coordinate is (7.85|47.98).' - * - * @param {Coordinate} coordinate Coordinate. - * @param {string} template A template string with `{x}` and `{y}` placeholders - * that will be replaced by first and second coordinate values. - * @param {number=} opt_fractionDigits The number of digits to include - * after the decimal point. Default is `0`. - * @return {string} Formatted coordinate. - * @api - */ -function format(coordinate, template, opt_fractionDigits) { - if (coordinate) { - return template - .replace('{x}', coordinate[0].toFixed(opt_fractionDigits)) - .replace('{y}', coordinate[1].toFixed(opt_fractionDigits)); - } else { - return ''; - } -} - - -/** - * @param {Coordinate} coordinate1 First coordinate. - * @param {Coordinate} coordinate2 Second coordinate. - * @return {boolean} The two coordinates are equal. - */ -function equals(coordinate1, coordinate2) { - var equals = true; - for (var i = coordinate1.length - 1; i >= 0; --i) { - if (coordinate1[i] != coordinate2[i]) { - equals = false; - break; - } - } - return equals; -} - - -/** - * Rotate `coordinate` by `angle`. `coordinate` is modified in place and - * returned by the function. - * - * Example: - * - * import {rotate} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var rotateRadians = Math.PI / 2; // 90 degrees - * rotate(coord, rotateRadians); - * // coord is now [-47.983333, 7.85] - * - * @param {Coordinate} coordinate Coordinate. - * @param {number} angle Angle in radian. - * @return {Coordinate} Coordinate. - * @api - */ -function rotate(coordinate, angle) { - var cosAngle = Math.cos(angle); - var sinAngle = Math.sin(angle); - var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle; - var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle; - coordinate[0] = x; - coordinate[1] = y; - return coordinate; -} - - -/** - * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned - * by the function. - * - * Example: - * - * import {scale as scaleCoordinate} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var scale = 1.2; - * scaleCoordinate(coord, scale); - * // coord is now [9.42, 57.5799996] - * - * @param {Coordinate} coordinate Coordinate. - * @param {number} scale Scale factor. - * @return {Coordinate} Coordinate. - */ -function scale(coordinate, scale) { - coordinate[0] *= scale; - coordinate[1] *= scale; - return coordinate; -} - - -/** - * @param {Coordinate} coord1 First coordinate. - * @param {Coordinate} coord2 Second coordinate. - * @return {number} Squared distance between coord1 and coord2. - */ -function squaredDistance(coord1, coord2) { - var dx = coord1[0] - coord2[0]; - var dy = coord1[1] - coord2[1]; - return dx * dx + dy * dy; -} - - -/** - * @param {Coordinate} coord1 First coordinate. - * @param {Coordinate} coord2 Second coordinate. - * @return {number} Distance between coord1 and coord2. - */ -function distance(coord1, coord2) { - return Math.sqrt(squaredDistance(coord1, coord2)); -} - - -/** - * Calculate the squared distance from a coordinate to a line segment. - * - * @param {Coordinate} coordinate Coordinate of the point. - * @param {Array} segment Line segment (2 - * coordinates). - * @return {number} Squared distance from the point to the line segment. - */ -function squaredDistanceToSegment(coordinate, segment) { - return squaredDistance(coordinate, - closestOnSegment(coordinate, segment)); -} - - -/** - * Format a geographic coordinate with the hemisphere, degrees, minutes, and - * seconds. - * - * Example without specifying fractional digits: - * - * import {toStringHDMS} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var out = toStringHDMS(coord); - * // out is now '47° 58′ 60″ N 7° 50′ 60″ E' - * - * Example explicitly specifying 1 fractional digit: - * - * import {toStringHDMS} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var out = toStringHDMS(coord, 1); - * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E' - * - * @param {Coordinate} coordinate Coordinate. - * @param {number=} opt_fractionDigits The number of digits to include - * after the decimal point. Default is `0`. - * @return {string} Hemisphere, degrees, minutes and seconds. - * @api - */ -function toStringHDMS(coordinate, opt_fractionDigits) { - if (coordinate) { - return degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' + - degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits); - } else { - return ''; - } -} - - -/** - * Format a coordinate as a comma delimited string. - * - * Example without specifying fractional digits: - * - * import {toStringXY} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var out = toStringXY(coord); - * // out is now '8, 48' - * - * Example explicitly specifying 1 fractional digit: - * - * import {toStringXY} from 'ol/coordinate'; - * - * var coord = [7.85, 47.983333]; - * var out = toStringXY(coord, 1); - * // out is now '7.8, 48.0' - * - * @param {Coordinate} coordinate Coordinate. - * @param {number=} opt_fractionDigits The number of digits to include - * after the decimal point. Default is `0`. - * @return {string} XY. - * @api - */ -function toStringXY(coordinate, opt_fractionDigits) { - return format(coordinate, '{x}, {y}', opt_fractionDigits); -} - -//# sourceMappingURL=coordinate.js.map - -/***/ }), -/* 48 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXTERNAL MODULE: ./node_modules/ol/util.js -var util = __webpack_require__(2); - -// EXTERNAL MODULE: ./node_modules/ol/extent.js -var ol_extent = __webpack_require__(0); - -// EXTERNAL MODULE: ./node_modules/ol/Object.js -var ol_Object = __webpack_require__(20); - -// EXTERNAL MODULE: ./node_modules/ol/geom/flat/transform.js -var flat_transform = __webpack_require__(21); - -// EXTERNAL MODULE: ./node_modules/ol/proj.js + 5 modules -var proj = __webpack_require__(15); - -// EXTERNAL MODULE: ./node_modules/ol/proj/Units.js -var Units = __webpack_require__(32); - -// EXTERNAL MODULE: ./node_modules/ol/transform.js -var ol_transform = __webpack_require__(4); - -// CONCATENATED MODULE: ./node_modules/ol/geom/Geometry.js -/** - * @module ol/geom/Geometry - */ - - - - - - - - - -/** - * @type {import("../transform.js").Transform} - */ -var tmpTransform = Object(ol_transform["c" /* create */])(); - - -/** - * @classdesc - * Abstract base class; normally only used for creating subclasses and not - * instantiated in apps. - * Base class for vector geometries. - * - * To get notified of changes to the geometry, register a listener for the - * generic `change` event on your geometry instance. - * - * @abstract - * @api - */ -var Geometry_Geometry = /*@__PURE__*/(function (BaseObject) { - function Geometry() { - - BaseObject.call(this); - - /** - * @private - * @type {import("../extent.js").Extent} - */ - this.extent_ = Object(ol_extent["j" /* createEmpty */])(); - - /** - * @private - * @type {number} - */ - this.extentRevision_ = -1; - - /** - * @protected - * @type {Object} - */ - this.simplifiedGeometryCache = {}; - - /** - * @protected - * @type {number} - */ - this.simplifiedGeometryMaxMinSquaredTolerance = 0; - - /** - * @protected - * @type {number} - */ - this.simplifiedGeometryRevision = 0; - - } - - if ( BaseObject ) Geometry.__proto__ = BaseObject; - Geometry.prototype = Object.create( BaseObject && BaseObject.prototype ); - Geometry.prototype.constructor = Geometry; - - /** - * Make a complete copy of the geometry. - * @abstract - * @return {!Geometry} Clone. - */ - Geometry.prototype.clone = function clone () { - return Object(util["b" /* abstract */])(); - }; - - /** - * @abstract - * @param {number} x X. - * @param {number} y Y. - * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. - * @param {number} minSquaredDistance Minimum squared distance. - * @return {number} Minimum squared distance. - */ - Geometry.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) { - return Object(util["b" /* abstract */])(); - }; - - /** - * @param {number} x X. - * @param {number} y Y. - * @return {boolean} Contains (x, y). - */ - Geometry.prototype.containsXY = function containsXY (x, y) { - return false; - }; - - /** - * Return the closest point of the geometry to the passed point as - * {@link module:ol/coordinate~Coordinate coordinate}. - * @param {import("../coordinate.js").Coordinate} point Point. - * @param {import("../coordinate.js").Coordinate=} opt_closestPoint Closest point. - * @return {import("../coordinate.js").Coordinate} Closest point. - * @api - */ - Geometry.prototype.getClosestPoint = function getClosestPoint (point, opt_closestPoint) { - var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN]; - this.closestPointXY(point[0], point[1], closestPoint, Infinity); - return closestPoint; - }; - - /** - * Returns true if this geometry includes the specified coordinate. If the - * coordinate is on the boundary of the geometry, returns false. - * @param {import("../coordinate.js").Coordinate} coordinate Coordinate. - * @return {boolean} Contains coordinate. - * @api - */ - Geometry.prototype.intersectsCoordinate = function intersectsCoordinate (coordinate) { - return this.containsXY(coordinate[0], coordinate[1]); - }; - - /** - * @abstract - * @param {import("../extent.js").Extent} extent Extent. - * @protected - * @return {import("../extent.js").Extent} extent Extent. - */ - Geometry.prototype.computeExtent = function computeExtent (extent) { - return Object(util["b" /* abstract */])(); - }; - - /** - * Get the extent of the geometry. - * @param {import("../extent.js").Extent=} opt_extent Extent. - * @return {import("../extent.js").Extent} extent Extent. - * @api - */ - Geometry.prototype.getExtent = function getExtent (opt_extent) { - if (this.extentRevision_ != this.getRevision()) { - this.extent_ = this.computeExtent(this.extent_); - this.extentRevision_ = this.getRevision(); - } - return Object(ol_extent["I" /* returnOrUpdate */])(this.extent_, opt_extent); - }; - - /** - * Rotate the geometry around a given coordinate. This modifies the geometry - * coordinates in place. - * @abstract - * @param {number} angle Rotation angle in radians. - * @param {import("../coordinate.js").Coordinate} anchor The rotation center. - * @api - */ - Geometry.prototype.rotate = function rotate (angle, anchor) { - Object(util["b" /* abstract */])(); - }; - - /** - * Scale the geometry (with an optional origin). This modifies the geometry - * coordinates in place. - * @abstract - * @param {number} sx The scaling factor in the x-direction. - * @param {number=} opt_sy The scaling factor in the y-direction (defaults to - * sx). - * @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center - * of the geometry extent). - * @api - */ - Geometry.prototype.scale = function scale (sx, opt_sy, opt_anchor) { - Object(util["b" /* abstract */])(); - }; - - /** - * Create a simplified version of this geometry. For linestrings, this uses - * the the {@link - * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm - * Douglas Peucker} algorithm. For polygons, a quantization-based - * simplification is used to preserve topology. - * @param {number} tolerance The tolerance distance for simplification. - * @return {Geometry} A new, simplified version of the original geometry. - * @api - */ - Geometry.prototype.simplify = function simplify (tolerance) { - return this.getSimplifiedGeometry(tolerance * tolerance); - }; - - /** - * Create a simplified version of this geometry using the Douglas Peucker - * algorithm. - * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm. - * @abstract - * @param {number} squaredTolerance Squared tolerance. - * @return {Geometry} Simplified geometry. - */ - Geometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) { - return Object(util["b" /* abstract */])(); - }; - - /** - * Get the type of this geometry. - * @abstract - * @return {import("./GeometryType.js").default} Geometry type. - */ - Geometry.prototype.getType = function getType () { - return Object(util["b" /* abstract */])(); - }; - - /** - * Apply a transform function to each coordinate of the geometry. - * The geometry is modified in place. - * If you do not want the geometry modified in place, first `clone()` it and - * then use this function on the clone. - * @abstract - * @param {import("../proj.js").TransformFunction} transformFn Transform. - */ - Geometry.prototype.applyTransform = function applyTransform (transformFn) { - Object(util["b" /* abstract */])(); - }; - - /** - * Test if the geometry and the passed extent intersect. - * @abstract - * @param {import("../extent.js").Extent} extent Extent. - * @return {boolean} `true` if the geometry and the extent intersect. - */ - Geometry.prototype.intersectsExtent = function intersectsExtent (extent) { - return Object(util["b" /* abstract */])(); - }; - - /** - * Translate the geometry. This modifies the geometry coordinates in place. If - * instead you want a new geometry, first `clone()` this geometry. - * @abstract - * @param {number} deltaX Delta X. - * @param {number} deltaY Delta Y. - * @api - */ - Geometry.prototype.translate = function translate (deltaX, deltaY) { - Object(util["b" /* abstract */])(); - }; - - /** - * Transform each coordinate of the geometry from one coordinate reference - * system to another. The geometry is modified in place. - * For example, a line will be transformed to a line and a circle to a circle. - * If you do not want the geometry modified in place, first `clone()` it and - * then use this function on the clone. - * - * @param {import("../proj.js").ProjectionLike} source The current projection. Can be a - * string identifier or a {@link module:ol/proj/Projection~Projection} object. - * @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a - * string identifier or a {@link module:ol/proj/Projection~Projection} object. - * @return {Geometry} This geometry. Note that original geometry is - * modified in place. - * @api - */ - Geometry.prototype.transform = function transform (source, destination) { - /** @type {import("../proj/Projection.js").default} */ - var sourceProj = Object(proj["e" /* get */])(source); - var transformFn = sourceProj.getUnits() == Units["b" /* default */].TILE_PIXELS ? - function(inCoordinates, outCoordinates, stride) { - var pixelExtent = sourceProj.getExtent(); - var projectedExtent = sourceProj.getWorldExtent(); - var scale = Object(ol_extent["A" /* getHeight */])(projectedExtent) / Object(ol_extent["A" /* getHeight */])(pixelExtent); - Object(ol_transform["b" /* compose */])(tmpTransform, - projectedExtent[0], projectedExtent[3], - scale, -scale, 0, - 0, 0); - Object(flat_transform["c" /* transform2D */])(inCoordinates, 0, inCoordinates.length, stride, - tmpTransform, outCoordinates); - return Object(proj["g" /* getTransform */])(sourceProj, destination)(inCoordinates, outCoordinates, stride); - } : - Object(proj["g" /* getTransform */])(sourceProj, destination); - this.applyTransform(transformFn); - return this; - }; - - return Geometry; -}(ol_Object["a" /* default */])); - - -/* harmony default export */ var geom_Geometry = (Geometry_Geometry); - -//# sourceMappingURL=Geometry.js.map -// EXTERNAL MODULE: ./node_modules/ol/geom/GeometryLayout.js -var GeometryLayout = __webpack_require__(22); - -// EXTERNAL MODULE: ./node_modules/ol/obj.js -var obj = __webpack_require__(10); - -// CONCATENATED MODULE: ./node_modules/ol/geom/SimpleGeometry.js -/* unused harmony export getStrideForLayout */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return transformGeom2D; }); -/** - * @module ol/geom/SimpleGeometry - */ - - - - - - - -/** - * @classdesc - * Abstract base class; only used for creating subclasses; do not instantiate - * in apps, as cannot be rendered. - * - * @abstract - * @api - */ -var SimpleGeometry_SimpleGeometry = /*@__PURE__*/(function (Geometry) { - function SimpleGeometry() { - - Geometry.call(this); - - /** - * @protected - * @type {GeometryLayout} - */ - this.layout = GeometryLayout["a" /* default */].XY; - - /** - * @protected - * @type {number} - */ - this.stride = 2; - - /** - * @protected - * @type {Array} - */ - this.flatCoordinates = null; - - } - - if ( Geometry ) SimpleGeometry.__proto__ = Geometry; - SimpleGeometry.prototype = Object.create( Geometry && Geometry.prototype ); - SimpleGeometry.prototype.constructor = SimpleGeometry; - - /** - * @inheritDoc - */ - SimpleGeometry.prototype.computeExtent = function computeExtent (extent) { - return Object(ol_extent["o" /* createOrUpdateFromFlatCoordinates */])(this.flatCoordinates, - 0, this.flatCoordinates.length, this.stride, extent); - }; - - /** - * @abstract - * @return {Array} Coordinates. - */ - SimpleGeometry.prototype.getCoordinates = function getCoordinates () { - return Object(util["b" /* abstract */])(); - }; - - /** - * Return the first coordinate of the geometry. - * @return {import("../coordinate.js").Coordinate} First coordinate. - * @api - */ - SimpleGeometry.prototype.getFirstCoordinate = function getFirstCoordinate () { - return this.flatCoordinates.slice(0, this.stride); - }; - - /** - * @return {Array} Flat coordinates. - */ - SimpleGeometry.prototype.getFlatCoordinates = function getFlatCoordinates () { - return this.flatCoordinates; - }; - - /** - * Return the last coordinate of the geometry. - * @return {import("../coordinate.js").Coordinate} Last point. - * @api - */ - SimpleGeometry.prototype.getLastCoordinate = function getLastCoordinate () { - return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride); - }; - - /** - * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry. - * @return {GeometryLayout} Layout. - * @api - */ - SimpleGeometry.prototype.getLayout = function getLayout () { - return this.layout; - }; - - /** - * @inheritDoc - */ - SimpleGeometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) { - if (this.simplifiedGeometryRevision != this.getRevision()) { - Object(obj["b" /* clear */])(this.simplifiedGeometryCache); - this.simplifiedGeometryMaxMinSquaredTolerance = 0; - this.simplifiedGeometryRevision = this.getRevision(); - } - // If squaredTolerance is negative or if we know that simplification will not - // have any effect then just return this. - if (squaredTolerance < 0 || - (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && - squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) { - return this; - } - var key = squaredTolerance.toString(); - if (this.simplifiedGeometryCache.hasOwnProperty(key)) { - return this.simplifiedGeometryCache[key]; - } else { - var simplifiedGeometry = - this.getSimplifiedGeometryInternal(squaredTolerance); - var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates(); - if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) { - this.simplifiedGeometryCache[key] = simplifiedGeometry; - return simplifiedGeometry; - } else { - // Simplification did not actually remove any coordinates. We now know - // that any calls to getSimplifiedGeometry with a squaredTolerance less - // than or equal to the current squaredTolerance will also not have any - // effect. This allows us to short circuit simplification (saving CPU - // cycles) and prevents the cache of simplified geometries from filling - // up with useless identical copies of this geometry (saving memory). - this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance; - return this; - } - } - }; - - /** - * @param {number} squaredTolerance Squared tolerance. - * @return {SimpleGeometry} Simplified geometry. - * @protected - */ - SimpleGeometry.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) { - return this; - }; - - /** - * @return {number} Stride. - */ - SimpleGeometry.prototype.getStride = function getStride () { - return this.stride; - }; - - /** - * @param {GeometryLayout} layout Layout. - * @param {Array} flatCoordinates Flat coordinates. - */ - SimpleGeometry.prototype.setFlatCoordinates = function setFlatCoordinates (layout, flatCoordinates) { - this.stride = getStrideForLayout(layout); - this.layout = layout; - this.flatCoordinates = flatCoordinates; - }; - - /** - * @abstract - * @param {!Array} coordinates Coordinates. - * @param {GeometryLayout=} opt_layout Layout. - */ - SimpleGeometry.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) { - Object(util["b" /* abstract */])(); - }; - - /** - * @param {GeometryLayout|undefined} layout Layout. - * @param {Array} coordinates Coordinates. - * @param {number} nesting Nesting. - * @protected - */ - SimpleGeometry.prototype.setLayout = function setLayout (layout, coordinates, nesting) { - /** @type {number} */ - var stride; - if (layout) { - stride = getStrideForLayout(layout); - } else { - for (var i = 0; i < nesting; ++i) { - if (coordinates.length === 0) { - this.layout = GeometryLayout["a" /* default */].XY; - this.stride = 2; - return; - } else { - coordinates = /** @type {Array} */ (coordinates[0]); - } - } - stride = coordinates.length; - layout = getLayoutForStride(stride); - } - this.layout = layout; - this.stride = stride; - }; - - /** - * @inheritDoc - * @api - */ - SimpleGeometry.prototype.applyTransform = function applyTransform (transformFn) { - if (this.flatCoordinates) { - transformFn(this.flatCoordinates, this.flatCoordinates, this.stride); - this.changed(); - } - }; - - /** - * @inheritDoc - * @api - */ - SimpleGeometry.prototype.rotate = function rotate$1 (angle, anchor) { - var flatCoordinates = this.getFlatCoordinates(); - if (flatCoordinates) { - var stride = this.getStride(); - Object(flat_transform["a" /* rotate */])( - flatCoordinates, 0, flatCoordinates.length, - stride, angle, anchor, flatCoordinates); - this.changed(); - } - }; - - /** - * @inheritDoc - * @api - */ - SimpleGeometry.prototype.scale = function scale$1 (sx, opt_sy, opt_anchor) { - var sy = opt_sy; - if (sy === undefined) { - sy = sx; - } - var anchor = opt_anchor; - if (!anchor) { - anchor = Object(ol_extent["x" /* getCenter */])(this.getExtent()); - } - var flatCoordinates = this.getFlatCoordinates(); - if (flatCoordinates) { - var stride = this.getStride(); - Object(flat_transform["b" /* scale */])( - flatCoordinates, 0, flatCoordinates.length, - stride, sx, sy, anchor, flatCoordinates); - this.changed(); - } - }; - - /** - * @inheritDoc - * @api - */ - SimpleGeometry.prototype.translate = function translate$1 (deltaX, deltaY) { - var flatCoordinates = this.getFlatCoordinates(); - if (flatCoordinates) { - var stride = this.getStride(); - Object(flat_transform["d" /* translate */])( - flatCoordinates, 0, flatCoordinates.length, stride, - deltaX, deltaY, flatCoordinates); - this.changed(); - } - }; - - return SimpleGeometry; -}(geom_Geometry)); - - -/** - * @param {number} stride Stride. - * @return {GeometryLayout} layout Layout. - */ -function getLayoutForStride(stride) { - var layout; - if (stride == 2) { - layout = GeometryLayout["a" /* default */].XY; - } else if (stride == 3) { - layout = GeometryLayout["a" /* default */].XYZ; - } else if (stride == 4) { - layout = GeometryLayout["a" /* default */].XYZM; - } - return ( - /** @type {GeometryLayout} */ (layout) - ); -} - - -/** - * @param {GeometryLayout} layout Layout. - * @return {number} Stride. - */ -function getStrideForLayout(layout) { - var stride; - if (layout == GeometryLayout["a" /* default */].XY) { - stride = 2; - } else if (layout == GeometryLayout["a" /* default */].XYZ || layout == GeometryLayout["a" /* default */].XYM) { - stride = 3; - } else if (layout == GeometryLayout["a" /* default */].XYZM) { - stride = 4; - } - return /** @type {number} */ (stride); -} - - -/** - * @param {SimpleGeometry} simpleGeometry Simple geometry. - * @param {import("../transform.js").Transform} transform Transform. - * @param {Array=} opt_dest Destination. - * @return {Array} Transformed flat coordinates. - */ -function transformGeom2D(simpleGeometry, transform, opt_dest) { - var flatCoordinates = simpleGeometry.getFlatCoordinates(); - if (!flatCoordinates) { - return null; - } else { - var stride = simpleGeometry.getStride(); - return Object(flat_transform["c" /* transform2D */])( - flatCoordinates, 0, flatCoordinates.length, stride, - transform, opt_dest); - } -} - -/* harmony default export */ var geom_SimpleGeometry = __webpack_exports__["a"] = (SimpleGeometry_SimpleGeometry); - -//# sourceMappingURL=SimpleGeometry.js.map - -/***/ }), -/* 49 */ +/* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -8779,1338 +1243,7 @@ function transformGeom2D(simpleGeometry, transform, opt_dest) { //# sourceMappingURL=ObjectEventType.js.map /***/ }), -/* 50 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return inflateCoordinates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return inflateCoordinatesArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return inflateMultiCoordinatesArray; }); -/** - * @module ol/geom/flat/inflate - */ - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @param {Array=} opt_coordinates Coordinates. - * @return {Array} Coordinates. - */ -function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) { - var coordinates = opt_coordinates !== undefined ? opt_coordinates : []; - var i = 0; - for (var j = offset; j < end; j += stride) { - coordinates[i++] = flatCoordinates.slice(j, j + stride); - } - coordinates.length = i; - return coordinates; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array} ends Ends. - * @param {number} stride Stride. - * @param {Array>=} opt_coordinatess Coordinatess. - * @return {Array>} Coordinatess. - */ -function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) { - var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : []; - var i = 0; - for (var j = 0, jj = ends.length; j < jj; ++j) { - var end = ends[j]; - coordinatess[i++] = inflateCoordinates( - flatCoordinates, offset, end, stride, coordinatess[i]); - offset = end; - } - coordinatess.length = i; - return coordinatess; -} - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array>} endss Endss. - * @param {number} stride Stride. - * @param {Array>>=} opt_coordinatesss - * Coordinatesss. - * @return {Array>>} Coordinatesss. - */ -function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) { - var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : []; - var i = 0; - for (var j = 0, jj = endss.length; j < jj; ++j) { - var ends = endss[j]; - coordinatesss[i++] = inflateCoordinatesArray( - flatCoordinates, offset, ends, stride, coordinatesss[i]); - offset = ends[ends.length - 1]; - } - coordinatesss.length = i; - return coordinatesss; -} - -//# sourceMappingURL=inflate.js.map - -/***/ }), -/* 51 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return disable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return none; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createSnapToN; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createSnapToZero; }); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); -/** - * @module ol/rotationconstraint - */ - - - -/** - * @typedef {function((number|undefined), number): (number|undefined)} Type - */ - - -/** - * @param {number|undefined} rotation Rotation. - * @param {number} delta Delta. - * @return {number|undefined} Rotation. - */ -function disable(rotation, delta) { - if (rotation !== undefined) { - return 0; - } else { - return undefined; - } -} - - -/** - * @param {number|undefined} rotation Rotation. - * @param {number} delta Delta. - * @return {number|undefined} Rotation. - */ -function none(rotation, delta) { - if (rotation !== undefined) { - return rotation + delta; - } else { - return undefined; - } -} - - -/** - * @param {number} n N. - * @return {Type} Rotation constraint. - */ -function createSnapToN(n) { - var theta = 2 * Math.PI / n; - return ( - /** - * @param {number|undefined} rotation Rotation. - * @param {number} delta Delta. - * @return {number|undefined} Rotation. - */ - function(rotation, delta) { - if (rotation !== undefined) { - rotation = Math.floor((rotation + delta) / theta + 0.5) * theta; - return rotation; - } else { - return undefined; - } - }); -} - - -/** - * @param {number=} opt_tolerance Tolerance. - * @return {Type} Rotation constraint. - */ -function createSnapToZero(opt_tolerance) { - var tolerance = opt_tolerance || Object(_math_js__WEBPACK_IMPORTED_MODULE_0__[/* toRadians */ "j"])(5); - return ( - /** - * @param {number|undefined} rotation Rotation. - * @param {number} delta Delta. - * @return {number|undefined} Rotation. - */ - function(rotation, delta) { - if (rotation !== undefined) { - if (Math.abs(rotation + delta) <= tolerance) { - return 0; - } else { - return rotation + delta; - } - } else { - return undefined; - } - }); -} - -//# sourceMappingURL=rotationconstraint.js.map - -/***/ }), -/* 52 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// CONCATENATED MODULE: ./node_modules/ol/geom/flat/reverse.js -/** - * @module ol/geom/flat/reverse - */ - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - */ -function coordinates(flatCoordinates, offset, end, stride) { - while (offset < end - stride) { - for (var i = 0; i < stride; ++i) { - var tmp = flatCoordinates[offset + i]; - flatCoordinates[offset + i] = flatCoordinates[end - stride + i]; - flatCoordinates[end - stride + i] = tmp; - } - offset += stride; - end -= stride; - } -} - -//# sourceMappingURL=reverse.js.map -// CONCATENATED MODULE: ./node_modules/ol/geom/flat/orient.js -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return linearRingIsClockwise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return linearRingIsOriented; }); -/* unused harmony export linearRingsAreOriented */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return orientLinearRings; }); -/* unused harmony export orientLinearRingsArray */ -/** - * @module ol/geom/flat/orient - */ - - - -/** - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {number} end End. - * @param {number} stride Stride. - * @return {boolean} Is clockwise. - */ -function linearRingIsClockwise(flatCoordinates, offset, end, stride) { - // http://tinyurl.com/clockwise-method - // https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp - var edge = 0; - var x1 = flatCoordinates[end - stride]; - var y1 = flatCoordinates[end - stride + 1]; - for (; offset < end; offset += stride) { - var x2 = flatCoordinates[offset]; - var y2 = flatCoordinates[offset + 1]; - edge += (x2 - x1) * (y2 + y1); - x1 = x2; - y1 = y2; - } - return edge > 0; -} - - -/** - * Determines if linear rings are oriented. By default, left-hand orientation - * is tested (first ring must be clockwise, remaining rings counter-clockwise). - * To test for right-hand orientation, use the `opt_right` argument. - * - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array} ends Array of end indexes. - * @param {number} stride Stride. - * @param {boolean=} opt_right Test for right-hand orientation - * (counter-clockwise exterior ring and clockwise interior rings). - * @return {boolean} Rings are correctly oriented. - */ -function linearRingIsOriented(flatCoordinates, offset, ends, stride, opt_right) { - var right = opt_right !== undefined ? opt_right : false; - for (var i = 0, ii = ends.length; i < ii; ++i) { - var end = ends[i]; - var isClockwise = linearRingIsClockwise( - flatCoordinates, offset, end, stride); - if (i === 0) { - if ((right && isClockwise) || (!right && !isClockwise)) { - return false; - } - } else { - if ((right && !isClockwise) || (!right && isClockwise)) { - return false; - } - } - offset = end; - } - return true; -} - - -/** - * Determines if linear rings are oriented. By default, left-hand orientation - * is tested (first ring must be clockwise, remaining rings counter-clockwise). - * To test for right-hand orientation, use the `opt_right` argument. - * - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array>} endss Array of array of end indexes. - * @param {number} stride Stride. - * @param {boolean=} opt_right Test for right-hand orientation - * (counter-clockwise exterior ring and clockwise interior rings). - * @return {boolean} Rings are correctly oriented. - */ -function linearRingsAreOriented(flatCoordinates, offset, endss, stride, opt_right) { - for (var i = 0, ii = endss.length; i < ii; ++i) { - if (!linearRingIsOriented( - flatCoordinates, offset, endss[i], stride, opt_right)) { - return false; - } - } - return true; -} - - -/** - * Orient coordinates in a flat array of linear rings. By default, rings - * are oriented following the left-hand rule (clockwise for exterior and - * counter-clockwise for interior rings). To orient according to the - * right-hand rule, use the `opt_right` argument. - * - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array} ends Ends. - * @param {number} stride Stride. - * @param {boolean=} opt_right Follow the right-hand rule for orientation. - * @return {number} End. - */ -function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) { - var right = opt_right !== undefined ? opt_right : false; - for (var i = 0, ii = ends.length; i < ii; ++i) { - var end = ends[i]; - var isClockwise = linearRingIsClockwise( - flatCoordinates, offset, end, stride); - var reverse = i === 0 ? - (right && isClockwise) || (!right && !isClockwise) : - (right && !isClockwise) || (!right && isClockwise); - if (reverse) { - coordinates(flatCoordinates, offset, end, stride); - } - offset = end; - } - return offset; -} - - -/** - * Orient coordinates in a flat array of linear rings. By default, rings - * are oriented following the left-hand rule (clockwise for exterior and - * counter-clockwise for interior rings). To orient according to the - * right-hand rule, use the `opt_right` argument. - * - * @param {Array} flatCoordinates Flat coordinates. - * @param {number} offset Offset. - * @param {Array>} endss Array of array of end indexes. - * @param {number} stride Stride. - * @param {boolean=} opt_right Follow the right-hand rule for orientation. - * @return {number} End. - */ -function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) { - for (var i = 0, ii = endss.length; i < ii; ++i) { - offset = orientLinearRings( - flatCoordinates, offset, endss[i], stride, opt_right); - } - return offset; -} - -//# sourceMappingURL=orient.js.map - -/***/ }), -/* 53 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return toFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createDefaultStyle; }); -/* unused harmony export createEditingStyle */ -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); -/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); -/* harmony import */ var _Circle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97); -/* harmony import */ var _Fill_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44); -/* harmony import */ var _Stroke_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42); -/** - * @module ol/style/Style - */ - -/** - * Feature styles. - * - * If no style is defined, the following default style is used: - * ```js - * import {Fill, Stroke, Circle, Style} from 'ol/style'; - * - * var fill = new Fill({ - * color: 'rgba(255,255,255,0.4)' - * }); - * var stroke = new Stroke({ - * color: '#3399CC', - * width: 1.25 - * }); - * var styles = [ - * new Style({ - * image: new Circle({ - * fill: fill, - * stroke: stroke, - * radius: 5 - * }), - * fill: fill, - * stroke: stroke - * }) - * ]; - * ``` - * - * A separate editing style has the following defaults: - * ```js - * import {Fill, Stroke, Circle, Style} from 'ol/style'; - * import GeometryType from 'ol/geom/GeometryType'; - * - * var white = [255, 255, 255, 1]; - * var blue = [0, 153, 255, 1]; - * var width = 3; - * styles[GeometryType.POLYGON] = [ - * new Style({ - * fill: new Fill({ - * color: [255, 255, 255, 0.5] - * }) - * }) - * ]; - * styles[GeometryType.MULTI_POLYGON] = - * styles[GeometryType.POLYGON]; - * styles[GeometryType.LINE_STRING] = [ - * new Style({ - * stroke: new Stroke({ - * color: white, - * width: width + 2 - * }) - * }), - * new Style({ - * stroke: new Stroke({ - * color: blue, - * width: width - * }) - * }) - * ]; - * styles[GeometryType.MULTI_LINE_STRING] = - * styles[GeometryType.LINE_STRING]; - * styles[GeometryType.POINT] = [ - * new Style({ - * image: new Circle({ - * radius: width * 2, - * fill: new Fill({ - * color: blue - * }), - * stroke: new Stroke({ - * color: white, - * width: width / 2 - * }) - * }), - * zIndex: Infinity - * }) - * ]; - * styles[GeometryType.MULTI_POINT] = - * styles[GeometryType.POINT]; - * styles[GeometryType.GEOMETRY_COLLECTION] = - * styles[GeometryType.POLYGON].concat( - * styles[GeometryType.LINE_STRING], - * styles[GeometryType.POINT] - * ); - * ``` - */ - - - - - - - -/** - * A function that takes an {@link module:ol/Feature} and a `{number}` - * representing the view's resolution. The function should return a - * {@link module:ol/style/Style} or an array of them. This way e.g. a - * vector layer can be styled. - * - * @typedef {function(import("../Feature.js").FeatureLike, number):(Style|Array