ol 9.2.5-sh.2 → 10.0.1-dev.1722076459273
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 -1
- package/Collection.d.ts.map +1 -1
- package/DataTile.d.ts +15 -1
- package/DataTile.d.ts.map +1 -1
- package/DataTile.js +26 -1
- package/Feature.d.ts +1 -1
- package/Feature.d.ts.map +1 -1
- package/Geolocation.d.ts +2 -2
- package/Geolocation.d.ts.map +1 -1
- package/Geolocation.js +1 -0
- package/Image.d.ts +4 -4
- package/Image.d.ts.map +1 -1
- package/ImageCanvas.d.ts +2 -1
- package/ImageCanvas.d.ts.map +1 -1
- package/ImageCanvas.js +2 -0
- package/ImageTile.d.ts.map +1 -1
- package/ImageTile.js +1 -1
- package/Map.d.ts +5 -4
- package/Map.d.ts.map +1 -1
- package/Map.js +15 -14
- package/MapBrowserEvent.d.ts +4 -2
- package/MapBrowserEvent.d.ts.map +1 -1
- package/MapBrowserEvent.js +4 -0
- package/MapBrowserEventHandler.d.ts +4 -1
- package/MapBrowserEventHandler.d.ts.map +1 -1
- package/MapBrowserEventHandler.js +4 -0
- package/MapBrowserEventType.d.ts +1 -1
- package/MapEvent.d.ts.map +1 -1
- package/MapEventType.d.ts +1 -1
- package/Object.d.ts.map +1 -1
- package/ObjectEventType.d.ts +1 -1
- package/Observable.d.ts +2 -2
- package/Observable.d.ts.map +1 -1
- package/Overlay.d.ts +2 -2
- package/Overlay.d.ts.map +1 -1
- package/Overlay.js +2 -2
- package/README.md +1 -1
- package/Tile.d.ts +10 -30
- package/Tile.d.ts.map +1 -1
- package/Tile.js +6 -79
- package/TileCache.d.ts +2 -1
- package/TileCache.d.ts.map +1 -1
- package/TileCache.js +4 -0
- package/TileQueue.d.ts +3 -2
- package/TileQueue.d.ts.map +1 -1
- package/TileQueue.js +7 -4
- package/VectorRenderTile.d.ts +8 -13
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorRenderTile.js +19 -24
- package/VectorTile.d.ts +6 -6
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +5 -4
- package/View.d.ts +1 -1
- package/View.d.ts.map +1 -1
- package/array.d.ts +2 -2
- package/array.d.ts.map +1 -1
- package/asserts.d.ts.map +1 -1
- package/centerconstraint.d.ts.map +1 -1
- package/color.d.ts.map +1 -1
- package/color.js +2 -2
- package/console.d.ts +1 -1
- package/console.d.ts.map +1 -1
- package/control/Attribution.d.ts.map +1 -1
- package/control/Attribution.js +5 -12
- package/control/Control.d.ts.map +1 -1
- package/control/Control.js +4 -6
- package/control/FullScreen.d.ts +1 -1
- package/control/FullScreen.d.ts.map +1 -1
- package/control/FullScreen.js +1 -0
- package/control/MousePosition.d.ts +1 -1
- package/control/MousePosition.d.ts.map +1 -1
- package/control/MousePosition.js +1 -0
- package/control/OverviewMap.d.ts.map +1 -1
- package/control/OverviewMap.js +16 -13
- package/control/Rotate.d.ts +4 -1
- package/control/Rotate.d.ts.map +1 -1
- package/control/Rotate.js +3 -0
- package/control/ScaleLine.d.ts +3 -3
- package/control/ScaleLine.d.ts.map +1 -1
- package/control/ZoomSlider.d.ts.map +1 -1
- package/control/ZoomSlider.js +1 -0
- package/control/ZoomToExtent.d.ts.map +1 -1
- package/control/defaults.d.ts.map +1 -1
- package/coordinate.d.ts +1 -1
- package/coordinate.d.ts.map +1 -1
- package/css.d.ts.map +1 -1
- package/dist/ol.d.ts +10 -8
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +1 -3
- package/dist/ol.js.map +1 -1
- package/dom.d.ts +0 -5
- package/dom.d.ts.map +1 -1
- package/dom.js +1 -9
- package/events/SnapEvent.d.ts.map +1 -1
- package/events/Target.d.ts.map +1 -1
- package/events/Target.js +1 -0
- package/events/condition.d.ts +2 -2
- package/events/condition.d.ts.map +1 -1
- package/events/condition.js +1 -1
- package/events.d.ts.map +1 -1
- package/events.js +6 -4
- package/expr/cpu.d.ts +1 -1
- package/expr/cpu.d.ts.map +1 -1
- package/expr/cpu.js +2 -16
- package/expr/expression.d.ts +8 -15
- package/expr/expression.d.ts.map +1 -1
- package/expr/expression.js +388 -508
- package/expr/gpu.d.ts +3 -3
- package/expr/gpu.d.ts.map +1 -1
- package/expr/gpu.js +1 -14
- package/extent.d.ts +2 -2
- package/extent.d.ts.map +1 -1
- package/featureloader.d.ts +6 -6
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +3 -3
- package/format/EsriJSON.d.ts +9 -5
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/EsriJSON.js +7 -0
- package/format/Feature.d.ts +12 -12
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +7 -5
- package/format/GML2.d.ts.map +1 -1
- package/format/GML2.js +7 -9
- package/format/GML3.d.ts +2 -1
- package/format/GML3.d.ts.map +1 -1
- package/format/GML3.js +23 -31
- package/format/GML32.d.ts.map +1 -1
- package/format/GML32.js +1 -0
- package/format/GMLBase.d.ts.map +1 -1
- package/format/GMLBase.js +3 -0
- package/format/GPX.d.ts.map +1 -1
- package/format/GPX.js +3 -0
- package/format/GeoJSON.d.ts +17 -13
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +17 -14
- package/format/IGC.d.ts +1 -1
- package/format/IGC.d.ts.map +1 -1
- package/format/IGC.js +2 -0
- package/format/IIIFInfo.d.ts.map +1 -1
- package/format/JSONFeature.d.ts +15 -11
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +17 -11
- package/format/KML.d.ts +6 -6
- package/format/KML.d.ts.map +1 -1
- package/format/KML.js +5 -1
- package/format/MVT.d.ts +15 -13
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +15 -14
- package/format/OSMXML.d.ts.map +1 -1
- package/format/OSMXML.js +1 -0
- package/format/OWS.d.ts.map +1 -1
- package/format/OWS.js +1 -0
- package/format/Polyline.d.ts +6 -3
- package/format/Polyline.d.ts.map +1 -1
- package/format/Polyline.js +6 -0
- package/format/TextFeature.d.ts +9 -5
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TextFeature.js +8 -0
- package/format/TopoJSON.d.ts +1 -1
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/TopoJSON.js +2 -0
- package/format/WFS.d.ts.map +1 -1
- package/format/WFS.js +3 -0
- package/format/WKB.d.ts +9 -5
- package/format/WKB.d.ts.map +1 -1
- package/format/WKB.js +8 -0
- package/format/WKT.d.ts.map +1 -1
- package/format/WKT.js +6 -0
- package/format/WMSCapabilities.d.ts.map +1 -1
- package/format/WMSCapabilities.js +1 -0
- package/format/WMSGetFeatureInfo.d.ts.map +1 -1
- package/format/WMSGetFeatureInfo.js +1 -0
- package/format/WMTSCapabilities.d.ts.map +1 -1
- package/format/WMTSCapabilities.js +1 -0
- package/format/XMLFeature.d.ts +11 -6
- package/format/XMLFeature.d.ts.map +1 -1
- package/format/XMLFeature.js +8 -0
- package/format/filter/Bbox.d.ts.map +1 -1
- package/format/filter/Comparison.d.ts.map +1 -1
- package/format/filter/ComparisonBinary.d.ts.map +1 -1
- package/format/filter/Contains.d.ts.map +1 -1
- package/format/filter/DWithin.d.ts.map +1 -1
- package/format/filter/Disjoint.d.ts.map +1 -1
- package/format/filter/During.d.ts.map +1 -1
- package/format/filter/EqualTo.d.ts.map +1 -1
- package/format/filter/Filter.d.ts.map +1 -1
- package/format/filter/GreaterThan.d.ts.map +1 -1
- package/format/filter/GreaterThanOrEqualTo.d.ts.map +1 -1
- package/format/filter/Intersects.d.ts.map +1 -1
- package/format/filter/IsBetween.d.ts.map +1 -1
- package/format/filter/IsLike.d.ts.map +1 -1
- package/format/filter/IsNull.d.ts.map +1 -1
- package/format/filter/LessThan.d.ts.map +1 -1
- package/format/filter/LessThanOrEqualTo.d.ts.map +1 -1
- package/format/filter/LogicalNary.d.ts.map +1 -1
- package/format/filter/Not.d.ts.map +1 -1
- package/format/filter/NotEqualTo.d.ts.map +1 -1
- package/format/filter/ResourceId.d.ts.map +1 -1
- package/format/filter/Spatial.d.ts.map +1 -1
- package/format/filter/Within.d.ts.map +1 -1
- package/format/filter.d.ts.map +1 -1
- package/functions.d.ts +2 -2
- package/functions.d.ts.map +1 -1
- package/functions.js +6 -5
- package/geom/Circle.d.ts +10 -3
- package/geom/Circle.d.ts.map +1 -1
- package/geom/Circle.js +13 -0
- package/geom/Geometry.d.ts +2 -2
- package/geom/GeometryCollection.d.ts +6 -3
- package/geom/GeometryCollection.d.ts.map +1 -1
- package/geom/GeometryCollection.js +13 -0
- package/geom/LineString.d.ts +9 -5
- package/geom/LineString.d.ts.map +1 -1
- package/geom/LineString.js +7 -0
- package/geom/LinearRing.d.ts +8 -4
- package/geom/LinearRing.d.ts.map +1 -1
- package/geom/LinearRing.js +7 -0
- package/geom/MultiLineString.d.ts +8 -4
- package/geom/MultiLineString.d.ts.map +1 -1
- package/geom/MultiLineString.js +7 -0
- package/geom/MultiPoint.d.ts +6 -3
- package/geom/MultiPoint.d.ts.map +1 -1
- package/geom/MultiPoint.js +6 -0
- package/geom/MultiPolygon.d.ts +8 -4
- package/geom/MultiPolygon.d.ts.map +1 -1
- package/geom/MultiPolygon.js +8 -0
- package/geom/Point.d.ts +4 -2
- package/geom/Point.d.ts.map +1 -1
- package/geom/Point.js +7 -0
- package/geom/Polygon.d.ts +8 -4
- package/geom/Polygon.d.ts.map +1 -1
- package/geom/Polygon.js +8 -0
- package/geom/SimpleGeometry.d.ts +2 -1
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/SimpleGeometry.js +6 -0
- package/geom/flat/area.d.ts.map +1 -1
- package/geom/flat/area.js +9 -7
- package/geom/flat/center.d.ts.map +1 -1
- package/geom/flat/closest.d.ts.map +1 -1
- package/geom/flat/contains.d.ts.map +1 -1
- package/geom/flat/deflate.d.ts.map +1 -1
- package/geom/flat/flip.d.ts.map +1 -1
- package/geom/flat/geodesic.d.ts.map +1 -1
- package/geom/flat/inflate.d.ts.map +1 -1
- package/geom/flat/interiorpoint.d.ts.map +1 -1
- package/geom/flat/interpolate.d.ts.map +1 -1
- package/geom/flat/intersectsextent.d.ts.map +1 -1
- package/geom/flat/length.d.ts.map +1 -1
- package/geom/flat/linechunk.d.ts.map +1 -1
- package/geom/flat/orient.d.ts.map +1 -1
- package/geom/flat/reverse.d.ts.map +1 -1
- package/geom/flat/segments.d.ts +1 -1
- package/geom/flat/segments.d.ts.map +1 -1
- package/geom/flat/simplify.d.ts.map +1 -1
- package/geom/flat/straightchunk.d.ts.map +1 -1
- package/geom/flat/textpath.d.ts.map +1 -1
- package/geom/flat/topology.d.ts.map +1 -1
- package/geom/flat/transform.d.ts.map +1 -1
- package/interaction/DblClickDragZoom.d.ts.map +1 -1
- package/interaction/DblClickDragZoom.js +1 -0
- package/interaction/DoubleClickZoom.d.ts.map +1 -1
- package/interaction/DoubleClickZoom.js +1 -0
- package/interaction/DragAndDrop.d.ts +4 -3
- package/interaction/DragAndDrop.d.ts.map +1 -1
- package/interaction/DragAndDrop.js +2 -0
- package/interaction/DragBox.d.ts +3 -3
- package/interaction/DragBox.d.ts.map +1 -1
- package/interaction/DragBox.js +6 -2
- package/interaction/DragPan.d.ts +6 -4
- package/interaction/DragPan.d.ts.map +1 -1
- package/interaction/DragPan.js +6 -1
- package/interaction/DragRotate.d.ts +3 -3
- package/interaction/DragRotate.d.ts.map +1 -1
- package/interaction/DragRotate.js +5 -2
- package/interaction/DragRotateAndZoom.d.ts +2 -2
- package/interaction/DragRotateAndZoom.d.ts.map +1 -1
- package/interaction/DragRotateAndZoom.js +4 -1
- package/interaction/DragZoom.d.ts +3 -3
- package/interaction/DragZoom.d.ts.map +1 -1
- package/interaction/DragZoom.js +3 -2
- package/interaction/Draw.d.ts +8 -7
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Draw.js +9 -5
- package/interaction/Extent.d.ts +4 -3
- package/interaction/Extent.d.ts.map +1 -1
- package/interaction/Extent.js +6 -1
- package/interaction/Interaction.d.ts +1 -1
- package/interaction/Interaction.d.ts.map +1 -1
- package/interaction/KeyboardPan.d.ts +2 -2
- package/interaction/KeyboardPan.d.ts.map +1 -1
- package/interaction/KeyboardPan.js +2 -1
- package/interaction/KeyboardZoom.d.ts +2 -2
- package/interaction/KeyboardZoom.d.ts.map +1 -1
- package/interaction/KeyboardZoom.js +2 -1
- package/interaction/Link.d.ts +1 -1
- package/interaction/Link.d.ts.map +1 -1
- package/interaction/Link.js +4 -0
- package/interaction/Modify.d.ts +13 -10
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Modify.js +11 -3
- package/interaction/MouseWheelZoom.d.ts +3 -3
- package/interaction/MouseWheelZoom.d.ts.map +1 -1
- package/interaction/MouseWheelZoom.js +2 -1
- package/interaction/PinchRotate.d.ts.map +1 -1
- package/interaction/PinchRotate.js +3 -0
- package/interaction/PinchZoom.d.ts.map +1 -1
- package/interaction/PinchZoom.js +3 -0
- package/interaction/Pointer.d.ts.map +1 -1
- package/interaction/Pointer.js +1 -0
- package/interaction/Select.d.ts +14 -14
- package/interaction/Select.d.ts.map +1 -1
- package/interaction/Select.js +8 -6
- package/interaction/Snap.d.ts +3 -2
- package/interaction/Snap.d.ts.map +1 -1
- package/interaction/Snap.js +3 -0
- package/interaction/Translate.d.ts +11 -10
- package/interaction/Translate.d.ts.map +1 -1
- package/interaction/Translate.js +9 -4
- package/interaction/defaults.d.ts.map +1 -1
- package/layer/Base.d.ts +1 -1
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +1 -0
- package/layer/BaseImage.d.ts.map +1 -1
- package/layer/BaseTile.d.ts +22 -5
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseTile.js +23 -3
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +3 -0
- package/layer/Graticule.d.ts +2 -1
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +1 -0
- package/layer/Group.d.ts +2 -2
- package/layer/Group.d.ts.map +1 -1
- package/layer/Group.js +3 -0
- package/layer/Heatmap.d.ts +8 -3
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +18 -7
- package/layer/Image.d.ts.map +1 -1
- package/layer/Image.js +4 -0
- package/layer/Layer.d.ts +4 -4
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +7 -8
- package/layer/Tile.d.ts +5 -2
- package/layer/Tile.d.ts.map +1 -1
- package/layer/Tile.js +6 -1
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +3 -0
- package/layer/VectorImage.d.ts +1 -1
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +3 -0
- package/layer/VectorTile.d.ts +32 -7
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +38 -6
- package/layer/WebGLPoints.d.ts +1 -2
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLPoints.js +3 -0
- package/layer/WebGLTile.d.ts +9 -12
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLTile.js +20 -21
- package/loadingstrategy.d.ts.map +1 -1
- package/math.d.ts.map +1 -1
- package/net.d.ts.map +1 -1
- package/obj.d.ts.map +1 -1
- package/ol.css +4 -0
- package/package.json +4 -4
- package/pixel.d.ts.map +1 -1
- package/proj/Projection.d.ts +1 -1
- package/proj/Projection.d.ts.map +1 -1
- package/proj/Units.d.ts +1 -1
- package/proj/epsg3857.d.ts.map +1 -1
- package/proj/epsg4326.d.ts.map +1 -1
- package/proj/proj4.d.ts.map +1 -1
- package/proj.d.ts.map +1 -1
- package/render/Box.d.ts.map +1 -1
- package/render/Box.js +1 -0
- package/render/Event.d.ts.map +1 -1
- package/render/EventType.d.ts +2 -2
- package/render/Feature.d.ts +6 -4
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +2 -0
- package/render/canvas/Builder.d.ts.map +1 -1
- package/render/canvas/Builder.js +2 -0
- package/render/canvas/BuilderGroup.d.ts.map +1 -1
- package/render/canvas/Executor.d.ts +6 -27
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +7 -13
- package/render/canvas/ExecutorGroup.d.ts +4 -5
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +2 -1
- package/render/canvas/ImageBuilder.d.ts +2 -1
- package/render/canvas/ImageBuilder.d.ts.map +1 -1
- package/render/canvas/ImageBuilder.js +4 -0
- package/render/canvas/Immediate.d.ts +24 -12
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +14 -0
- package/render/canvas/Instruction.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.js +4 -0
- package/render/canvas/PolygonBuilder.d.ts.map +1 -1
- package/render/canvas/PolygonBuilder.js +4 -0
- package/render/canvas/TextBuilder.d.ts +4 -2
- package/render/canvas/TextBuilder.d.ts.map +1 -1
- package/render/canvas/TextBuilder.js +4 -0
- package/render/canvas/ZIndexContext.d.ts +2 -1
- package/render/canvas/ZIndexContext.d.ts.map +1 -1
- package/render/canvas/ZIndexContext.js +1 -0
- package/render/canvas/hitdetect.d.ts +1 -1
- package/render/canvas/hitdetect.d.ts.map +1 -1
- package/render/canvas/style.d.ts +3 -3
- package/render/canvas/style.d.ts.map +1 -1
- package/render/canvas/style.js +6 -5
- package/render/canvas.d.ts +1 -1
- package/render/canvas.d.ts.map +1 -1
- package/render/canvas.js +2 -1
- package/render/webgl/MixedGeometryBatch.d.ts +4 -1
- package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.js +4 -0
- package/render/webgl/VectorStyleRenderer.d.ts +56 -30
- package/render/webgl/VectorStyleRenderer.d.ts.map +1 -1
- package/render/webgl/VectorStyleRenderer.js +39 -0
- package/render/webgl/renderinstructions.d.ts +4 -4
- package/render/webgl/utils.d.ts +1 -1
- package/render/webgl/utils.d.ts.map +1 -1
- package/render.d.ts.map +1 -1
- package/renderer/Composite.d.ts +3 -2
- package/renderer/Composite.d.ts.map +1 -1
- package/renderer/Composite.js +10 -4
- package/renderer/Layer.d.ts +22 -29
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Layer.js +33 -37
- package/renderer/Map.d.ts +1 -1
- package/renderer/Map.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.d.ts +6 -4
- package/renderer/canvas/ImageLayer.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.js +12 -9
- package/renderer/canvas/Layer.d.ts +4 -9
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/Layer.js +1 -6
- package/renderer/canvas/TileLayer.d.ts +105 -41
- package/renderer/canvas/TileLayer.d.ts.map +1 -1
- package/renderer/canvas/TileLayer.js +545 -329
- package/renderer/canvas/VectorImageLayer.d.ts +6 -3
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.js +10 -3
- package/renderer/canvas/VectorLayer.d.ts +6 -3
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.js +8 -0
- package/renderer/canvas/VectorTileLayer.d.ts +16 -14
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +78 -53
- package/renderer/vector.d.ts.map +1 -1
- package/renderer/webgl/Layer.d.ts +1 -6
- package/renderer/webgl/Layer.d.ts.map +1 -1
- package/renderer/webgl/Layer.js +2 -6
- package/renderer/webgl/PointsLayer.d.ts +23 -8
- package/renderer/webgl/PointsLayer.d.ts.map +1 -1
- package/renderer/webgl/PointsLayer.js +22 -1
- package/renderer/webgl/TileLayer.d.ts +16 -5
- package/renderer/webgl/TileLayer.d.ts.map +1 -1
- package/renderer/webgl/TileLayer.js +18 -0
- package/renderer/webgl/TileLayerBase.d.ts +7 -16
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
- package/renderer/webgl/TileLayerBase.js +69 -84
- package/renderer/webgl/VectorLayer.d.ts +32 -8
- package/renderer/webgl/VectorLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorLayer.js +53 -0
- package/renderer/webgl/VectorTileLayer.d.ts +34 -29
- package/renderer/webgl/VectorTileLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorTileLayer.js +27 -0
- package/renderer/webgl/worldUtil.d.ts.map +1 -1
- package/reproj/DataTile.d.ts.map +1 -1
- package/reproj/DataTile.js +121 -119
- package/reproj/Image.d.ts +2 -1
- package/reproj/Image.d.ts.map +1 -1
- package/reproj/Image.js +4 -2
- package/reproj/Tile.d.ts.map +1 -1
- package/reproj/Tile.js +16 -19
- package/reproj/Triangulation.d.ts.map +1 -1
- package/reproj.d.ts +1 -1
- package/reproj.d.ts.map +1 -1
- package/resolution.d.ts.map +1 -1
- package/resolutionconstraint.d.ts.map +1 -1
- package/rotationconstraint.d.ts.map +1 -1
- package/size.d.ts.map +1 -1
- package/source/BingMaps.d.ts +3 -3
- package/source/BingMaps.d.ts.map +1 -1
- package/source/BingMaps.js +1 -2
- package/source/CartoDB.d.ts +2 -2
- package/source/CartoDB.d.ts.map +1 -1
- package/source/CartoDB.js +1 -1
- package/source/Cluster.d.ts +5 -5
- package/source/Cluster.d.ts.map +1 -1
- package/source/Cluster.js +5 -2
- package/source/DataTile.d.ts +51 -22
- package/source/DataTile.d.ts.map +1 -1
- package/source/DataTile.js +67 -9
- package/source/GeoTIFF.d.ts +4 -7
- package/source/GeoTIFF.d.ts.map +1 -1
- package/source/GeoTIFF.js +4 -3
- package/source/Google.d.ts +2 -1
- package/source/Google.d.ts.map +1 -1
- package/source/Google.js +4 -2
- package/source/IIIF.d.ts +1 -1
- package/source/IIIF.js +1 -1
- package/source/Image.d.ts +3 -2
- package/source/Image.d.ts.map +1 -1
- package/source/Image.js +1 -0
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageArcGISRest.js +4 -0
- package/source/ImageCanvas.d.ts +2 -1
- package/source/ImageCanvas.d.ts.map +1 -1
- package/source/ImageCanvas.js +1 -0
- package/source/ImageMapGuide.d.ts.map +1 -1
- package/source/ImageMapGuide.js +4 -0
- package/source/ImageStatic.d.ts.map +1 -1
- package/source/ImageStatic.js +1 -0
- package/source/ImageTile.d.ts +102 -0
- package/source/ImageTile.d.ts.map +1 -0
- package/source/ImageTile.js +206 -0
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/ImageWMS.js +4 -0
- package/source/OGCMapTile.d.ts +2 -2
- package/source/OGCMapTile.js +1 -1
- package/source/OGCVectorTile.d.ts +4 -4
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OGCVectorTile.js +2 -2
- package/source/OSM.d.ts +2 -7
- package/source/OSM.d.ts.map +1 -1
- package/source/OSM.js +1 -3
- package/source/Raster.d.ts +41 -26
- package/source/Raster.d.ts.map +1 -1
- package/source/Raster.js +83 -102
- package/source/Source.d.ts +1 -1
- package/source/Source.d.ts.map +1 -1
- package/source/Source.js +5 -14
- package/source/StadiaMaps.d.ts +2 -2
- package/source/StadiaMaps.d.ts.map +1 -1
- package/source/StadiaMaps.js +2 -18
- package/source/Tile.d.ts +7 -36
- package/source/Tile.d.ts.map +1 -1
- package/source/Tile.js +9 -69
- package/source/TileArcGISRest.d.ts +2 -2
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileArcGISRest.js +2 -1
- package/source/TileDebug.d.ts.map +1 -1
- package/source/TileDebug.js +0 -1
- package/source/TileEventType.d.ts +1 -1
- package/source/TileImage.d.ts +9 -12
- package/source/TileImage.d.ts.map +1 -1
- package/source/TileImage.js +21 -43
- package/source/TileJSON.d.ts +2 -2
- package/source/TileJSON.d.ts.map +1 -1
- package/source/TileJSON.js +1 -1
- package/source/TileWMS.d.ts +2 -2
- package/source/TileWMS.d.ts.map +1 -1
- package/source/TileWMS.js +3 -4
- package/source/UTFGrid.d.ts +5 -3
- package/source/UTFGrid.d.ts.map +1 -1
- package/source/UTFGrid.js +7 -8
- package/source/UrlTile.d.ts +16 -13
- package/source/UrlTile.d.ts.map +1 -1
- package/source/UrlTile.js +13 -7
- package/source/Vector.d.ts +10 -10
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +8 -5
- package/source/VectorEventType.d.ts +1 -1
- package/source/VectorTile.d.ts +8 -20
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +16 -85
- package/source/WMTS.d.ts +3 -3
- package/source/WMTS.d.ts.map +1 -1
- package/source/WMTS.js +5 -4
- package/source/XYZ.d.ts +14 -17
- package/source/XYZ.d.ts.map +1 -1
- package/source/XYZ.js +8 -8
- package/source/Zoomify.d.ts +5 -4
- package/source/Zoomify.d.ts.map +1 -1
- package/source/Zoomify.js +5 -2
- package/source/arcgisRest.d.ts +4 -4
- package/source/arcgisRest.d.ts.map +1 -1
- package/source/arcgisRest.js +5 -5
- package/source/mapguide.d.ts +3 -3
- package/source/mapguide.d.ts.map +1 -1
- package/source/mapguide.js +11 -8
- package/source/ogcTileUtil.d.ts +2 -2
- package/source/ogcTileUtil.d.ts.map +1 -1
- package/source/ogcTileUtil.js +7 -7
- package/source/static.d.ts +3 -3
- package/source/static.d.ts.map +1 -1
- package/source/static.js +7 -7
- package/source/wms.d.ts +2 -2
- package/source/wms.d.ts.map +1 -1
- package/source/wms.js +16 -19
- package/source.d.ts +1 -0
- package/source.d.ts.map +1 -1
- package/source.js +1 -0
- package/sphere.d.ts +1 -1
- package/structs/LRUCache.d.ts.map +1 -1
- package/structs/PriorityQueue.d.ts.map +1 -1
- package/structs/RBush.d.ts +10 -32
- package/structs/RBush.d.ts.map +1 -1
- package/structs/RBush.js +9 -12
- package/style/Circle.d.ts +2 -1
- package/style/Circle.d.ts.map +1 -1
- package/style/Circle.js +2 -1
- package/style/Fill.d.ts +3 -3
- package/style/Fill.d.ts.map +1 -1
- package/style/Fill.js +1 -1
- package/style/Icon.d.ts +8 -5
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +21 -0
- package/style/IconImage.d.ts.map +1 -1
- package/style/IconImage.js +3 -2
- package/style/IconImageCache.d.ts.map +1 -1
- package/style/Image.d.ts +3 -3
- package/style/Image.d.ts.map +1 -1
- package/style/RegularShape.d.ts +11 -5
- package/style/RegularShape.d.ts.map +1 -1
- package/style/RegularShape.js +23 -5
- package/style/Stroke.d.ts.map +1 -1
- package/style/Style.d.ts +5 -5
- package/style/Style.d.ts.map +1 -1
- package/style/Style.js +2 -2
- package/style/Text.d.ts +2 -2
- package/style/Text.d.ts.map +1 -1
- package/style/flat.d.ts.map +1 -1
- package/style/webgl.d.ts.map +1 -1
- package/tilecoord.d.ts +7 -0
- package/tilecoord.d.ts.map +1 -1
- package/tilecoord.js +11 -1
- package/tilegrid/TileGrid.d.ts +1 -1
- package/tilegrid/TileGrid.d.ts.map +1 -1
- package/tilegrid/WMTS.d.ts.map +1 -1
- package/tilegrid/WMTS.js +1 -1
- package/tileurlfunction.d.ts +3 -7
- package/tileurlfunction.d.ts.map +1 -1
- package/tileurlfunction.js +14 -47
- package/transform.d.ts +15 -15
- package/transform.d.ts.map +1 -1
- package/uri.d.ts +23 -3
- package/uri.d.ts.map +1 -1
- package/uri.js +75 -0
- package/util.d.ts.map +1 -1
- package/util.js +1 -1
- package/vec/mat4.d.ts.map +1 -1
- package/webgl/BaseTileRepresentation.d.ts +3 -3
- package/webgl/BaseTileRepresentation.d.ts.map +1 -1
- package/webgl/BaseTileRepresentation.js +9 -2
- package/webgl/Buffer.d.ts.map +1 -1
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +1 -0
- package/webgl/PostProcessingPass.d.ts +48 -12
- package/webgl/PostProcessingPass.d.ts.map +1 -1
- package/webgl/PostProcessingPass.js +42 -6
- package/webgl/RenderTarget.d.ts.map +1 -1
- package/webgl/ShaderBuilder.d.ts +1 -1
- package/webgl/TileGeometry.d.ts.map +1 -1
- package/webgl/TileGeometry.js +4 -1
- package/webgl/TileTexture.d.ts.map +1 -1
- package/webgl/TileTexture.js +14 -8
- package/webgl/styleparser.d.ts.map +1 -1
- package/webgl/styleparser.js +54 -66
- package/webgl.d.ts.map +1 -1
- package/worker/webgl.js +1 -1
- package/xml.d.ts.map +1 -1
- package/xml.js +27 -39
- package/source/SentinelHub.d.ts +0 -507
- package/source/SentinelHub.d.ts.map +0 -1
- package/source/SentinelHub.js +0 -616
- package/structs/LinkedList.d.ts +0 -130
- package/structs/LinkedList.d.ts.map +0 -1
- package/structs/LinkedList.js +0 -259
package/source/VectorTile.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
intersects,
|
|
17
17
|
} from '../extent.js';
|
|
18
18
|
import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|
19
|
-
import {
|
|
19
|
+
import {getCacheKeyForTileKey} from '../tilecoord.js';
|
|
20
20
|
import {isEmpty} from '../obj.js';
|
|
21
21
|
import {loadFeaturesXhr} from '../featureloader.js';
|
|
22
22
|
import {toSize} from '../size.js';
|
|
@@ -28,7 +28,7 @@ import {toSize} from '../size.js';
|
|
|
28
28
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
29
29
|
* @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.
|
|
30
30
|
* @property {import("../extent.js").Extent} [extent] Extent.
|
|
31
|
-
* @property {import("../format/Feature.js").default<
|
|
31
|
+
* @property {import("../format/Feature.js").default<FeatureType>} [format] Feature format for tiles. Used and required by the default.
|
|
32
32
|
* @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this
|
|
33
33
|
* to `false` (e.g. for sources with polygons that represent administrative
|
|
34
34
|
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
|
|
@@ -125,7 +125,6 @@ class VectorTile extends UrlTile {
|
|
|
125
125
|
attributionsCollapsible: options.attributionsCollapsible,
|
|
126
126
|
cacheSize: options.cacheSize,
|
|
127
127
|
interpolate: true,
|
|
128
|
-
opaque: false,
|
|
129
128
|
projection: projection,
|
|
130
129
|
state: options.state,
|
|
131
130
|
tileGrid: tileGrid,
|
|
@@ -142,7 +141,7 @@ class VectorTile extends UrlTile {
|
|
|
142
141
|
|
|
143
142
|
/**
|
|
144
143
|
* @private
|
|
145
|
-
* @type {import("../format/Feature.js").default<
|
|
144
|
+
* @type {import("../format/Feature.js").default<FeatureType>|null}
|
|
146
145
|
*/
|
|
147
146
|
this.format_ = options.format ? options.format : null;
|
|
148
147
|
|
|
@@ -150,7 +149,7 @@ class VectorTile extends UrlTile {
|
|
|
150
149
|
* @private
|
|
151
150
|
* @type {TileCache}
|
|
152
151
|
*/
|
|
153
|
-
this.
|
|
152
|
+
this.sourceTileCache_ = new TileCache(128);
|
|
154
153
|
|
|
155
154
|
/**
|
|
156
155
|
* @private
|
|
@@ -171,51 +170,6 @@ class VectorTile extends UrlTile {
|
|
|
171
170
|
this.tileGrids_ = {};
|
|
172
171
|
}
|
|
173
172
|
|
|
174
|
-
/**
|
|
175
|
-
* Get features whose bounding box intersects the provided extent. Only features for cached
|
|
176
|
-
* tiles for the last rendered zoom level are available in the source. So this method is only
|
|
177
|
-
* suitable for requesting tiles for extents that are currently rendered.
|
|
178
|
-
*
|
|
179
|
-
* Features are returned in random tile order and as they are included in the tiles. This means
|
|
180
|
-
* they can be clipped, duplicated across tiles, and simplified to the render resolution.
|
|
181
|
-
*
|
|
182
|
-
* @param {import("../extent.js").Extent} extent Extent.
|
|
183
|
-
* @return {Array<FeatureType>} Features.
|
|
184
|
-
* @api
|
|
185
|
-
*/
|
|
186
|
-
getFeaturesInExtent(extent) {
|
|
187
|
-
const features = [];
|
|
188
|
-
const tileCache = this.tileCache;
|
|
189
|
-
if (tileCache.getCount() === 0) {
|
|
190
|
-
return features;
|
|
191
|
-
}
|
|
192
|
-
const z = fromKey(tileCache.peekFirstKey())[0];
|
|
193
|
-
const tileGrid = this.tileGrid;
|
|
194
|
-
tileCache.forEach(function (tile) {
|
|
195
|
-
if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
const sourceTiles = tile.getSourceTiles();
|
|
199
|
-
for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {
|
|
200
|
-
const sourceTile = sourceTiles[i];
|
|
201
|
-
const tileCoord = sourceTile.tileCoord;
|
|
202
|
-
if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {
|
|
203
|
-
const tileFeatures = sourceTile.getFeatures();
|
|
204
|
-
if (tileFeatures) {
|
|
205
|
-
for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {
|
|
206
|
-
const candidate = tileFeatures[j];
|
|
207
|
-
const geometry = candidate.getGeometry();
|
|
208
|
-
if (intersects(extent, geometry.getExtent())) {
|
|
209
|
-
features.push(candidate);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
return features;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
173
|
/**
|
|
220
174
|
* @return {boolean} The source can have overlapping geometries.
|
|
221
175
|
*/
|
|
@@ -226,15 +180,16 @@ class VectorTile extends UrlTile {
|
|
|
226
180
|
/**
|
|
227
181
|
* clear {@link module:ol/TileCache~TileCache} and delete all source tiles
|
|
228
182
|
* @api
|
|
183
|
+
* @override
|
|
229
184
|
*/
|
|
230
185
|
clear() {
|
|
231
|
-
this.
|
|
232
|
-
this.sourceTileCache.clear();
|
|
186
|
+
this.sourceTileCache_.clear();
|
|
233
187
|
}
|
|
234
188
|
|
|
235
189
|
/**
|
|
236
190
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
237
191
|
* @param {!Object<string, boolean>} usedTiles Used tiles.
|
|
192
|
+
* @override
|
|
238
193
|
*/
|
|
239
194
|
expireCache(projection, usedTiles) {
|
|
240
195
|
const tileCache = this.getTileCacheForProjection(projection);
|
|
@@ -250,7 +205,7 @@ class VectorTile extends UrlTile {
|
|
|
250
205
|
return acc;
|
|
251
206
|
}, {});
|
|
252
207
|
super.expireCache(projection, usedTiles);
|
|
253
|
-
this.
|
|
208
|
+
this.sourceTileCache_.expireCache(usedSourceTiles);
|
|
254
209
|
}
|
|
255
210
|
|
|
256
211
|
/**
|
|
@@ -285,8 +240,8 @@ class VectorTile extends UrlTile {
|
|
|
285
240
|
pixelRatio,
|
|
286
241
|
projection,
|
|
287
242
|
);
|
|
288
|
-
const sourceTile = this.
|
|
289
|
-
? this.
|
|
243
|
+
const sourceTile = this.sourceTileCache_.containsKey(tileUrl)
|
|
244
|
+
? this.sourceTileCache_.get(tileUrl)
|
|
290
245
|
: new this.tileClass(
|
|
291
246
|
sourceTileCoord,
|
|
292
247
|
tileUrl ? TileState.IDLE : TileState.EMPTY,
|
|
@@ -333,7 +288,7 @@ class VectorTile extends UrlTile {
|
|
|
333
288
|
sourceTile.resolution = sourceTileGrid.getResolution(
|
|
334
289
|
sourceTileCoord[0],
|
|
335
290
|
);
|
|
336
|
-
this.
|
|
291
|
+
this.sourceTileCache_.set(tileUrl, sourceTile);
|
|
337
292
|
sourceTile.load();
|
|
338
293
|
}
|
|
339
294
|
});
|
|
@@ -358,17 +313,9 @@ class VectorTile extends UrlTile {
|
|
|
358
313
|
* @param {number} pixelRatio Pixel ratio.
|
|
359
314
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
360
315
|
* @return {!VectorRenderTile} Tile.
|
|
316
|
+
* @override
|
|
361
317
|
*/
|
|
362
318
|
getTile(z, x, y, pixelRatio, projection) {
|
|
363
|
-
const coordKey = getKeyZXY(z, x, y);
|
|
364
|
-
const key = this.getKey();
|
|
365
|
-
let tile;
|
|
366
|
-
if (this.tileCache.containsKey(coordKey)) {
|
|
367
|
-
tile = this.tileCache.get(coordKey);
|
|
368
|
-
if (tile.key === key) {
|
|
369
|
-
return tile;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
319
|
const tileCoord = [z, x, y];
|
|
373
320
|
let urlTileCoord = this.getTileCoordForTileUrlFunction(
|
|
374
321
|
tileCoord,
|
|
@@ -404,21 +351,14 @@ class VectorTile extends UrlTile {
|
|
|
404
351
|
urlTileCoord,
|
|
405
352
|
this.getSourceTiles.bind(this, pixelRatio, projection),
|
|
406
353
|
);
|
|
407
|
-
|
|
408
|
-
newTile.key = key;
|
|
409
|
-
if (tile) {
|
|
410
|
-
newTile.interimTile = tile;
|
|
411
|
-
newTile.refreshInterimChain();
|
|
412
|
-
this.tileCache.replace(coordKey, newTile);
|
|
413
|
-
} else {
|
|
414
|
-
this.tileCache.set(coordKey, newTile);
|
|
415
|
-
}
|
|
354
|
+
newTile.key = this.getKey();
|
|
416
355
|
return newTile;
|
|
417
356
|
}
|
|
418
357
|
|
|
419
358
|
/**
|
|
420
359
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
421
360
|
* @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
|
|
361
|
+
* @override
|
|
422
362
|
*/
|
|
423
363
|
getTileGridForProjection(projection) {
|
|
424
364
|
const code = projection.getCode();
|
|
@@ -455,6 +395,7 @@ class VectorTile extends UrlTile {
|
|
|
455
395
|
* Get the tile pixel ratio for this source.
|
|
456
396
|
* @param {number} pixelRatio Pixel ratio.
|
|
457
397
|
* @return {number} Tile pixel ratio.
|
|
398
|
+
* @override
|
|
458
399
|
*/
|
|
459
400
|
getTilePixelRatio(pixelRatio) {
|
|
460
401
|
return pixelRatio;
|
|
@@ -465,6 +406,7 @@ class VectorTile extends UrlTile {
|
|
|
465
406
|
* @param {number} pixelRatio Pixel ratio.
|
|
466
407
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
467
408
|
* @return {import("../size.js").Size} Tile size.
|
|
409
|
+
* @override
|
|
468
410
|
*/
|
|
469
411
|
getTilePixelSize(z, pixelRatio, projection) {
|
|
470
412
|
const tileGrid = this.getTileGridForProjection(projection);
|
|
@@ -474,17 +416,6 @@ class VectorTile extends UrlTile {
|
|
|
474
416
|
Math.round(tileSize[1] * pixelRatio),
|
|
475
417
|
];
|
|
476
418
|
}
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Increases the cache size if needed
|
|
480
|
-
* @param {number} tileCount Minimum number of tiles needed.
|
|
481
|
-
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
482
|
-
*/
|
|
483
|
-
updateCacheSize(tileCount, projection) {
|
|
484
|
-
super.updateCacheSize(tileCount * 2, projection);
|
|
485
|
-
this.sourceTileCache.highWaterMark =
|
|
486
|
-
this.getTileCacheForProjection(projection).highWaterMark;
|
|
487
|
-
}
|
|
488
419
|
}
|
|
489
420
|
|
|
490
421
|
export default VectorTile;
|
package/source/WMTS.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default WMTS;
|
|
|
27
27
|
/**
|
|
28
28
|
* Request encoding. One of 'KVP', 'REST'.
|
|
29
29
|
*/
|
|
30
|
-
export type RequestEncoding =
|
|
30
|
+
export type RequestEncoding = "KVP" | "REST";
|
|
31
31
|
export type Options = {
|
|
32
32
|
/**
|
|
33
33
|
* Attributions.
|
|
@@ -38,7 +38,7 @@ export type Options = {
|
|
|
38
38
|
*/
|
|
39
39
|
attributionsCollapsible?: boolean | undefined;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Deprecated. Use the cacheSize option on the layer instead.
|
|
42
42
|
*/
|
|
43
43
|
cacheSize?: number | undefined;
|
|
44
44
|
/**
|
|
@@ -150,7 +150,7 @@ export type Options = {
|
|
|
150
150
|
* @typedef {Object} Options
|
|
151
151
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
152
152
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
153
|
-
* @property {number} [cacheSize]
|
|
153
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
154
154
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
155
155
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
|
156
156
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
package/source/WMTS.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WMTS.d.ts","sourceRoot":"","sources":["WMTS.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WMTS.d.ts","sourceRoot":"","sources":["WMTS.js"],"names":[],"mappings":"AAkVA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8DArBW,GAAO,GAkBN,OAAO,GAAC,IAAI,CAuOvB;;;;;8BAjkBY,KAAK,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAab,OAAO,qBAAqB,EAAE,OAAO;;;;iBACrC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;WAInC,MAAM;;;;WACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;eAQN,MAAM;;;;;iBACN,GAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9BrB;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAwFjB;IArDC;;;OAGG;IACH,iBAAyE;IAEzE;;;OAGG;IACH,gBAA2E;IAE3E;;;OAGG;IACH,oBAC4D;IAE5D;;;OAGG;IACH,eAA2B;IAE3B;;;OAGG;IACH,mBAAmC;IAEnC;;;OAGG;IACH,eAA2B;IAK3B;;;OAGG;IACH,yBAAuC;IA4BzC;;;;;;OAMG;IACH,iBAHY,GAAO,CAKlB;IAED;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,gBAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,sBAHY,eAAe,CAK1B;IAED;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,cAHY,MAAM,CAKjB;IAED;;;OAGG;IACH,6BAMC;IAED;;;;OAIG;IACH,wCAGC;IAED;;;OAGG;IACH,iCAHW,MAAM,GACL,OAAO,YAAY,EAAE,WAAW,CAkE3C;CACF;sBA1UqB,gBAAgB"}
|
package/source/WMTS.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import TileImage from './TileImage.js';
|
|
6
|
-
import {appendParams} from '../uri.js';
|
|
6
|
+
import {appendParams, expandUrl} from '../uri.js';
|
|
7
7
|
import {containsExtent} from '../extent.js';
|
|
8
8
|
import {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';
|
|
9
|
-
import {createFromTileUrlFunctions
|
|
9
|
+
import {createFromTileUrlFunctions} from '../tileurlfunction.js';
|
|
10
10
|
import {equivalent, get as getProjection, transformExtent} from '../proj.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -18,7 +18,7 @@ import {equivalent, get as getProjection, transformExtent} from '../proj.js';
|
|
|
18
18
|
* @typedef {Object} Options
|
|
19
19
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
20
20
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
21
|
-
* @property {number} [cacheSize]
|
|
21
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
22
22
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
23
23
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
|
24
24
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
|
@@ -163,6 +163,7 @@ class WMTS extends TileImage {
|
|
|
163
163
|
* Set the URLs to use for requests.
|
|
164
164
|
* URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
|
|
165
165
|
* @param {Array<string>} urls URLs.
|
|
166
|
+
* @override
|
|
166
167
|
*/
|
|
167
168
|
setUrls(urls) {
|
|
168
169
|
this.urls = urls;
|
|
@@ -448,7 +449,7 @@ export function optionsFromCapabilities(wmtsCap, config) {
|
|
|
448
449
|
}
|
|
449
450
|
|
|
450
451
|
let wrapX = false;
|
|
451
|
-
const switchXY = projection.getAxisOrientation().
|
|
452
|
+
const switchXY = projection.getAxisOrientation().startsWith('ne');
|
|
452
453
|
|
|
453
454
|
let matrix = matrixSetObj.TileMatrix[0];
|
|
454
455
|
|
package/source/XYZ.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type Options = {
|
|
|
9
9
|
*/
|
|
10
10
|
attributionsCollapsible?: boolean | undefined;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Deprecated. Use the cacheSize option on the layer instead.
|
|
13
13
|
*/
|
|
14
14
|
cacheSize?: number | undefined;
|
|
15
15
|
/**
|
|
@@ -23,10 +23,6 @@ export type Options = {
|
|
|
23
23
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
24
24
|
*/
|
|
25
25
|
interpolate?: boolean | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the layer is opaque.
|
|
28
|
-
*/
|
|
29
|
-
opaque?: boolean | undefined;
|
|
30
26
|
/**
|
|
31
27
|
* Projection.
|
|
32
28
|
*/
|
|
@@ -53,7 +49,8 @@ export type Options = {
|
|
|
53
49
|
*/
|
|
54
50
|
tileGrid?: import("../tilegrid.js").TileGrid | undefined;
|
|
55
51
|
/**
|
|
56
|
-
*
|
|
52
|
+
* Deprecated. Use an ImageTile source with a loader
|
|
53
|
+
* instead. Optional function to load a tile given a URL. The default is
|
|
57
54
|
* ```js
|
|
58
55
|
* function(imageTile, src) {
|
|
59
56
|
* imageTile.getImage().src = src;
|
|
@@ -80,9 +77,8 @@ export type Options = {
|
|
|
80
77
|
*/
|
|
81
78
|
gutter?: number | undefined;
|
|
82
79
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* Required if `url` or `urls` are not provided.
|
|
80
|
+
* Deprecated. Use an ImageTile source and provide a function
|
|
81
|
+
* for the url option instead.
|
|
86
82
|
*/
|
|
87
83
|
tileUrlFunction?: import("../Tile.js").UrlFunction | undefined;
|
|
88
84
|
/**
|
|
@@ -92,7 +88,8 @@ export type Options = {
|
|
|
92
88
|
*/
|
|
93
89
|
url?: string | undefined;
|
|
94
90
|
/**
|
|
95
|
-
*
|
|
91
|
+
* Deprecated. Use an ImageTile source and provide an array of URLs for the
|
|
92
|
+
* url option instead.
|
|
96
93
|
*/
|
|
97
94
|
urls?: string[] | undefined;
|
|
98
95
|
/**
|
|
@@ -114,13 +111,12 @@ export type Options = {
|
|
|
114
111
|
* @typedef {Object} Options
|
|
115
112
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
116
113
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
117
|
-
* @property {number} [cacheSize]
|
|
114
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
118
115
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
119
116
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
|
120
117
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
|
121
118
|
* @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
|
|
122
119
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
123
|
-
* @property {boolean} [opaque=false] Whether the layer is opaque.
|
|
124
120
|
* @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection.
|
|
125
121
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
|
126
122
|
* Higher values can increase reprojection performance, but decrease precision.
|
|
@@ -128,7 +124,8 @@ export type Options = {
|
|
|
128
124
|
* @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
|
|
129
125
|
* @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
|
|
130
126
|
* @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
|
|
131
|
-
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction]
|
|
127
|
+
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Deprecated. Use an ImageTile source with a loader
|
|
128
|
+
* instead. Optional function to load a tile given a URL. The default is
|
|
132
129
|
* ```js
|
|
133
130
|
* function(imageTile, src) {
|
|
134
131
|
* imageTile.getImage().src = src;
|
|
@@ -143,13 +140,13 @@ export type Options = {
|
|
|
143
140
|
* @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.
|
|
144
141
|
* This allows artifacts of rendering at tile edges to be ignored.
|
|
145
142
|
* Supported images should be wider and taller than the tile size by a value of `2 x gutter`.
|
|
146
|
-
* @property {import("../Tile.js").UrlFunction} [tileUrlFunction]
|
|
147
|
-
*
|
|
148
|
-
* Required if `url` or `urls` are not provided.
|
|
143
|
+
* @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
|
|
144
|
+
* for the url option instead.
|
|
149
145
|
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
|
|
150
146
|
* and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,
|
|
151
147
|
* may be used instead of defining each one separately in the `urls` option.
|
|
152
|
-
* @property {Array<string>} [urls]
|
|
148
|
+
* @property {Array<string>} [urls] Deprecated. Use an ImageTile source and provide an array of URLs for the
|
|
149
|
+
* url option instead.
|
|
153
150
|
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
|
154
151
|
* @property {number} [transition=250] Duration of the opacity transition for rendering.
|
|
155
152
|
* To disable the opacity transition, pass `transition: 0`.
|
package/source/XYZ.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XYZ.d.ts","sourceRoot":"","sources":["XYZ.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"XYZ.d.ts","sourceRoot":"","sources":["XYZ.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAVjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACE;;OAEG;IACH,2CAyCC;IALC;;;OAGG;IACH,gBAAgE;CAUnE;sBA1HqB,gBAAgB"}
|
package/source/XYZ.js
CHANGED
|
@@ -9,13 +9,12 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|
|
9
9
|
* @typedef {Object} Options
|
|
10
10
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
11
11
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
|
12
|
-
* @property {number} [cacheSize]
|
|
12
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
13
13
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
14
14
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
|
15
15
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
|
16
16
|
* @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
|
|
17
17
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
18
|
-
* @property {boolean} [opaque=false] Whether the layer is opaque.
|
|
19
18
|
* @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection.
|
|
20
19
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
|
21
20
|
* Higher values can increase reprojection performance, but decrease precision.
|
|
@@ -23,7 +22,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|
|
23
22
|
* @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
|
|
24
23
|
* @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
|
|
25
24
|
* @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
|
|
26
|
-
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction]
|
|
25
|
+
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Deprecated. Use an ImageTile source with a loader
|
|
26
|
+
* instead. Optional function to load a tile given a URL. The default is
|
|
27
27
|
* ```js
|
|
28
28
|
* function(imageTile, src) {
|
|
29
29
|
* imageTile.getImage().src = src;
|
|
@@ -38,13 +38,13 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|
|
38
38
|
* @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.
|
|
39
39
|
* This allows artifacts of rendering at tile edges to be ignored.
|
|
40
40
|
* Supported images should be wider and taller than the tile size by a value of `2 x gutter`.
|
|
41
|
-
* @property {import("../Tile.js").UrlFunction} [tileUrlFunction]
|
|
42
|
-
*
|
|
43
|
-
* Required if `url` or `urls` are not provided.
|
|
41
|
+
* @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
|
|
42
|
+
* for the url option instead.
|
|
44
43
|
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
|
|
45
44
|
* and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,
|
|
46
45
|
* may be used instead of defining each one separately in the `urls` option.
|
|
47
|
-
* @property {Array<string>} [urls]
|
|
46
|
+
* @property {Array<string>} [urls] Deprecated. Use an ImageTile source and provide an array of URLs for the
|
|
47
|
+
* url option instead.
|
|
48
48
|
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
|
49
49
|
* @property {number} [transition=250] Duration of the opacity transition for rendering.
|
|
50
50
|
* To disable the opacity transition, pass `transition: 0`.
|
|
@@ -96,7 +96,6 @@ class XYZ extends TileImage {
|
|
|
96
96
|
cacheSize: options.cacheSize,
|
|
97
97
|
crossOrigin: options.crossOrigin,
|
|
98
98
|
interpolate: options.interpolate,
|
|
99
|
-
opaque: options.opaque,
|
|
100
99
|
projection: projection,
|
|
101
100
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
|
102
101
|
tileGrid: tileGrid,
|
|
@@ -120,6 +119,7 @@ class XYZ extends TileImage {
|
|
|
120
119
|
|
|
121
120
|
/**
|
|
122
121
|
* @return {number} Gutter.
|
|
122
|
+
* @override
|
|
123
123
|
*/
|
|
124
124
|
getGutter() {
|
|
125
125
|
return this.gutter_;
|
package/source/Zoomify.d.ts
CHANGED
|
@@ -18,19 +18,20 @@ export class CustomTile extends ImageTile {
|
|
|
18
18
|
*/
|
|
19
19
|
private zoomifyImage_;
|
|
20
20
|
/**
|
|
21
|
+
* @private
|
|
21
22
|
* @type {import("../size.js").Size}
|
|
22
23
|
*/
|
|
23
|
-
tileSize_
|
|
24
|
+
private tileSize_;
|
|
24
25
|
}
|
|
25
26
|
export default Zoomify;
|
|
26
|
-
export type TierSizeCalculation =
|
|
27
|
+
export type TierSizeCalculation = "default" | "truncated";
|
|
27
28
|
export type Options = {
|
|
28
29
|
/**
|
|
29
30
|
* Attributions.
|
|
30
31
|
*/
|
|
31
32
|
attributions?: import("./Source.js").AttributionLike | undefined;
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Deprecated. Use the cacheSize option on the layer instead.
|
|
34
35
|
*/
|
|
35
36
|
cacheSize?: number | undefined;
|
|
36
37
|
/**
|
|
@@ -106,7 +107,7 @@ import ImageTile from '../ImageTile.js';
|
|
|
106
107
|
/**
|
|
107
108
|
* @typedef {Object} Options
|
|
108
109
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
109
|
-
* @property {number} [cacheSize]
|
|
110
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
110
111
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
111
112
|
* you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.
|
|
112
113
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
package/source/Zoomify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zoomify.d.ts","sourceRoot":"","sources":["Zoomify.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Zoomify.d.ts","sourceRoot":"","sources":["Zoomify.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;IACE;;;;;;;;OAQG;IACH,sBARW,OAAO,YAAY,EAAE,IAAI,aACzB,OAAO,iBAAiB,EAAE,SAAS,SACnC,GAAiC,OACjC,MAAM,eACL,MAAM,OAAA,oBACP,OAAO,YAAY,EAAE,YAAY,sDAyB3C;IAXC;;;OAGG;IACH,sBAAyB;IAEzB;;;OAGG;IACH,kBAAyB;CA0B5B;;kCA5DY,SAAS,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;iBAuEtB,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;SAInC,MAAM;;;;;;;;UAYN,OAAO,YAAY,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;sBAlGjB,iBAAiB;AAyEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4JjB;CACF;sBAnRqB,gBAAgB"}
|
package/source/Zoomify.js
CHANGED
|
@@ -8,7 +8,8 @@ import TileGrid from '../tilegrid/TileGrid.js';
|
|
|
8
8
|
import TileImage from './TileImage.js';
|
|
9
9
|
import TileState from '../TileState.js';
|
|
10
10
|
import {createCanvasContext2D} from '../dom.js';
|
|
11
|
-
import {createFromTileUrlFunctions
|
|
11
|
+
import {createFromTileUrlFunctions} from '../tileurlfunction.js';
|
|
12
|
+
import {expandUrl} from '../uri.js';
|
|
12
13
|
import {getCenter} from '../extent.js';
|
|
13
14
|
import {toSize} from '../size.js';
|
|
14
15
|
|
|
@@ -44,6 +45,7 @@ export class CustomTile extends ImageTile {
|
|
|
44
45
|
this.zoomifyImage_ = null;
|
|
45
46
|
|
|
46
47
|
/**
|
|
48
|
+
* @private
|
|
47
49
|
* @type {import("../size.js").Size}
|
|
48
50
|
*/
|
|
49
51
|
this.tileSize_ = tileSize;
|
|
@@ -52,6 +54,7 @@ export class CustomTile extends ImageTile {
|
|
|
52
54
|
/**
|
|
53
55
|
* Get the image element for this tile.
|
|
54
56
|
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
|
|
57
|
+
* @override
|
|
55
58
|
*/
|
|
56
59
|
getImage() {
|
|
57
60
|
if (this.zoomifyImage_) {
|
|
@@ -76,7 +79,7 @@ export class CustomTile extends ImageTile {
|
|
|
76
79
|
/**
|
|
77
80
|
* @typedef {Object} Options
|
|
78
81
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
79
|
-
* @property {number} [cacheSize]
|
|
82
|
+
* @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
|
|
80
83
|
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
|
81
84
|
* you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.
|
|
82
85
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
package/source/arcgisRest.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export function getRequestUrl(baseUrl: string, extent: import("../extent.js").Ex
|
|
|
26
26
|
* or the entire code must form a valid ArcGIS SpatialReference definition.
|
|
27
27
|
* @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,
|
|
28
28
|
* `2` means twice the size of the map viewport, and so on.
|
|
29
|
-
* @property {string}
|
|
29
|
+
* @property {string} url ArcGIS Rest service URL for a Map Service or Image Service. The url
|
|
30
30
|
* should include /MapServer or /ImageServer.
|
|
31
31
|
* @property {function(HTMLImageElement, string): Promise<import('../DataTile.js').ImageLike>} [load] Function
|
|
32
32
|
* to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and
|
|
@@ -38,7 +38,7 @@ export function getRequestUrl(baseUrl: string, extent: import("../extent.js").Ex
|
|
|
38
38
|
* @return {import('../Image.js').ImageObjectPromiseLoader} ArcGIS Rest image.
|
|
39
39
|
* @api
|
|
40
40
|
*/
|
|
41
|
-
export function createLoader(options: LoaderOptions): import(
|
|
41
|
+
export function createLoader(options: LoaderOptions): import("../Image.js").ImageObjectPromiseLoader;
|
|
42
42
|
export type LoaderOptions = {
|
|
43
43
|
/**
|
|
44
44
|
* The `crossOrigin` attribute for loaded images. Note that
|
|
@@ -77,12 +77,12 @@ export type LoaderOptions = {
|
|
|
77
77
|
* ArcGIS Rest service URL for a Map Service or Image Service. The url
|
|
78
78
|
* should include /MapServer or /ImageServer.
|
|
79
79
|
*/
|
|
80
|
-
url
|
|
80
|
+
url: string;
|
|
81
81
|
/**
|
|
82
82
|
* Function
|
|
83
83
|
* to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and
|
|
84
84
|
* returns a promise resolving to the loaded or decoded image. Default is {@link module :ol/Image.decode}.
|
|
85
85
|
*/
|
|
86
|
-
load?: ((arg0: HTMLImageElement, arg1: string) => Promise<import(
|
|
86
|
+
load?: ((arg0: HTMLImageElement, arg1: string) => Promise<import("../DataTile.js").ImageLike>) | undefined;
|
|
87
87
|
};
|
|
88
88
|
//# sourceMappingURL=arcgisRest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgisRest.d.ts","sourceRoot":"","sources":["arcgisRest.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,uCARW,MAAM,UACN,OAAO,cAAc,EAAE,MAAM,cAC7B,MAAM,cACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,gBAEtC,MAAM,CAqCjB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;GAKG;AACH,sCAJW,aAAa,GACZ,OAAO,aAAa,EAAE,wBAAwB,CAwCzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAvDa,OAAO,YAAY,EAAE,cAAc
|
|
1
|
+
{"version":3,"file":"arcgisRest.d.ts","sourceRoot":"","sources":["arcgisRest.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,uCARW,MAAM,UACN,OAAO,cAAc,EAAE,MAAM,cAC7B,MAAM,cACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,gBAEtC,MAAM,CAqCjB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;GAKG;AACH,sCAJW,aAAa,GACZ,OAAO,aAAa,EAAE,wBAAwB,CAwCzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAvDa,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;SAKnC,MAAM;;;;;;mBAEG,gBAAgB,QAAE,MAAM,KAAG,OAAO,CAAC,OAAO,gBAAgB,EAAE,SAAS,CAAC"}
|
package/source/arcgisRest.js
CHANGED
|
@@ -74,7 +74,7 @@ export function getRequestUrl(
|
|
|
74
74
|
* or the entire code must form a valid ArcGIS SpatialReference definition.
|
|
75
75
|
* @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,
|
|
76
76
|
* `2` means twice the size of the map viewport, and so on.
|
|
77
|
-
* @property {string}
|
|
77
|
+
* @property {string} url ArcGIS Rest service URL for a Map Service or Image Service. The url
|
|
78
78
|
* should include /MapServer or /ImageServer.
|
|
79
79
|
* @property {function(HTMLImageElement, string): Promise<import('../DataTile.js').ImageLike>} [load] Function
|
|
80
80
|
* to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and
|
|
@@ -90,6 +90,8 @@ export function getRequestUrl(
|
|
|
90
90
|
export function createLoader(options) {
|
|
91
91
|
const load = options.load ? options.load : decode;
|
|
92
92
|
const projection = getProjection(options.projection || 'EPSG:3857');
|
|
93
|
+
const ratio = options.ratio ?? 1.5;
|
|
94
|
+
const crossOrigin = options.crossOrigin ?? null;
|
|
93
95
|
|
|
94
96
|
/** @type {import('../Image.js').ImageObjectPromiseLoader} */
|
|
95
97
|
return function (extent, resolution, pixelRatio) {
|
|
@@ -102,7 +104,7 @@ export function createLoader(options) {
|
|
|
102
104
|
};
|
|
103
105
|
Object.assign(params, options.params);
|
|
104
106
|
|
|
105
|
-
extent = getRequestExtent(extent, resolution, pixelRatio,
|
|
107
|
+
extent = getRequestExtent(extent, resolution, pixelRatio, ratio);
|
|
106
108
|
|
|
107
109
|
const src = getRequestUrl(
|
|
108
110
|
options.url,
|
|
@@ -114,9 +116,7 @@ export function createLoader(options) {
|
|
|
114
116
|
);
|
|
115
117
|
|
|
116
118
|
const image = new Image();
|
|
117
|
-
|
|
118
|
-
image.crossOrigin = options.crossOrigin;
|
|
119
|
-
}
|
|
119
|
+
image.crossOrigin = crossOrigin;
|
|
120
120
|
|
|
121
121
|
return load(image, src).then((image) => {
|
|
122
122
|
// Update resolution, because the server may return a smaller size than requested
|
package/source/mapguide.d.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* @return {import('../Image.js').ImageObjectPromiseLoader} ArcGIS Rest image.
|
|
5
5
|
* @api
|
|
6
6
|
*/
|
|
7
|
-
export function createLoader(options: LoaderOptions): import(
|
|
7
|
+
export function createLoader(options: LoaderOptions): import("../Image.js").ImageObjectPromiseLoader;
|
|
8
8
|
export type LoaderOptions = {
|
|
9
9
|
/**
|
|
10
10
|
* The mapagent url.
|
|
11
11
|
*/
|
|
12
|
-
url
|
|
12
|
+
url: string;
|
|
13
13
|
/**
|
|
14
14
|
* The `crossOrigin` attribute for loaded images. Note that
|
|
15
15
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
|
@@ -47,6 +47,6 @@ export type LoaderOptions = {
|
|
|
47
47
|
* to perform loading of the image. Receives the created `HTMLImageElement` and the desired `src` as argument and
|
|
48
48
|
* returns a promise resolving to the loaded or decoded image. Default is {@link module :ol/Image.decode}.
|
|
49
49
|
*/
|
|
50
|
-
load?: ((arg0: HTMLImageElement, arg1: string) => Promise<import(
|
|
50
|
+
load?: ((arg0: HTMLImageElement, arg1: string) => Promise<import("../DataTile.js").ImageLike>) | undefined;
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=mapguide.d.ts.map
|
package/source/mapguide.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapguide.d.ts","sourceRoot":"","sources":["mapguide.js"],"names":[],"mappings":"AAqFA;;;;;GAKG;AACH,sCAJW,aAAa,GACZ,OAAO,aAAa,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mapguide.d.ts","sourceRoot":"","sources":["mapguide.js"],"names":[],"mappings":"AAqFA;;;;;GAKG;AACH,sCAJW,aAAa,GACZ,OAAO,aAAa,EAAE,wBAAwB,CA8BzD;;;;;SA3Ga,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAYG,gBAAgB,QAAE,MAAM,KAAG,OAAO,CAAC,OAAO,gBAAgB,EAAE,SAAS,CAAC"}
|