ol 7.0.0-dev.1660306204497 → 7.0.0-dev.1660487589130
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 +4 -4
- package/Collection.d.ts.map +1 -1
- package/Collection.js +8 -8
- package/Feature.d.ts +4 -4
- package/Feature.d.ts.map +1 -1
- package/Feature.js +10 -12
- package/Geolocation.d.ts +2 -2
- package/Geolocation.d.ts.map +1 -1
- package/Geolocation.js +3 -3
- package/ImageCanvas.d.ts +2 -2
- package/ImageCanvas.d.ts.map +1 -1
- package/ImageCanvas.js +4 -5
- package/ImageTile.d.ts +2 -2
- package/ImageTile.d.ts.map +1 -1
- package/ImageTile.js +3 -10
- package/Map.d.ts +12 -12
- package/Map.d.ts.map +1 -1
- package/Map.js +23 -23
- package/MapBrowserEvent.d.ts +4 -4
- package/MapBrowserEvent.d.ts.map +1 -1
- package/MapBrowserEvent.js +7 -14
- package/MapEvent.d.ts +2 -2
- package/MapEvent.d.ts.map +1 -1
- package/MapEvent.js +3 -3
- package/Object.d.ts +8 -8
- package/Object.d.ts.map +1 -1
- package/Object.js +13 -13
- package/Overlay.d.ts +2 -2
- package/Overlay.d.ts.map +1 -1
- package/Overlay.js +3 -3
- package/Tile.d.ts +2 -2
- package/Tile.d.ts.map +1 -1
- package/Tile.js +3 -3
- package/TileCache.d.ts +1 -1
- package/TileCache.d.ts.map +1 -1
- package/VectorTile.d.ts +2 -2
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +3 -3
- package/View.d.ts +55 -55
- package/View.d.ts.map +1 -1
- package/View.js +96 -103
- package/array.d.ts +5 -5
- package/array.d.ts.map +1 -1
- package/array.js +8 -8
- package/centerconstraint.js +6 -6
- package/control/Attribution.d.ts +2 -2
- package/control/Attribution.d.ts.map +1 -1
- package/control/Attribution.js +3 -3
- package/control/FullScreen.d.ts +2 -2
- package/control/FullScreen.d.ts.map +1 -1
- package/control/FullScreen.js +3 -3
- package/control/MousePosition.d.ts +2 -2
- package/control/MousePosition.d.ts.map +1 -1
- package/control/MousePosition.js +3 -3
- package/control/OverviewMap.d.ts +2 -2
- package/control/OverviewMap.d.ts.map +1 -1
- package/control/OverviewMap.js +3 -3
- package/control/Rotate.d.ts +2 -2
- package/control/Rotate.d.ts.map +1 -1
- package/control/Rotate.js +3 -3
- package/control/ScaleLine.d.ts +2 -2
- package/control/ScaleLine.d.ts.map +1 -1
- package/control/ScaleLine.js +3 -3
- package/control/Zoom.d.ts +2 -2
- package/control/Zoom.d.ts.map +1 -1
- package/control/Zoom.js +3 -3
- package/control/ZoomSlider.d.ts +2 -2
- package/control/ZoomSlider.d.ts.map +1 -1
- package/control/ZoomSlider.js +3 -3
- package/control/ZoomToExtent.d.ts +2 -2
- package/control/ZoomToExtent.d.ts.map +1 -1
- package/control/ZoomToExtent.js +3 -3
- package/control/defaults.d.ts +2 -2
- package/control/defaults.d.ts.map +1 -1
- package/control/defaults.js +3 -3
- package/coordinate.d.ts +12 -12
- package/coordinate.d.ts.map +1 -1
- package/coordinate.js +20 -21
- package/dom.d.ts +5 -5
- package/dom.d.ts.map +1 -1
- package/dom.js +13 -18
- package/events/Target.d.ts +4 -4
- package/events/Target.d.ts.map +1 -1
- package/events/Target.js +7 -7
- package/events.d.ts +5 -5
- package/events.d.ts.map +1 -1
- package/events.js +9 -9
- package/extent.d.ts +25 -25
- package/extent.d.ts.map +1 -1
- package/extent.js +66 -72
- package/format/EsriJSON.d.ts +11 -11
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/EsriJSON.js +45 -50
- package/format/Feature.d.ts +18 -18
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +33 -41
- package/format/GML.d.ts +1 -1
- package/format/GML.js +3 -3
- package/format/GML2.d.ts +5 -5
- package/format/GML2.d.ts.map +1 -1
- package/format/GML2.js +15 -18
- package/format/GML3.d.ts +7 -7
- package/format/GML3.d.ts.map +1 -1
- package/format/GML3.js +26 -29
- package/format/GML32.d.ts.map +1 -1
- package/format/GML32.js +3 -5
- package/format/GMLBase.d.ts +6 -6
- package/format/GMLBase.d.ts.map +1 -1
- package/format/GMLBase.js +14 -14
- package/format/GPX.d.ts +2 -2
- package/format/GPX.d.ts.map +1 -1
- package/format/GPX.js +15 -17
- package/format/GeoJSON.d.ts +10 -10
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +60 -65
- package/format/IGC.d.ts +2 -2
- package/format/IGC.d.ts.map +1 -1
- package/format/IGC.js +9 -9
- package/format/IIIFInfo.d.ts +2 -2
- package/format/IIIFInfo.d.ts.map +1 -1
- package/format/IIIFInfo.js +3 -3
- package/format/JSONFeature.d.ts +22 -22
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +30 -30
- package/format/KML.d.ts +2 -2
- package/format/KML.d.ts.map +1 -1
- package/format/KML.js +22 -22
- package/format/MVT.d.ts +5 -5
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +7 -9
- package/format/OSMXML.js +3 -3
- package/format/Polyline.d.ts +16 -16
- package/format/Polyline.d.ts.map +1 -1
- package/format/Polyline.js +33 -37
- package/format/TextFeature.d.ts +22 -22
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TextFeature.js +30 -30
- package/format/TopoJSON.d.ts +2 -2
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/TopoJSON.js +13 -13
- package/format/WFS.d.ts +7 -7
- package/format/WFS.d.ts.map +1 -1
- package/format/WFS.js +15 -18
- package/format/WKB.d.ts +8 -8
- package/format/WKB.d.ts.map +1 -1
- package/format/WKB.js +21 -21
- package/format/WKT.d.ts +2 -2
- package/format/WKT.d.ts.map +1 -1
- package/format/WKT.js +25 -25
- package/format/WMSGetFeatureInfo.d.ts +2 -2
- package/format/WMSGetFeatureInfo.d.ts.map +1 -1
- package/format/WMSGetFeatureInfo.js +9 -9
- package/format/XMLFeature.d.ts +28 -28
- package/format/XMLFeature.d.ts.map +1 -1
- package/format/XMLFeature.js +44 -47
- package/format/filter/Bbox.d.ts +2 -2
- package/format/filter/Bbox.d.ts.map +1 -1
- package/format/filter/Bbox.js +3 -3
- package/format/filter/ComparisonBinary.d.ts +2 -2
- package/format/filter/ComparisonBinary.d.ts.map +1 -1
- package/format/filter/ComparisonBinary.js +3 -3
- package/format/filter/Contains.d.ts +2 -2
- package/format/filter/Contains.d.ts.map +1 -1
- package/format/filter/Contains.js +3 -3
- package/format/filter/DWithin.d.ts +2 -2
- package/format/filter/DWithin.d.ts.map +1 -1
- package/format/filter/DWithin.js +3 -3
- package/format/filter/Disjoint.d.ts +2 -2
- package/format/filter/Disjoint.d.ts.map +1 -1
- package/format/filter/Disjoint.js +3 -3
- package/format/filter/EqualTo.d.ts +2 -2
- package/format/filter/EqualTo.d.ts.map +1 -1
- package/format/filter/EqualTo.js +3 -3
- package/format/filter/Intersects.d.ts +2 -2
- package/format/filter/Intersects.d.ts.map +1 -1
- package/format/filter/Intersects.js +3 -3
- package/format/filter/IsLike.d.ts +5 -5
- package/format/filter/IsLike.d.ts.map +1 -1
- package/format/filter/IsLike.js +12 -12
- package/format/filter/NotEqualTo.d.ts +2 -2
- package/format/filter/NotEqualTo.d.ts.map +1 -1
- package/format/filter/NotEqualTo.js +3 -3
- package/format/filter/Spatial.d.ts +2 -2
- package/format/filter/Spatial.d.ts.map +1 -1
- package/format/filter/Spatial.js +3 -3
- package/format/filter/Within.d.ts +2 -2
- package/format/filter/Within.d.ts.map +1 -1
- package/format/filter/Within.js +3 -3
- package/format/filter.d.ts +21 -21
- package/format/filter.d.ts.map +1 -1
- package/format/filter.js +36 -36
- package/geom/Circle.d.ts +8 -8
- package/geom/Circle.d.ts.map +1 -1
- package/geom/Circle.js +13 -13
- package/geom/Geometry.d.ts +10 -10
- package/geom/Geometry.d.ts.map +1 -1
- package/geom/Geometry.js +16 -16
- package/geom/GeometryCollection.d.ts +2 -2
- package/geom/GeometryCollection.d.ts.map +1 -1
- package/geom/GeometryCollection.js +7 -8
- package/geom/LineString.d.ts +11 -11
- package/geom/LineString.d.ts.map +1 -1
- package/geom/LineString.js +17 -17
- package/geom/LinearRing.d.ts +5 -5
- package/geom/LinearRing.d.ts.map +1 -1
- package/geom/LinearRing.js +9 -9
- package/geom/MultiLineString.d.ts +14 -14
- package/geom/MultiLineString.d.ts.map +1 -1
- package/geom/MultiLineString.js +21 -21
- package/geom/MultiPoint.d.ts +5 -5
- package/geom/MultiPoint.d.ts.map +1 -1
- package/geom/MultiPoint.js +9 -9
- package/geom/MultiPolygon.d.ts +8 -8
- package/geom/MultiPolygon.d.ts.map +1 -1
- package/geom/MultiPolygon.js +22 -22
- package/geom/Point.d.ts +2 -2
- package/geom/Point.d.ts.map +1 -1
- package/geom/Point.js +6 -6
- package/geom/Polygon.d.ts +16 -16
- package/geom/Polygon.d.ts.map +1 -1
- package/geom/Polygon.js +28 -28
- package/geom/SimpleGeometry.d.ts +4 -4
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/SimpleGeometry.js +8 -10
- package/geom/flat/closest.d.ts +6 -6
- package/geom/flat/closest.d.ts.map +1 -1
- package/geom/flat/closest.js +9 -9
- package/geom/flat/deflate.d.ts +4 -4
- package/geom/flat/deflate.d.ts.map +1 -1
- package/geom/flat/deflate.js +6 -6
- package/geom/flat/flip.d.ts +3 -3
- package/geom/flat/flip.d.ts.map +1 -1
- package/geom/flat/flip.js +6 -14
- package/geom/flat/inflate.d.ts +6 -6
- package/geom/flat/inflate.d.ts.map +1 -1
- package/geom/flat/inflate.js +9 -10
- package/geom/flat/interiorpoint.d.ts +2 -2
- package/geom/flat/interiorpoint.d.ts.map +1 -1
- package/geom/flat/interiorpoint.js +5 -5
- package/geom/flat/interpolate.d.ts +3 -3
- package/geom/flat/interpolate.d.ts.map +1 -1
- package/geom/flat/interpolate.js +6 -6
- package/geom/flat/orient.d.ts +12 -12
- package/geom/flat/orient.d.ts.map +1 -1
- package/geom/flat/orient.js +16 -18
- package/geom/flat/simplify.d.ts +2 -2
- package/geom/flat/simplify.d.ts.map +1 -1
- package/geom/flat/simplify.js +4 -6
- package/geom/flat/transform.d.ts +8 -8
- package/geom/flat/transform.d.ts.map +1 -1
- package/geom/flat/transform.js +16 -16
- package/interaction/DoubleClickZoom.d.ts +2 -2
- package/interaction/DoubleClickZoom.d.ts.map +1 -1
- package/interaction/DoubleClickZoom.js +3 -3
- package/interaction/DragAndDrop.d.ts +5 -5
- package/interaction/DragAndDrop.d.ts.map +1 -1
- package/interaction/DragAndDrop.js +8 -8
- package/interaction/DragBox.d.ts +2 -2
- package/interaction/DragBox.d.ts.map +1 -1
- package/interaction/DragBox.js +3 -3
- package/interaction/DragPan.d.ts +2 -2
- package/interaction/DragPan.d.ts.map +1 -1
- package/interaction/DragPan.js +3 -3
- package/interaction/DragRotate.d.ts +2 -2
- package/interaction/DragRotate.d.ts.map +1 -1
- package/interaction/DragRotate.js +3 -3
- package/interaction/DragRotateAndZoom.d.ts +2 -2
- package/interaction/DragRotateAndZoom.d.ts.map +1 -1
- package/interaction/DragRotateAndZoom.js +3 -3
- package/interaction/DragZoom.d.ts +2 -2
- package/interaction/DragZoom.d.ts.map +1 -1
- package/interaction/DragZoom.js +3 -3
- package/interaction/Draw.d.ts +3 -3
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Draw.js +15 -13
- package/interaction/Extent.d.ts +2 -2
- package/interaction/Extent.d.ts.map +1 -1
- package/interaction/Extent.js +13 -13
- package/interaction/Interaction.d.ts +7 -7
- package/interaction/Interaction.d.ts.map +1 -1
- package/interaction/Interaction.js +12 -12
- package/interaction/KeyboardPan.d.ts +2 -2
- package/interaction/KeyboardPan.d.ts.map +1 -1
- package/interaction/KeyboardPan.js +3 -3
- package/interaction/KeyboardZoom.d.ts +2 -2
- package/interaction/KeyboardZoom.d.ts.map +1 -1
- package/interaction/KeyboardZoom.js +3 -3
- package/interaction/Link.d.ts +2 -2
- package/interaction/Link.d.ts.map +1 -1
- package/interaction/Link.js +4 -4
- package/interaction/Modify.d.ts +1 -1
- package/interaction/Modify.js +3 -3
- package/interaction/MouseWheelZoom.d.ts +2 -2
- package/interaction/MouseWheelZoom.d.ts.map +1 -1
- package/interaction/MouseWheelZoom.js +3 -3
- package/interaction/PinchRotate.d.ts +2 -2
- package/interaction/PinchRotate.d.ts.map +1 -1
- package/interaction/PinchRotate.js +3 -3
- package/interaction/PinchZoom.d.ts +2 -2
- package/interaction/PinchZoom.d.ts.map +1 -1
- package/interaction/PinchZoom.js +3 -3
- package/interaction/Pointer.d.ts +2 -2
- package/interaction/Pointer.d.ts.map +1 -1
- package/interaction/Pointer.js +3 -3
- package/interaction/Select.d.ts +2 -2
- package/interaction/Select.d.ts.map +1 -1
- package/interaction/Select.js +3 -3
- package/interaction/Snap.d.ts +6 -6
- package/interaction/Snap.d.ts.map +1 -1
- package/interaction/Snap.js +9 -9
- package/interaction/Translate.d.ts +2 -2
- package/interaction/Translate.d.ts.map +1 -1
- package/interaction/Translate.js +3 -3
- package/interaction/defaults.d.ts +2 -2
- package/interaction/defaults.d.ts.map +1 -1
- package/interaction/defaults.js +3 -3
- package/layer/Base.d.ts +8 -8
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +10 -10
- package/layer/BaseImage.d.ts +2 -2
- package/layer/BaseImage.d.ts.map +1 -1
- package/layer/BaseImage.js +3 -3
- package/layer/BaseTile.d.ts +2 -2
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseTile.js +3 -3
- package/layer/BaseVector.d.ts +4 -4
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +21 -21
- package/layer/Graticule.d.ts +2 -2
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +6 -10
- package/layer/Group.d.ts +2 -2
- package/layer/Group.d.ts.map +1 -1
- package/layer/Group.js +11 -11
- package/layer/Heatmap.d.ts +2 -2
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +3 -3
- package/layer/Image.d.ts +2 -2
- package/layer/Image.d.ts.map +1 -1
- package/layer/Image.js +3 -3
- package/layer/Layer.js +6 -6
- package/layer/Tile.d.ts +2 -2
- package/layer/Tile.d.ts.map +1 -1
- package/layer/Tile.js +3 -3
- package/layer/Vector.d.ts +2 -2
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +3 -3
- package/layer/VectorImage.d.ts +2 -2
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +3 -3
- package/layer/VectorTile.d.ts +3 -3
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +4 -4
- package/layer/WebGLTile.d.ts +2 -2
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLTile.js +3 -3
- package/net.d.ts +3 -3
- package/net.d.ts.map +1 -1
- package/net.js +6 -6
- package/package.json +1 -1
- package/proj/epsg3857.d.ts +6 -6
- package/proj/epsg3857.d.ts.map +1 -1
- package/proj/epsg3857.js +8 -10
- package/proj/epsg4326.js +3 -3
- package/proj.d.ts +16 -16
- package/proj.d.ts.map +1 -1
- package/proj.js +38 -39
- package/render/Event.d.ts +4 -4
- package/render/Event.d.ts.map +1 -1
- package/render/Event.js +7 -7
- package/render/Feature.d.ts +4 -4
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +6 -6
- package/render/VectorContext.d.ts +4 -4
- package/render/VectorContext.d.ts.map +1 -1
- package/render/VectorContext.js +4 -4
- package/render/canvas/Executor.d.ts +8 -8
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +31 -33
- package/render/canvas/ExecutorGroup.d.ts +5 -5
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +10 -10
- package/render/canvas/ImageBuilder.d.ts +2 -2
- package/render/canvas/ImageBuilder.d.ts.map +1 -1
- package/render/canvas/ImageBuilder.js +3 -3
- package/render/canvas/Immediate.d.ts +3 -3
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +6 -6
- package/render/canvas/TextBuilder.d.ts +2 -2
- package/render/canvas/TextBuilder.d.ts.map +1 -1
- package/render/canvas/TextBuilder.js +3 -3
- package/render/webgl/utils.d.ts +2 -2
- package/render/webgl/utils.d.ts.map +1 -1
- package/render/webgl/utils.js +3 -3
- package/render.d.ts +2 -2
- package/render.d.ts.map +1 -1
- package/render.js +3 -3
- package/renderer/canvas/Layer.d.ts +2 -2
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/Layer.js +6 -6
- package/renderer/canvas/TileLayer.d.ts +2 -2
- package/renderer/canvas/TileLayer.d.ts.map +1 -1
- package/renderer/canvas/TileLayer.js +4 -4
- package/renderer/canvas/VectorLayer.d.ts +5 -5
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.js +11 -11
- package/renderer/canvas/VectorTileLayer.d.ts +2 -2
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +4 -4
- package/renderer/vector.d.ts +3 -3
- package/renderer/vector.d.ts.map +1 -1
- package/renderer/vector.js +42 -42
- package/renderer/webgl/Layer.d.ts +2 -2
- package/renderer/webgl/Layer.d.ts.map +1 -1
- package/renderer/webgl/Layer.js +3 -3
- package/reproj/Tile.d.ts +4 -4
- package/reproj/Tile.d.ts.map +1 -1
- package/reproj/Tile.js +9 -9
- package/reproj/Triangulation.d.ts +2 -2
- package/reproj/Triangulation.d.ts.map +1 -1
- package/reproj/Triangulation.js +4 -7
- package/reproj.d.ts +3 -3
- package/reproj.d.ts.map +1 -1
- package/reproj.js +8 -8
- package/resolutionconstraint.d.ts +13 -13
- package/resolutionconstraint.d.ts.map +1 -1
- package/resolutionconstraint.js +44 -43
- package/rotationconstraint.d.ts +2 -2
- package/rotationconstraint.d.ts.map +1 -1
- package/rotationconstraint.js +9 -9
- package/size.d.ts +6 -6
- package/size.d.ts.map +1 -1
- package/size.js +21 -21
- package/source/Cluster.js +3 -3
- package/source/IIIF.d.ts +2 -2
- package/source/IIIF.d.ts.map +1 -1
- package/source/IIIF.js +26 -26
- package/source/ImageArcGISRest.d.ts +2 -2
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageArcGISRest.js +3 -3
- package/source/ImageCanvas.d.ts +2 -2
- package/source/ImageCanvas.d.ts.map +1 -1
- package/source/ImageCanvas.js +3 -3
- package/source/ImageWMS.d.ts +7 -7
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/ImageWMS.js +5 -5
- package/source/OSM.d.ts +2 -2
- package/source/OSM.d.ts.map +1 -1
- package/source/OSM.js +3 -3
- package/source/Raster.d.ts +2 -2
- package/source/Raster.d.ts.map +1 -1
- package/source/Raster.js +3 -3
- package/source/Tile.d.ts +2 -2
- package/source/Tile.d.ts.map +1 -1
- package/source/Tile.js +3 -4
- package/source/TileArcGISRest.d.ts +2 -2
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileArcGISRest.js +3 -3
- package/source/TileDebug.d.ts +2 -2
- package/source/TileDebug.d.ts.map +1 -1
- package/source/TileDebug.js +3 -3
- package/source/TileWMS.d.ts +2 -2
- package/source/TileWMS.d.ts.map +1 -1
- package/source/TileWMS.js +3 -3
- package/source/UTFGrid.d.ts +6 -6
- package/source/UTFGrid.d.ts.map +1 -1
- package/source/UTFGrid.js +9 -14
- package/source/Vector.d.ts +13 -13
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +21 -22
- package/source/XYZ.d.ts +2 -2
- package/source/XYZ.d.ts.map +1 -1
- package/source/XYZ.js +3 -3
- package/source/Zoomify.d.ts +4 -4
- package/source/Zoomify.d.ts.map +1 -1
- package/source/Zoomify.js +5 -7
- package/sphere.d.ts +8 -8
- package/sphere.d.ts.map +1 -1
- package/sphere.js +14 -14
- package/string.d.ts +2 -2
- package/string.d.ts.map +1 -1
- package/string.js +3 -3
- package/structs/LRUCache.d.ts +4 -4
- package/structs/LRUCache.d.ts.map +1 -1
- package/structs/LRUCache.js +5 -6
- package/structs/LinkedList.d.ts +2 -2
- package/structs/LinkedList.d.ts.map +1 -1
- package/structs/LinkedList.js +3 -3
- package/structs/RBush.d.ts +4 -4
- package/structs/RBush.d.ts.map +1 -1
- package/structs/RBush.js +6 -12
- package/style/Circle.d.ts +2 -2
- package/style/Circle.d.ts.map +1 -1
- package/style/Circle.js +3 -3
- package/style/Fill.d.ts +2 -2
- package/style/Fill.d.ts.map +1 -1
- package/style/Fill.js +3 -3
- package/style/Icon.d.ts +2 -2
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +3 -3
- package/style/Stroke.d.ts +2 -2
- package/style/Stroke.d.ts.map +1 -1
- package/style/Stroke.js +3 -3
- package/style/Style.d.ts +2 -2
- package/style/Style.d.ts.map +1 -1
- package/style/Style.js +3 -3
- package/style/Text.d.ts +2 -2
- package/style/Text.d.ts.map +1 -1
- package/style/Text.js +3 -3
- package/style/expressions.js +7 -7
- package/tilecoord.d.ts +2 -2
- package/tilecoord.d.ts.map +1 -1
- package/tilecoord.js +7 -7
- package/tilegrid/TileGrid.d.ts +14 -14
- package/tilegrid/TileGrid.js +28 -28
- package/tilegrid/WMTS.d.ts +3 -3
- package/tilegrid/WMTS.d.ts.map +1 -1
- package/tilegrid/WMTS.js +6 -6
- package/tilegrid.d.ts +10 -10
- package/tilegrid.d.ts.map +1 -1
- package/tilegrid.js +24 -36
- package/util.js +1 -1
- package/webgl/Buffer.d.ts +2 -2
- package/webgl/Buffer.d.ts.map +1 -1
- package/webgl/Buffer.js +3 -3
- package/webgl/Helper.d.ts +9 -9
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +15 -28
- package/webgl/RenderTarget.d.ts +2 -2
- package/webgl/RenderTarget.d.ts.map +1 -1
- package/webgl/RenderTarget.js +3 -3
- package/webgl.d.ts +2 -2
- package/webgl.d.ts.map +1 -1
- package/webgl.js +4 -4
- package/xml.d.ts +37 -37
- package/xml.d.ts.map +1 -1
- package/xml.js +63 -82
package/View.js
CHANGED
|
@@ -288,7 +288,7 @@ const DEFAULT_MIN_ZOOM = 0;
|
|
|
288
288
|
* A consequence of this is that, when applying a delta on the view state, one
|
|
289
289
|
* should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`
|
|
290
290
|
* rather than the corresponding setters. This will let view do its internal
|
|
291
|
-
* computations. Besides, the `adjust*` methods also take an `
|
|
291
|
+
* computations. Besides, the `adjust*` methods also take an `anchor`
|
|
292
292
|
* argument which allows specifying an origin for the transformation.
|
|
293
293
|
*
|
|
294
294
|
* ### Interacting with the view
|
|
@@ -303,9 +303,9 @@ const DEFAULT_MIN_ZOOM = 0;
|
|
|
303
303
|
*/
|
|
304
304
|
class View extends BaseObject {
|
|
305
305
|
/**
|
|
306
|
-
* @param {ViewOptions} [
|
|
306
|
+
* @param {ViewOptions} [options] View options.
|
|
307
307
|
*/
|
|
308
|
-
constructor(
|
|
308
|
+
constructor(options) {
|
|
309
309
|
super();
|
|
310
310
|
|
|
311
311
|
/***
|
|
@@ -323,7 +323,7 @@ class View extends BaseObject {
|
|
|
323
323
|
*/
|
|
324
324
|
this.un;
|
|
325
325
|
|
|
326
|
-
|
|
326
|
+
options = Object.assign({}, options);
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
329
|
* @private
|
|
@@ -896,19 +896,17 @@ class View extends BaseObject {
|
|
|
896
896
|
/**
|
|
897
897
|
* Returns the current viewport size.
|
|
898
898
|
* @private
|
|
899
|
-
* @param {number} [
|
|
899
|
+
* @param {number} [rotation] Take into account the rotation of the viewport when giving the size
|
|
900
900
|
* @return {import("./size.js").Size} Viewport size or `[100, 100]` when no viewport is found.
|
|
901
901
|
*/
|
|
902
|
-
getViewportSize_(
|
|
902
|
+
getViewportSize_(rotation) {
|
|
903
903
|
const size = this.viewportSize_;
|
|
904
|
-
if (
|
|
904
|
+
if (rotation) {
|
|
905
905
|
const w = size[0];
|
|
906
906
|
const h = size[1];
|
|
907
907
|
return [
|
|
908
|
-
Math.abs(w * Math.cos(
|
|
909
|
-
|
|
910
|
-
Math.abs(w * Math.sin(opt_rotation)) +
|
|
911
|
-
Math.abs(h * Math.cos(opt_rotation)),
|
|
908
|
+
Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),
|
|
909
|
+
Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),
|
|
912
910
|
];
|
|
913
911
|
} else {
|
|
914
912
|
return size;
|
|
@@ -920,12 +918,10 @@ class View extends BaseObject {
|
|
|
920
918
|
* to avoid performance hit and layout reflow.
|
|
921
919
|
* This should be done on map size change.
|
|
922
920
|
* Note: the constraints are not resolved during an animation to avoid stopping it
|
|
923
|
-
* @param {import("./size.js").Size} [
|
|
921
|
+
* @param {import("./size.js").Size} [size] Viewport size; if undefined, [100, 100] is assumed
|
|
924
922
|
*/
|
|
925
|
-
setViewportSize(
|
|
926
|
-
this.viewportSize_ = Array.isArray(
|
|
927
|
-
? opt_size.slice()
|
|
928
|
-
: [100, 100];
|
|
923
|
+
setViewportSize(size) {
|
|
924
|
+
this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];
|
|
929
925
|
if (!this.getAnimating()) {
|
|
930
926
|
this.resolveConstraints(0);
|
|
931
927
|
}
|
|
@@ -970,14 +966,14 @@ class View extends BaseObject {
|
|
|
970
966
|
}
|
|
971
967
|
|
|
972
968
|
/**
|
|
973
|
-
* @param {Array<number>} [
|
|
969
|
+
* @param {Array<number>} [hints] Destination array.
|
|
974
970
|
* @return {Array<number>} Hint.
|
|
975
971
|
*/
|
|
976
|
-
getHints(
|
|
977
|
-
if (
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
return
|
|
972
|
+
getHints(hints) {
|
|
973
|
+
if (hints !== undefined) {
|
|
974
|
+
hints[0] = this.hints_[0];
|
|
975
|
+
hints[1] = this.hints_[1];
|
|
976
|
+
return hints;
|
|
981
977
|
} else {
|
|
982
978
|
return this.hints_.slice();
|
|
983
979
|
}
|
|
@@ -988,23 +984,23 @@ class View extends BaseObject {
|
|
|
988
984
|
* The size is the pixel dimensions of the box into which the calculated extent
|
|
989
985
|
* should fit. In most cases you want to get the extent of the entire map,
|
|
990
986
|
* that is `map.getSize()`.
|
|
991
|
-
* @param {import("./size.js").Size} [
|
|
987
|
+
* @param {import("./size.js").Size} [size] Box pixel size. If not provided, the size
|
|
992
988
|
* of the map that uses this view will be used.
|
|
993
989
|
* @return {import("./extent.js").Extent} Extent.
|
|
994
990
|
* @api
|
|
995
991
|
*/
|
|
996
|
-
calculateExtent(
|
|
997
|
-
const extent = this.calculateExtentInternal(
|
|
992
|
+
calculateExtent(size) {
|
|
993
|
+
const extent = this.calculateExtentInternal(size);
|
|
998
994
|
return toUserExtent(extent, this.getProjection());
|
|
999
995
|
}
|
|
1000
996
|
|
|
1001
997
|
/**
|
|
1002
|
-
* @param {import("./size.js").Size} [
|
|
998
|
+
* @param {import("./size.js").Size} [size] Box pixel size. If not provided,
|
|
1003
999
|
* the map's last known viewport size will be used.
|
|
1004
1000
|
* @return {import("./extent.js").Extent} Extent.
|
|
1005
1001
|
*/
|
|
1006
|
-
calculateExtentInternal(
|
|
1007
|
-
|
|
1002
|
+
calculateExtentInternal(size) {
|
|
1003
|
+
size = size || this.getViewportSizeMinusPadding_();
|
|
1008
1004
|
const center = /** @type {!import("./coordinate.js").Coordinate} */ (
|
|
1009
1005
|
this.getCenterInternal()
|
|
1010
1006
|
);
|
|
@@ -1116,27 +1112,27 @@ class View extends BaseObject {
|
|
|
1116
1112
|
/**
|
|
1117
1113
|
* Get the resolution for a provided extent (in map units) and size (in pixels).
|
|
1118
1114
|
* @param {import("./extent.js").Extent} extent Extent.
|
|
1119
|
-
* @param {import("./size.js").Size} [
|
|
1115
|
+
* @param {import("./size.js").Size} [size] Box pixel size.
|
|
1120
1116
|
* @return {number} The resolution at which the provided extent will render at
|
|
1121
1117
|
* the given size.
|
|
1122
1118
|
* @api
|
|
1123
1119
|
*/
|
|
1124
|
-
getResolutionForExtent(extent,
|
|
1120
|
+
getResolutionForExtent(extent, size) {
|
|
1125
1121
|
return this.getResolutionForExtentInternal(
|
|
1126
1122
|
fromUserExtent(extent, this.getProjection()),
|
|
1127
|
-
|
|
1123
|
+
size
|
|
1128
1124
|
);
|
|
1129
1125
|
}
|
|
1130
1126
|
|
|
1131
1127
|
/**
|
|
1132
1128
|
* Get the resolution for a provided extent (in map units) and size (in pixels).
|
|
1133
1129
|
* @param {import("./extent.js").Extent} extent Extent.
|
|
1134
|
-
* @param {import("./size.js").Size} [
|
|
1130
|
+
* @param {import("./size.js").Size} [size] Box pixel size.
|
|
1135
1131
|
* @return {number} The resolution at which the provided extent will render at
|
|
1136
1132
|
* the given size.
|
|
1137
1133
|
*/
|
|
1138
|
-
getResolutionForExtentInternal(extent,
|
|
1139
|
-
|
|
1134
|
+
getResolutionForExtentInternal(extent, size) {
|
|
1135
|
+
size = size || this.getViewportSizeMinusPadding_();
|
|
1140
1136
|
const xResolution = getWidth(extent) / size[0];
|
|
1141
1137
|
const yResolution = getHeight(extent) / size[1];
|
|
1142
1138
|
return Math.max(xResolution, yResolution);
|
|
@@ -1145,11 +1141,11 @@ class View extends BaseObject {
|
|
|
1145
1141
|
/**
|
|
1146
1142
|
* Return a function that returns a value between 0 and 1 for a
|
|
1147
1143
|
* resolution. Exponential scaling is assumed.
|
|
1148
|
-
* @param {number} [
|
|
1144
|
+
* @param {number} [power] Power.
|
|
1149
1145
|
* @return {function(number): number} Resolution for value function.
|
|
1150
1146
|
*/
|
|
1151
|
-
getResolutionForValueFunction(
|
|
1152
|
-
|
|
1147
|
+
getResolutionForValueFunction(power) {
|
|
1148
|
+
power = power || 2;
|
|
1153
1149
|
const maxResolution = this.getConstrainedResolution(this.maxResolution_);
|
|
1154
1150
|
const minResolution = this.minResolution_;
|
|
1155
1151
|
const max = Math.log(maxResolution / minResolution) / Math.log(power);
|
|
@@ -1178,11 +1174,11 @@ class View extends BaseObject {
|
|
|
1178
1174
|
/**
|
|
1179
1175
|
* Return a function that returns a resolution for a value between
|
|
1180
1176
|
* 0 and 1. Exponential scaling is assumed.
|
|
1181
|
-
* @param {number} [
|
|
1177
|
+
* @param {number} [power] Power.
|
|
1182
1178
|
* @return {function(number): number} Value for resolution function.
|
|
1183
1179
|
*/
|
|
1184
|
-
getValueForResolutionFunction(
|
|
1185
|
-
const logPower = Math.log(
|
|
1180
|
+
getValueForResolutionFunction(power) {
|
|
1181
|
+
const logPower = Math.log(power || 2);
|
|
1186
1182
|
const maxResolution = this.getConstrainedResolution(this.maxResolution_);
|
|
1187
1183
|
const minResolution = this.minResolution_;
|
|
1188
1184
|
const max = Math.log(maxResolution / minResolution) / logPower;
|
|
@@ -1201,11 +1197,11 @@ class View extends BaseObject {
|
|
|
1201
1197
|
/**
|
|
1202
1198
|
* Returns the size of the viewport minus padding.
|
|
1203
1199
|
* @private
|
|
1204
|
-
* @param {number} [
|
|
1200
|
+
* @param {number} [rotation] Take into account the rotation of the viewport when giving the size
|
|
1205
1201
|
* @return {import("./size.js").Size} Viewport size reduced by the padding.
|
|
1206
1202
|
*/
|
|
1207
|
-
getViewportSizeMinusPadding_(
|
|
1208
|
-
let size = this.getViewportSize_(
|
|
1203
|
+
getViewportSizeMinusPadding_(rotation) {
|
|
1204
|
+
let size = this.getViewportSize_(rotation);
|
|
1209
1205
|
const padding = this.padding_;
|
|
1210
1206
|
if (padding) {
|
|
1211
1207
|
size = [
|
|
@@ -1326,10 +1322,10 @@ class View extends BaseObject {
|
|
|
1326
1322
|
* Takes care of the map angle.
|
|
1327
1323
|
* @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or
|
|
1328
1324
|
* extent to fit the view to.
|
|
1329
|
-
* @param {FitOptions} [
|
|
1325
|
+
* @param {FitOptions} [options] Options.
|
|
1330
1326
|
* @api
|
|
1331
1327
|
*/
|
|
1332
|
-
fit(geometryOrExtent,
|
|
1328
|
+
fit(geometryOrExtent, options) {
|
|
1333
1329
|
/** @type {import("./geom/SimpleGeometry.js").default} */
|
|
1334
1330
|
let geometry;
|
|
1335
1331
|
assert(
|
|
@@ -1362,7 +1358,7 @@ class View extends BaseObject {
|
|
|
1362
1358
|
}
|
|
1363
1359
|
}
|
|
1364
1360
|
|
|
1365
|
-
this.fitInternal(geometry,
|
|
1361
|
+
this.fitInternal(geometry, options);
|
|
1366
1362
|
}
|
|
1367
1363
|
|
|
1368
1364
|
/**
|
|
@@ -1393,10 +1389,10 @@ class View extends BaseObject {
|
|
|
1393
1389
|
|
|
1394
1390
|
/**
|
|
1395
1391
|
* @param {import("./geom/SimpleGeometry.js").default} geometry The geometry.
|
|
1396
|
-
* @param {FitOptions} [
|
|
1392
|
+
* @param {FitOptions} [options] Options.
|
|
1397
1393
|
*/
|
|
1398
|
-
fitInternal(geometry,
|
|
1399
|
-
|
|
1394
|
+
fitInternal(geometry, options) {
|
|
1395
|
+
options = options || {};
|
|
1400
1396
|
let size = options.size;
|
|
1401
1397
|
if (!size) {
|
|
1402
1398
|
size = this.getViewportSizeMinusPadding_();
|
|
@@ -1551,12 +1547,11 @@ class View extends BaseObject {
|
|
|
1551
1547
|
* Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
|
|
1552
1548
|
* constraint will apply.
|
|
1553
1549
|
* @param {number} ratio The ratio to apply on the view resolution.
|
|
1554
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1550
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1555
1551
|
* @api
|
|
1556
1552
|
*/
|
|
1557
|
-
adjustResolution(ratio,
|
|
1558
|
-
|
|
1559
|
-
opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());
|
|
1553
|
+
adjustResolution(ratio, anchor) {
|
|
1554
|
+
anchor = anchor && fromUserCoordinate(anchor, this.getProjection());
|
|
1560
1555
|
this.adjustResolutionInternal(ratio, anchor);
|
|
1561
1556
|
}
|
|
1562
1557
|
|
|
@@ -1564,9 +1559,9 @@ class View extends BaseObject {
|
|
|
1564
1559
|
* Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
|
|
1565
1560
|
* constraint will apply.
|
|
1566
1561
|
* @param {number} ratio The ratio to apply on the view resolution.
|
|
1567
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1562
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1568
1563
|
*/
|
|
1569
|
-
adjustResolutionInternal(ratio,
|
|
1564
|
+
adjustResolutionInternal(ratio, anchor) {
|
|
1570
1565
|
const isMoving = this.getAnimating() || this.getInteracting();
|
|
1571
1566
|
const size = this.getViewportSize_(this.getRotation());
|
|
1572
1567
|
const newResolution = this.constraints_.resolution(
|
|
@@ -1576,8 +1571,8 @@ class View extends BaseObject {
|
|
|
1576
1571
|
isMoving
|
|
1577
1572
|
);
|
|
1578
1573
|
|
|
1579
|
-
if (
|
|
1580
|
-
this.targetCenter_ = this.calculateCenterZoom(newResolution,
|
|
1574
|
+
if (anchor) {
|
|
1575
|
+
this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);
|
|
1581
1576
|
}
|
|
1582
1577
|
|
|
1583
1578
|
this.targetResolution_ *= ratio;
|
|
@@ -1588,39 +1583,39 @@ class View extends BaseObject {
|
|
|
1588
1583
|
* Adds a value to the view zoom level, optionally using an anchor. Any resolution
|
|
1589
1584
|
* constraint will apply.
|
|
1590
1585
|
* @param {number} delta Relative value to add to the zoom level.
|
|
1591
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1586
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1592
1587
|
* @api
|
|
1593
1588
|
*/
|
|
1594
|
-
adjustZoom(delta,
|
|
1595
|
-
this.adjustResolution(Math.pow(this.zoomFactor_, -delta),
|
|
1589
|
+
adjustZoom(delta, anchor) {
|
|
1590
|
+
this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);
|
|
1596
1591
|
}
|
|
1597
1592
|
|
|
1598
1593
|
/**
|
|
1599
1594
|
* Adds a value to the view rotation, optionally using an anchor. Any rotation
|
|
1600
1595
|
* constraint will apply.
|
|
1601
1596
|
* @param {number} delta Relative value to add to the zoom rotation, in radians.
|
|
1602
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1597
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The rotation center.
|
|
1603
1598
|
* @api
|
|
1604
1599
|
*/
|
|
1605
|
-
adjustRotation(delta,
|
|
1606
|
-
if (
|
|
1607
|
-
|
|
1600
|
+
adjustRotation(delta, anchor) {
|
|
1601
|
+
if (anchor) {
|
|
1602
|
+
anchor = fromUserCoordinate(anchor, this.getProjection());
|
|
1608
1603
|
}
|
|
1609
|
-
this.adjustRotationInternal(delta,
|
|
1604
|
+
this.adjustRotationInternal(delta, anchor);
|
|
1610
1605
|
}
|
|
1611
1606
|
|
|
1612
1607
|
/**
|
|
1613
1608
|
* @param {number} delta Relative value to add to the zoom rotation, in radians.
|
|
1614
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1609
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The rotation center.
|
|
1615
1610
|
*/
|
|
1616
|
-
adjustRotationInternal(delta,
|
|
1611
|
+
adjustRotationInternal(delta, anchor) {
|
|
1617
1612
|
const isMoving = this.getAnimating() || this.getInteracting();
|
|
1618
1613
|
const newRotation = this.constraints_.rotation(
|
|
1619
1614
|
this.targetRotation_ + delta,
|
|
1620
1615
|
isMoving
|
|
1621
1616
|
);
|
|
1622
|
-
if (
|
|
1623
|
-
this.targetCenter_ = this.calculateCenterRotate(newRotation,
|
|
1617
|
+
if (anchor) {
|
|
1618
|
+
this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);
|
|
1624
1619
|
}
|
|
1625
1620
|
this.targetRotation_ += delta;
|
|
1626
1621
|
this.applyTargetState_();
|
|
@@ -1693,13 +1688,13 @@ class View extends BaseObject {
|
|
|
1693
1688
|
* Recompute rotation/resolution/center based on target values.
|
|
1694
1689
|
* Note: we have to compute rotation first, then resolution and center considering that
|
|
1695
1690
|
* parameters can influence one another in case a view extent constraint is present.
|
|
1696
|
-
* @param {boolean} [
|
|
1697
|
-
* @param {boolean} [
|
|
1691
|
+
* @param {boolean} [doNotCancelAnims] Do not cancel animations.
|
|
1692
|
+
* @param {boolean} [forceMoving] Apply constraints as if the view is moving.
|
|
1698
1693
|
* @private
|
|
1699
1694
|
*/
|
|
1700
|
-
applyTargetState_(
|
|
1695
|
+
applyTargetState_(doNotCancelAnims, forceMoving) {
|
|
1701
1696
|
const isMoving =
|
|
1702
|
-
this.getAnimating() || this.getInteracting() ||
|
|
1697
|
+
this.getAnimating() || this.getInteracting() || forceMoving;
|
|
1703
1698
|
|
|
1704
1699
|
// compute rotation
|
|
1705
1700
|
const newRotation = this.constraints_.rotation(
|
|
@@ -1741,7 +1736,7 @@ class View extends BaseObject {
|
|
|
1741
1736
|
this.set(ViewProperty.CENTER, newCenter);
|
|
1742
1737
|
}
|
|
1743
1738
|
|
|
1744
|
-
if (this.getAnimating() && !
|
|
1739
|
+
if (this.getAnimating() && !doNotCancelAnims) {
|
|
1745
1740
|
this.cancelAnimations();
|
|
1746
1741
|
}
|
|
1747
1742
|
this.cancelAnchor_ = undefined;
|
|
@@ -1752,13 +1747,13 @@ class View extends BaseObject {
|
|
|
1752
1747
|
* This is typically done on interaction end.
|
|
1753
1748
|
* Note: calling this with a duration of 0 will apply the constrained values straight away,
|
|
1754
1749
|
* without animation.
|
|
1755
|
-
* @param {number} [
|
|
1756
|
-
* @param {number} [
|
|
1757
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1750
|
+
* @param {number} [duration] The animation duration in ms.
|
|
1751
|
+
* @param {number} [resolutionDirection] Which direction to zoom.
|
|
1752
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1758
1753
|
*/
|
|
1759
|
-
resolveConstraints(
|
|
1760
|
-
|
|
1761
|
-
const direction =
|
|
1754
|
+
resolveConstraints(duration, resolutionDirection, anchor) {
|
|
1755
|
+
duration = duration !== undefined ? duration : 200;
|
|
1756
|
+
const direction = resolutionDirection || 0;
|
|
1762
1757
|
|
|
1763
1758
|
const newRotation = this.constraints_.rotation(this.targetRotation_);
|
|
1764
1759
|
const size = this.getViewportSize_(newRotation);
|
|
@@ -1788,8 +1783,7 @@ class View extends BaseObject {
|
|
|
1788
1783
|
return;
|
|
1789
1784
|
}
|
|
1790
1785
|
|
|
1791
|
-
|
|
1792
|
-
opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);
|
|
1786
|
+
anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);
|
|
1793
1787
|
this.cancelAnchor_ = undefined;
|
|
1794
1788
|
|
|
1795
1789
|
if (
|
|
@@ -1828,42 +1822,41 @@ class View extends BaseObject {
|
|
|
1828
1822
|
/**
|
|
1829
1823
|
* Notify the View that an interaction has ended. The view state will be resolved
|
|
1830
1824
|
* to a stable one if needed (depending on its constraints).
|
|
1831
|
-
* @param {number} [
|
|
1832
|
-
* @param {number} [
|
|
1833
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1825
|
+
* @param {number} [duration] Animation duration in ms.
|
|
1826
|
+
* @param {number} [resolutionDirection] Which direction to zoom.
|
|
1827
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1834
1828
|
* @api
|
|
1835
1829
|
*/
|
|
1836
|
-
endInteraction(
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);
|
|
1830
|
+
endInteraction(duration, resolutionDirection, anchor) {
|
|
1831
|
+
anchor = anchor && fromUserCoordinate(anchor, this.getProjection());
|
|
1832
|
+
this.endInteractionInternal(duration, resolutionDirection, anchor);
|
|
1840
1833
|
}
|
|
1841
1834
|
|
|
1842
1835
|
/**
|
|
1843
1836
|
* Notify the View that an interaction has ended. The view state will be resolved
|
|
1844
1837
|
* to a stable one if needed (depending on its constraints).
|
|
1845
|
-
* @param {number} [
|
|
1846
|
-
* @param {number} [
|
|
1847
|
-
* @param {import("./coordinate.js").Coordinate} [
|
|
1838
|
+
* @param {number} [duration] Animation duration in ms.
|
|
1839
|
+
* @param {number} [resolutionDirection] Which direction to zoom.
|
|
1840
|
+
* @param {import("./coordinate.js").Coordinate} [anchor] The origin of the transformation.
|
|
1848
1841
|
*/
|
|
1849
|
-
endInteractionInternal(
|
|
1842
|
+
endInteractionInternal(duration, resolutionDirection, anchor) {
|
|
1850
1843
|
this.setHint(ViewHint.INTERACTING, -1);
|
|
1851
1844
|
|
|
1852
|
-
this.resolveConstraints(
|
|
1845
|
+
this.resolveConstraints(duration, resolutionDirection, anchor);
|
|
1853
1846
|
}
|
|
1854
1847
|
|
|
1855
1848
|
/**
|
|
1856
1849
|
* Get a valid position for the view center according to the current constraints.
|
|
1857
1850
|
* @param {import("./coordinate.js").Coordinate|undefined} targetCenter Target center position.
|
|
1858
|
-
* @param {number} [
|
|
1851
|
+
* @param {number} [targetResolution] Target resolution. If not supplied, the current one will be used.
|
|
1859
1852
|
* This is useful to guess a valid center position at a different zoom level.
|
|
1860
1853
|
* @return {import("./coordinate.js").Coordinate|undefined} Valid center position.
|
|
1861
1854
|
*/
|
|
1862
|
-
getConstrainedCenter(targetCenter,
|
|
1855
|
+
getConstrainedCenter(targetCenter, targetResolution) {
|
|
1863
1856
|
const size = this.getViewportSize_(this.getRotation());
|
|
1864
1857
|
return this.constraints_.center(
|
|
1865
1858
|
targetCenter,
|
|
1866
|
-
|
|
1859
|
+
targetResolution || this.getResolution(),
|
|
1867
1860
|
size
|
|
1868
1861
|
);
|
|
1869
1862
|
}
|
|
@@ -1871,30 +1864,30 @@ class View extends BaseObject {
|
|
|
1871
1864
|
/**
|
|
1872
1865
|
* Get a valid zoom level according to the current view constraints.
|
|
1873
1866
|
* @param {number|undefined} targetZoom Target zoom.
|
|
1874
|
-
* @param {number} [
|
|
1867
|
+
* @param {number} [direction=0] Indicate which resolution should be used
|
|
1875
1868
|
* by a renderer if the view resolution does not match any resolution of the tile source.
|
|
1876
1869
|
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
|
|
1877
1870
|
* will be used. If -1, the nearest higher resolution will be used.
|
|
1878
1871
|
* @return {number|undefined} Valid zoom level.
|
|
1879
1872
|
*/
|
|
1880
|
-
getConstrainedZoom(targetZoom,
|
|
1873
|
+
getConstrainedZoom(targetZoom, direction) {
|
|
1881
1874
|
const targetRes = this.getResolutionForZoom(targetZoom);
|
|
1882
1875
|
return this.getZoomForResolution(
|
|
1883
|
-
this.getConstrainedResolution(targetRes,
|
|
1876
|
+
this.getConstrainedResolution(targetRes, direction)
|
|
1884
1877
|
);
|
|
1885
1878
|
}
|
|
1886
1879
|
|
|
1887
1880
|
/**
|
|
1888
1881
|
* Get a valid resolution according to the current view constraints.
|
|
1889
1882
|
* @param {number|undefined} targetResolution Target resolution.
|
|
1890
|
-
* @param {number} [
|
|
1883
|
+
* @param {number} [direction=0] Indicate which resolution should be used
|
|
1891
1884
|
* by a renderer if the view resolution does not match any resolution of the tile source.
|
|
1892
1885
|
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
|
|
1893
1886
|
* will be used. If -1, the nearest higher resolution will be used.
|
|
1894
1887
|
* @return {number|undefined} Valid resolution.
|
|
1895
1888
|
*/
|
|
1896
|
-
getConstrainedResolution(targetResolution,
|
|
1897
|
-
|
|
1889
|
+
getConstrainedResolution(targetResolution, direction) {
|
|
1890
|
+
direction = direction || 0;
|
|
1898
1891
|
const size = this.getViewportSize_(this.getRotation());
|
|
1899
1892
|
|
|
1900
1893
|
return this.constraints_.resolution(targetResolution, direction, size);
|
package/array.d.ts
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @param {Array<*>} haystack Items to search through.
|
|
9
9
|
* @param {*} needle The item to look for.
|
|
10
|
-
* @param {Function} [
|
|
10
|
+
* @param {Function} [comparator] Comparator function.
|
|
11
11
|
* @return {number} The index of the item if found, -1 if not.
|
|
12
12
|
*/
|
|
13
|
-
export function binarySearch(haystack: Array<any>, needle: any,
|
|
13
|
+
export function binarySearch(haystack: Array<any>, needle: any, comparator?: Function | undefined): number;
|
|
14
14
|
/**
|
|
15
15
|
* Compare function for array sort that is safe for numbers.
|
|
16
16
|
* @param {*} a The first object to be compared.
|
|
@@ -77,11 +77,11 @@ export function equals(arr1: any[] | Uint8ClampedArray, arr2: any[] | Uint8Clamp
|
|
|
77
77
|
export function stableSort(arr: Array<any>, compareFnc: (arg0: any, arg1: any) => number): void;
|
|
78
78
|
/**
|
|
79
79
|
* @param {Array<*>} arr The array to test.
|
|
80
|
-
* @param {Function} [
|
|
81
|
-
* @param {boolean} [
|
|
80
|
+
* @param {Function} [func] Comparison function.
|
|
81
|
+
* @param {boolean} [strict] Strictly sorted (default false).
|
|
82
82
|
* @return {boolean} Return index.
|
|
83
83
|
*/
|
|
84
|
-
export function isSorted(arr: Array<any>,
|
|
84
|
+
export function isSorted(arr: Array<any>, func?: Function | undefined, strict?: boolean | undefined): boolean;
|
|
85
85
|
/**
|
|
86
86
|
* {@link module :ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function
|
|
87
87
|
* of this type to determine which nearest resolution to use.
|
package/array.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,uCALW,UAAQ,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["array.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,uCALW,UAAQ,mDAGP,MAAM,CA2BjB;AAED;;;;;;GAMG;AACH,2DAHY,MAAM,CAKjB;AAED;;;;;;;;;;;;GAYG;AAEH;;;;;;;;GAQG;AACH,uCARW,MAAM,MAAM,CAAC,UACb,MAAM,aACN,MAAM,GAAC,wBAAwB,GAI9B,MAAM,CA2CjB;AAED;;;;GAIG;AACH,qCAJW,UAAQ,SACR,MAAM,OACN,MAAM,QAUhB;AAED;;;;GAIG;AACH,yEAMC;AAED;;;;;GAKG;AACH,yDAFY,OAAO,CASlB;AAED;;;;GAIG;AACH,6BAJW,QAAM,iBAAiB,QACvB,QAAM,iBAAiB,GACtB,OAAO,CAalB;AAED;;;;;;GAMG;AACH,gCAJW,UAAQ,wCACS,MAAM,QAgBjC;AAED;;;;;GAKG;AACH,8BALW,UAAQ,8DAGP,OAAO,CAWlB;;;;;;;;;;;;8CA1JqB,MAAM,QAAE,MAAM,QAAE,MAAM,KAAG,MAAM"}
|
package/array.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @param {Array<*>} haystack Items to search through.
|
|
10
10
|
* @param {*} needle The item to look for.
|
|
11
|
-
* @param {Function} [
|
|
11
|
+
* @param {Function} [comparator] Comparator function.
|
|
12
12
|
* @return {number} The index of the item if found, -1 if not.
|
|
13
13
|
*/
|
|
14
|
-
export function binarySearch(haystack, needle,
|
|
14
|
+
export function binarySearch(haystack, needle, comparator) {
|
|
15
15
|
let mid, cmp;
|
|
16
|
-
|
|
16
|
+
comparator = comparator || numberSafeCompareFunction;
|
|
17
17
|
let low = 0;
|
|
18
18
|
let high = haystack.length;
|
|
19
19
|
let found = false;
|
|
@@ -200,17 +200,17 @@ export function stableSort(arr, compareFnc) {
|
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
* @param {Array<*>} arr The array to test.
|
|
203
|
-
* @param {Function} [
|
|
204
|
-
* @param {boolean} [
|
|
203
|
+
* @param {Function} [func] Comparison function.
|
|
204
|
+
* @param {boolean} [strict] Strictly sorted (default false).
|
|
205
205
|
* @return {boolean} Return index.
|
|
206
206
|
*/
|
|
207
|
-
export function isSorted(arr,
|
|
208
|
-
const compare =
|
|
207
|
+
export function isSorted(arr, func, strict) {
|
|
208
|
+
const compare = func || numberSafeCompareFunction;
|
|
209
209
|
return arr.every(function (currentVal, index) {
|
|
210
210
|
if (index === 0) {
|
|
211
211
|
return true;
|
|
212
212
|
}
|
|
213
213
|
const res = compare(arr[index - 1], currentVal);
|
|
214
|
-
return !(res > 0 || (
|
|
214
|
+
return !(res > 0 || (strict && res === 0));
|
|
215
215
|
});
|
|
216
216
|
}
|
package/centerconstraint.js
CHANGED
|
@@ -20,11 +20,11 @@ export function createExtent(extent, onlyCenter, smooth) {
|
|
|
20
20
|
* @param {import("./coordinate.js").Coordinate|undefined} center Center.
|
|
21
21
|
* @param {number|undefined} resolution Resolution.
|
|
22
22
|
* @param {import("./size.js").Size} size Viewport size; unused if `onlyCenter` was specified.
|
|
23
|
-
* @param {boolean} [
|
|
24
|
-
* @param {Array<number>} [
|
|
23
|
+
* @param {boolean} [isMoving] True if an interaction or animation is in progress.
|
|
24
|
+
* @param {Array<number>} [centerShift] Shift between map center and viewport center.
|
|
25
25
|
* @return {import("./coordinate.js").Coordinate|undefined} Center.
|
|
26
26
|
*/
|
|
27
|
-
function (center, resolution, size,
|
|
27
|
+
function (center, resolution, size, isMoving, centerShift) {
|
|
28
28
|
if (!center) {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
@@ -33,8 +33,8 @@ export function createExtent(extent, onlyCenter, smooth) {
|
|
|
33
33
|
}
|
|
34
34
|
const viewWidth = onlyCenter ? 0 : size[0] * resolution;
|
|
35
35
|
const viewHeight = onlyCenter ? 0 : size[1] * resolution;
|
|
36
|
-
const shiftX =
|
|
37
|
-
const shiftY =
|
|
36
|
+
const shiftX = centerShift ? centerShift[0] : 0;
|
|
37
|
+
const shiftY = centerShift ? centerShift[1] : 0;
|
|
38
38
|
let minX = extent[0] + viewWidth / 2 + shiftX;
|
|
39
39
|
let maxX = extent[2] - viewWidth / 2 + shiftX;
|
|
40
40
|
let minY = extent[1] + viewHeight / 2 + shiftY;
|
|
@@ -55,7 +55,7 @@ export function createExtent(extent, onlyCenter, smooth) {
|
|
|
55
55
|
let y = clamp(center[1], minY, maxY);
|
|
56
56
|
|
|
57
57
|
// during an interaction, allow some overscroll
|
|
58
|
-
if (
|
|
58
|
+
if (isMoving && smooth && resolution) {
|
|
59
59
|
const ratio = 30 * resolution;
|
|
60
60
|
x +=
|
|
61
61
|
-ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +
|
package/control/Attribution.d.ts
CHANGED
|
@@ -91,9 +91,9 @@ export type Options = {
|
|
|
91
91
|
*/
|
|
92
92
|
declare class Attribution extends Control {
|
|
93
93
|
/**
|
|
94
|
-
* @param {Options} [
|
|
94
|
+
* @param {Options} [options] Attribution options.
|
|
95
95
|
*/
|
|
96
|
-
constructor(
|
|
96
|
+
constructor(options?: Options | undefined);
|
|
97
97
|
/**
|
|
98
98
|
* @private
|
|
99
99
|
* @type {HTMLElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attribution.d.ts","sourceRoot":"","sources":["Attribution.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCuB,OAAO,gBAAgB,EAAE,OAAO,KAAE,IAAI;;AAtB7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH
|
|
1
|
+
{"version":3,"file":"Attribution.d.ts","sourceRoot":"","sources":["Attribution.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCuB,OAAO,gBAAgB,EAAE,OAAO,KAAE,IAAI;;AAtB7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,2CAsIC;IA7HC;;;OAGG;IACH,mBAA8C;IAE9C;;;OAGG;IACH,mBAC4D;IAE5D;;;OAGG;IACH,uBAAqC;IAErC;;;OAGG;IACH,6BAA6D;IAE7D;;;OAGG;IACH,qBACgE;IA0B9D;;;OAGG;IACH,uBAAoD;IAUpD;;;OAGG;IACH,eAA4C;IAU9C;;;OAGG;IACH,sBAAqD;IAyBrD;;;;OAIG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,yBAA4B;IAG9B;;;;;OAKG;IACH,mCA2DC;IAED;;;OAGG;IACH,uBA+BC;IAED;;;OAGG;IACH,qBAIC;IAED;;OAEG;IACH,sBASC;IAED;;;;OAIG;IACH,kBAHY,OAAO,CAKlB;IAED;;;;OAIG;IACH,4BAHW,OAAO,QAYjB;IAED;;;;;;OAMG;IACH,wBAHW,OAAO,QASjB;IAED;;;;;OAKG;IACH,gBAHY,OAAO,CAKlB;CAUF"}
|
package/control/Attribution.js
CHANGED
|
@@ -46,10 +46,10 @@ import {removeChildren, replaceNode} from '../dom.js';
|
|
|
46
46
|
*/
|
|
47
47
|
class Attribution extends Control {
|
|
48
48
|
/**
|
|
49
|
-
* @param {Options} [
|
|
49
|
+
* @param {Options} [options] Attribution options.
|
|
50
50
|
*/
|
|
51
|
-
constructor(
|
|
52
|
-
|
|
51
|
+
constructor(options) {
|
|
52
|
+
options = options ? options : {};
|
|
53
53
|
|
|
54
54
|
super({
|
|
55
55
|
element: document.createElement('div'),
|
package/control/FullScreen.d.ts
CHANGED
|
@@ -94,9 +94,9 @@ export type Options = {
|
|
|
94
94
|
*/
|
|
95
95
|
declare class FullScreen extends Control {
|
|
96
96
|
/**
|
|
97
|
-
* @param {Options} [
|
|
97
|
+
* @param {Options} [options] Options.
|
|
98
98
|
*/
|
|
99
|
-
constructor(
|
|
99
|
+
constructor(options?: Options | undefined);
|
|
100
100
|
/***
|
|
101
101
|
* @type {FullScreenOnSignature<import("../events").EventsKey>}
|
|
102
102
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullScreen.d.ts","sourceRoot":"","sources":["FullScreen.js"],"names":[],"mappings":";;;;4CAqCa,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,GAClF,iBAAuB,GAAC,iBAAiB,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACxF,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GACpH,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAClF,iBAAuB,GAAC,iBAAiB,GAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AANtF;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH
|
|
1
|
+
{"version":3,"file":"FullScreen.d.ts","sourceRoot":"","sources":["FullScreen.js"],"names":[],"mappings":";;;;4CAqCa,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,GAClF,iBAAuB,GAAC,iBAAiB,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACxF,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GACpH,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAClF,iBAAuB,GAAC,iBAAiB,GAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AANtF;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,2CAqHC;IA7GC;;OAEG;IACH,IAFU,sBAAsB,OAAO,WAAW,EAAE,SAAS,CAAC,CAEvD;IAEP;;OAEG;IACH,MAFU,sBAAsB,OAAO,WAAW,EAAE,SAAS,CAAC,CAErD;IAET;;OAEG;IACH,IAFU,sBAAsB,IAAI,CAAC,CAE9B;IAEP;;;OAGG;IACH,cAA8D;IAE9D;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,wBAA4B;IAE5B;;OAEG;IACH,oCAAyE;IAEzE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,2BAA4B;IAE5B;;;OAGG;IACH,yBAGoC;IAEpC;;;OAGG;IACH,2BAGqC;IAIrC;;;OAGG;IACH,mBACoE;IAKpE;;;OAGG;IACH,yBAGiB;IAIjB;;;OAGG;IACH,gBAA+C;IAejD;;;OAGG;IACH,qBAGC;IAED;;OAEG;IACH,0BA2BC;IAED;;OAEG;IACH,gCAkBC;IAED;;;;OAIG;IACH,sBAQC;IA8BD;;OAEG;IACH,+BAuBC;CACF"}
|
package/control/FullScreen.js
CHANGED
|
@@ -80,10 +80,10 @@ const FullScreenEventType = {
|
|
|
80
80
|
*/
|
|
81
81
|
class FullScreen extends Control {
|
|
82
82
|
/**
|
|
83
|
-
* @param {Options} [
|
|
83
|
+
* @param {Options} [options] Options.
|
|
84
84
|
*/
|
|
85
|
-
constructor(
|
|
86
|
-
|
|
85
|
+
constructor(options) {
|
|
86
|
+
options = options ? options : {};
|
|
87
87
|
|
|
88
88
|
super({
|
|
89
89
|
element: document.createElement('div'),
|