ol 7.3.0 → 7.3.1-dev
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 +2 -2
- package/Collection.d.ts.map +1 -1
- package/DataTile.d.ts +1 -1
- package/DataTile.d.ts.map +1 -1
- package/DataTile.js +2 -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/Image.d.ts +1 -1
- package/Image.d.ts.map +1 -1
- package/ImageBase.d.ts +1 -1
- package/ImageBase.d.ts.map +1 -1
- package/ImageCanvas.d.ts +1 -1
- package/ImageCanvas.d.ts.map +1 -1
- package/ImageTile.d.ts +1 -1
- package/ImageTile.d.ts.map +1 -1
- package/Map.d.ts +7 -7
- package/Map.d.ts.map +1 -1
- package/Map.js +2 -1
- package/MapBrowserEvent.d.ts +1 -1
- package/MapBrowserEvent.d.ts.map +1 -1
- package/MapBrowserEventHandler.d.ts +1 -1
- package/MapBrowserEventHandler.d.ts.map +1 -1
- package/MapEvent.d.ts +1 -1
- package/MapEvent.d.ts.map +1 -1
- package/Object.d.ts +2 -2
- package/Object.d.ts.map +1 -1
- package/Observable.d.ts +1 -1
- package/Observable.d.ts.map +1 -1
- package/Overlay.d.ts +1 -1
- package/Overlay.d.ts.map +1 -1
- package/Tile.d.ts +1 -1
- package/Tile.d.ts.map +1 -1
- package/TileCache.d.ts +1 -1
- package/TileCache.d.ts.map +1 -1
- package/TileQueue.d.ts +1 -1
- package/TileQueue.d.ts.map +1 -1
- package/VectorRenderTile.d.ts +1 -1
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorTile.d.ts +1 -1
- package/VectorTile.d.ts.map +1 -1
- package/View.d.ts +10 -6
- package/View.d.ts.map +1 -1
- package/View.js +9 -6
- package/array.d.ts.map +1 -1
- package/array.js +38 -20
- package/control/Attribution.d.ts +1 -1
- package/control/Attribution.d.ts.map +1 -1
- package/control/Control.d.ts +1 -1
- package/control/Control.d.ts.map +1 -1
- package/control/FullScreen.d.ts +1 -1
- package/control/FullScreen.d.ts.map +1 -1
- package/control/MousePosition.d.ts +1 -1
- package/control/MousePosition.d.ts.map +1 -1
- package/control/OverviewMap.d.ts +3 -3
- package/control/OverviewMap.d.ts.map +1 -1
- package/control/Rotate.d.ts +1 -1
- package/control/Rotate.d.ts.map +1 -1
- package/control/ScaleLine.d.ts +1 -1
- package/control/ScaleLine.d.ts.map +1 -1
- package/control/Zoom.d.ts +1 -1
- package/control/Zoom.d.ts.map +1 -1
- package/control/ZoomSlider.d.ts +1 -1
- package/control/ZoomSlider.d.ts.map +1 -1
- package/control/ZoomToExtent.d.ts +1 -1
- package/control/ZoomToExtent.d.ts.map +1 -1
- package/control/defaults.d.ts +1 -1
- package/control/defaults.d.ts.map +1 -1
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/events/Key.d.ts +8 -0
- package/events/Key.d.ts.map +1 -0
- package/events/Key.js +14 -0
- package/events/Target.d.ts +1 -1
- package/events/Target.d.ts.map +1 -1
- package/events/condition.d.ts +2 -2
- package/events/condition.d.ts.map +1 -1
- package/extent.d.ts.map +1 -1
- package/extent.js +7 -2
- package/format/EsriJSON.d.ts +1 -1
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/GML.d.ts +1 -1
- package/format/GML.d.ts.map +1 -1
- package/format/GML2.d.ts +1 -1
- package/format/GML2.d.ts.map +1 -1
- package/format/GML3.d.ts +5 -5
- package/format/GML3.d.ts.map +1 -1
- package/format/GML32.d.ts +1 -1
- package/format/GML32.d.ts.map +1 -1
- package/format/GMLBase.d.ts +9 -9
- package/format/GMLBase.d.ts.map +1 -1
- package/format/GPX.d.ts +2 -2
- package/format/GPX.d.ts.map +1 -1
- package/format/GeoJSON.d.ts +1 -1
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/IGC.d.ts +1 -1
- package/format/IGC.d.ts.map +1 -1
- package/format/IIIFInfo.d.ts +8 -8
- package/format/IIIFInfo.d.ts.map +1 -1
- package/format/IIIFInfo.js +10 -9
- package/format/JSONFeature.d.ts +1 -1
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +2 -1
- package/format/KML.d.ts +121 -5
- package/format/KML.d.ts.map +1 -1
- package/format/KML.js +105 -7
- package/format/MVT.d.ts +2 -2
- package/format/MVT.d.ts.map +1 -1
- package/format/OSMXML.d.ts +1 -1
- package/format/OSMXML.d.ts.map +1 -1
- package/format/OSMXML.js +11 -4
- package/format/OWS.d.ts +1 -1
- package/format/OWS.d.ts.map +1 -1
- package/format/Polyline.d.ts +2 -2
- package/format/Polyline.d.ts.map +1 -1
- package/format/TextFeature.d.ts +1 -1
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TopoJSON.d.ts +1 -1
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/WFS.d.ts +2 -2
- package/format/WFS.d.ts.map +1 -1
- package/format/WFS.js +8 -4
- package/format/WKB.d.ts +1 -1
- package/format/WKB.d.ts.map +1 -1
- package/format/WKB.js +6 -4
- package/format/WKT.d.ts +1 -1
- package/format/WKT.d.ts.map +1 -1
- package/format/WMSCapabilities.d.ts +1 -1
- package/format/WMSCapabilities.d.ts.map +1 -1
- package/format/WMSGetFeatureInfo.d.ts +1 -1
- package/format/WMSGetFeatureInfo.d.ts.map +1 -1
- package/format/WMTSCapabilities.d.ts +1 -1
- package/format/WMTSCapabilities.d.ts.map +1 -1
- package/format/XML.d.ts.map +1 -1
- package/format/XML.js +4 -2
- package/format/XMLFeature.d.ts +1 -1
- package/format/XMLFeature.d.ts.map +1 -1
- package/format/XMLFeature.js +16 -8
- package/format/filter/And.d.ts +1 -1
- package/format/filter/And.d.ts.map +1 -1
- package/format/filter/Bbox.d.ts +1 -1
- package/format/filter/Bbox.d.ts.map +1 -1
- package/format/filter/Comparison.d.ts +1 -1
- package/format/filter/Comparison.d.ts.map +1 -1
- package/format/filter/ComparisonBinary.d.ts +1 -1
- package/format/filter/ComparisonBinary.d.ts.map +1 -1
- package/format/filter/Contains.d.ts +1 -1
- package/format/filter/Contains.d.ts.map +1 -1
- package/format/filter/DWithin.d.ts +1 -1
- package/format/filter/DWithin.d.ts.map +1 -1
- package/format/filter/Disjoint.d.ts +1 -1
- package/format/filter/Disjoint.d.ts.map +1 -1
- package/format/filter/During.d.ts +1 -1
- package/format/filter/During.d.ts.map +1 -1
- package/format/filter/EqualTo.d.ts +1 -1
- package/format/filter/EqualTo.d.ts.map +1 -1
- package/format/filter/GreaterThan.d.ts +1 -1
- package/format/filter/GreaterThan.d.ts.map +1 -1
- package/format/filter/GreaterThanOrEqualTo.d.ts +1 -1
- package/format/filter/GreaterThanOrEqualTo.d.ts.map +1 -1
- package/format/filter/Intersects.d.ts +1 -1
- package/format/filter/Intersects.d.ts.map +1 -1
- package/format/filter/IsBetween.d.ts +1 -1
- package/format/filter/IsBetween.d.ts.map +1 -1
- package/format/filter/IsLike.d.ts +1 -1
- package/format/filter/IsLike.d.ts.map +1 -1
- package/format/filter/IsNull.d.ts +1 -1
- package/format/filter/IsNull.d.ts.map +1 -1
- package/format/filter/LessThan.d.ts +1 -1
- package/format/filter/LessThan.d.ts.map +1 -1
- package/format/filter/LessThanOrEqualTo.d.ts +1 -1
- package/format/filter/LessThanOrEqualTo.d.ts.map +1 -1
- package/format/filter/LogicalNary.d.ts +1 -1
- package/format/filter/LogicalNary.d.ts.map +1 -1
- package/format/filter/Not.d.ts +1 -1
- package/format/filter/Not.d.ts.map +1 -1
- package/format/filter/NotEqualTo.d.ts +1 -1
- package/format/filter/NotEqualTo.d.ts.map +1 -1
- package/format/filter/Or.d.ts +2 -2
- package/format/filter/Or.d.ts.map +1 -1
- package/format/filter/Or.js +1 -1
- package/format/filter/ResourceId.d.ts +1 -1
- package/format/filter/ResourceId.d.ts.map +1 -1
- package/format/filter/Spatial.d.ts +1 -1
- package/format/filter/Spatial.d.ts.map +1 -1
- package/format/filter/Within.d.ts +1 -1
- package/format/filter/Within.d.ts.map +1 -1
- package/format/filter.d.ts +20 -20
- package/format/filter.d.ts.map +1 -1
- package/geom/Circle.d.ts +1 -1
- package/geom/Circle.d.ts.map +1 -1
- package/geom/Circle.js +1 -17
- package/geom/Geometry.d.ts +1 -1
- package/geom/Geometry.d.ts.map +1 -1
- package/geom/GeometryCollection.d.ts +1 -1
- package/geom/GeometryCollection.d.ts.map +1 -1
- package/geom/LineString.d.ts +1 -1
- package/geom/LineString.d.ts.map +1 -1
- package/geom/LinearRing.d.ts +1 -1
- package/geom/LinearRing.d.ts.map +1 -1
- package/geom/MultiLineString.d.ts +2 -2
- package/geom/MultiLineString.d.ts.map +1 -1
- package/geom/MultiPoint.d.ts +2 -2
- package/geom/MultiPoint.d.ts.map +1 -1
- package/geom/MultiPolygon.d.ts +3 -3
- package/geom/MultiPolygon.d.ts.map +1 -1
- package/geom/Point.d.ts +1 -1
- package/geom/Point.d.ts.map +1 -1
- package/geom/Polygon.d.ts +3 -3
- package/geom/Polygon.d.ts.map +1 -1
- package/geom/SimpleGeometry.d.ts +1 -1
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/flat/interpolate.d.ts.map +1 -1
- package/geom/flat/interpolate.js +4 -2
- package/geom/flat/orient.d.ts +1 -1
- package/geom/flat/orient.js +1 -1
- package/interaction/DblClickDragZoom.d.ts +110 -0
- package/interaction/DblClickDragZoom.d.ts.map +1 -0
- package/interaction/DblClickDragZoom.js +251 -0
- package/interaction/DoubleClickZoom.d.ts +1 -1
- package/interaction/DoubleClickZoom.d.ts.map +1 -1
- package/interaction/DragAndDrop.d.ts +2 -2
- package/interaction/DragAndDrop.d.ts.map +1 -1
- package/interaction/DragBox.d.ts +2 -2
- package/interaction/DragBox.d.ts.map +1 -1
- package/interaction/DragPan.d.ts +1 -1
- package/interaction/DragPan.d.ts.map +1 -1
- package/interaction/DragRotate.d.ts +1 -1
- package/interaction/DragRotate.d.ts.map +1 -1
- package/interaction/DragRotateAndZoom.d.ts +1 -1
- package/interaction/DragRotateAndZoom.d.ts.map +1 -1
- package/interaction/DragZoom.d.ts +1 -1
- package/interaction/DragZoom.d.ts.map +1 -1
- package/interaction/Draw.d.ts +6 -6
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Extent.d.ts +2 -2
- package/interaction/Extent.d.ts.map +1 -1
- package/interaction/Extent.js +2 -1
- package/interaction/Interaction.d.ts +1 -1
- package/interaction/Interaction.d.ts.map +1 -1
- package/interaction/KeyboardPan.d.ts +1 -1
- package/interaction/KeyboardPan.d.ts.map +1 -1
- package/interaction/KeyboardPan.js +9 -9
- package/interaction/KeyboardZoom.d.ts +1 -1
- package/interaction/KeyboardZoom.d.ts.map +1 -1
- package/interaction/Link.d.ts +1 -1
- package/interaction/Link.d.ts.map +1 -1
- package/interaction/Modify.d.ts +6 -6
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Modify.js +6 -1
- package/interaction/MouseWheelZoom.d.ts +1 -1
- package/interaction/MouseWheelZoom.d.ts.map +1 -1
- package/interaction/PinchRotate.d.ts +1 -1
- package/interaction/PinchRotate.d.ts.map +1 -1
- package/interaction/PinchZoom.d.ts +1 -1
- package/interaction/PinchZoom.d.ts.map +1 -1
- package/interaction/Pointer.d.ts +1 -1
- package/interaction/Pointer.d.ts.map +1 -1
- package/interaction/Select.d.ts +5 -5
- package/interaction/Select.d.ts.map +1 -1
- package/interaction/Snap.d.ts +1 -1
- package/interaction/Snap.d.ts.map +1 -1
- package/interaction/Snap.js +10 -4
- package/interaction/Translate.d.ts +4 -4
- package/interaction/Translate.d.ts.map +1 -1
- package/interaction/Translate.js +18 -3
- package/interaction/defaults.d.ts +1 -1
- package/interaction/defaults.d.ts.map +1 -1
- package/interaction.d.ts +1 -0
- package/interaction.js +1 -0
- package/layer/Base.d.ts +4 -3
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +3 -2
- package/layer/BaseImage.d.ts +1 -1
- package/layer/BaseImage.d.ts.map +1 -1
- package/layer/BaseTile.d.ts +1 -1
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseVector.d.ts +10 -4
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +9 -3
- package/layer/Graticule.d.ts +6 -6
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Group.d.ts +4 -4
- package/layer/Group.d.ts.map +1 -1
- package/layer/Heatmap.d.ts +2 -2
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Image.d.ts +2 -2
- package/layer/Image.d.ts.map +1 -1
- package/layer/Layer.d.ts +14 -11
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +28 -8
- package/layer/MapboxVector.d.ts +1 -1
- package/layer/MapboxVector.d.ts.map +1 -1
- package/layer/Tile.d.ts +2 -2
- package/layer/Tile.d.ts.map +1 -1
- package/layer/Vector.d.ts +2 -2
- package/layer/Vector.d.ts.map +1 -1
- package/layer/VectorImage.d.ts +2 -2
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorTile.d.ts +2 -2
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/WebGLPoints.d.ts +4 -4
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLPoints.js +13 -4
- package/layer/WebGLTile.d.ts +9 -2
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLTile.js +6 -6
- package/package.json +2 -2
- package/proj/proj4.d.ts +2 -2
- package/proj/proj4.d.ts.map +1 -1
- package/proj/proj4.js +1 -1
- package/proj.d.ts +9 -9
- package/proj.d.ts.map +1 -1
- package/proj.js +9 -8
- package/render/Box.d.ts +1 -1
- package/render/Box.d.ts.map +1 -1
- package/render/Event.d.ts +1 -1
- package/render/Event.d.ts.map +1 -1
- package/render/Feature.d.ts +7 -7
- package/render/Feature.d.ts.map +1 -1
- package/render/canvas/Builder.d.ts +1 -1
- package/render/canvas/Builder.d.ts.map +1 -1
- package/render/canvas/ImageBuilder.d.ts +1 -1
- package/render/canvas/ImageBuilder.d.ts.map +1 -1
- package/render/canvas/Immediate.d.ts +1 -1
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +9 -1
- package/render/canvas/LineStringBuilder.d.ts +1 -1
- package/render/canvas/LineStringBuilder.d.ts.map +1 -1
- package/render/canvas/PolygonBuilder.d.ts +1 -1
- package/render/canvas/PolygonBuilder.d.ts.map +1 -1
- package/render/canvas/TextBuilder.d.ts +1 -1
- package/render/canvas/TextBuilder.d.ts.map +1 -1
- package/render/canvas.d.ts +1 -1
- package/render/canvas.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.d.ts +37 -131
- package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.js +230 -147
- package/render/webgl/VectorStyleRenderer.d.ts +256 -0
- package/render/webgl/VectorStyleRenderer.d.ts.map +1 -0
- package/render/webgl/VectorStyleRenderer.js +440 -0
- package/render/webgl/constants.d.ts +1 -1
- package/render/webgl/constants.js +1 -1
- package/render/webgl/renderinstructions.d.ts +36 -0
- package/render/webgl/renderinstructions.d.ts.map +1 -0
- package/render/webgl/renderinstructions.js +241 -0
- package/render/webgl/utils.d.ts +4 -4
- package/render/webgl/utils.d.ts.map +1 -1
- package/render/webgl/utils.js +9 -9
- package/render.d.ts +1 -1
- package/render.d.ts.map +1 -1
- package/renderer/Composite.d.ts +1 -1
- package/renderer/Composite.d.ts.map +1 -1
- package/renderer/Layer.d.ts +1 -1
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Map.d.ts +1 -1
- package/renderer/Map.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.d.ts +1 -1
- package/renderer/canvas/ImageLayer.d.ts.map +1 -1
- package/renderer/canvas/Layer.d.ts +1 -1
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/TileLayer.d.ts +1 -1
- package/renderer/canvas/TileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.d.ts +3 -3
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.d.ts +2 -2
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/webgl/Layer.d.ts +2 -2
- package/renderer/webgl/Layer.d.ts.map +1 -1
- package/renderer/webgl/PointsLayer.d.ts +3 -3
- package/renderer/webgl/PointsLayer.d.ts.map +1 -1
- package/renderer/webgl/PointsLayer.js +5 -8
- package/renderer/webgl/TileLayer.d.ts +32 -99
- package/renderer/webgl/TileLayer.d.ts.map +1 -1
- package/renderer/webgl/TileLayer.js +103 -644
- package/renderer/webgl/TileLayerBase.d.ts +194 -0
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -0
- package/renderer/webgl/TileLayerBase.js +750 -0
- package/renderer/webgl/VectorLayer.d.ts +59 -60
- package/renderer/webgl/VectorLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorLayer.js +118 -156
- package/renderer/webgl/VectorTileLayer.d.ts +87 -0
- package/renderer/webgl/VectorTileLayer.d.ts.map +1 -0
- package/renderer/webgl/VectorTileLayer.js +201 -0
- package/reproj/DataTile.d.ts +1 -1
- package/reproj/DataTile.d.ts.map +1 -1
- package/reproj/Image.d.ts +1 -1
- package/reproj/Image.d.ts.map +1 -1
- package/reproj/Image.js +22 -8
- package/reproj/Tile.d.ts +1 -1
- package/reproj/Tile.d.ts.map +1 -1
- package/reproj/Triangulation.js +2 -2
- package/source/BingMaps.d.ts +1 -1
- package/source/BingMaps.d.ts.map +1 -1
- package/source/CartoDB.d.ts +1 -1
- package/source/CartoDB.d.ts.map +1 -1
- package/source/Cluster.d.ts +3 -3
- package/source/Cluster.d.ts.map +1 -1
- package/source/DataTile.d.ts +4 -4
- package/source/DataTile.d.ts.map +1 -1
- package/source/DataTile.js +1 -1
- package/source/GeoTIFF.d.ts +1 -1
- package/source/GeoTIFF.d.ts.map +1 -1
- package/source/IIIF.d.ts +1 -1
- package/source/IIIF.d.ts.map +1 -1
- package/source/Image.d.ts +2 -2
- package/source/Image.d.ts.map +1 -1
- package/source/ImageArcGISRest.d.ts +1 -1
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageCanvas.d.ts +1 -1
- package/source/ImageCanvas.d.ts.map +1 -1
- package/source/ImageMapGuide.d.ts +1 -1
- package/source/ImageMapGuide.d.ts.map +1 -1
- package/source/ImageStatic.d.ts +1 -1
- package/source/ImageStatic.d.ts.map +1 -1
- package/source/ImageWMS.d.ts +1 -1
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/OGCMapTile.d.ts +1 -1
- package/source/OGCMapTile.d.ts.map +1 -1
- package/source/OGCVectorTile.d.ts +1 -1
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OSM.d.ts +1 -1
- package/source/OSM.d.ts.map +1 -1
- package/source/Raster.d.ts +3 -3
- package/source/Raster.d.ts.map +1 -1
- package/source/Source.d.ts +5 -5
- package/source/Source.d.ts.map +1 -1
- package/source/Source.js +2 -2
- package/source/Stamen.d.ts +1 -1
- package/source/Stamen.d.ts.map +1 -1
- package/source/Tile.d.ts +2 -2
- package/source/Tile.d.ts.map +1 -1
- package/source/TileArcGISRest.d.ts +1 -1
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileDebug.d.ts +1 -1
- package/source/TileDebug.d.ts.map +1 -1
- package/source/TileImage.d.ts +4 -4
- package/source/TileImage.d.ts.map +1 -1
- package/source/TileJSON.d.ts +1 -1
- package/source/TileJSON.d.ts.map +1 -1
- package/source/TileWMS.d.ts +1 -1
- package/source/TileWMS.d.ts.map +1 -1
- package/source/UTFGrid.d.ts +2 -2
- package/source/UTFGrid.d.ts.map +1 -1
- package/source/UrlTile.d.ts +1 -1
- package/source/UrlTile.d.ts.map +1 -1
- package/source/Vector.d.ts +3 -3
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +6 -3
- package/source/VectorTile.d.ts +4 -4
- package/source/VectorTile.d.ts.map +1 -1
- package/source/WMTS.d.ts +1 -1
- package/source/WMTS.d.ts.map +1 -1
- package/source/XYZ.d.ts +1 -1
- package/source/XYZ.d.ts.map +1 -1
- package/source/Zoomify.d.ts +2 -2
- package/source/Zoomify.d.ts.map +1 -1
- package/structs/LRUCache.d.ts.map +1 -1
- package/structs/LRUCache.js +2 -1
- package/style/Circle.d.ts +1 -1
- package/style/Circle.d.ts.map +1 -1
- package/style/Icon.d.ts +4 -78
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +89 -86
- package/style/IconImage.d.ts +1 -1
- package/style/IconImage.d.ts.map +1 -1
- package/style/RegularShape.d.ts +1 -1
- package/style/RegularShape.d.ts.map +1 -1
- package/style/RegularShape.js +1 -1
- package/style/Style.d.ts +2 -2
- package/style/Style.d.ts.map +1 -1
- package/style/Text.d.ts +5 -5
- package/style/Text.d.ts.map +1 -1
- package/style/Text.js +2 -2
- package/style/expressions.d.ts +42 -17
- package/style/expressions.d.ts.map +1 -1
- package/style/expressions.js +258 -118
- package/style/flat.d.ts +14 -0
- package/style/flat.d.ts.map +1 -1
- package/style/flat.js +6 -0
- package/style/literal.d.ts +204 -3
- package/style/literal.d.ts.map +1 -1
- package/style/literal.js +106 -3
- package/tilegrid/TileGrid.d.ts +1 -9
- package/tilegrid/TileGrid.d.ts.map +1 -1
- package/tilegrid/TileGrid.js +0 -18
- package/tilegrid/WMTS.d.ts +1 -1
- package/tilegrid/WMTS.d.ts.map +1 -1
- package/tilegrid.d.ts +1 -1
- package/tilegrid.d.ts.map +1 -1
- package/util.d.ts.map +1 -1
- package/util.js +1 -1
- package/webgl/BaseTileRepresentation.d.ts +72 -0
- package/webgl/BaseTileRepresentation.d.ts.map +1 -0
- package/webgl/BaseTileRepresentation.js +108 -0
- package/webgl/Buffer.d.ts +9 -6
- package/webgl/Buffer.d.ts.map +1 -1
- package/webgl/Buffer.js +6 -0
- package/webgl/Helper.d.ts +19 -12
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +79 -71
- package/webgl/ShaderBuilder.d.ts +75 -65
- package/webgl/ShaderBuilder.d.ts.map +1 -1
- package/webgl/ShaderBuilder.js +382 -241
- package/webgl/TileGeometry.d.ts +29 -0
- package/webgl/TileGeometry.d.ts.map +1 -0
- package/webgl/TileGeometry.js +73 -0
- package/webgl/TileTexture.d.ts +8 -51
- package/webgl/TileTexture.d.ts.map +1 -1
- package/webgl/TileTexture.js +11 -62
- package/webgl/styleparser.d.ts +61 -0
- package/webgl/styleparser.d.ts.map +1 -0
- package/webgl/styleparser.js +406 -0
- package/worker/webgl.js +1 -1
- package/events/KeyCode.d.ts +0 -8
- package/events/KeyCode.d.ts.map +0 -1
- package/events/KeyCode.js +0 -14
- package/render/webgl/BatchRenderer.d.ts +0 -92
- package/render/webgl/BatchRenderer.d.ts.map +0 -1
- package/render/webgl/BatchRenderer.js +0 -200
- package/render/webgl/LineStringBatchRenderer.d.ts +0 -27
- package/render/webgl/LineStringBatchRenderer.d.ts.map +0 -1
- package/render/webgl/LineStringBatchRenderer.js +0 -114
- package/render/webgl/PointBatchRenderer.d.ts +0 -26
- package/render/webgl/PointBatchRenderer.d.ts.map +0 -1
- package/render/webgl/PointBatchRenderer.js +0 -95
- package/render/webgl/PolygonBatchRenderer.d.ts +0 -25
- package/render/webgl/PolygonBatchRenderer.d.ts.map +0 -1
- package/render/webgl/PolygonBatchRenderer.js +0 -115
- package/renderer/webgl/shaders.d.ts +0 -43
- package/renderer/webgl/shaders.d.ts.map +0 -1
- package/renderer/webgl/shaders.js +0 -198
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module ol/render/webgl/MixedGeometryBatch
|
|
3
3
|
*/
|
|
4
|
-
import WebGLArrayBuffer from '../../webgl/Buffer.js';
|
|
5
|
-
import {ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER} from '../../webgl.js';
|
|
6
|
-
import {create as createTransform} from '../../transform.js';
|
|
7
4
|
import {getUid} from '../../util.js';
|
|
5
|
+
import {linearRingIsClockwise} from '../../geom/flat/orient.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {import("../../render/Feature").default} RenderFeature
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {import("../../Feature").default} Feature
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {import("../../geom/Geometry.js").Type} GeometryType
|
|
15
|
+
*/
|
|
8
16
|
|
|
9
17
|
/**
|
|
10
18
|
* @typedef {Object} GeometryBatchItem Object that holds a reference to a feature as well as the raw coordinates of its various geometries
|
|
11
|
-
* @property {
|
|
19
|
+
* @property {Feature|RenderFeature} feature Feature
|
|
12
20
|
* @property {Array<Array<number>>} flatCoordss Array of flat coordinates arrays, one for each geometry related to the feature
|
|
13
21
|
* @property {number} [verticesCount] Only defined for linestring and polygon batches
|
|
14
22
|
* @property {number} [ringsCount] Only defined for polygon batches
|
|
@@ -24,13 +32,6 @@ import {getUid} from '../../util.js';
|
|
|
24
32
|
* @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.
|
|
25
33
|
* One entry corresponds to one feature. Key is feature uid.
|
|
26
34
|
* @property {number} geometriesCount Amount of geometries in the batch.
|
|
27
|
-
* @property {Float32Array} renderInstructions Render instructions for polygons are structured like so:
|
|
28
|
-
* [ numberOfRings, numberOfVerticesInRing0, ..., numberOfVerticesInRingN, x0, y0, customAttr0, ..., xN, yN, customAttrN, numberOfRings,... ]
|
|
29
|
-
* @property {WebGLArrayBuffer} verticesBuffer Vertices WebGL buffer
|
|
30
|
-
* @property {WebGLArrayBuffer} indicesBuffer Indices WebGL buffer
|
|
31
|
-
* @property {import("../../transform.js").Transform} renderInstructionsTransform Converts world space coordinates to screen space; applies to the rendering instructions
|
|
32
|
-
* @property {import("../../transform.js").Transform} verticesBufferTransform Converts world space coordinates to screen space; applies to the webgl vertices buffer
|
|
33
|
-
* @property {import("../../transform.js").Transform} invertVerticesBufferTransform Screen space to world space; applies to the webgl vertices buffer
|
|
34
35
|
* @property {number} verticesCount Amount of vertices from geometries in the batch.
|
|
35
36
|
* @property {number} ringsCount How many outer and inner rings in this batch.
|
|
36
37
|
*/
|
|
@@ -40,13 +41,6 @@ import {getUid} from '../../util.js';
|
|
|
40
41
|
* @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.
|
|
41
42
|
* One entry corresponds to one feature. Key is feature uid.
|
|
42
43
|
* @property {number} geometriesCount Amount of geometries in the batch.
|
|
43
|
-
* @property {Float32Array} renderInstructions Render instructions for polygons are structured like so:
|
|
44
|
-
* [ numberOfRings, numberOfVerticesInRing0, ..., numberOfVerticesInRingN, x0, y0, customAttr0, ..., xN, yN, customAttrN, numberOfRings,... ]
|
|
45
|
-
* @property {WebGLArrayBuffer} verticesBuffer Vertices WebGL buffer
|
|
46
|
-
* @property {WebGLArrayBuffer} indicesBuffer Indices WebGL buffer
|
|
47
|
-
* @property {import("../../transform.js").Transform} renderInstructionsTransform Converts world space coordinates to screen space; applies to the rendering instructions
|
|
48
|
-
* @property {import("../../transform.js").Transform} verticesBufferTransform Converts world space coordinates to screen space; applies to the webgl vertices buffer
|
|
49
|
-
* @property {import("../../transform.js").Transform} invertVerticesBufferTransform Screen space to world space; applies to the webgl vertices buffer
|
|
50
44
|
* @property {number} verticesCount Amount of vertices from geometries in the batch.
|
|
51
45
|
*/
|
|
52
46
|
|
|
@@ -55,13 +49,6 @@ import {getUid} from '../../util.js';
|
|
|
55
49
|
* @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.
|
|
56
50
|
* One entry corresponds to one feature. Key is feature uid.
|
|
57
51
|
* @property {number} geometriesCount Amount of geometries in the batch.
|
|
58
|
-
* @property {Float32Array} renderInstructions Render instructions for polygons are structured like so:
|
|
59
|
-
* [ numberOfRings, numberOfVerticesInRing0, ..., numberOfVerticesInRingN, x0, y0, customAttr0, ..., xN, yN, customAttrN, numberOfRings,... ]
|
|
60
|
-
* @property {WebGLArrayBuffer} verticesBuffer Vertices WebGL buffer
|
|
61
|
-
* @property {WebGLArrayBuffer} indicesBuffer Indices WebGL buffer
|
|
62
|
-
* @property {import("../../transform.js").Transform} renderInstructionsTransform Converts world space coordinates to screen space; applies to the rendering instructions
|
|
63
|
-
* @property {import("../../transform.js").Transform} verticesBufferTransform Converts world space coordinates to screen space; applies to the webgl vertices buffer
|
|
64
|
-
* @property {import("../../transform.js").Transform} invertVerticesBufferTransform Screen space to world space; applies to the webgl vertices buffer
|
|
65
52
|
*/
|
|
66
53
|
|
|
67
54
|
/**
|
|
@@ -70,7 +57,7 @@ import {getUid} from '../../util.js';
|
|
|
70
57
|
* from the batch, these inner batches are modified accordingly in order to keep them up-to-date.
|
|
71
58
|
*
|
|
72
59
|
* A feature can be present in several inner batches, for example a polygon geometry will be present in the polygon batch
|
|
73
|
-
* and its
|
|
60
|
+
* and its linear rings will be present in the line batch. Multi geometries are also broken down into individual geometries
|
|
74
61
|
* and added to the corresponding batches in a recursive manner.
|
|
75
62
|
*
|
|
76
63
|
* Corresponding {@link module:ol/render/webgl/BatchRenderer} instances are then used to generate the render instructions
|
|
@@ -93,12 +80,6 @@ class MixedGeometryBatch {
|
|
|
93
80
|
geometriesCount: 0,
|
|
94
81
|
verticesCount: 0,
|
|
95
82
|
ringsCount: 0,
|
|
96
|
-
renderInstructions: new Float32Array(0),
|
|
97
|
-
verticesBuffer: new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
98
|
-
indicesBuffer: new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
99
|
-
renderInstructionsTransform: createTransform(),
|
|
100
|
-
verticesBufferTransform: createTransform(),
|
|
101
|
-
invertVerticesBufferTransform: createTransform(),
|
|
102
83
|
};
|
|
103
84
|
|
|
104
85
|
/**
|
|
@@ -107,12 +88,6 @@ class MixedGeometryBatch {
|
|
|
107
88
|
this.pointBatch = {
|
|
108
89
|
entries: {},
|
|
109
90
|
geometriesCount: 0,
|
|
110
|
-
renderInstructions: new Float32Array(0),
|
|
111
|
-
verticesBuffer: new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
112
|
-
indicesBuffer: new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
113
|
-
renderInstructionsTransform: createTransform(),
|
|
114
|
-
verticesBufferTransform: createTransform(),
|
|
115
|
-
invertVerticesBufferTransform: createTransform(),
|
|
116
91
|
};
|
|
117
92
|
|
|
118
93
|
/**
|
|
@@ -122,17 +97,11 @@ class MixedGeometryBatch {
|
|
|
122
97
|
entries: {},
|
|
123
98
|
geometriesCount: 0,
|
|
124
99
|
verticesCount: 0,
|
|
125
|
-
renderInstructions: new Float32Array(0),
|
|
126
|
-
verticesBuffer: new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
127
|
-
indicesBuffer: new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW),
|
|
128
|
-
renderInstructionsTransform: createTransform(),
|
|
129
|
-
verticesBufferTransform: createTransform(),
|
|
130
|
-
invertVerticesBufferTransform: createTransform(),
|
|
131
100
|
};
|
|
132
101
|
}
|
|
133
102
|
|
|
134
103
|
/**
|
|
135
|
-
* @param {Array<
|
|
104
|
+
* @param {Array<Feature|RenderFeature>} features Array of features to add to the batch
|
|
136
105
|
*/
|
|
137
106
|
addFeatures(features) {
|
|
138
107
|
for (let i = 0; i < features.length; i++) {
|
|
@@ -141,7 +110,7 @@ class MixedGeometryBatch {
|
|
|
141
110
|
}
|
|
142
111
|
|
|
143
112
|
/**
|
|
144
|
-
* @param {
|
|
113
|
+
* @param {Feature|RenderFeature} feature Feature to add to the batch
|
|
145
114
|
*/
|
|
146
115
|
addFeature(feature) {
|
|
147
116
|
const geometry = feature.getGeometry();
|
|
@@ -152,59 +121,7 @@ class MixedGeometryBatch {
|
|
|
152
121
|
}
|
|
153
122
|
|
|
154
123
|
/**
|
|
155
|
-
* @param {
|
|
156
|
-
* @return {GeometryBatchItem} Batch item added (or existing one)
|
|
157
|
-
* @private
|
|
158
|
-
*/
|
|
159
|
-
addFeatureEntryInPointBatch_(feature) {
|
|
160
|
-
const uid = getUid(feature);
|
|
161
|
-
if (!(uid in this.pointBatch.entries)) {
|
|
162
|
-
this.pointBatch.entries[uid] = {
|
|
163
|
-
feature: feature,
|
|
164
|
-
flatCoordss: [],
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
return this.pointBatch.entries[uid];
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @param {import("../../Feature").default} feature Feature
|
|
172
|
-
* @return {GeometryBatchItem} Batch item added (or existing one)
|
|
173
|
-
* @private
|
|
174
|
-
*/
|
|
175
|
-
addFeatureEntryInLineStringBatch_(feature) {
|
|
176
|
-
const uid = getUid(feature);
|
|
177
|
-
if (!(uid in this.lineStringBatch.entries)) {
|
|
178
|
-
this.lineStringBatch.entries[uid] = {
|
|
179
|
-
feature: feature,
|
|
180
|
-
flatCoordss: [],
|
|
181
|
-
verticesCount: 0,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
return this.lineStringBatch.entries[uid];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @param {import("../../Feature").default} feature Feature
|
|
189
|
-
* @return {GeometryBatchItem} Batch item added (or existing one)
|
|
190
|
-
* @private
|
|
191
|
-
*/
|
|
192
|
-
addFeatureEntryInPolygonBatch_(feature) {
|
|
193
|
-
const uid = getUid(feature);
|
|
194
|
-
if (!(uid in this.polygonBatch.entries)) {
|
|
195
|
-
this.polygonBatch.entries[uid] = {
|
|
196
|
-
feature: feature,
|
|
197
|
-
flatCoordss: [],
|
|
198
|
-
verticesCount: 0,
|
|
199
|
-
ringsCount: 0,
|
|
200
|
-
ringsVerticesCounts: [],
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
return this.polygonBatch.entries[uid];
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @param {import("../../Feature").default} feature Feature
|
|
124
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
208
125
|
* @private
|
|
209
126
|
*/
|
|
210
127
|
clearFeatureEntryInPointBatch_(feature) {
|
|
@@ -217,7 +134,7 @@ class MixedGeometryBatch {
|
|
|
217
134
|
}
|
|
218
135
|
|
|
219
136
|
/**
|
|
220
|
-
* @param {
|
|
137
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
221
138
|
* @private
|
|
222
139
|
*/
|
|
223
140
|
clearFeatureEntryInLineStringBatch_(feature) {
|
|
@@ -231,7 +148,7 @@ class MixedGeometryBatch {
|
|
|
231
148
|
}
|
|
232
149
|
|
|
233
150
|
/**
|
|
234
|
-
* @param {
|
|
151
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
235
152
|
* @private
|
|
236
153
|
*/
|
|
237
154
|
clearFeatureEntryInPolygonBatch_(feature) {
|
|
@@ -246,79 +163,245 @@ class MixedGeometryBatch {
|
|
|
246
163
|
}
|
|
247
164
|
|
|
248
165
|
/**
|
|
249
|
-
* @param {import("../../geom").Geometry} geometry Geometry
|
|
250
|
-
* @param {
|
|
166
|
+
* @param {import("../../geom").Geometry|RenderFeature} geometry Geometry
|
|
167
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
251
168
|
* @private
|
|
252
169
|
*/
|
|
253
170
|
addGeometry_(geometry, feature) {
|
|
254
171
|
const type = geometry.getType();
|
|
255
|
-
let flatCoords;
|
|
256
|
-
let verticesCount;
|
|
257
|
-
let batchEntry;
|
|
258
172
|
switch (type) {
|
|
259
173
|
case 'GeometryCollection':
|
|
260
|
-
|
|
261
|
-
.
|
|
262
|
-
|
|
174
|
+
const geometries =
|
|
175
|
+
/** @type {import("../../geom").GeometryCollection} */ (
|
|
176
|
+
geometry
|
|
177
|
+
).getGeometriesArray();
|
|
178
|
+
for (const geometry of geometries) {
|
|
179
|
+
this.addGeometry_(geometry, feature);
|
|
180
|
+
}
|
|
263
181
|
break;
|
|
264
182
|
case 'MultiPolygon':
|
|
265
|
-
|
|
266
|
-
.
|
|
267
|
-
|
|
183
|
+
const multiPolygonGeom =
|
|
184
|
+
/** @type {import("../../geom").MultiPolygon|RenderFeature} */ (
|
|
185
|
+
geometry
|
|
186
|
+
);
|
|
187
|
+
this.addCoordinates_(
|
|
188
|
+
type,
|
|
189
|
+
multiPolygonGeom.getFlatCoordinates(),
|
|
190
|
+
multiPolygonGeom.getEndss(),
|
|
191
|
+
feature,
|
|
192
|
+
getUid(feature)
|
|
193
|
+
);
|
|
268
194
|
break;
|
|
269
195
|
case 'MultiLineString':
|
|
270
|
-
|
|
271
|
-
.
|
|
272
|
-
|
|
196
|
+
const multiLineGeom =
|
|
197
|
+
/** @type {import("../../geom").MultiLineString|RenderFeature} */ (
|
|
198
|
+
geometry
|
|
199
|
+
);
|
|
200
|
+
this.addCoordinates_(
|
|
201
|
+
type,
|
|
202
|
+
multiLineGeom.getFlatCoordinates(),
|
|
203
|
+
multiLineGeom.getEnds(),
|
|
204
|
+
feature,
|
|
205
|
+
getUid(feature)
|
|
206
|
+
);
|
|
273
207
|
break;
|
|
274
208
|
case 'MultiPoint':
|
|
275
|
-
|
|
276
|
-
.
|
|
277
|
-
|
|
209
|
+
const multiPointGeom =
|
|
210
|
+
/** @type {import("../../geom").MultiPoint|RenderFeature} */ (
|
|
211
|
+
geometry
|
|
212
|
+
);
|
|
213
|
+
this.addCoordinates_(
|
|
214
|
+
type,
|
|
215
|
+
multiPointGeom.getFlatCoordinates(),
|
|
216
|
+
null,
|
|
217
|
+
feature,
|
|
218
|
+
getUid(feature)
|
|
219
|
+
);
|
|
278
220
|
break;
|
|
279
221
|
case 'Polygon':
|
|
280
|
-
const polygonGeom =
|
|
222
|
+
const polygonGeom =
|
|
223
|
+
/** @type {import("../../geom").Polygon|RenderFeature} */ (geometry);
|
|
224
|
+
this.addCoordinates_(
|
|
225
|
+
type,
|
|
226
|
+
polygonGeom.getFlatCoordinates(),
|
|
227
|
+
polygonGeom.getEnds(),
|
|
228
|
+
feature,
|
|
229
|
+
getUid(feature)
|
|
230
|
+
);
|
|
231
|
+
break;
|
|
232
|
+
case 'Point':
|
|
233
|
+
const pointGeom = /** @type {import("../../geom").Point} */ (geometry);
|
|
234
|
+
this.addCoordinates_(
|
|
235
|
+
type,
|
|
236
|
+
pointGeom.getFlatCoordinates(),
|
|
237
|
+
null,
|
|
238
|
+
feature,
|
|
239
|
+
getUid(feature)
|
|
240
|
+
);
|
|
241
|
+
break;
|
|
242
|
+
case 'LineString':
|
|
243
|
+
case 'LinearRing':
|
|
244
|
+
const lineGeom = /** @type {import("../../geom").LineString} */ (
|
|
281
245
|
geometry
|
|
282
246
|
);
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
247
|
+
this.addCoordinates_(
|
|
248
|
+
type,
|
|
249
|
+
lineGeom.getFlatCoordinates(),
|
|
250
|
+
null,
|
|
251
|
+
feature,
|
|
252
|
+
getUid(feature)
|
|
253
|
+
);
|
|
254
|
+
break;
|
|
255
|
+
default:
|
|
256
|
+
// pass
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @param {GeometryType} type Geometry type
|
|
262
|
+
* @param {Array<number>} flatCoords Flat coordinates
|
|
263
|
+
* @param {Array<number> | Array<Array<number>> | null} ends Coordinate ends
|
|
264
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
265
|
+
* @param {string} featureUid Feature uid
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
addCoordinates_(type, flatCoords, ends, feature, featureUid) {
|
|
269
|
+
/** @type {number} */
|
|
270
|
+
let verticesCount;
|
|
271
|
+
switch (type) {
|
|
272
|
+
case 'MultiPolygon':
|
|
273
|
+
const multiPolygonEndss = /** @type {Array<Array<number>>} */ (ends);
|
|
274
|
+
for (let i = 0, ii = multiPolygonEndss.length; i < ii; i++) {
|
|
275
|
+
let polygonEnds = multiPolygonEndss[i];
|
|
276
|
+
const prevPolygonEnds = i > 0 ? multiPolygonEndss[i - 1] : null;
|
|
277
|
+
const startIndex = prevPolygonEnds
|
|
278
|
+
? prevPolygonEnds[prevPolygonEnds.length - 1]
|
|
279
|
+
: 0;
|
|
280
|
+
const endIndex = polygonEnds[polygonEnds.length - 1];
|
|
281
|
+
const polygonCoords = flatCoords.slice(startIndex, endIndex);
|
|
282
|
+
polygonEnds =
|
|
283
|
+
startIndex > 0
|
|
284
|
+
? polygonEnds.map((end) => end - startIndex)
|
|
285
|
+
: polygonEnds;
|
|
286
|
+
this.addCoordinates_(
|
|
287
|
+
'Polygon',
|
|
288
|
+
polygonCoords,
|
|
289
|
+
polygonEnds,
|
|
290
|
+
feature,
|
|
291
|
+
featureUid
|
|
291
292
|
);
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
case 'MultiLineString':
|
|
296
|
+
const multiLineEnds = /** @type {Array<number>} */ (ends);
|
|
297
|
+
for (let i = 0, ii = multiLineEnds.length; i < ii; i++) {
|
|
298
|
+
const startIndex = i > 0 ? multiLineEnds[i - 1] : 0;
|
|
299
|
+
const ringCoords = flatCoords.slice(startIndex, multiLineEnds[i]);
|
|
300
|
+
this.addCoordinates_(
|
|
301
|
+
'LinearRing',
|
|
302
|
+
ringCoords,
|
|
303
|
+
null,
|
|
304
|
+
feature,
|
|
305
|
+
featureUid
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
break;
|
|
309
|
+
case 'MultiPoint':
|
|
310
|
+
for (let i = 0, ii = flatCoords.length; i < ii; i += 2) {
|
|
311
|
+
this.addCoordinates_(
|
|
312
|
+
'Point',
|
|
313
|
+
flatCoords.slice(i, i + 2),
|
|
314
|
+
null,
|
|
315
|
+
feature,
|
|
316
|
+
featureUid
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
break;
|
|
320
|
+
case 'Polygon':
|
|
321
|
+
const polygonEnds = /** @type {Array<number>} */ (ends);
|
|
322
|
+
// first look for a CW ring; if so, handle it and following rings as another polygon
|
|
323
|
+
for (let i = 1, ii = polygonEnds.length; i < ii; i++) {
|
|
324
|
+
const ringStartIndex = polygonEnds[i - 1];
|
|
325
|
+
if (
|
|
326
|
+
i > 0 &&
|
|
327
|
+
linearRingIsClockwise(flatCoords, ringStartIndex, polygonEnds[i], 2)
|
|
328
|
+
) {
|
|
329
|
+
this.addCoordinates_(
|
|
330
|
+
'Polygon',
|
|
331
|
+
flatCoords.slice(0, ringStartIndex),
|
|
332
|
+
polygonEnds.slice(0, i),
|
|
333
|
+
feature,
|
|
334
|
+
featureUid
|
|
335
|
+
);
|
|
336
|
+
this.addCoordinates_(
|
|
337
|
+
'Polygon',
|
|
338
|
+
flatCoords.slice(ringStartIndex),
|
|
339
|
+
polygonEnds.slice(i).map((end) => end - polygonEnds[i - 1]),
|
|
340
|
+
feature,
|
|
341
|
+
featureUid
|
|
342
|
+
);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (!this.polygonBatch.entries[featureUid]) {
|
|
347
|
+
this.polygonBatch.entries[featureUid] = {
|
|
348
|
+
feature: feature,
|
|
349
|
+
flatCoordss: [],
|
|
350
|
+
verticesCount: 0,
|
|
351
|
+
ringsCount: 0,
|
|
352
|
+
ringsVerticesCounts: [],
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
verticesCount = flatCoords.length / 2;
|
|
356
|
+
const ringsCount = ends.length;
|
|
357
|
+
const ringsVerticesCount = ends.map((end, ind, arr) =>
|
|
358
|
+
ind > 0 ? (end - arr[ind - 1]) / 2 : end / 2
|
|
359
|
+
);
|
|
292
360
|
this.polygonBatch.verticesCount += verticesCount;
|
|
293
361
|
this.polygonBatch.ringsCount += ringsCount;
|
|
294
362
|
this.polygonBatch.geometriesCount++;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
363
|
+
this.polygonBatch.entries[featureUid].flatCoordss.push(flatCoords);
|
|
364
|
+
this.polygonBatch.entries[featureUid].ringsVerticesCounts.push(
|
|
365
|
+
ringsVerticesCount
|
|
366
|
+
);
|
|
367
|
+
this.polygonBatch.entries[featureUid].verticesCount += verticesCount;
|
|
368
|
+
this.polygonBatch.entries[featureUid].ringsCount += ringsCount;
|
|
369
|
+
for (let i = 0, ii = polygonEnds.length; i < ii; i++) {
|
|
370
|
+
const startIndex = i > 0 ? polygonEnds[i - 1] : 0;
|
|
371
|
+
const ringCoords = flatCoords.slice(startIndex, polygonEnds[i]);
|
|
372
|
+
this.addCoordinates_(
|
|
373
|
+
'LinearRing',
|
|
374
|
+
ringCoords,
|
|
375
|
+
null,
|
|
376
|
+
feature,
|
|
377
|
+
featureUid
|
|
378
|
+
);
|
|
379
|
+
}
|
|
302
380
|
break;
|
|
303
381
|
case 'Point':
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
382
|
+
if (!this.pointBatch.entries[featureUid]) {
|
|
383
|
+
this.pointBatch.entries[featureUid] = {
|
|
384
|
+
feature: feature,
|
|
385
|
+
flatCoordss: [],
|
|
386
|
+
};
|
|
387
|
+
}
|
|
307
388
|
this.pointBatch.geometriesCount++;
|
|
308
|
-
|
|
389
|
+
this.pointBatch.entries[featureUid].flatCoordss.push(flatCoords);
|
|
309
390
|
break;
|
|
310
391
|
case 'LineString':
|
|
311
392
|
case 'LinearRing':
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
393
|
+
if (!this.lineStringBatch.entries[featureUid]) {
|
|
394
|
+
this.lineStringBatch.entries[featureUid] = {
|
|
395
|
+
feature: feature,
|
|
396
|
+
flatCoordss: [],
|
|
397
|
+
verticesCount: 0,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
317
400
|
verticesCount = flatCoords.length / 2;
|
|
318
401
|
this.lineStringBatch.verticesCount += verticesCount;
|
|
319
402
|
this.lineStringBatch.geometriesCount++;
|
|
320
|
-
|
|
321
|
-
|
|
403
|
+
this.lineStringBatch.entries[featureUid].flatCoordss.push(flatCoords);
|
|
404
|
+
this.lineStringBatch.entries[featureUid].verticesCount += verticesCount;
|
|
322
405
|
break;
|
|
323
406
|
default:
|
|
324
407
|
// pass
|
|
@@ -326,7 +409,7 @@ class MixedGeometryBatch {
|
|
|
326
409
|
}
|
|
327
410
|
|
|
328
411
|
/**
|
|
329
|
-
* @param {
|
|
412
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
330
413
|
*/
|
|
331
414
|
changeFeature(feature) {
|
|
332
415
|
this.clearFeatureEntryInPointBatch_(feature);
|
|
@@ -340,7 +423,7 @@ class MixedGeometryBatch {
|
|
|
340
423
|
}
|
|
341
424
|
|
|
342
425
|
/**
|
|
343
|
-
* @param {
|
|
426
|
+
* @param {Feature|RenderFeature} feature Feature
|
|
344
427
|
*/
|
|
345
428
|
removeFeature(feature) {
|
|
346
429
|
this.clearFeatureEntryInPointBatch_(feature);
|