Commit Graph

103 Commits

Author SHA1 Message Date
Tim Schaub b8c04ee7c5 Store rendererd source on the layer instead of the layer state 2022-03-26 10:18:49 -06:00
Andreas Hocevar 20e352111c Handle layers without renderer properly 2022-02-28 07:36:34 +01:00
Tim Schaub 2526a04f2a Merge pull request #13338 from tschaub/get-layer-data
Get pixel data
2022-02-08 20:46:18 -07:00
Tim Schaub 97a1c196cc Merge pull request #13334 from EvertEt/strictnullchecks-4
Improve some null types for strictNullChecks
2022-02-08 10:32:32 -07:00
Tim Schaub bd86639351 Keep track of when a layer is unrendered 2022-02-08 10:23:55 -07:00
Tim Schaub eb4d5e0784 Get pixel data 2022-02-07 18:35:47 -07:00
EvertEt 25e1d6c5d6 Improve some null types for strictNullChecks 2022-02-06 19:36:30 +01:00
EvertEt 15de4bb5ab Improve some nullable map types
Closes #13326
2022-02-04 17:05:52 +01:00
Andreas Hocevar 94cc414ea2 Defaults for the Layer, Source and Feature generics 2022-01-26 22:40:27 +01:00
Andreas Hocevar 0004b2594d Support multiple sources for layers 2022-01-13 17:42:52 +01:00
Tim Schaub 6f80ba93c8 Add the renderer type to generic layer template variables 2021-11-19 10:56:37 -07:00
Tim Schaub 371bb85350 Add a map property to layers 2021-11-12 17:54:10 -07:00
Tim Schaub a332842540 More cleanup in the WebGL tile layer's dispose method 2021-09-23 12:00:00 +00:00
mike-000 a5ed3ce853 Change Select to Draw to describe unmanaged layers 2021-09-13 10:20:30 +01:00
Simon Seyock ce4f6ccb0d OnSignatures return more specific type 2021-09-10 16:11:38 +02:00
Andreas Hocevar e9e664f3c9 Add typed signature for Observable#un() 2021-07-10 11:28:50 +02:00
Simon Seyock d914006d51 Add signatures for once. 2021-07-10 11:28:49 +02:00
Simon Seyock 1870a64984 Add CombinedOnSignature. 2021-07-10 11:28:49 +02:00
Simon Seyock 7fc664c3fe sources and layers. 2021-07-10 11:28:48 +02:00
Simon Seyock c8f43050c4 Revert "Merge pull request #12416 from ahocevar/eventtype-generics"
This reverts commit b6c143deb2, reversing
changes made to 7777821df5.
2021-07-10 11:28:46 +02:00
Andreas Hocevar 79f5f46d27 Remove lint 2021-06-28 18:10:51 +02:00
Andreas Hocevar b6c143deb2 Merge pull request #12416 from ahocevar/eventtype-generics
Use generics to limit event types in on(), once() and un()
2021-06-21 09:36:25 +02:00
Andreas Hocevar 4dd75d75e3 Merge pull request #12414 from ahocevar/change-event-type
Replace getChangeEventType() with add/removeChangeListener methods
2021-06-21 08:04:23 +02:00
Andreas Hocevar 018ad97f25 Use generics to limit event types in on(), once() and un() 2021-06-20 22:25:47 +02:00
Andreas Hocevar 343e0ffce9 Replace getChangeEventType() with add/removeChangeListener methods 2021-06-19 23:16:26 +02:00
Tim Schaub 2e4b2e10ab Fix additional doc links 2021-06-17 21:59:51 -06:00
Simon Seyock a211666fd8 Added generic source option to layer option types 2021-06-17 18:54:28 +02:00
Andreas Hocevar 432bd7f851 Allow custom properties in the constructor using the properties option 2021-05-24 23:23:51 +02:00
Maximilian Krög 29349d275e Always return Promise from getFeatures 2021-02-24 18:37:30 +01:00
Simon Seyock 2ad5789797 Add descriptions for properties. 2021-02-04 18:19:33 +01:00
Simon Seyock 8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Andreas Hocevar b0f20d6bd6 Use imports for enum types 2020-04-15 10:53:23 +02:00
Tim Schaub 054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Frederic Junod 15d36a22f0 Remove all inheritDoc tags from src/ol/layer 2020-04-03 07:56:58 +02:00
mike-000 d0e439ee80 add minZoom and maxZoom options 2020-02-17 16:55:15 +00:00
Andreas Hocevar 1ee03decdd Assert each layer is only added to the map once 2020-01-24 17:52:13 +01:00
jahow f7b0f6750b Resolve memory leak when deleting a webgl layer
Various references were kept, preventing the layer and underlying
renderer and webgl context to be garbage collected.

Also, the Helper was simplified because it turns out deleting manually
all Webgl objects is useless: these objects will be released when
the context is garbage collected anyway.

Note: this touches the Layer and BaseLayer classes, as the following were
preventing the layer from being garbage collected:
* layer reference in the `state_` object in BaseLayer
* dangling listener for source change in Layer
2019-11-04 09:31:38 +01:00
Andreas Hocevar bb2bdb17aa Render vector tile layers to a single canvas 2019-10-31 20:29:19 +01:00
Andreas Hocevar 315695eeb8 New Layer#getFeatures method with fast hit detection for VectorLayer 2019-10-08 08:23:38 +02:00
Olivier Guyot 167fa6b8a0 Add property to all layers api doc 2019-09-24 10:58:55 +02:00
Olivier Guyot 449686527b Document how to avoid canvas reuse for layers
This restores the `map.forEachLayerAtPixel` functionality.

This is intended to help with openlayers#9720
2019-09-24 09:46:32 +02:00
ahocevar ebfb20440a Simplify events and store listeners only in one place 2019-09-04 16:48:43 +02:00
Tim Schaub 65ad4932f4 Support zoom limits for layers 2019-08-06 21:19:09 -04:00
ahocevar 6123be726a Handle layer removal on shared containers 2019-06-02 13:59:06 +02:00
Frederic Junod 40c49a9ce5 Remove layerState param from prepareFrame and renderFrame function 2019-05-25 07:19:10 +02:00
ahocevar 606443bc6d Pass render target of previous layer to next layer 2019-05-22 15:56:51 +02:00
ahocevar 335648d613 Remove memory leak caused by label cache listeners 2019-05-16 21:04:55 +02:00
Olivier Guyot 4a1cda715d Layer / update doc to reflect custom render function support 2019-05-13 16:22:27 +02:00
Olivier Guyot 14f580fe30 Layer / accepts a custom render function 2019-05-13 16:16:53 +02:00
ahocevar ba6ac43a28 Fix zIndex handling for unmanaged layers 2019-05-05 13:24:46 +02:00