ol 10.7.1 → 10.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Collection.d.ts +1 -3
- package/Collection.d.ts.map +1 -1
- package/Feature.d.ts +6 -15
- package/Feature.d.ts.map +1 -1
- package/Feature.js +3 -6
- package/Geolocation.d.ts +1 -3
- package/Geolocation.d.ts.map +1 -1
- package/ImageTile.d.ts +2 -12
- package/ImageTile.d.ts.map +1 -1
- package/ImageTile.js +5 -32
- package/Map.d.ts +7 -27
- package/Map.d.ts.map +1 -1
- package/Map.js +3 -29
- package/Object.d.ts +18 -15
- package/Object.d.ts.map +1 -1
- package/Object.js +6 -9
- package/Overlay.d.ts +1 -3
- package/Overlay.d.ts.map +1 -1
- package/VectorRenderTile.d.ts +0 -4
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorRenderTile.js +0 -2
- package/View.d.ts +1 -40
- package/View.d.ts.map +1 -1
- package/View.js +0 -94
- package/colorlike.js +8 -4
- package/control/Control.d.ts +1 -3
- package/control/Control.d.ts.map +1 -1
- package/control/OverviewMap.d.ts +1 -5
- package/control/OverviewMap.d.ts.map +1 -1
- package/coordinate.d.ts +0 -8
- package/coordinate.d.ts.map +1 -1
- package/coordinate.js +1 -31
- package/dist/ol.d.ts +0 -24
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/dom.d.ts +0 -15
- package/dom.d.ts.map +1 -1
- package/dom.js +0 -6
- package/featureloader.d.ts +2 -6
- package/featureloader.d.ts.map +1 -1
- package/format/EsriJSON.d.ts +1 -3
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +1 -3
- package/format/Feature.d.ts.map +1 -1
- package/format/GeoJSON.d.ts +2 -6
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/JSONFeature.d.ts +1 -3
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/KML.d.ts +0 -9
- package/format/KML.d.ts.map +1 -1
- package/format/KML.js +0 -7
- package/format/TextFeature.d.ts +1 -3
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TopoJSON.d.ts +1 -3
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/WKB.d.ts +1 -3
- package/format/WKB.d.ts.map +1 -1
- package/format/XMLFeature.d.ts +1 -3
- package/format/XMLFeature.d.ts.map +1 -1
- package/geom/Geometry.d.ts +1 -3
- package/geom/Geometry.d.ts.map +1 -1
- package/interaction/DragAndDrop.d.ts +2 -6
- package/interaction/DragAndDrop.d.ts.map +1 -1
- package/interaction/Draw.d.ts +3 -9
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Interaction.d.ts +1 -3
- package/interaction/Interaction.d.ts.map +1 -1
- package/interaction/Link.js +2 -2
- package/interaction/Modify.d.ts +28 -76
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Modify.js +54 -248
- package/interaction/Select.d.ts +18 -10
- package/interaction/Select.d.ts.map +1 -1
- package/interaction/Select.js +89 -54
- package/interaction/Snap.d.ts +12 -18
- package/interaction/Snap.d.ts.map +1 -1
- package/interaction/Translate.d.ts +2 -6
- package/interaction/Translate.d.ts.map +1 -1
- package/layer/Base.d.ts +8 -19
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +3 -6
- package/layer/BaseImage.d.ts +1 -3
- package/layer/BaseImage.d.ts.map +1 -1
- package/layer/BaseTile.d.ts +1 -3
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseVector.d.ts +1 -3
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/Flow.d.ts +2 -2
- package/layer/Graticule.d.ts +1 -5
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Group.d.ts +2 -8
- package/layer/Group.d.ts.map +1 -1
- package/layer/Heatmap.d.ts +2 -23
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +0 -29
- package/layer/Layer.d.ts +8 -17
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +2 -5
- package/layer/Tile.d.ts +1 -1
- package/layer/Vector.d.ts +2 -2
- package/layer/Vector.d.ts.map +1 -1
- package/layer/VectorImage.d.ts +2 -2
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorTile.d.ts +2 -2
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/WebGLPoints.d.ts +1 -3
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLTile.d.ts +3 -3
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLVector.d.ts +2 -4
- package/layer/WebGLVector.d.ts.map +1 -1
- package/layer/WebGLVectorTile.d.ts +2 -2
- package/layer/WebGLVectorTile.d.ts.map +1 -1
- package/package.json +3 -4
- package/proj/proj4.d.ts +6 -43
- package/proj/proj4.d.ts.map +1 -1
- package/proj/proj4.js +28 -89
- package/proj.js +2 -2
- package/render/canvas/Builder.d.ts.map +1 -1
- package/render/canvas/Builder.js +1 -8
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +3 -49
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +5 -41
- package/render/canvas/Immediate.d.ts +0 -2
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +4 -28
- package/render/canvas/LineStringBuilder.d.ts +0 -1
- package/render/canvas/LineStringBuilder.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.js +5 -15
- package/render/canvas/PolygonBuilder.d.ts +0 -2
- package/render/canvas/PolygonBuilder.d.ts.map +1 -1
- package/render/canvas/PolygonBuilder.js +6 -72
- package/render/canvas/style.d.ts.map +1 -1
- package/render/canvas/style.js +37 -118
- package/render/canvas.d.ts +2 -22
- package/render/canvas.d.ts.map +1 -1
- package/render/canvas.js +0 -9
- package/render/webgl/bufferUtil.d.ts.map +1 -1
- package/render/webgl/bufferUtil.js +31 -1
- package/renderer/Composite.js +4 -4
- package/renderer/canvas/ImageLayer.d.ts +1 -6
- package/renderer/canvas/ImageLayer.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.js +0 -14
- package/renderer/canvas/TileLayer.d.ts +1 -1
- package/renderer/canvas/VectorLayer.d.ts +1 -8
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.js +14 -55
- package/renderer/canvas/VectorTileLayer.d.ts +1 -1
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +0 -2
- package/renderer/webgl/TileLayerBase.js +1 -1
- package/reproj/Tile.d.ts +2 -7
- package/reproj/Tile.d.ts.map +1 -1
- package/reproj/Tile.js +6 -12
- package/source/Cluster.d.ts +2 -8
- package/source/Cluster.d.ts.map +1 -1
- package/source/DataTile.d.ts +0 -15
- package/source/DataTile.d.ts.map +1 -1
- package/source/DataTile.js +0 -9
- package/source/GeoTIFF.d.ts +2 -7
- package/source/GeoTIFF.d.ts.map +1 -1
- package/source/GeoTIFF.js +10 -15
- package/source/ImageArcGISRest.d.ts +0 -10
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageArcGISRest.js +0 -8
- package/source/ImageMapGuide.d.ts +0 -10
- package/source/ImageMapGuide.d.ts.map +1 -1
- package/source/ImageMapGuide.js +0 -8
- package/source/ImageStatic.d.ts +0 -5
- package/source/ImageStatic.d.ts.map +1 -1
- package/source/ImageStatic.js +0 -2
- package/source/ImageTile.d.ts +1 -5
- package/source/ImageTile.d.ts.map +1 -1
- package/source/ImageTile.js +0 -5
- package/source/ImageWMS.d.ts +0 -10
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/ImageWMS.js +0 -10
- package/source/OGCMapTile.d.ts +0 -5
- package/source/OGCMapTile.d.ts.map +1 -1
- package/source/OGCMapTile.js +0 -2
- package/source/OSM.d.ts +0 -5
- package/source/OSM.d.ts.map +1 -1
- package/source/OSM.js +19 -5
- package/source/SentinelHub.d.ts +0 -1
- package/source/SentinelHub.d.ts.map +1 -1
- package/source/SentinelHub.js +0 -5
- package/source/Source.d.ts +1 -3
- package/source/Source.d.ts.map +1 -1
- package/source/TileArcGISRest.d.ts +1 -6
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileArcGISRest.js +0 -2
- package/source/TileDebug.d.ts +1 -1
- package/source/TileImage.d.ts +0 -10
- package/source/TileImage.d.ts.map +1 -1
- package/source/TileImage.js +3 -16
- package/source/TileWMS.d.ts +1 -1
- package/source/UrlTile.d.ts +1 -1
- package/source/Vector.d.ts +8 -18
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +3 -3
- package/source/WMTS.d.ts +0 -5
- package/source/WMTS.d.ts.map +1 -1
- package/source/WMTS.js +0 -2
- package/source/XYZ.d.ts +0 -5
- package/source/XYZ.d.ts.map +1 -1
- package/source/XYZ.js +0 -2
- package/source/Zoomify.d.ts +2 -7
- package/source/Zoomify.d.ts.map +1 -1
- package/source/Zoomify.js +3 -5
- package/source/arcgisRest.d.ts +0 -5
- package/source/arcgisRest.d.ts.map +1 -1
- package/source/arcgisRest.js +0 -5
- package/source/mapguide.d.ts +0 -4
- package/source/mapguide.d.ts.map +1 -1
- package/source/mapguide.js +0 -5
- package/source/mapserver.d.ts +1 -5
- package/source/mapserver.d.ts.map +1 -1
- package/source/mapserver.js +0 -4
- package/source/ogcTileUtil.d.ts +12 -20
- package/source/ogcTileUtil.d.ts.map +1 -1
- package/source/ogcTileUtil.js +15 -27
- package/source/static.d.ts +0 -5
- package/source/static.d.ts.map +1 -1
- package/source/static.js +0 -4
- package/source/wms.d.ts +0 -5
- package/source/wms.d.ts.map +1 -1
- package/source/wms.js +0 -5
- package/style/Circle.d.ts +14 -0
- package/style/Circle.d.ts.map +1 -1
- package/style/Circle.js +11 -0
- package/style/Fill.js +1 -1
- package/style/Icon.d.ts +0 -19
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +2 -55
- package/style/IconImage.d.ts +5 -14
- package/style/IconImage.d.ts.map +1 -1
- package/style/IconImage.js +18 -28
- package/style/IconImageCache.d.ts +8 -4
- package/style/IconImageCache.d.ts.map +1 -1
- package/style/IconImageCache.js +13 -11
- package/style/RegularShape.d.ts +0 -12
- package/style/RegularShape.d.ts.map +1 -1
- package/style/RegularShape.js +4 -36
- package/style/Stroke.d.ts +0 -25
- package/style/Stroke.d.ts.map +1 -1
- package/style/Stroke.js +0 -28
- package/style/Style.d.ts +1 -1
- package/style/flat.d.ts +2 -2
- package/style/flat.js +1 -1
- package/tilegrid/TileGrid.d.ts +0 -5
- package/tilegrid/TileGrid.d.ts.map +1 -1
- package/tilegrid/TileGrid.js +0 -8
- package/util.js +1 -1
- package/worker/webgl.js +1 -1
- package/geom/flat/lineoffset.d.ts +0 -45
- package/geom/flat/lineoffset.d.ts.map +0 -1
- package/geom/flat/lineoffset.js +0 -173
- package/source/GeoZarr.d.ts +0 -163
- package/source/GeoZarr.d.ts.map +0 -1
- package/source/GeoZarr.js +0 -472
- package/source/OGCMap.d.ts +0 -180
- package/source/OGCMap.d.ts.map +0 -1
- package/source/OGCMap.js +0 -227
- package/source/ogcMapUtil.d.ts +0 -88
- package/source/ogcMapUtil.d.ts.map +0 -1
- package/source/ogcMapUtil.js +0 -121
package/render/canvas.js
CHANGED
|
@@ -33,7 +33,6 @@ import {clear} from '../obj.js';
|
|
|
33
33
|
* @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.
|
|
34
34
|
* @property {number} [currentLineWidth] Current LineWidth.
|
|
35
35
|
* @property {number} [currentMiterLimit] Current MiterLimit.
|
|
36
|
-
* @property {number} [currentStrokeOffset] Current StrokeOffset.
|
|
37
36
|
* @property {number} [lastStroke] Last stroke.
|
|
38
37
|
* @property {import("../colorlike.js").ColorLike} [fillStyle] FillStyle.
|
|
39
38
|
* @property {import("../colorlike.js").ColorLike} [strokeStyle] StrokeStyle.
|
|
@@ -43,7 +42,6 @@ import {clear} from '../obj.js';
|
|
|
43
42
|
* @property {CanvasLineJoin} [lineJoin] LineJoin.
|
|
44
43
|
* @property {number} [lineWidth] LineWidth.
|
|
45
44
|
* @property {number} [miterLimit] MiterLimit.
|
|
46
|
-
* @property {number} [strokeOffset] StrokeOffset.
|
|
47
45
|
* @property {number} [fillPatternScale] Fill pattern scale.
|
|
48
46
|
*/
|
|
49
47
|
|
|
@@ -55,7 +53,6 @@ import {clear} from '../obj.js';
|
|
|
55
53
|
* @property {CanvasLineJoin} lineJoin LineJoin.
|
|
56
54
|
* @property {number} lineWidth LineWidth.
|
|
57
55
|
* @property {number} miterLimit MiterLimit.
|
|
58
|
-
* @property {number} [strokeOffset] StrokeOffset.
|
|
59
56
|
* @property {import("../colorlike.js").ColorLike} strokeStyle StrokeStyle.
|
|
60
57
|
*/
|
|
61
58
|
|
|
@@ -131,12 +128,6 @@ export const defaultLineJoin = 'round';
|
|
|
131
128
|
*/
|
|
132
129
|
export const defaultMiterLimit = 10;
|
|
133
130
|
|
|
134
|
-
/**
|
|
135
|
-
* @const
|
|
136
|
-
* @type {number}
|
|
137
|
-
*/
|
|
138
|
-
export const defaultStrokeOffset = 0;
|
|
139
|
-
|
|
140
131
|
/**
|
|
141
132
|
* @const
|
|
142
133
|
* @type {import("../colorlike.js").ColorLike}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bufferUtil.d.ts","sourceRoot":"","sources":["bufferUtil.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,yDAVW,YAAY,gBACZ,MAAM,4BACN,YAAY,wBACZ,MAAM,oBACN,eAAe,GACd,eAAe,CAmC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wDAbW,YAAY,qBACZ,MAAM,mBACN,MAAM,sBACN,MAAM,GAAC,IAAI,qBACX,MAAM,GAAC,IAAI,2BACX,KAAK,CAAC,MAAM,CAAC,oBACb,KAAK,CAAC,MAAM,CAAC,oBACb,OAAO,oBAAoB,EAAE,SAAS,iBACtC,MAAM,0BACN,MAAM,GACL;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"bufferUtil.d.ts","sourceRoot":"","sources":["bufferUtil.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,yDAVW,YAAY,gBACZ,MAAM,4BACN,YAAY,wBACZ,MAAM,oBACN,eAAe,GACd,eAAe,CAmC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wDAbW,YAAY,qBACZ,MAAM,mBACN,MAAM,sBACN,MAAM,GAAC,IAAI,qBACX,MAAM,GAAC,IAAI,2BACX,KAAK,CAAC,MAAM,CAAC,oBACb,KAAK,CAAC,MAAM,CAAC,oBACb,OAAO,oBAAoB,EAAE,SAAS,iBACtC,MAAM,0BACN,MAAM,GACL;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAgI1C;AAED;;;;;;;;;GASG;AACH,6DARW,YAAY,qBACZ,MAAM,eACN,KAAK,CAAC,MAAM,CAAC,cACb,KAAK,CAAC,MAAM,CAAC,wBACb,MAAM,GACL,MAAM,CA0CjB;AA/QD,6CAA8C,KAAK,CAAC;;;;;;;;8BAQtC,MAAM;;;;gCACN,MAAM;;;;qBACN,MAAM"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module ol/render/webgl/bufferUtil
|
|
4
4
|
*/
|
|
5
5
|
import earcut from 'earcut';
|
|
6
|
-
import {
|
|
6
|
+
import {clamp} from '../../math.js';
|
|
7
7
|
import {apply as applyTransform} from '../../transform.js';
|
|
8
8
|
|
|
9
9
|
export const LINESTRING_ANGLE_COSINE_CUTOFF = 0.985;
|
|
@@ -129,6 +129,36 @@ export function writeLineSegmentToBuffers(
|
|
|
129
129
|
const p0world = applyTransform(toWorldTransform, [...p0]);
|
|
130
130
|
const p1world = applyTransform(toWorldTransform, [...p1]);
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Compute the angle between p0pA and p0pB
|
|
134
|
+
* @param {import("../../coordinate.js").Coordinate} p0 Point 0
|
|
135
|
+
* @param {import("../../coordinate.js").Coordinate} pA Point A
|
|
136
|
+
* @param {import("../../coordinate.js").Coordinate} pB Point B
|
|
137
|
+
* @return {number} a value in [0, 2PI]
|
|
138
|
+
*/
|
|
139
|
+
function angleBetween(p0, pA, pB) {
|
|
140
|
+
const lenA = Math.sqrt(
|
|
141
|
+
(pA[0] - p0[0]) * (pA[0] - p0[0]) + (pA[1] - p0[1]) * (pA[1] - p0[1]),
|
|
142
|
+
);
|
|
143
|
+
const tangentA = [(pA[0] - p0[0]) / lenA, (pA[1] - p0[1]) / lenA];
|
|
144
|
+
const orthoA = [-tangentA[1], tangentA[0]];
|
|
145
|
+
const lenB = Math.sqrt(
|
|
146
|
+
(pB[0] - p0[0]) * (pB[0] - p0[0]) + (pB[1] - p0[1]) * (pB[1] - p0[1]),
|
|
147
|
+
);
|
|
148
|
+
const tangentB = [(pB[0] - p0[0]) / lenB, (pB[1] - p0[1]) / lenB];
|
|
149
|
+
|
|
150
|
+
// this angle can be clockwise or anticlockwise; hence the computation afterwards
|
|
151
|
+
let angle =
|
|
152
|
+
lenA === 0 || lenB === 0
|
|
153
|
+
? 0
|
|
154
|
+
: Math.acos(
|
|
155
|
+
clamp(tangentB[0] * tangentA[0] + tangentB[1] * tangentA[1], -1, 1),
|
|
156
|
+
);
|
|
157
|
+
angle = Math.max(angle, 0.00001); // avoid a zero angle otherwise this is detected as a line cap
|
|
158
|
+
const isClockwise = tangentB[0] * orthoA[0] + tangentB[1] * orthoA[1] > 0;
|
|
159
|
+
return !isClockwise ? Math.PI * 2 - angle : angle;
|
|
160
|
+
}
|
|
161
|
+
|
|
132
162
|
// a negative angle indicates a line cap
|
|
133
163
|
let angle0 = -1;
|
|
134
164
|
let angle1 = -1;
|
package/renderer/Composite.js
CHANGED
|
@@ -171,13 +171,12 @@ class CompositeMapRenderer extends MapRenderer {
|
|
|
171
171
|
mapContext.fillRect(0, 0, mapCanvas.width, mapCanvas.height);
|
|
172
172
|
}
|
|
173
173
|
if (isCanvas(canvas) && canvas.width > 0) {
|
|
174
|
-
mapContext.save();
|
|
175
174
|
const opacity = container.style.opacity || canvas.style.opacity;
|
|
176
175
|
mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);
|
|
177
176
|
const transform = canvas.style.transform;
|
|
178
177
|
if (transform) {
|
|
179
178
|
// Get the transform parameters from the style's transform matrix
|
|
180
|
-
mapContext.
|
|
179
|
+
mapContext.setTransform(
|
|
181
180
|
.../** @type {[number, number, number, number, number, number]} */ (
|
|
182
181
|
fromString(transform)
|
|
183
182
|
),
|
|
@@ -185,12 +184,13 @@ class CompositeMapRenderer extends MapRenderer {
|
|
|
185
184
|
} else {
|
|
186
185
|
const w = parseFloat(canvas.style.width) / canvas.width;
|
|
187
186
|
const h = parseFloat(canvas.style.height) / canvas.height;
|
|
188
|
-
mapContext.
|
|
187
|
+
mapContext.setTransform(w, 0, 0, h, 0, 0);
|
|
189
188
|
}
|
|
190
189
|
mapContext.drawImage(canvas, 0, 0);
|
|
191
|
-
mapContext.restore();
|
|
192
190
|
}
|
|
193
191
|
}
|
|
192
|
+
mapContext.globalAlpha = 1;
|
|
193
|
+
mapContext.setTransform(1, 0, 0, 1, 0, 0);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);
|
|
@@ -8,17 +8,12 @@ declare class CanvasImageLayerRenderer extends CanvasLayerRenderer<any> {
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../../layer/Image.js").default} imageLayer Image layer.
|
|
10
10
|
*/
|
|
11
|
-
constructor(imageLayer: import("../../layer.js").
|
|
11
|
+
constructor(imageLayer: import("../../layer/Image.js").default<any>);
|
|
12
12
|
/**
|
|
13
13
|
* @protected
|
|
14
14
|
* @type {?import("../../Image.js").default}
|
|
15
15
|
*/
|
|
16
16
|
protected image: import("../../Image.js").default | null;
|
|
17
|
-
/**
|
|
18
|
-
* @private
|
|
19
|
-
* @type {number}
|
|
20
|
-
*/
|
|
21
|
-
private renderedSourceRevision_;
|
|
22
17
|
/**
|
|
23
18
|
* @return {import('../../DataTile.js').ImageLike} Image.
|
|
24
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageLayer.d.ts","sourceRoot":"","sources":["ImageLayer.js"],"names":[],"mappings":";AAqBA;;;;GAIG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"ImageLayer.d.ts","sourceRoot":"","sources":["ImageLayer.js"],"names":[],"mappings":";AAqBA;;;;GAIG;AACH;IACE;;OAEG;IACH,qEAQC;IALC;;;OAGG;IACH,iBAFW,OAAO,gBAAgB,EAAE,OAAO,OAAA,CAE1B;IAGnB;;OAEG;IACH,YAFY,OAAO,mBAAmB,EAAE,SAAS,CAIhD;IAsDD;;;;OAIG;IACH,wBAJW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,iBAAiB,CA0C5B;IAED;;;;;;OAMG;IACH,iCALW,OAAO,cAAc,EAAE,UAAU,UACjC,WAAW,GACV,WAAW,CAuFtB;CACF;gCA1N+B,YAAY"}
|
|
@@ -36,12 +36,6 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|
|
36
36
|
* @type {?import("../../Image.js").default}
|
|
37
37
|
*/
|
|
38
38
|
this.image = null;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @private
|
|
42
|
-
* @type {number}
|
|
43
|
-
*/
|
|
44
|
-
this.renderedSourceRevision_ = 0;
|
|
45
39
|
}
|
|
46
40
|
|
|
47
41
|
/**
|
|
@@ -81,14 +75,6 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|
|
81
75
|
!isEmpty(renderedExtent)
|
|
82
76
|
) {
|
|
83
77
|
if (imageSource) {
|
|
84
|
-
if (
|
|
85
|
-
!this.getLayer().rendered &&
|
|
86
|
-
this.renderedSourceRevision_ !== imageSource.getRevision()
|
|
87
|
-
) {
|
|
88
|
-
this.image = null;
|
|
89
|
-
}
|
|
90
|
-
this.renderedSourceRevision_ = imageSource.getRevision();
|
|
91
|
-
|
|
92
78
|
const projection = viewState.projection;
|
|
93
79
|
const image = imageSource.getImage(
|
|
94
80
|
renderedExtent,
|
|
@@ -19,7 +19,7 @@ export type Options = {
|
|
|
19
19
|
* @template {import("../../layer/Tile.js").default|import("../../layer/VectorTile.js").default} [LayerType=import("../../layer/Tile.js").default<import("../../source/Tile.js").default>|import("../../layer/VectorTile.js").default]
|
|
20
20
|
* @extends {CanvasLayerRenderer<LayerType>}
|
|
21
21
|
*/
|
|
22
|
-
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default | import("../../layer/VectorTile.js").default = import("../../layer.js").
|
|
22
|
+
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default | import("../../layer/VectorTile.js").default = import("../../layer/Tile.js").default<import("../../source/Tile.js").default<import("../../Tile.js").default>> | import("../../layer/VectorTile.js").default<import("../../source.js").VectorTile<any>, any>> extends CanvasLayerRenderer<LayerType> {
|
|
23
23
|
/**
|
|
24
24
|
* @param {LayerType} tileLayer Tile layer.
|
|
25
25
|
* @param {Options} [options] Options.
|
|
@@ -22,17 +22,10 @@ declare class CanvasVectorLayerRenderer extends CanvasLayerRenderer<any> {
|
|
|
22
22
|
*/
|
|
23
23
|
private hitDetectionImageData_;
|
|
24
24
|
/**
|
|
25
|
-
* @private
|
|
26
|
-
* @type {import("../../extent.js").Extent}
|
|
27
|
-
*/
|
|
28
|
-
private clipExtent_;
|
|
29
|
-
/**
|
|
30
|
-
* Do we need to extend the rendered area on the x-axis to handle
|
|
31
|
-
* features that cross the antimeridian?
|
|
32
25
|
* @private
|
|
33
26
|
* @type {boolean}
|
|
34
27
|
*/
|
|
35
|
-
private
|
|
28
|
+
private clipped_;
|
|
36
29
|
/**
|
|
37
30
|
* @private
|
|
38
31
|
* @type {Array<import("../../Feature.js").default>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";AA4CA;;;;GAIG;AACH;IACE;;OAEG;IACH,qFAuHC;IApHC,eAAe;IACf,qCAA2E;IAE3E;;;OAGG;IACH,gCAA4B;IAE5B;;;OAGG;IACH,+BAAkC;IAElC;;;OAGG;IACH,iBAAqB;IAErB;;;OAGG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,4BAA8B;IAE9B;;;OAGG;IACH,wBAAoC;IAEpC;;;OAGG;IACH,+BAA2C;IAE3C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,4BAA4B;IAE5B;;;OAGG;IACH,6BAAgC;IAEhC;;;OAGG;IACH,gCAA4B;IAE5B;;;OAGG;IACH,qBAAwB;IAExB;;;OAGG;IACH,oBAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,uBAA0B;IAE1B;;;OAGG;IACH,iBAAiB;IAGnB;;;;;OAKG;IACH,4BALW,aAAa,cACb,OAAO,cAAc,EAAE,UAAU,kBACjC,OAAO,QA2DjB;IAED;;OAEG;IACH,wBASC;IAED;;OAEG;IACH,0BAWC;IAED;;;OAGG;IACH,4BAFW,OAAO,cAAc,EAAE,UAAU,QAO3C;IAqFD;;;;;;OAMG;IACH,4BALW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,eAAe,EAAE,OAAO,CAAC,CAAC,CA+F1D;IAwFD;;;;OAIG;IACH,gCAEC;IA2MD;;;;;;;;;OASG;IACH,uBATW,OAAO,kBAAkB,EAAE,OAAO,oBAClC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,KAAK,CAAC,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,cACrD,OAAO,eAAe,EAAE,iBAAiB,cACzC,OAAO,UACP,MAAM,GACL,OAAO,CA0ClB;CACF;gCA/vB6C,YAAY;0BAbnD,sCAAsC"}
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
getHeight,
|
|
13
13
|
getWidth,
|
|
14
14
|
intersects as intersectsExtent,
|
|
15
|
-
isEmpty,
|
|
16
15
|
wrapX as wrapExtentX,
|
|
17
16
|
} from '../../extent.js';
|
|
18
17
|
import {
|
|
@@ -71,18 +70,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
71
70
|
this.hitDetectionImageData_ = null;
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
|
-
* @private
|
|
75
|
-
* @type {import("../../extent.js").Extent}
|
|
76
|
-
*/
|
|
77
|
-
this.clipExtent_ = null;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Do we need to extend the rendered area on the x-axis to handle
|
|
81
|
-
* features that cross the antimeridian?
|
|
82
73
|
* @private
|
|
83
74
|
* @type {boolean}
|
|
84
75
|
*/
|
|
85
|
-
this.
|
|
76
|
+
this.clipped_ = false;
|
|
86
77
|
|
|
87
78
|
/**
|
|
88
79
|
* @private
|
|
@@ -209,12 +200,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
209
200
|
const multiWorld = vectorSource.getWrapX() && projection.canWrapX();
|
|
210
201
|
const worldWidth = multiWorld ? getWidth(projectionExtent) : null;
|
|
211
202
|
const endWorld = multiWorld
|
|
212
|
-
? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) +
|
|
213
|
-
(this.extendX_ ? 2 : 1)
|
|
203
|
+
? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1
|
|
214
204
|
: 1;
|
|
215
205
|
let world = multiWorld
|
|
216
|
-
? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)
|
|
217
|
-
(this.extendX_ ? 1 : 0)
|
|
206
|
+
? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)
|
|
218
207
|
: 0;
|
|
219
208
|
do {
|
|
220
209
|
let transform = this.getRenderTransform(
|
|
@@ -297,13 +286,9 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
297
286
|
if (!this.replayGroup_) {
|
|
298
287
|
return;
|
|
299
288
|
}
|
|
300
|
-
if (this.clipExtent_) {
|
|
301
|
-
this.clipUnrotated(this.context, frameState, this.clipExtent_);
|
|
302
|
-
}
|
|
303
289
|
this.replayGroup_.renderDeferred();
|
|
304
|
-
if (this.
|
|
290
|
+
if (this.clipped_) {
|
|
305
291
|
this.context.restore();
|
|
306
|
-
this.clipExtent_ = null;
|
|
307
292
|
}
|
|
308
293
|
this.resetDrawContext_();
|
|
309
294
|
}
|
|
@@ -341,22 +326,13 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
341
326
|
const projection = viewState.projection;
|
|
342
327
|
|
|
343
328
|
// clipped rendering if layer extent is set
|
|
344
|
-
this.
|
|
345
|
-
let clipped = false;
|
|
329
|
+
this.clipped_ = false;
|
|
346
330
|
if (render && layerState.extent && this.clipping) {
|
|
347
331
|
const layerExtent = fromUserExtent(layerState.extent, projection);
|
|
348
332
|
render = intersectsExtent(layerExtent, frameState.extent);
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
if (frameState.declutter) {
|
|
353
|
-
// Store extent for deferred clipping
|
|
354
|
-
this.clipExtent_ = layerExtent;
|
|
355
|
-
} else {
|
|
356
|
-
// Apply clipping immediately for non-declutter rendering
|
|
357
|
-
this.clipUnrotated(context, frameState, layerExtent);
|
|
358
|
-
clipped = true;
|
|
359
|
-
}
|
|
333
|
+
this.clipped_ = render && !containsExtent(layerExtent, frameState.extent);
|
|
334
|
+
if (this.clipped_) {
|
|
335
|
+
this.clipUnrotated(context, frameState, layerExtent);
|
|
360
336
|
}
|
|
361
337
|
}
|
|
362
338
|
|
|
@@ -368,7 +344,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
368
344
|
);
|
|
369
345
|
}
|
|
370
346
|
|
|
371
|
-
if (
|
|
347
|
+
if (!frameState.declutter && this.clipped_) {
|
|
372
348
|
context.restore();
|
|
373
349
|
}
|
|
374
350
|
|
|
@@ -628,20 +604,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
628
604
|
const loadExtents = [extent.slice()];
|
|
629
605
|
const projectionExtent = projection.getExtent();
|
|
630
606
|
|
|
631
|
-
const canWrapX = vectorSource.getWrapX() && projection.canWrapX();
|
|
632
|
-
this.extendX_ = false;
|
|
633
|
-
if (canWrapX) {
|
|
634
|
-
const sourceExtent = vectorSource.getExtent();
|
|
635
|
-
if (sourceExtent && !isEmpty(sourceExtent)) {
|
|
636
|
-
this.extendX_ =
|
|
637
|
-
sourceExtent[0] < projectionExtent[0] ||
|
|
638
|
-
sourceExtent[2] > projectionExtent[2];
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
607
|
if (
|
|
643
|
-
|
|
644
|
-
(
|
|
608
|
+
vectorSource.getWrapX() &&
|
|
609
|
+
projection.canWrapX() &&
|
|
610
|
+
!containsExtent(projectionExtent, frameState.extent)
|
|
645
611
|
) {
|
|
646
612
|
// For the replay group, we need an extent that intersects the real world
|
|
647
613
|
// (-180° to +180°). To support geometries in a coordinate range from -540°
|
|
@@ -650,14 +616,8 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
650
616
|
// the viewport width to make sure we cover the whole viewport.
|
|
651
617
|
const worldWidth = getWidth(projectionExtent);
|
|
652
618
|
const gutter = Math.max(getWidth(extent) / 2, worldWidth);
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
if (this.extendX_) {
|
|
656
|
-
projMinX -= worldWidth;
|
|
657
|
-
projMaxX += worldWidth;
|
|
658
|
-
}
|
|
659
|
-
extent[0] = projMinX - gutter;
|
|
660
|
-
extent[2] = projMaxX + gutter;
|
|
619
|
+
extent[0] = projectionExtent[0] - gutter;
|
|
620
|
+
extent[2] = projectionExtent[2] + gutter;
|
|
661
621
|
wrapCoordinateX(center, projection);
|
|
662
622
|
const loadExtent = wrapExtentX(loadExtents[0], projection);
|
|
663
623
|
// If the extent crosses the date line, we load data for both edges of the worlds
|
|
@@ -687,7 +647,6 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
687
647
|
if (
|
|
688
648
|
this.ready &&
|
|
689
649
|
this.renderedResolution_ == resolution &&
|
|
690
|
-
this.renderedPixelRatio_ === pixelRatio &&
|
|
691
650
|
this.renderedRevision_ == vectorLayerRevision &&
|
|
692
651
|
this.renderedRenderOrder_ == vectorLayerRenderOrder &&
|
|
693
652
|
this.renderedFrameDeclutter_ === !!frameState.declutter &&
|
|
@@ -5,7 +5,7 @@ export default CanvasVectorTileLayerRenderer;
|
|
|
5
5
|
* @api
|
|
6
6
|
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}
|
|
7
7
|
*/
|
|
8
|
-
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer.js").
|
|
8
|
+
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import("../../source/VectorTile.js").default<import("../../Feature.js").FeatureLike>, import("../../Feature.js").FeatureLike>> {
|
|
9
9
|
/**
|
|
10
10
|
* @param {import("../../layer/VectorTile.js").default} layer VectorTile layer.
|
|
11
11
|
* @param {import("./TileLayer.js").Options} options Options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA6DA;;;;;GAKG;AACH;IACE;;;OAGG;IACH,mBAHW,OAAO,2BAA2B,EAAE,OAAO,WAC3C,OAAO,gBAAgB,EAAE,OAAO,EA2C1C;IAtCC,eAAe;IACf,qCAA2E;IAE3E;;;OAGG;IACH,+BAA2B;IAE3B;;;OAGG;IACH,4CAA+C;IAE/C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,yBAAyB;IAEzB;;;OAGG;IACH,sBAAsC;IAEtC;;;OAGG;IACH,0BAA6B;IAY/B;;;;;;;;;;OAUG;IACH,wBAVW,OAAO,2BAA2B,EAAE,OAAO,cAC3C,OAAO,cAAc,EAAE,UAAU,KACjC,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,UACN,MAAM,cACN,OAAO,QAajB;IAoDD;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA6DA;;;;;GAKG;AACH;IACE;;;OAGG;IACH,mBAHW,OAAO,2BAA2B,EAAE,OAAO,WAC3C,OAAO,gBAAgB,EAAE,OAAO,EA2C1C;IAtCC,eAAe;IACf,qCAA2E;IAE3E;;;OAGG;IACH,+BAA2B;IAE3B;;;OAGG;IACH,4CAA+C;IAE/C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,yBAAyB;IAEzB;;;OAGG;IACH,sBAAsC;IAEtC;;;OAGG;IACH,0BAA6B;IAY/B;;;;;;;;;;OAUG;IACH,wBAVW,OAAO,2BAA2B,EAAE,OAAO,cAC3C,OAAO,cAAc,EAAE,UAAU,KACjC,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,UACN,MAAM,cACN,OAAO,QAajB;IAoDD;;;;;OAKG;IACH,6BA4IC;IAyMD;;;OAGG;IACH,4BAHW,OAAO,iBAAiB,EAAE,MAAM,GAC/B,KAAK,CAAC,OAAO,kBAAkB,EAAE,WAAW,CAAC,CA4CxD;IAaD;;;;OAIG;IACH,gCAEC;IAED;;;;OAIG;IACH,4BAHW,OAAO,cAAc,EAAE,UAAU,cACjC,OAAO,sBAAsB,EAAE,KAAK,QAyC9C;IA6DD;;;;OAIG;IACH,6BAJW,OAAO,2BAA2B,EAAE,OAAO,cAC3C,OAAO,cAAc,EAAE,UAAU,GAChC,OAAO,oBAAoB,EAAE,SAAS,CAkCjD;IAqID;;;;;;;;OAQG;IACH,uBARW,OAAO,kBAAkB,EAAE,WAAW,oBACtC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,KAAK,CAAC,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,cACrD,OAAO,UACP,MAAM,GACL,OAAO,CAyClB;IAED;;;;OAIG;IACH,8BAcC;IAED;;;;OAIG;IACH,yBAwDC;CACF;oCAl9BmC,gBAAgB"}
|
|
@@ -214,7 +214,6 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|
|
214
214
|
!builderState.dirty &&
|
|
215
215
|
builderState.renderedResolution === resolution &&
|
|
216
216
|
builderState.renderedRevision == revision &&
|
|
217
|
-
builderState.renderedPixelRatio === pixelRatio &&
|
|
218
217
|
builderState.renderedRenderOrder == renderOrder
|
|
219
218
|
) {
|
|
220
219
|
return;
|
|
@@ -340,7 +339,6 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|
|
340
339
|
tile.executorGroups[layerUid].push(renderingReplayGroup);
|
|
341
340
|
}
|
|
342
341
|
builderState.renderedRevision = revision;
|
|
343
|
-
builderState.renderedPixelRatio = pixelRatio;
|
|
344
342
|
builderState.renderedRenderOrder = renderOrder;
|
|
345
343
|
builderState.renderedResolution = resolution;
|
|
346
344
|
}
|
|
@@ -124,7 +124,7 @@ function getRenderExtent(frameState, extent) {
|
|
|
124
124
|
* @return {string} The cache key.
|
|
125
125
|
*/
|
|
126
126
|
export function getCacheKey(source, tileCoord) {
|
|
127
|
-
return `${getUid(source)},${source.getKey()},${getTileCoordKey(tileCoord)}`;
|
|
127
|
+
return `${getUid(source)},${source.getKey()},${source.getRevision()},${getTileCoordKey(tileCoord)}`;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
package/reproj/Tile.d.ts
CHANGED
|
@@ -4,11 +4,7 @@ export type TileOffset = {
|
|
|
4
4
|
/**
|
|
5
5
|
* Tile.
|
|
6
6
|
*/
|
|
7
|
-
tile
|
|
8
|
-
/**
|
|
9
|
-
* Tile getter.
|
|
10
|
-
*/
|
|
11
|
-
getTile: () => import("../ImageTile.js").default;
|
|
7
|
+
tile: import("../ImageTile.js").default;
|
|
12
8
|
/**
|
|
13
9
|
* Offset.
|
|
14
10
|
*/
|
|
@@ -19,8 +15,7 @@ export type TileOffset = {
|
|
|
19
15
|
*/
|
|
20
16
|
/**
|
|
21
17
|
* @typedef {Object} TileOffset
|
|
22
|
-
* @property {import("../ImageTile.js").default}
|
|
23
|
-
* @property {function(): import("../ImageTile.js").default} getTile Tile getter.
|
|
18
|
+
* @property {import("../ImageTile.js").default} tile Tile.
|
|
24
19
|
* @property {number} offset Offset.
|
|
25
20
|
*/
|
|
26
21
|
/**
|
package/reproj/Tile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["Tile.js"],"names":[],"mappings":";2BAoBa,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,KAAI,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["Tile.js"],"names":[],"mappings":";2BAoBa,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,KAAI,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC;;;;;UAK7E,OAAO,iBAAiB,EAAE,OAAO;;;;YACjC,MAAM;;AAPpB;;GAEG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH;IACE;;;;;;;;;;;;;;OAcG;IACH,wBAdW,OAAO,uBAAuB,EAAE,OAAO,kBACvC,OAAO,yBAAyB,EAAE,OAAO,cACzC,OAAO,uBAAuB,EAAE,OAAO,kBACvC,OAAO,yBAAyB,EAAE,OAAO,aACzC,OAAO,iBAAiB,EAAE,SAAS,oBACnC,OAAO,iBAAiB,EAAE,SAAS,cACnC,MAAM,UACN,MAAM,mBACN,YAAY,mBAEZ,MAAM,gBACN,OAAO,YACP,OAAO,YAAY,EAAE,OAAO,EAmNtC;IAjMC;;;OAGG;IACH,qBAAmE;IAEnE;;;OAGG;IACH,oBAA6B;IAE7B;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,gBAAmB;IAEnB;;;OAGG;IACH,wBAAqC;IAErC;;;OAGG;IACH,wBAAqC;IAErC;;;OAGG;IACH,0BAAwE;IAExE;;;OAGG;IACH,qBAAsB;IAEtB;;;OAGG;IACH,6BAAgC;IAEhC;;;OAGG;IACH,iBAAiB;IAEjB;;;OAGG;IACH,oBAEa;IAiDb;;;OAGG;IACH,uBAOC;IAqEH;;;OAGG;IACH,YAFY,iBAAiB,GAAC,eAAe,CAI5C;IAED;;OAEG;IACH,mBAwDC;IAmDD;;OAEG;IACH,yBAGC;CAkBF;iBAhZgB,YAAY"}
|
package/reproj/Tile.js
CHANGED
|
@@ -23,8 +23,7 @@ import {ERROR_THRESHOLD} from './common.js';
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @typedef {Object} TileOffset
|
|
26
|
-
* @property {import("../ImageTile.js").default}
|
|
27
|
-
* @property {function(): import("../ImageTile.js").default} getTile Tile getter.
|
|
26
|
+
* @property {import("../ImageTile.js").default} tile Tile.
|
|
28
27
|
* @property {number} offset Offset.
|
|
29
28
|
*/
|
|
30
29
|
|
|
@@ -245,12 +244,11 @@ class ReprojTile extends Tile {
|
|
|
245
244
|
|
|
246
245
|
for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {
|
|
247
246
|
for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
});
|
|
247
|
+
const tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);
|
|
248
|
+
if (tile) {
|
|
249
|
+
const offset = worldsAway * worldWidth;
|
|
250
|
+
this.sourceTiles_.push({tile, offset});
|
|
251
|
+
}
|
|
254
252
|
}
|
|
255
253
|
}
|
|
256
254
|
++worldsAway;
|
|
@@ -336,9 +334,6 @@ class ReprojTile extends Tile {
|
|
|
336
334
|
* @override
|
|
337
335
|
*/
|
|
338
336
|
load() {
|
|
339
|
-
for (const sourceTile of this.sourceTiles_) {
|
|
340
|
-
sourceTile.tile = sourceTile.getTile();
|
|
341
|
-
}
|
|
342
337
|
if (this.state == TileState.IDLE) {
|
|
343
338
|
this.state = TileState.LOADING;
|
|
344
339
|
this.changed();
|
|
@@ -405,7 +400,6 @@ class ReprojTile extends Tile {
|
|
|
405
400
|
canvasPool.push(this.canvas_);
|
|
406
401
|
this.canvas_ = null;
|
|
407
402
|
}
|
|
408
|
-
this.sourceTiles_.length = 0;
|
|
409
403
|
super.release();
|
|
410
404
|
}
|
|
411
405
|
}
|
package/source/Cluster.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export default Cluster;
|
|
2
2
|
export type GeometryFunction<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").FeatureLike> = (feature: FeatureType) => (Point | null);
|
|
3
|
-
export type Options<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom.js").
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
}>> = {
|
|
3
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom/Geometry.js").default>> = {
|
|
6
4
|
/**
|
|
7
5
|
* Attributions.
|
|
8
6
|
*/
|
|
@@ -114,11 +112,7 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike = Fe
|
|
|
114
112
|
* @template {import('../Feature.js').FeatureLike} [FeatureType=import('../Feature.js').default]
|
|
115
113
|
* @extends {VectorSource<Feature<import("../geom/Geometry.js").default>>}
|
|
116
114
|
*/
|
|
117
|
-
declare class Cluster<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom.js").Geometry
|
|
118
|
-
[x: string]: any;
|
|
119
|
-
}>> extends VectorSource<Feature<import("../geom.js").Geometry, {
|
|
120
|
-
[x: string]: any;
|
|
121
|
-
}>> {
|
|
115
|
+
declare class Cluster<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom/Geometry.js").default>> extends VectorSource<Feature<import("../geom/Geometry.js").default>> {
|
|
122
116
|
/**
|
|
123
117
|
* @param {Options<FeatureType>} [options] Cluster options.
|
|
124
118
|
*/
|
package/source/Cluster.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cluster.d.ts","sourceRoot":"","sources":["Cluster.js"],"names":[],"mappings":";6BAmBoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY,0CACrC,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,KAAK,GAAC,IAAI,CAAC;oBAIC,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY
|
|
1
|
+
{"version":3,"file":"Cluster.d.ts","sourceRoot":"","sources":["Cluster.js"],"names":[],"mappings":";6BAmBoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY,0CACrC,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,KAAK,GAAC,IAAI,CAAC;oBAIC,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAuB3B,KAAK,QAAE,KAAK,CAAC,WAAW,CAAC,KAAE,OAAO;;;;;;;;;;AA7BzD;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;GAYG;AACH,sBAHoD,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;IAIhD;;OAEG;IACH,sBAFW,OAAO,CAAC,WAAW,CAAC,EAyE9B;IAhEC;;;OAGG;IACH,sBAHU,MAAM,GAAC,SAAS,CAGC;IAE3B;;;OAGG;IACH,oBAHU,MAAM,CAGsD;IAEtE;;;OAGG;IACH,uBAHU,MAAM,CAG2B;IAE3C;;;OAGG;IACH,8BAHU,MAAM,CAGW;IAE3B;;;OAGG;IACH,oBAHU,KAAK,CAAC,OAAO,CAAC,CAGN;IAElB;;;OAGG;IACH,4BAHU,gBAAgB,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC,CAY5D;IAEH;;;OAGG;IACH,6BAAiD;IAEjD;;;OAGG;IACH,kBAHU,YAAY,CAAC,WAAW,CAAC,GAAC,IAAI,CAGtB;IAElB;;OAEG;IACH,sBAA4C;IAiB9C;;;;OAIG;IACH,eAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,aAHY,YAAY,CAAC,WAAW,CAAC,GAAC,IAAI,CAKzC;IAgBD;;;;OAIG;IACH,sBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,4BAHW,MAAM,QAKhB;IAED;;;;OAIG;IACH,kBAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,kBAHW,YAAY,CAAC,WAAW,CAAC,GAAC,IAAI,QAYxC;IAYD;;;;OAIG;IACH,yBAHW,MAAM,eACN,MAAM,QAahB;IAED;;OAEG;IACH,0BAkCC;IAED;;;;;OAKG;IACH,kCALW,KAAK,CAAC,WAAW,CAAC,UAClB,OAAO,cAAc,EAAE,MAAM,GAC5B,OAAO,CA2BlB;CACF;kBApUiB,kBAAkB;oBAVhB,eAAe;yBAYV,aAAa"}
|
package/source/DataTile.d.ts
CHANGED
|
@@ -9,10 +9,6 @@ export type LoaderOptions = {
|
|
|
9
9
|
* The cross-origin attribute for images.
|
|
10
10
|
*/
|
|
11
11
|
crossOrigin?: CrossOriginAttribute | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* The `referrerPolicy` property for images.
|
|
14
|
-
*/
|
|
15
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
16
12
|
/**
|
|
17
13
|
* The maximum y coordinate at the given z level. Will be undefined if the
|
|
18
14
|
* underlying tile grid does not have a known extent.
|
|
@@ -95,10 +91,6 @@ export type Options = {
|
|
|
95
91
|
* The crossOrigin property to pass to loaders for image data.
|
|
96
92
|
*/
|
|
97
93
|
crossOrigin?: CrossOriginAttribute | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* The `referrerPolicy` property for loaded images.
|
|
100
|
-
*/
|
|
101
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
102
94
|
/**
|
|
103
95
|
* Key for use in caching tiles.
|
|
104
96
|
*/
|
|
@@ -116,7 +108,6 @@ export type Options = {
|
|
|
116
108
|
* @typedef {Object} LoaderOptions
|
|
117
109
|
* @property {AbortSignal} signal An abort controller signal.
|
|
118
110
|
* @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.
|
|
119
|
-
* @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for images.
|
|
120
111
|
* @property {number} [maxY] The maximum y coordinate at the given z level. Will be undefined if the
|
|
121
112
|
* underlying tile grid does not have a known extent.
|
|
122
113
|
*/
|
|
@@ -149,7 +140,6 @@ export type Options = {
|
|
|
149
140
|
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
150
141
|
* the nearest neighbor is used when resampling.
|
|
151
142
|
* @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.
|
|
152
|
-
* @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.
|
|
153
143
|
* @property {string} [key] Key for use in caching tiles.
|
|
154
144
|
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
|
|
155
145
|
* Choose whether to use tiles with a higher or lower zoom level when between integer
|
|
@@ -212,11 +202,6 @@ declare class DataTileSource<TileType extends import("../Tile.js").default = Dat
|
|
|
212
202
|
* @type {CrossOriginAttribute}
|
|
213
203
|
*/
|
|
214
204
|
private crossOrigin_;
|
|
215
|
-
/**
|
|
216
|
-
* @private
|
|
217
|
-
* @type {ReferrerPolicy}
|
|
218
|
-
*/
|
|
219
|
-
private referrerPolicy_;
|
|
220
205
|
/**
|
|
221
206
|
* @type {import("../transform.js").Transform|null}
|
|
222
207
|
*/
|
package/source/DataTile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTile.d.ts","sourceRoot":"","sources":["DataTile.js"],"names":[],"mappings":";mCAqBa,WAAW,GAAC,iBAAiB;;;;;YAK5B,WAAW
|
|
1
|
+
{"version":3,"file":"DataTile.d.ts","sourceRoot":"","sources":["DataTile.js"],"names":[],"mappings":";mCAqBa,WAAW,GAAC,iBAAiB;;;;;YAK5B,WAAW;;;;;;;;;;;;;;;qBASZ,CAAS,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAM,EAAN,MAAM,EAAE,IAAa,EAAb,aAAa,KAAI,CAAC,OAAO,gBAAgB,EAAE,IAAI,GAAC,OAAO,CAAC,OAAO,gBAAgB,EAAE,IAAI,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBvH,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjCjD;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;GAQG;AACH,6BAJ6C,QAAQ,SAAxC,OAAQ,YAAY,EAAE,OAAQ;IAKzC;;OAEG;IACH,qBAFW,OAAO,EAsFjB;IAvDC;;;OAGG;IACH,gBAAgE;IAEhE;;;OAGG;IACH,kBAAmE;IAEnE;;;OAGG;IACH,mBAAsB;IAEtB;;;OAGG;IACH,yBAA0B;IAE1B;;OAEG;IACH,gBAA6B;IAiO/B;;;OAGG;IACH,yBAFW,OAAO,oBAAoB,EAAE,OAAO,QAsB9C;IAlPC;;OAEG;IACH,WAFU,MAAM,CAEwD;IAExE;;;OAGG;IACH,+BAAgC;IAEhC;;;OAGG;IACH,qBAAsD;IAEtD;;OAEG;IACH,iBAFU,OAAO,iBAAiB,EAAE,SAAS,GAAC,IAAI,CAEvB;IAG7B;;;;;OAKG;IACH,kCAFW,KAAK,CAAC,OAAO,YAAY,EAAE,IAAI,CAAC,QAI1C;IAED;;;;;;OAMG;IACH,yBAHW,MAAM,GACL,OAAO,YAAY,EAAE,IAAI,CAWpC;IAmBD;;;OAGG;IACH,4BAHW,MAAM,QAKhB;IAED;;;;;;;;OAQG;IACH,kBARW,MAAM,KACN,MAAM,KACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,cACvC,OAAO,uBAAuB,EAAE,OAAO,cACvC,OAAO,wBAAwB,EAAE,OAAO,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,GACpE,QAAQ,CA6CpB;IAED;;;;;;;;;OASG;IACH,oBATW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,eACN,OAAO,uBAAuB,EAAE,OAAO,cACvC,OAAO,wBAAwB,EAAE,OAAO,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,GACrE,QAAQ,GAAC,IAAI,CA+ExB;IAmDD;;;;;;;;;;;OAWG;IACH,qCAJW,OAAO,YAAY,EAAE,cAAc,YACnC,OAAO,yBAAyB,EAAE,OAAO,QAWnD;CACF;qBA7aoB,gBAAgB;uBAcK,WAAW"}
|
package/source/DataTile.js
CHANGED
|
@@ -26,7 +26,6 @@ import TileEventType from './TileEventType.js';
|
|
|
26
26
|
* @typedef {Object} LoaderOptions
|
|
27
27
|
* @property {AbortSignal} signal An abort controller signal.
|
|
28
28
|
* @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.
|
|
29
|
-
* @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for images.
|
|
30
29
|
* @property {number} [maxY] The maximum y coordinate at the given z level. Will be undefined if the
|
|
31
30
|
* underlying tile grid does not have a known extent.
|
|
32
31
|
*/
|
|
@@ -61,7 +60,6 @@ import TileEventType from './TileEventType.js';
|
|
|
61
60
|
* @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
|
|
62
61
|
* the nearest neighbor is used when resampling.
|
|
63
62
|
* @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.
|
|
64
|
-
* @property {ReferrerPolicy} [referrerPolicy] The `referrerPolicy` property for loaded images.
|
|
65
63
|
* @property {string} [key] Key for use in caching tiles.
|
|
66
64
|
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
|
|
67
65
|
* Choose whether to use tiles with a higher or lower zoom level when between integer
|
|
@@ -161,12 +159,6 @@ class DataTileSource extends TileSource {
|
|
|
161
159
|
*/
|
|
162
160
|
this.crossOrigin_ = options.crossOrigin || 'anonymous';
|
|
163
161
|
|
|
164
|
-
/**
|
|
165
|
-
* @private
|
|
166
|
-
* @type {ReferrerPolicy}
|
|
167
|
-
*/
|
|
168
|
-
this.referrerPolicy_ = options.referrerPolicy;
|
|
169
|
-
|
|
170
162
|
/**
|
|
171
163
|
* @type {import("../transform.js").Transform|null}
|
|
172
164
|
*/
|
|
@@ -319,7 +311,6 @@ class DataTileSource extends TileSource {
|
|
|
319
311
|
const loaderOptions = {
|
|
320
312
|
signal: controller.signal,
|
|
321
313
|
crossOrigin: this.crossOrigin_,
|
|
322
|
-
referrerPolicy: this.referrerPolicy_,
|
|
323
314
|
};
|
|
324
315
|
|
|
325
316
|
const tileCoord = this.getTileCoordForTileUrlFunction([z, x, y]);
|
package/source/GeoTIFF.d.ts
CHANGED
|
@@ -123,10 +123,6 @@ export type GeoTIFFSourceOptions = {
|
|
|
123
123
|
cacheSize?: number | undefined;
|
|
124
124
|
};
|
|
125
125
|
export type Options = {
|
|
126
|
-
/**
|
|
127
|
-
* Attributions.
|
|
128
|
-
*/
|
|
129
|
-
attributions?: import("./Source.js").AttributionLike | undefined;
|
|
130
126
|
/**
|
|
131
127
|
* List of information about GeoTIFF sources.
|
|
132
128
|
* Multiple sources can be combined when their resolution sets are equal after applying a scale.
|
|
@@ -191,7 +187,6 @@ export type Options = {
|
|
|
191
187
|
*/
|
|
192
188
|
/**
|
|
193
189
|
* @typedef {Object} Options
|
|
194
|
-
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
195
190
|
* @property {Array<SourceInfo>} sources List of information about GeoTIFF sources.
|
|
196
191
|
* Multiple sources can be combined when their resolution sets are equal after applying a scale.
|
|
197
192
|
* The list of sources defines a mapping between input bands as they are read from each GeoTIFF and
|
|
@@ -266,7 +261,7 @@ declare class GeoTIFFSource extends DataTile<import("../DataTile.js").default> {
|
|
|
266
261
|
*/
|
|
267
262
|
private nodataValues_;
|
|
268
263
|
/**
|
|
269
|
-
* @type {Array<Array<
|
|
264
|
+
* @type {Array<Array<GDALMetadata>>}
|
|
270
265
|
* @private
|
|
271
266
|
*/
|
|
272
267
|
private metadata_;
|
|
@@ -340,7 +335,7 @@ declare class GeoTIFFSource extends DataTile<import("../DataTile.js").default> {
|
|
|
340
335
|
/**
|
|
341
336
|
* @param {import("../size.js").Size} sourceTileSize The source tile size.
|
|
342
337
|
* @param {Array} sourceSamples The source samples.
|
|
343
|
-
* @return {
|
|
338
|
+
* @return {import("../DataTile.js").Data} The composed tile data.
|
|
344
339
|
* @private
|
|
345
340
|
*/
|
|
346
341
|
private composeTile_;
|