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.
Files changed (535) hide show
  1. package/Collection.d.ts +2 -2
  2. package/Collection.d.ts.map +1 -1
  3. package/DataTile.d.ts +1 -1
  4. package/DataTile.d.ts.map +1 -1
  5. package/DataTile.js +2 -1
  6. package/Feature.d.ts +1 -1
  7. package/Feature.d.ts.map +1 -1
  8. package/Geolocation.d.ts +2 -2
  9. package/Geolocation.d.ts.map +1 -1
  10. package/Image.d.ts +1 -1
  11. package/Image.d.ts.map +1 -1
  12. package/ImageBase.d.ts +1 -1
  13. package/ImageBase.d.ts.map +1 -1
  14. package/ImageCanvas.d.ts +1 -1
  15. package/ImageCanvas.d.ts.map +1 -1
  16. package/ImageTile.d.ts +1 -1
  17. package/ImageTile.d.ts.map +1 -1
  18. package/Map.d.ts +7 -7
  19. package/Map.d.ts.map +1 -1
  20. package/Map.js +2 -1
  21. package/MapBrowserEvent.d.ts +1 -1
  22. package/MapBrowserEvent.d.ts.map +1 -1
  23. package/MapBrowserEventHandler.d.ts +1 -1
  24. package/MapBrowserEventHandler.d.ts.map +1 -1
  25. package/MapEvent.d.ts +1 -1
  26. package/MapEvent.d.ts.map +1 -1
  27. package/Object.d.ts +2 -2
  28. package/Object.d.ts.map +1 -1
  29. package/Observable.d.ts +1 -1
  30. package/Observable.d.ts.map +1 -1
  31. package/Overlay.d.ts +1 -1
  32. package/Overlay.d.ts.map +1 -1
  33. package/Tile.d.ts +1 -1
  34. package/Tile.d.ts.map +1 -1
  35. package/TileCache.d.ts +1 -1
  36. package/TileCache.d.ts.map +1 -1
  37. package/TileQueue.d.ts +1 -1
  38. package/TileQueue.d.ts.map +1 -1
  39. package/VectorRenderTile.d.ts +1 -1
  40. package/VectorRenderTile.d.ts.map +1 -1
  41. package/VectorTile.d.ts +1 -1
  42. package/VectorTile.d.ts.map +1 -1
  43. package/View.d.ts +10 -6
  44. package/View.d.ts.map +1 -1
  45. package/View.js +9 -6
  46. package/array.d.ts.map +1 -1
  47. package/array.js +38 -20
  48. package/control/Attribution.d.ts +1 -1
  49. package/control/Attribution.d.ts.map +1 -1
  50. package/control/Control.d.ts +1 -1
  51. package/control/Control.d.ts.map +1 -1
  52. package/control/FullScreen.d.ts +1 -1
  53. package/control/FullScreen.d.ts.map +1 -1
  54. package/control/MousePosition.d.ts +1 -1
  55. package/control/MousePosition.d.ts.map +1 -1
  56. package/control/OverviewMap.d.ts +3 -3
  57. package/control/OverviewMap.d.ts.map +1 -1
  58. package/control/Rotate.d.ts +1 -1
  59. package/control/Rotate.d.ts.map +1 -1
  60. package/control/ScaleLine.d.ts +1 -1
  61. package/control/ScaleLine.d.ts.map +1 -1
  62. package/control/Zoom.d.ts +1 -1
  63. package/control/Zoom.d.ts.map +1 -1
  64. package/control/ZoomSlider.d.ts +1 -1
  65. package/control/ZoomSlider.d.ts.map +1 -1
  66. package/control/ZoomToExtent.d.ts +1 -1
  67. package/control/ZoomToExtent.d.ts.map +1 -1
  68. package/control/defaults.d.ts +1 -1
  69. package/control/defaults.d.ts.map +1 -1
  70. package/dist/ol.js +2 -2
  71. package/dist/ol.js.map +1 -1
  72. package/events/Key.d.ts +8 -0
  73. package/events/Key.d.ts.map +1 -0
  74. package/events/Key.js +14 -0
  75. package/events/Target.d.ts +1 -1
  76. package/events/Target.d.ts.map +1 -1
  77. package/events/condition.d.ts +2 -2
  78. package/events/condition.d.ts.map +1 -1
  79. package/extent.d.ts.map +1 -1
  80. package/extent.js +7 -2
  81. package/format/EsriJSON.d.ts +1 -1
  82. package/format/EsriJSON.d.ts.map +1 -1
  83. package/format/GML.d.ts +1 -1
  84. package/format/GML.d.ts.map +1 -1
  85. package/format/GML2.d.ts +1 -1
  86. package/format/GML2.d.ts.map +1 -1
  87. package/format/GML3.d.ts +5 -5
  88. package/format/GML3.d.ts.map +1 -1
  89. package/format/GML32.d.ts +1 -1
  90. package/format/GML32.d.ts.map +1 -1
  91. package/format/GMLBase.d.ts +9 -9
  92. package/format/GMLBase.d.ts.map +1 -1
  93. package/format/GPX.d.ts +2 -2
  94. package/format/GPX.d.ts.map +1 -1
  95. package/format/GeoJSON.d.ts +1 -1
  96. package/format/GeoJSON.d.ts.map +1 -1
  97. package/format/IGC.d.ts +1 -1
  98. package/format/IGC.d.ts.map +1 -1
  99. package/format/IIIFInfo.d.ts +8 -8
  100. package/format/IIIFInfo.d.ts.map +1 -1
  101. package/format/IIIFInfo.js +10 -9
  102. package/format/JSONFeature.d.ts +1 -1
  103. package/format/JSONFeature.d.ts.map +1 -1
  104. package/format/JSONFeature.js +2 -1
  105. package/format/KML.d.ts +121 -5
  106. package/format/KML.d.ts.map +1 -1
  107. package/format/KML.js +105 -7
  108. package/format/MVT.d.ts +2 -2
  109. package/format/MVT.d.ts.map +1 -1
  110. package/format/OSMXML.d.ts +1 -1
  111. package/format/OSMXML.d.ts.map +1 -1
  112. package/format/OSMXML.js +11 -4
  113. package/format/OWS.d.ts +1 -1
  114. package/format/OWS.d.ts.map +1 -1
  115. package/format/Polyline.d.ts +2 -2
  116. package/format/Polyline.d.ts.map +1 -1
  117. package/format/TextFeature.d.ts +1 -1
  118. package/format/TextFeature.d.ts.map +1 -1
  119. package/format/TopoJSON.d.ts +1 -1
  120. package/format/TopoJSON.d.ts.map +1 -1
  121. package/format/WFS.d.ts +2 -2
  122. package/format/WFS.d.ts.map +1 -1
  123. package/format/WFS.js +8 -4
  124. package/format/WKB.d.ts +1 -1
  125. package/format/WKB.d.ts.map +1 -1
  126. package/format/WKB.js +6 -4
  127. package/format/WKT.d.ts +1 -1
  128. package/format/WKT.d.ts.map +1 -1
  129. package/format/WMSCapabilities.d.ts +1 -1
  130. package/format/WMSCapabilities.d.ts.map +1 -1
  131. package/format/WMSGetFeatureInfo.d.ts +1 -1
  132. package/format/WMSGetFeatureInfo.d.ts.map +1 -1
  133. package/format/WMTSCapabilities.d.ts +1 -1
  134. package/format/WMTSCapabilities.d.ts.map +1 -1
  135. package/format/XML.d.ts.map +1 -1
  136. package/format/XML.js +4 -2
  137. package/format/XMLFeature.d.ts +1 -1
  138. package/format/XMLFeature.d.ts.map +1 -1
  139. package/format/XMLFeature.js +16 -8
  140. package/format/filter/And.d.ts +1 -1
  141. package/format/filter/And.d.ts.map +1 -1
  142. package/format/filter/Bbox.d.ts +1 -1
  143. package/format/filter/Bbox.d.ts.map +1 -1
  144. package/format/filter/Comparison.d.ts +1 -1
  145. package/format/filter/Comparison.d.ts.map +1 -1
  146. package/format/filter/ComparisonBinary.d.ts +1 -1
  147. package/format/filter/ComparisonBinary.d.ts.map +1 -1
  148. package/format/filter/Contains.d.ts +1 -1
  149. package/format/filter/Contains.d.ts.map +1 -1
  150. package/format/filter/DWithin.d.ts +1 -1
  151. package/format/filter/DWithin.d.ts.map +1 -1
  152. package/format/filter/Disjoint.d.ts +1 -1
  153. package/format/filter/Disjoint.d.ts.map +1 -1
  154. package/format/filter/During.d.ts +1 -1
  155. package/format/filter/During.d.ts.map +1 -1
  156. package/format/filter/EqualTo.d.ts +1 -1
  157. package/format/filter/EqualTo.d.ts.map +1 -1
  158. package/format/filter/GreaterThan.d.ts +1 -1
  159. package/format/filter/GreaterThan.d.ts.map +1 -1
  160. package/format/filter/GreaterThanOrEqualTo.d.ts +1 -1
  161. package/format/filter/GreaterThanOrEqualTo.d.ts.map +1 -1
  162. package/format/filter/Intersects.d.ts +1 -1
  163. package/format/filter/Intersects.d.ts.map +1 -1
  164. package/format/filter/IsBetween.d.ts +1 -1
  165. package/format/filter/IsBetween.d.ts.map +1 -1
  166. package/format/filter/IsLike.d.ts +1 -1
  167. package/format/filter/IsLike.d.ts.map +1 -1
  168. package/format/filter/IsNull.d.ts +1 -1
  169. package/format/filter/IsNull.d.ts.map +1 -1
  170. package/format/filter/LessThan.d.ts +1 -1
  171. package/format/filter/LessThan.d.ts.map +1 -1
  172. package/format/filter/LessThanOrEqualTo.d.ts +1 -1
  173. package/format/filter/LessThanOrEqualTo.d.ts.map +1 -1
  174. package/format/filter/LogicalNary.d.ts +1 -1
  175. package/format/filter/LogicalNary.d.ts.map +1 -1
  176. package/format/filter/Not.d.ts +1 -1
  177. package/format/filter/Not.d.ts.map +1 -1
  178. package/format/filter/NotEqualTo.d.ts +1 -1
  179. package/format/filter/NotEqualTo.d.ts.map +1 -1
  180. package/format/filter/Or.d.ts +2 -2
  181. package/format/filter/Or.d.ts.map +1 -1
  182. package/format/filter/Or.js +1 -1
  183. package/format/filter/ResourceId.d.ts +1 -1
  184. package/format/filter/ResourceId.d.ts.map +1 -1
  185. package/format/filter/Spatial.d.ts +1 -1
  186. package/format/filter/Spatial.d.ts.map +1 -1
  187. package/format/filter/Within.d.ts +1 -1
  188. package/format/filter/Within.d.ts.map +1 -1
  189. package/format/filter.d.ts +20 -20
  190. package/format/filter.d.ts.map +1 -1
  191. package/geom/Circle.d.ts +1 -1
  192. package/geom/Circle.d.ts.map +1 -1
  193. package/geom/Circle.js +1 -17
  194. package/geom/Geometry.d.ts +1 -1
  195. package/geom/Geometry.d.ts.map +1 -1
  196. package/geom/GeometryCollection.d.ts +1 -1
  197. package/geom/GeometryCollection.d.ts.map +1 -1
  198. package/geom/LineString.d.ts +1 -1
  199. package/geom/LineString.d.ts.map +1 -1
  200. package/geom/LinearRing.d.ts +1 -1
  201. package/geom/LinearRing.d.ts.map +1 -1
  202. package/geom/MultiLineString.d.ts +2 -2
  203. package/geom/MultiLineString.d.ts.map +1 -1
  204. package/geom/MultiPoint.d.ts +2 -2
  205. package/geom/MultiPoint.d.ts.map +1 -1
  206. package/geom/MultiPolygon.d.ts +3 -3
  207. package/geom/MultiPolygon.d.ts.map +1 -1
  208. package/geom/Point.d.ts +1 -1
  209. package/geom/Point.d.ts.map +1 -1
  210. package/geom/Polygon.d.ts +3 -3
  211. package/geom/Polygon.d.ts.map +1 -1
  212. package/geom/SimpleGeometry.d.ts +1 -1
  213. package/geom/SimpleGeometry.d.ts.map +1 -1
  214. package/geom/flat/interpolate.d.ts.map +1 -1
  215. package/geom/flat/interpolate.js +4 -2
  216. package/geom/flat/orient.d.ts +1 -1
  217. package/geom/flat/orient.js +1 -1
  218. package/interaction/DblClickDragZoom.d.ts +110 -0
  219. package/interaction/DblClickDragZoom.d.ts.map +1 -0
  220. package/interaction/DblClickDragZoom.js +251 -0
  221. package/interaction/DoubleClickZoom.d.ts +1 -1
  222. package/interaction/DoubleClickZoom.d.ts.map +1 -1
  223. package/interaction/DragAndDrop.d.ts +2 -2
  224. package/interaction/DragAndDrop.d.ts.map +1 -1
  225. package/interaction/DragBox.d.ts +2 -2
  226. package/interaction/DragBox.d.ts.map +1 -1
  227. package/interaction/DragPan.d.ts +1 -1
  228. package/interaction/DragPan.d.ts.map +1 -1
  229. package/interaction/DragRotate.d.ts +1 -1
  230. package/interaction/DragRotate.d.ts.map +1 -1
  231. package/interaction/DragRotateAndZoom.d.ts +1 -1
  232. package/interaction/DragRotateAndZoom.d.ts.map +1 -1
  233. package/interaction/DragZoom.d.ts +1 -1
  234. package/interaction/DragZoom.d.ts.map +1 -1
  235. package/interaction/Draw.d.ts +6 -6
  236. package/interaction/Draw.d.ts.map +1 -1
  237. package/interaction/Extent.d.ts +2 -2
  238. package/interaction/Extent.d.ts.map +1 -1
  239. package/interaction/Extent.js +2 -1
  240. package/interaction/Interaction.d.ts +1 -1
  241. package/interaction/Interaction.d.ts.map +1 -1
  242. package/interaction/KeyboardPan.d.ts +1 -1
  243. package/interaction/KeyboardPan.d.ts.map +1 -1
  244. package/interaction/KeyboardPan.js +9 -9
  245. package/interaction/KeyboardZoom.d.ts +1 -1
  246. package/interaction/KeyboardZoom.d.ts.map +1 -1
  247. package/interaction/Link.d.ts +1 -1
  248. package/interaction/Link.d.ts.map +1 -1
  249. package/interaction/Modify.d.ts +6 -6
  250. package/interaction/Modify.d.ts.map +1 -1
  251. package/interaction/Modify.js +6 -1
  252. package/interaction/MouseWheelZoom.d.ts +1 -1
  253. package/interaction/MouseWheelZoom.d.ts.map +1 -1
  254. package/interaction/PinchRotate.d.ts +1 -1
  255. package/interaction/PinchRotate.d.ts.map +1 -1
  256. package/interaction/PinchZoom.d.ts +1 -1
  257. package/interaction/PinchZoom.d.ts.map +1 -1
  258. package/interaction/Pointer.d.ts +1 -1
  259. package/interaction/Pointer.d.ts.map +1 -1
  260. package/interaction/Select.d.ts +5 -5
  261. package/interaction/Select.d.ts.map +1 -1
  262. package/interaction/Snap.d.ts +1 -1
  263. package/interaction/Snap.d.ts.map +1 -1
  264. package/interaction/Snap.js +10 -4
  265. package/interaction/Translate.d.ts +4 -4
  266. package/interaction/Translate.d.ts.map +1 -1
  267. package/interaction/Translate.js +18 -3
  268. package/interaction/defaults.d.ts +1 -1
  269. package/interaction/defaults.d.ts.map +1 -1
  270. package/interaction.d.ts +1 -0
  271. package/interaction.js +1 -0
  272. package/layer/Base.d.ts +4 -3
  273. package/layer/Base.d.ts.map +1 -1
  274. package/layer/Base.js +3 -2
  275. package/layer/BaseImage.d.ts +1 -1
  276. package/layer/BaseImage.d.ts.map +1 -1
  277. package/layer/BaseTile.d.ts +1 -1
  278. package/layer/BaseTile.d.ts.map +1 -1
  279. package/layer/BaseVector.d.ts +10 -4
  280. package/layer/BaseVector.d.ts.map +1 -1
  281. package/layer/BaseVector.js +9 -3
  282. package/layer/Graticule.d.ts +6 -6
  283. package/layer/Graticule.d.ts.map +1 -1
  284. package/layer/Group.d.ts +4 -4
  285. package/layer/Group.d.ts.map +1 -1
  286. package/layer/Heatmap.d.ts +2 -2
  287. package/layer/Heatmap.d.ts.map +1 -1
  288. package/layer/Image.d.ts +2 -2
  289. package/layer/Image.d.ts.map +1 -1
  290. package/layer/Layer.d.ts +14 -11
  291. package/layer/Layer.d.ts.map +1 -1
  292. package/layer/Layer.js +28 -8
  293. package/layer/MapboxVector.d.ts +1 -1
  294. package/layer/MapboxVector.d.ts.map +1 -1
  295. package/layer/Tile.d.ts +2 -2
  296. package/layer/Tile.d.ts.map +1 -1
  297. package/layer/Vector.d.ts +2 -2
  298. package/layer/Vector.d.ts.map +1 -1
  299. package/layer/VectorImage.d.ts +2 -2
  300. package/layer/VectorImage.d.ts.map +1 -1
  301. package/layer/VectorTile.d.ts +2 -2
  302. package/layer/VectorTile.d.ts.map +1 -1
  303. package/layer/WebGLPoints.d.ts +4 -4
  304. package/layer/WebGLPoints.d.ts.map +1 -1
  305. package/layer/WebGLPoints.js +13 -4
  306. package/layer/WebGLTile.d.ts +9 -2
  307. package/layer/WebGLTile.d.ts.map +1 -1
  308. package/layer/WebGLTile.js +6 -6
  309. package/package.json +2 -2
  310. package/proj/proj4.d.ts +2 -2
  311. package/proj/proj4.d.ts.map +1 -1
  312. package/proj/proj4.js +1 -1
  313. package/proj.d.ts +9 -9
  314. package/proj.d.ts.map +1 -1
  315. package/proj.js +9 -8
  316. package/render/Box.d.ts +1 -1
  317. package/render/Box.d.ts.map +1 -1
  318. package/render/Event.d.ts +1 -1
  319. package/render/Event.d.ts.map +1 -1
  320. package/render/Feature.d.ts +7 -7
  321. package/render/Feature.d.ts.map +1 -1
  322. package/render/canvas/Builder.d.ts +1 -1
  323. package/render/canvas/Builder.d.ts.map +1 -1
  324. package/render/canvas/ImageBuilder.d.ts +1 -1
  325. package/render/canvas/ImageBuilder.d.ts.map +1 -1
  326. package/render/canvas/Immediate.d.ts +1 -1
  327. package/render/canvas/Immediate.d.ts.map +1 -1
  328. package/render/canvas/Immediate.js +9 -1
  329. package/render/canvas/LineStringBuilder.d.ts +1 -1
  330. package/render/canvas/LineStringBuilder.d.ts.map +1 -1
  331. package/render/canvas/PolygonBuilder.d.ts +1 -1
  332. package/render/canvas/PolygonBuilder.d.ts.map +1 -1
  333. package/render/canvas/TextBuilder.d.ts +1 -1
  334. package/render/canvas/TextBuilder.d.ts.map +1 -1
  335. package/render/canvas.d.ts +1 -1
  336. package/render/canvas.d.ts.map +1 -1
  337. package/render/webgl/MixedGeometryBatch.d.ts +37 -131
  338. package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
  339. package/render/webgl/MixedGeometryBatch.js +230 -147
  340. package/render/webgl/VectorStyleRenderer.d.ts +256 -0
  341. package/render/webgl/VectorStyleRenderer.d.ts.map +1 -0
  342. package/render/webgl/VectorStyleRenderer.js +440 -0
  343. package/render/webgl/constants.d.ts +1 -1
  344. package/render/webgl/constants.js +1 -1
  345. package/render/webgl/renderinstructions.d.ts +36 -0
  346. package/render/webgl/renderinstructions.d.ts.map +1 -0
  347. package/render/webgl/renderinstructions.js +241 -0
  348. package/render/webgl/utils.d.ts +4 -4
  349. package/render/webgl/utils.d.ts.map +1 -1
  350. package/render/webgl/utils.js +9 -9
  351. package/render.d.ts +1 -1
  352. package/render.d.ts.map +1 -1
  353. package/renderer/Composite.d.ts +1 -1
  354. package/renderer/Composite.d.ts.map +1 -1
  355. package/renderer/Layer.d.ts +1 -1
  356. package/renderer/Layer.d.ts.map +1 -1
  357. package/renderer/Map.d.ts +1 -1
  358. package/renderer/Map.d.ts.map +1 -1
  359. package/renderer/canvas/ImageLayer.d.ts +1 -1
  360. package/renderer/canvas/ImageLayer.d.ts.map +1 -1
  361. package/renderer/canvas/Layer.d.ts +1 -1
  362. package/renderer/canvas/Layer.d.ts.map +1 -1
  363. package/renderer/canvas/TileLayer.d.ts +1 -1
  364. package/renderer/canvas/TileLayer.d.ts.map +1 -1
  365. package/renderer/canvas/VectorImageLayer.d.ts +1 -1
  366. package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
  367. package/renderer/canvas/VectorLayer.d.ts +3 -3
  368. package/renderer/canvas/VectorLayer.d.ts.map +1 -1
  369. package/renderer/canvas/VectorTileLayer.d.ts +2 -2
  370. package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
  371. package/renderer/webgl/Layer.d.ts +2 -2
  372. package/renderer/webgl/Layer.d.ts.map +1 -1
  373. package/renderer/webgl/PointsLayer.d.ts +3 -3
  374. package/renderer/webgl/PointsLayer.d.ts.map +1 -1
  375. package/renderer/webgl/PointsLayer.js +5 -8
  376. package/renderer/webgl/TileLayer.d.ts +32 -99
  377. package/renderer/webgl/TileLayer.d.ts.map +1 -1
  378. package/renderer/webgl/TileLayer.js +103 -644
  379. package/renderer/webgl/TileLayerBase.d.ts +194 -0
  380. package/renderer/webgl/TileLayerBase.d.ts.map +1 -0
  381. package/renderer/webgl/TileLayerBase.js +750 -0
  382. package/renderer/webgl/VectorLayer.d.ts +59 -60
  383. package/renderer/webgl/VectorLayer.d.ts.map +1 -1
  384. package/renderer/webgl/VectorLayer.js +118 -156
  385. package/renderer/webgl/VectorTileLayer.d.ts +87 -0
  386. package/renderer/webgl/VectorTileLayer.d.ts.map +1 -0
  387. package/renderer/webgl/VectorTileLayer.js +201 -0
  388. package/reproj/DataTile.d.ts +1 -1
  389. package/reproj/DataTile.d.ts.map +1 -1
  390. package/reproj/Image.d.ts +1 -1
  391. package/reproj/Image.d.ts.map +1 -1
  392. package/reproj/Image.js +22 -8
  393. package/reproj/Tile.d.ts +1 -1
  394. package/reproj/Tile.d.ts.map +1 -1
  395. package/reproj/Triangulation.js +2 -2
  396. package/source/BingMaps.d.ts +1 -1
  397. package/source/BingMaps.d.ts.map +1 -1
  398. package/source/CartoDB.d.ts +1 -1
  399. package/source/CartoDB.d.ts.map +1 -1
  400. package/source/Cluster.d.ts +3 -3
  401. package/source/Cluster.d.ts.map +1 -1
  402. package/source/DataTile.d.ts +4 -4
  403. package/source/DataTile.d.ts.map +1 -1
  404. package/source/DataTile.js +1 -1
  405. package/source/GeoTIFF.d.ts +1 -1
  406. package/source/GeoTIFF.d.ts.map +1 -1
  407. package/source/IIIF.d.ts +1 -1
  408. package/source/IIIF.d.ts.map +1 -1
  409. package/source/Image.d.ts +2 -2
  410. package/source/Image.d.ts.map +1 -1
  411. package/source/ImageArcGISRest.d.ts +1 -1
  412. package/source/ImageArcGISRest.d.ts.map +1 -1
  413. package/source/ImageCanvas.d.ts +1 -1
  414. package/source/ImageCanvas.d.ts.map +1 -1
  415. package/source/ImageMapGuide.d.ts +1 -1
  416. package/source/ImageMapGuide.d.ts.map +1 -1
  417. package/source/ImageStatic.d.ts +1 -1
  418. package/source/ImageStatic.d.ts.map +1 -1
  419. package/source/ImageWMS.d.ts +1 -1
  420. package/source/ImageWMS.d.ts.map +1 -1
  421. package/source/OGCMapTile.d.ts +1 -1
  422. package/source/OGCMapTile.d.ts.map +1 -1
  423. package/source/OGCVectorTile.d.ts +1 -1
  424. package/source/OGCVectorTile.d.ts.map +1 -1
  425. package/source/OSM.d.ts +1 -1
  426. package/source/OSM.d.ts.map +1 -1
  427. package/source/Raster.d.ts +3 -3
  428. package/source/Raster.d.ts.map +1 -1
  429. package/source/Source.d.ts +5 -5
  430. package/source/Source.d.ts.map +1 -1
  431. package/source/Source.js +2 -2
  432. package/source/Stamen.d.ts +1 -1
  433. package/source/Stamen.d.ts.map +1 -1
  434. package/source/Tile.d.ts +2 -2
  435. package/source/Tile.d.ts.map +1 -1
  436. package/source/TileArcGISRest.d.ts +1 -1
  437. package/source/TileArcGISRest.d.ts.map +1 -1
  438. package/source/TileDebug.d.ts +1 -1
  439. package/source/TileDebug.d.ts.map +1 -1
  440. package/source/TileImage.d.ts +4 -4
  441. package/source/TileImage.d.ts.map +1 -1
  442. package/source/TileJSON.d.ts +1 -1
  443. package/source/TileJSON.d.ts.map +1 -1
  444. package/source/TileWMS.d.ts +1 -1
  445. package/source/TileWMS.d.ts.map +1 -1
  446. package/source/UTFGrid.d.ts +2 -2
  447. package/source/UTFGrid.d.ts.map +1 -1
  448. package/source/UrlTile.d.ts +1 -1
  449. package/source/UrlTile.d.ts.map +1 -1
  450. package/source/Vector.d.ts +3 -3
  451. package/source/Vector.d.ts.map +1 -1
  452. package/source/Vector.js +6 -3
  453. package/source/VectorTile.d.ts +4 -4
  454. package/source/VectorTile.d.ts.map +1 -1
  455. package/source/WMTS.d.ts +1 -1
  456. package/source/WMTS.d.ts.map +1 -1
  457. package/source/XYZ.d.ts +1 -1
  458. package/source/XYZ.d.ts.map +1 -1
  459. package/source/Zoomify.d.ts +2 -2
  460. package/source/Zoomify.d.ts.map +1 -1
  461. package/structs/LRUCache.d.ts.map +1 -1
  462. package/structs/LRUCache.js +2 -1
  463. package/style/Circle.d.ts +1 -1
  464. package/style/Circle.d.ts.map +1 -1
  465. package/style/Icon.d.ts +4 -78
  466. package/style/Icon.d.ts.map +1 -1
  467. package/style/Icon.js +89 -86
  468. package/style/IconImage.d.ts +1 -1
  469. package/style/IconImage.d.ts.map +1 -1
  470. package/style/RegularShape.d.ts +1 -1
  471. package/style/RegularShape.d.ts.map +1 -1
  472. package/style/RegularShape.js +1 -1
  473. package/style/Style.d.ts +2 -2
  474. package/style/Style.d.ts.map +1 -1
  475. package/style/Text.d.ts +5 -5
  476. package/style/Text.d.ts.map +1 -1
  477. package/style/Text.js +2 -2
  478. package/style/expressions.d.ts +42 -17
  479. package/style/expressions.d.ts.map +1 -1
  480. package/style/expressions.js +258 -118
  481. package/style/flat.d.ts +14 -0
  482. package/style/flat.d.ts.map +1 -1
  483. package/style/flat.js +6 -0
  484. package/style/literal.d.ts +204 -3
  485. package/style/literal.d.ts.map +1 -1
  486. package/style/literal.js +106 -3
  487. package/tilegrid/TileGrid.d.ts +1 -9
  488. package/tilegrid/TileGrid.d.ts.map +1 -1
  489. package/tilegrid/TileGrid.js +0 -18
  490. package/tilegrid/WMTS.d.ts +1 -1
  491. package/tilegrid/WMTS.d.ts.map +1 -1
  492. package/tilegrid.d.ts +1 -1
  493. package/tilegrid.d.ts.map +1 -1
  494. package/util.d.ts.map +1 -1
  495. package/util.js +1 -1
  496. package/webgl/BaseTileRepresentation.d.ts +72 -0
  497. package/webgl/BaseTileRepresentation.d.ts.map +1 -0
  498. package/webgl/BaseTileRepresentation.js +108 -0
  499. package/webgl/Buffer.d.ts +9 -6
  500. package/webgl/Buffer.d.ts.map +1 -1
  501. package/webgl/Buffer.js +6 -0
  502. package/webgl/Helper.d.ts +19 -12
  503. package/webgl/Helper.d.ts.map +1 -1
  504. package/webgl/Helper.js +79 -71
  505. package/webgl/ShaderBuilder.d.ts +75 -65
  506. package/webgl/ShaderBuilder.d.ts.map +1 -1
  507. package/webgl/ShaderBuilder.js +382 -241
  508. package/webgl/TileGeometry.d.ts +29 -0
  509. package/webgl/TileGeometry.d.ts.map +1 -0
  510. package/webgl/TileGeometry.js +73 -0
  511. package/webgl/TileTexture.d.ts +8 -51
  512. package/webgl/TileTexture.d.ts.map +1 -1
  513. package/webgl/TileTexture.js +11 -62
  514. package/webgl/styleparser.d.ts +61 -0
  515. package/webgl/styleparser.d.ts.map +1 -0
  516. package/webgl/styleparser.js +406 -0
  517. package/worker/webgl.js +1 -1
  518. package/events/KeyCode.d.ts +0 -8
  519. package/events/KeyCode.d.ts.map +0 -1
  520. package/events/KeyCode.js +0 -14
  521. package/render/webgl/BatchRenderer.d.ts +0 -92
  522. package/render/webgl/BatchRenderer.d.ts.map +0 -1
  523. package/render/webgl/BatchRenderer.js +0 -200
  524. package/render/webgl/LineStringBatchRenderer.d.ts +0 -27
  525. package/render/webgl/LineStringBatchRenderer.d.ts.map +0 -1
  526. package/render/webgl/LineStringBatchRenderer.js +0 -114
  527. package/render/webgl/PointBatchRenderer.d.ts +0 -26
  528. package/render/webgl/PointBatchRenderer.d.ts.map +0 -1
  529. package/render/webgl/PointBatchRenderer.js +0 -95
  530. package/render/webgl/PolygonBatchRenderer.d.ts +0 -25
  531. package/render/webgl/PolygonBatchRenderer.d.ts.map +0 -1
  532. package/render/webgl/PolygonBatchRenderer.js +0 -115
  533. package/renderer/webgl/shaders.d.ts +0 -43
  534. package/renderer/webgl/shaders.d.ts.map +0 -1
  535. package/renderer/webgl/shaders.js +0 -198
package/style/Icon.js CHANGED
@@ -58,6 +58,26 @@ import {getUid} from '../util.js';
58
58
  * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode.
59
59
  */
60
60
 
61
+ /**
62
+ * @param {number} width The width.
63
+ * @param {number} height The height.
64
+ * @param {number|undefined} wantedWidth The wanted width.
65
+ * @param {number|undefined} wantedHeight The wanted height.
66
+ * @return {number|Array<number>} The scale.
67
+ */
68
+ function calculateScale(width, height, wantedWidth, wantedHeight) {
69
+ if (wantedWidth !== undefined && wantedHeight !== undefined) {
70
+ return [wantedWidth / width, wantedHeight / height];
71
+ }
72
+ if (wantedWidth !== undefined) {
73
+ return wantedWidth / width;
74
+ }
75
+ if (wantedHeight !== undefined) {
76
+ return wantedHeight / height;
77
+ }
78
+ return 1;
79
+ }
80
+
61
81
  /**
62
82
  * @classdesc
63
83
  * Set icon style for vector features.
@@ -224,27 +244,45 @@ class Icon extends ImageStyle {
224
244
  this.size_ = options.size !== undefined ? options.size : null;
225
245
 
226
246
  /**
227
- * @type {number|undefined}
228
- */
229
- this.width_ = options.width;
230
-
231
- /**
232
- * @type {number|undefined}
247
+ * Calculate the scale if width or height were given.
233
248
  */
234
- this.height_ = options.height;
235
-
236
- /**
237
- * Recalculate the scale if width or height were given.
238
- */
239
- if (this.width_ !== undefined || this.height_ !== undefined) {
240
- const image = this.getImage(1);
241
- const setScale = () => {
242
- this.updateScaleFromWidthAndHeight(this.width_, this.height_);
243
- };
244
- if (image.width > 0) {
245
- this.updateScaleFromWidthAndHeight(this.width_, this.height_);
249
+ if (options.width !== undefined || options.height !== undefined) {
250
+ let width, height;
251
+ if (options.size) {
252
+ [width, height] = options.size;
246
253
  } else {
247
- image.addEventListener('load', setScale);
254
+ const image = this.getImage(1);
255
+ if (
256
+ image instanceof HTMLCanvasElement ||
257
+ (image.src && image.complete)
258
+ ) {
259
+ width = image.width;
260
+ height = image.height;
261
+ } else {
262
+ this.initialOptions_ = options;
263
+ const onload = () => {
264
+ this.unlistenImageChange(onload);
265
+ if (!this.initialOptions_) {
266
+ return;
267
+ }
268
+ const imageSize = this.iconImage_.getSize();
269
+ this.setScale(
270
+ calculateScale(
271
+ imageSize[0],
272
+ imageSize[1],
273
+ options.width,
274
+ options.height
275
+ )
276
+ );
277
+ };
278
+ this.listenImageChange(onload);
279
+ return;
280
+ }
281
+ }
282
+ if (width !== undefined) {
283
+ this.setScale(
284
+ calculateScale(width, height, options.width, options.height)
285
+ );
248
286
  }
249
287
  }
250
288
  }
@@ -255,13 +293,15 @@ class Icon extends ImageStyle {
255
293
  * @api
256
294
  */
257
295
  clone() {
258
- let scale = this.getScale();
259
- scale = Array.isArray(scale) ? scale.slice() : scale;
260
- // if either width or height are defined, do not pass scale.
261
- if (this.width_ !== undefined || this.height_ !== undefined) {
262
- scale = undefined;
296
+ let scale, width, height;
297
+ if (this.initialOptions_) {
298
+ width = this.initialOptions_.width;
299
+ height = this.initialOptions_.height;
300
+ } else {
301
+ scale = this.getScale();
302
+ scale = Array.isArray(scale) ? scale.slice() : scale;
263
303
  }
264
- return new Icon({
304
+ const clone = new Icon({
265
305
  anchor: this.anchor_.slice(),
266
306
  anchorOrigin: this.anchorOrigin_,
267
307
  anchorXUnits: this.anchorXUnits_,
@@ -277,35 +317,15 @@ class Icon extends ImageStyle {
277
317
  opacity: this.getOpacity(),
278
318
  rotateWithView: this.getRotateWithView(),
279
319
  rotation: this.getRotation(),
280
- scale: scale,
320
+ scale,
321
+ width,
322
+ height,
281
323
  size: this.size_ !== null ? this.size_.slice() : undefined,
282
324
  src: this.getSrc(),
283
325
  displacement: this.getDisplacement().slice(),
284
326
  declutterMode: this.getDeclutterMode(),
285
- width: this.width_,
286
- height: this.height_,
287
327
  });
288
- }
289
-
290
- /**
291
- * Set the scale of the Icon by calculating it from given width and height and the
292
- * width and height of the image.
293
- *
294
- * @private
295
- * @param {number} width The width.
296
- * @param {number} height The height.
297
- */
298
- updateScaleFromWidthAndHeight(width, height) {
299
- const image = this.getImage(1);
300
- if (width !== undefined && height !== undefined) {
301
- super.setScale([width / image.width, height / image.height]);
302
- } else if (width !== undefined) {
303
- super.setScale([width / image.width, width / image.width]);
304
- } else if (height !== undefined) {
305
- super.setScale([height / image.height, height / image.height]);
306
- } else {
307
- super.setScale([1, 1]);
308
- }
328
+ return clone;
309
329
  }
310
330
 
311
331
  /**
@@ -483,63 +503,46 @@ class Icon extends ImageStyle {
483
503
  }
484
504
 
485
505
  /**
486
- * Get the width of the icon (in pixels).
506
+ * Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
487
507
  * @return {number} Icon width (in pixels).
488
508
  * @api
489
509
  */
490
510
  getWidth() {
491
- return this.width_;
511
+ const scale = this.getScaleArray();
512
+ if (this.size_) {
513
+ return this.size_[0] * scale[0];
514
+ }
515
+ if (this.iconImage_.getImageState() == ImageState.LOADED) {
516
+ return this.iconImage_.getSize()[0] * scale[0];
517
+ }
518
+ return undefined;
492
519
  }
493
520
 
494
521
  /**
495
- * Get the height of the icon (in pixels).
522
+ * Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
496
523
  * @return {number} Icon height (in pixels).
497
524
  * @api
498
525
  */
499
526
  getHeight() {
500
- return this.height_;
501
- }
502
-
503
- /**
504
- * Set the width of the icon in pixels.
505
- *
506
- * @param {number} width The width to set.
507
- */
508
- setWidth(width) {
509
- this.width_ = width;
510
- this.updateScaleFromWidthAndHeight(width, this.height_);
511
- }
512
-
513
- /**
514
- * Set the height of the icon in pixels.
515
- *
516
- * @param {number} height The height to set.
517
- */
518
- setHeight(height) {
519
- this.height_ = height;
520
- this.updateScaleFromWidthAndHeight(this.width_, height);
527
+ const scale = this.getScaleArray();
528
+ if (this.size_) {
529
+ return this.size_[1] * scale[1];
530
+ }
531
+ if (this.iconImage_.getImageState() == ImageState.LOADED) {
532
+ return this.iconImage_.getSize()[1] * scale[1];
533
+ }
534
+ return undefined;
521
535
  }
522
536
 
523
537
  /**
524
- * Set the scale and updates the width and height correspondingly.
538
+ * Set the scale.
525
539
  *
526
540
  * @param {number|import("../size.js").Size} scale Scale.
527
- * @override
528
541
  * @api
529
542
  */
530
543
  setScale(scale) {
544
+ delete this.initialOptions_;
531
545
  super.setScale(scale);
532
- const image = this.getImage(1);
533
- if (image) {
534
- const widthScale = Array.isArray(scale) ? scale[0] : scale;
535
- if (widthScale !== undefined) {
536
- this.width_ = widthScale * image.width;
537
- }
538
- const heightScale = Array.isArray(scale) ? scale[1] : scale;
539
- if (heightScale !== undefined) {
540
- this.height_ = heightScale * image.height;
541
- }
542
- }
543
546
  }
544
547
 
545
548
  /**
@@ -129,5 +129,5 @@ declare class IconImage extends EventTarget {
129
129
  */
130
130
  private unlistenImage_;
131
131
  }
132
- import EventTarget from "../events/Target.js";
132
+ import EventTarget from '../events/Target.js';
133
133
  //# sourceMappingURL=IconImage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconImage.d.ts","sourceRoot":"","sources":["IconImage.js"],"names":[],"mappings":"AA8RA;;;;;;;;GAQG;AACH,2BARW,gBAAgB,GAAC,iBAAiB,OAClC,MAAM,QACN,OAAO,YAAY,EAAE,IAAI,eACxB,MAAM,iCAEP,OAAO,aAAa,EAAE,KAAK,GAC1B,SAAS,CASpB;;AA7RD;IACE;;;;;;;OAOG;IACH,mBAPW,gBAAgB,GAAC,iBAAiB,OAClC,MAAM,GAAC,SAAS,QAChB,OAAO,YAAY,EAAE,IAAI,eACxB,MAAM,iCAEP,OAAO,aAAa,EAAE,KAAK,EA+DrC;IA1DC;;;OAGG;IACH,2BAA8B;IAE9B;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,qBAA+B;IAE/B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,kBAAqB;IAErB;;;OAGG;IACH,oBAA6B;IAE7B;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,aAAe;IAQjB;;OAEG;IACH,yBAKC;IAED;;;OAGG;IACH,mBAiBC;IAPK,8BAAqB;IAS3B;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,0BAIC;IAED;;OAEG;IACH,yBAUC;IAED;;;OAGG;IACH,qBAHW,MAAM,GACL,gBAAgB,GAAC,iBAAiB,CAQ7C;IAED;;;OAGG;IACH,0BAHW,MAAM,GACL,MAAM,CAKjB;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,wBAFY,gBAAgB,GAAC,iBAAiB,CAkB7C;IAED;;;OAGG;IACH,WAFY,OAAO,YAAY,EAAE,IAAI,CAIpC;IAED;;OAEG;IACH,UAFY,MAAM,GAAC,SAAS,CAI3B;IAED;;OAEG;IACH,aAmBC;IAED;;;OAGG;IACH,sBA0BC;IAED;;;;OAIG;IACH,uBAKC;CACF"}
1
+ {"version":3,"file":"IconImage.d.ts","sourceRoot":"","sources":["IconImage.js"],"names":[],"mappings":"AA8RA;;;;;;;;GAQG;AACH,2BARW,gBAAgB,GAAC,iBAAiB,OAClC,MAAM,QACN,OAAO,YAAY,EAAE,IAAI,eACxB,MAAM,iCAEP,OAAO,aAAa,EAAE,KAAK,GAC1B,SAAS,CASpB;;AA7RD;IACE;;;;;;;OAOG;IACH,mBAPW,gBAAgB,GAAC,iBAAiB,OAClC,MAAM,GAAC,SAAS,QAChB,OAAO,YAAY,EAAE,IAAI,eACxB,MAAM,iCAEP,OAAO,aAAa,EAAE,KAAK,EA+DrC;IA1DC;;;OAGG;IACH,2BAA8B;IAE9B;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,qBAA+B;IAE/B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,kBAAqB;IAErB;;;OAGG;IACH,oBAA6B;IAE7B;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,aAAe;IAQjB;;OAEG;IACH,yBAKC;IAED;;;OAGG;IACH,mBAiBC;IAPK,8BAAqB;IAS3B;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,0BAIC;IAED;;OAEG;IACH,yBAUC;IAED;;;OAGG;IACH,qBAHW,MAAM,GACL,gBAAgB,GAAC,iBAAiB,CAQ7C;IAED;;;OAGG;IACH,0BAHW,MAAM,GACL,MAAM,CAKjB;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,wBAFY,gBAAgB,GAAC,iBAAiB,CAkB7C;IAED;;;OAGG;IACH,WAFY,OAAO,YAAY,EAAE,IAAI,CAIpC;IAED;;OAEG;IACH,UAFY,MAAM,GAAC,SAAS,CAI3B;IAED;;OAEG;IACH,aAmBC;IAED;;;OAGG;IACH,sBA0BC;IAED;;;;OAIG;IACH,uBAKC;CACF;wBAxRuB,qBAAqB"}
@@ -288,5 +288,5 @@ declare class RegularShape extends ImageStyle {
288
288
  */
289
289
  private drawHitDetectionCanvas_;
290
290
  }
291
- import ImageStyle from "./Image.js";
291
+ import ImageStyle from './Image.js';
292
292
  //# sourceMappingURL=RegularShape.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegularShape.d.ts","sourceRoot":"","sources":["RegularShape.js"],"names":[],"mappings":";;;;;;;;;;;;;YAqBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAaN,WAAW,GAAC,UAAU,GAAC,MAAM,GAAC,SAAS;;;;;;;;;;iBAMvC,MAAM;;;;UACN,MAAM;;;;cACN,MAAM,MAAM,CAAC,GAAC,IAAI;;;;oBAClB,MAAM;;;;cACN,cAAc;;;;gBACd,MAAM;;AA5BpB;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAuFjB;IApEC;;;OAGG;IACH,gBAAwB;IAExB;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,mBAFU,MAAM,CAGiD;IAEjE;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,eAA6D;IAE7D;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,uBAA0B;IAK5B;;;;OAIG;IACH,SAHY,YAAY,CAoBvB;IAuBD;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO,CAKtC;IAED;;;;OAIG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,QAMrC;IAED;;OAEG;IACH,wBAFY,iBAAiB,CAO5B;IAED;;;;;OAKG;IACH,qBAJW,MAAM,GACL,iBAAiB,CAiB5B;IAkCD;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,cAHY,MAAM,GAAC,SAAS,CAK3B;IAWD;;;;OAIG;IACH,aAHY,OAAO,aAAa,EAAE,OAAO,CAKxC;IAED;;;;OAIG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,QAMvC;IAiBD;;;;;;;OAOG;IACH,+BAgFC;IAED;;;OAGG;IACH,iCAHY,aAAa,CA8CxB;IAED;;OAEG;IACH,yBAKC;IAED;;;;;OAKG;IACH,cA0BC;IAED;;;OAGG;IACH,kCA6BC;IAED;;;OAGG;IACH,oBAmBC;IAED;;;;OAIG;IACH,gCAmBC;CACF"}
1
+ {"version":3,"file":"RegularShape.d.ts","sourceRoot":"","sources":["RegularShape.js"],"names":[],"mappings":";;;;;;;;;;;;;YAqBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAaN,WAAW,GAAC,UAAU,GAAC,MAAM,GAAC,SAAS;;;;;;;;;;iBAMvC,MAAM;;;;UACN,MAAM;;;;cACN,MAAM,MAAM,CAAC,GAAC,IAAI;;;;oBAClB,MAAM;;;;cACN,cAAc;;;;gBACd,MAAM;;AA5BpB;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAuFjB;IApEC;;;OAGG;IACH,gBAAwB;IAExB;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,mBAFU,MAAM,CAGiD;IAEjE;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,eAA6D;IAE7D;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,uBAA0B;IAK5B;;;;OAIG;IACH,SAHY,YAAY,CAoBvB;IAuBD;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO,CAKtC;IAED;;;;OAIG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,QAMrC;IAED;;OAEG;IACH,wBAFY,iBAAiB,CAO5B;IAED;;;;;OAKG;IACH,qBAJW,MAAM,GACL,iBAAiB,CAiB5B;IAkCD;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,cAHY,MAAM,GAAC,SAAS,CAK3B;IAWD;;;;OAIG;IACH,aAHY,OAAO,aAAa,EAAE,OAAO,CAKxC;IAED;;;;OAIG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,QAMvC;IAiBD;;;;;;;OAOG;IACH,+BAgFC;IAED;;;OAGG;IACH,iCAHY,aAAa,CA8CxB;IAED;;OAEG;IACH,yBAKC;IAED;;;;;OAKG;IACH,cA0BC;IAED;;;OAGG;IACH,kCA6BC;IAED;;;OAGG;IACH,oBAmBC;IAED;;;;OAIG;IACH,gCAmBC;CACF;uBAxmBsB,YAAY"}
@@ -407,7 +407,7 @@ class RegularShape extends ImageStyle {
407
407
  if (lineJoin === 'miter' && miterRatio <= miterLimit) {
408
408
  return miterRatio * strokeWidth;
409
409
  }
410
- // Calculate the distnce from center to the stroke corner where
410
+ // Calculate the distance from center to the stroke corner where
411
411
  // it was cut short because of the miter limit.
412
412
  // l
413
413
  // ----+---- <= distance from center to here is maxr
package/style/Style.d.ts CHANGED
@@ -387,6 +387,6 @@ declare class Style {
387
387
  */
388
388
  setZIndex(zIndex: number | undefined): void;
389
389
  }
390
- import Fill from "./Fill.js";
391
- import Stroke from "./Stroke.js";
390
+ import Fill from './Fill.js';
391
+ import Stroke from './Stroke.js';
392
392
  //# sourceMappingURL=Style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["Style.js"],"names":[],"mappings":"AAuaA;;;;;;;GAOG;AACH,gCAJW,aAAa,GAAC,MAAM,KAAK,CAAC,GAAC,KAAK,GAE/B,aAAa,CAwBxB;AAOD;;;;GAIG;AACH,4CAJW,OAAO,eAAe,EAAE,WAAW,cACnC,MAAM,GACL,MAAM,KAAK,CAAC,CA6BvB;AAED;;;GAGG;AACH,0CAwDC;;;;;;;;;mCA1hBqB,OAAO,eAAe,EAAE,WAAW,QAAE,MAAM,KAAE,CAAC,KAAK,GAAC,MAAM,KAAK,CAAC,GAAC,IAAI,CAAC;;;;wBAK/E,KAAK,GAAC,MAAM,KAAK,CAAC,GAAC,aAAa;;;;;sCAOvB,OAAO,eAAe,EAAE,WAAW,KACxD,CAAO,OAAO,qBAAqB,EAAE,OAAO,GAAC,OAAO,sBAAsB,EAAE,OAAO,GAAC,SAAS,CAAC;;;;;;;oCASzE,CAAC,OAAO,kBAAkB,EAAE,UAAU,GAAC,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,GAAC,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,QAAC,OAAO,cAAc,EAAE,KAAK,KAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7BlM;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8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WAAW;mBACT,aAAa"}
package/style/Text.d.ts CHANGED
@@ -36,8 +36,8 @@ export type Options = {
36
36
  */
37
37
  placement?: TextPlacement | undefined;
38
38
  /**
39
- * Repeat interval in pixels. When set, the text will be repeated at this interval. Only available
40
- * when `placement` is set to `'line'`. Overrides 'textAlign'.
39
+ * Repeat interval. When set, the text will be repeated at this interval, which specifies
40
+ * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.
41
41
  */
42
42
  repeat?: number | undefined;
43
43
  /**
@@ -113,8 +113,8 @@ export type Options = {
113
113
  * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed
114
114
  * the width of the polygon at the label position or the length of the path that it follows.
115
115
  * @property {TextPlacement} [placement='point'] Text placement.
116
- * @property {number} [repeat] Repeat interval in pixels. When set, the text will be repeated at this interval. Only available
117
- * when `placement` is set to `'line'`. Overrides 'textAlign'.
116
+ * @property {number} [repeat] Repeat interval. When set, the text will be repeated at this interval, which specifies
117
+ * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.
118
118
  * @property {number|import("../size.js").Size} [scale] Scale.
119
119
  * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.
120
120
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
@@ -509,5 +509,5 @@ declare class Text {
509
509
  */
510
510
  setPadding(padding: Array<number> | null): void;
511
511
  }
512
- import Fill from "./Fill.js";
512
+ import Fill from './Fill.js';
513
513
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["Text.js"],"names":[],"mappings":";;;;;;;4BAOa,OAAO,GAAG,MAAM;0BAQhB,MAAM,GAAG,QAAQ,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWxC;;;;;;;;;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AKhB;IAED;;;;;OAKG;IACH,oBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,oBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,wBAHW,aAAa,QAKvB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GAAC,SAAS,QAK1B;IAED;;;;;OAKG;IACH,kCAHW,OAAO,QAKjB;IAED;;;;;OAKG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,QAKrC;IAED;;;;;OAKG;IACH,sBAHW,MAAM,GAAC,SAAS,QAK1B;IAED;;;;;OAKG;IACH,gBAHW,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI,GAAC,SAAS,QAMpD;IAED;;;;;OAKG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,QAKvC;IAED;;;;;OAKG;IACH,cAHW,MAAM,GAAC,MAAM,MAAM,CAAC,GAAC,SAAS,QAKxC;IAED;;;;;OAKG;IACH,wBAHW,eAAe,GAAC,SAAS,QAKnC;IAED;;;;;OAKG;IACH,oBAHW,WAAW,GAAC,SAAS,QAK/B;IAED;;;;;OAKG;IACH,8BAHW,kBAAkB,GAAC,SAAS,QAKtC;IAED;;;;;OAKG;IACH,wBAHW,OAAO,WAAW,EAAE,OAAO,QAKrC;IAED;;;;;OAKG;IACH,4BAHW,OAAO,aAAa,EAAE,OAAO,QAKvC;IAED;;;;;OAKG;IACH,oBAHW,MAAM,MAAM,CAAC,GAAC,IAAI,QAK5B;CACF;iBA/lBgB,WAAW"}
package/style/Text.js CHANGED
@@ -35,8 +35,8 @@ const DEFAULT_FILL_COLOR = '#333';
35
35
  * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed
36
36
  * the width of the polygon at the label position or the length of the path that it follows.
37
37
  * @property {TextPlacement} [placement='point'] Text placement.
38
- * @property {number} [repeat] Repeat interval in pixels. When set, the text will be repeated at this interval. Only available
39
- * when `placement` is set to `'line'`. Overrides 'textAlign'.
38
+ * @property {number} [repeat] Repeat interval. When set, the text will be repeated at this interval, which specifies
39
+ * the distance between two text anchors in pixels. Only available when `placement` is set to `'line'`. Overrides 'textAlign'.
40
40
  * @property {number|import("../size.js").Size} [scale] Scale.
41
41
  * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.
42
42
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
@@ -11,16 +11,22 @@ export function getValueType(value: ExpressionValue): ValueTypes | number;
11
11
  * @return {boolean} True if only one type flag is enabled, false if zero or multiple
12
12
  */
13
13
  export function isTypeUnique(valueType: ValueTypes | number): boolean;
14
+ /**
15
+ * @typedef {Object} ParsingContextExternal
16
+ * @property {string} name Name, unprefixed
17
+ * @property {ValueTypes} type One of the value types constants
18
+ */
14
19
  /**
15
20
  * Context available during the parsing of an expression.
16
21
  * @typedef {Object} ParsingContext
17
22
  * @property {boolean} [inFragmentShader] If false, means the expression output should be made for a vertex shader
18
- * @property {Array<string>} variables List of variables used in the expression; contains **unprefixed names**
19
- * @property {Array<string>} attributes List of attributes used in the expression; contains **unprefixed names**
23
+ * @property {Array<ParsingContextExternal>} variables External variables used in the expression
24
+ * @property {Array<ParsingContextExternal>} attributes External attributes used in the expression
20
25
  * @property {Object<string, number>} stringLiteralsMap This object maps all encountered string values to a number
21
26
  * @property {Object<string, string>} functions Lookup of functions used by the style.
22
27
  * @property {number} [bandCount] Number of bands per pixel.
23
28
  * @property {Array<PaletteTexture>} [paletteTextures] List of palettes used by the style.
29
+ * @property {import("../style/literal").LiteralStyle} style The style being parsed
24
30
  */
25
31
  /**
26
32
  * Will return the number as a float with a dot separator, which is required by GLSL.
@@ -62,10 +68,11 @@ export function stringToGlsl(context: ParsingContext, string: string): string;
62
68
  * will be read and modified during the parsing operation.
63
69
  * @param {ParsingContext} context Parsing context
64
70
  * @param {ExpressionValue} value Value
65
- * @param {ValueTypes|number} [typeHint] Hint for the expected final type (can be several types combined)
71
+ * @param {ValueTypes|number} [expectedType] Expected final type (can be several types combined)
72
+ * If omitted, defaults to ValueTypes.NUMBER
66
73
  * @return {string} GLSL-compatible output
67
74
  */
68
- export function expressionToGlsl(context: ParsingContext, value: ExpressionValue, typeHint?: number | undefined): string;
75
+ export function expressionToGlsl(context: ParsingContext, value: ExpressionValue, expectedType?: number | undefined): string;
69
76
  /**
70
77
  * Get the uniform name given a variable name.
71
78
  * @param {string} variableName The variable name.
@@ -92,8 +99,9 @@ export namespace ValueTypes {
92
99
  * Note: both methods can process arguments recursively.
93
100
  * @typedef {Object} Operator
94
101
  * @property {function(Array<ExpressionValue>): ValueTypes|number} getReturnType Returns one or several types
95
- * @property {function(ParsingContext, Array<ExpressionValue>, ValueTypes=): string} toGlsl Returns a GLSL-compatible string
96
- * Note: takes in an optional type hint as 3rd parameter
102
+ * @property {function(ParsingContext, Array<ExpressionValue>, ValueTypes): string} toGlsl Returns a GLSL-compatible string
103
+ * given a parsing context, an array of arguments and an expected type.
104
+ * Note: the expected type can be a combination such as ValueTypes.NUMBER | ValueTypes.STRING or ValueTypes.ANY for instance
97
105
  */
98
106
  /**
99
107
  * Operator declarations
@@ -103,6 +111,16 @@ export const Operators: {
103
111
  [x: string]: Operator;
104
112
  };
105
113
  export const PALETTE_TEXTURE_ARRAY: "u_paletteTextures";
114
+ export type ParsingContextExternal = {
115
+ /**
116
+ * Name, unprefixed
117
+ */
118
+ name: string;
119
+ /**
120
+ * One of the value types constants
121
+ */
122
+ type: ValueTypes;
123
+ };
106
124
  /**
107
125
  * Context available during the parsing of an expression.
108
126
  */
@@ -112,13 +130,13 @@ export type ParsingContext = {
112
130
  */
113
131
  inFragmentShader?: boolean | undefined;
114
132
  /**
115
- * List of variables used in the expression; contains **unprefixed names**
133
+ * External variables used in the expression
116
134
  */
117
- variables: Array<string>;
135
+ variables: Array<ParsingContextExternal>;
118
136
  /**
119
- * List of attributes used in the expression; contains **unprefixed names**
137
+ * External attributes used in the expression
120
138
  */
121
- attributes: Array<string>;
139
+ attributes: Array<ParsingContextExternal>;
122
140
  /**
123
141
  * This object maps all encountered string values to a number
124
142
  */
@@ -139,6 +157,10 @@ export type ParsingContext = {
139
157
  * List of palettes used by the style.
140
158
  */
141
159
  paletteTextures?: PaletteTexture[] | undefined;
160
+ /**
161
+ * The style being parsed
162
+ */
163
+ style: import("../style/literal").LiteralStyle;
142
164
  };
143
165
  /**
144
166
  * Base type used for literal style parameters; can be a number literal or the output of an operator,
@@ -154,15 +176,16 @@ export type ParsingContext = {
154
176
  * of bands, depending on the underlying data source and
155
177
  * {@link import ("../source/GeoTIFF.js").Options configuration}. `xOffset` and `yOffset` are optional
156
178
  * and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels.
157
- * * `['get', 'attributeName']` fetches a feature attribute (it will be prefixed by `a_` in the shader)
158
- * Note: those will be taken from the attributes provided to the renderer
179
+ * * `['get', 'attributeName', typeHint]` fetches a feature property value, similar to `feature.get('attributeName')`
180
+ * A type hint can optionally be specified, in case the resulting expression contains a type ambiguity which
181
+ * will make it invalid. Type hints can be one of: 'string', 'color', 'number', 'boolean', 'number[]'
159
182
  * * `['resolution']` returns the current resolution
160
183
  * * `['time']` returns the time in seconds since the creation of the layer
161
- * * `['var', 'varName']` fetches a value from the style variables, or 0 if undefined
184
+ * * `['var', 'varName']` fetches a value from the style variables; will throw an error if that variable is undefined
162
185
  * * `['zoom']` returns the current zoom level
163
186
  *
164
187
  * * Math operators:
165
- * * `['*', value1, value2]` multiplies `value1` by `value2`
188
+ * * `['*', value1, value2]` multiplies `value1` by `value2` (either numbers or colors)
166
189
  * * `['/', value1, value2]` divides `value1` by `value2`
167
190
  * * `['+', value1, value2]` adds `value1` and `value2`
168
191
  * * `['-', value1, value2]` subtracts `value2` from `value1`
@@ -223,6 +246,7 @@ export type ParsingContext = {
223
246
  * Literal values can be of the following types:
224
247
  * * `boolean`
225
248
  * * `number`
249
+ * * `number[]` (number arrays can only have a length of 2, 3 or 4)
226
250
  * * `string`
227
251
  * * {@link module :ol/color~Color}
228
252
  */
@@ -239,9 +263,10 @@ export type Operator = {
239
263
  getReturnType: (arg0: Array<ExpressionValue>) => ValueTypes | number;
240
264
  /**
241
265
  * Returns a GLSL-compatible string
242
- * Note: takes in an optional type hint as 3rd parameter
266
+ * given a parsing context, an array of arguments and an expected type.
267
+ * Note: the expected type can be a combination such as ValueTypes.NUMBER | ValueTypes.STRING or ValueTypes.ANY for instance
243
268
  */
244
- toGlsl: (arg0: ParsingContext, arg1: Array<ExpressionValue>, arg2: ValueTypes | undefined) => string;
269
+ toGlsl: (arg0: ParsingContext, arg1: Array<ExpressionValue>, arg2: ValueTypes) => string;
245
270
  };
246
- import PaletteTexture from "../webgl/PaletteTexture.js";
271
+ import PaletteTexture from '../webgl/PaletteTexture.js';
247
272
  //# sourceMappingURL=expressions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["expressions.js"],"names":[],"mappings":"AAkIA;;;;;GAKG;AACH,oCAHW,eAAe,GACd,UAAU,GAAC,MAAM,CA0C5B;AAED;;;;GAIG;AACH,wCAHW,UAAU,GAAC,MAAM,GAChB,OAAO,CAIlB;AAED;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,gCAHW,MAAM,GACL,MAAM,CAKjB;AAED;;;;GAIG;AACH,mCAHW,MAAM,MAAM,CAAC,GACZ,MAAM,CASjB;AAED;;;;;;GAMG;AACH,mCALW,MAAM,GAAC,OAAO,aAAa,EAAE,KAAK,GAGjC,MAAM,CAYjB;AAED;;;;;GAKG;AACH,mDAJW,cAAc,UACd,MAAM,GACL,MAAM,CASjB;AAED;;;;;;GAMG;AACH,sCAJW,cAAc,UACd,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;;GAOG;AACH,0CALW,cAAc,SACd,eAAe,kCAEd,MAAM,CA0CjB;AAyFD;;;;GAIG;AACH,qDAHW,MAAM,GACL,MAAM,CAIjB;;;;;yBAtTS,MAAM;;;;;;;;;;AAYhB;;;;;;;;GAQG;AAEH;;;GAGG;AACH;QAFiB,MAAM,GAAE,QAAQ;EAEL;AA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