Commit Graph

740 Commits

Author SHA1 Message Date
Olivier Guyot 0732f17fd3 Webgl layer / remove @api tag & better doc
Also the webgl layer now only inherits from the Layer class,
not the VectorLayer one.
2019-09-26 14:42:04 +02:00
Olivier Guyot 34572da17b Webgl shader builder / expanded functionality
Now takes in a custom object with attributes, uniforms etc.
The WebGLPointsLayer uses this to handle image icons.
2019-09-25 17:22:36 +02:00
Olivier Guyot 109f9718f9 Webgl renderer / fix existing examples
The shaders were rewritten manually for those, althoughj eventually they
should use the shader builder utilities as well.
2019-09-25 11:09:07 +02:00
Olivier Guyot 4d7562fca2 Add a new WebGLPointsLayer type using the shader builder utilities
This required adding a `a_index` attribute in the points layer renderer
to be able to make the precomputed shaders to work.
2019-09-24 17:24:56 +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 2c69ad2bb4 Throw on non-numeric opacity values 2019-08-15 12:55:13 -06:00
Tim Schaub 65ad4932f4 Support zoom limits for layers 2019-08-06 21:19:09 -04:00
Frederic Junod 73032db345 Remove unused 'v_screenCoord' from fragment shader 2019-07-03 08:16:37 +02:00
Frederic Junod bb35a03704 Don't rotate the points of the heatmap layer 2019-07-01 11:29:27 +02:00
Frederic Junod ed340d7e2c Remove unused 'resolution' uniform from fragment shader 2019-07-01 10:00:55 +02:00
Kai Volland 83173cd385 Fixes typing issue in VectorTile.js 2019-06-21 13:30:35 +02:00
ahocevar 2df911e0a8 Import options directly instead of importing a typedef 2019-06-04 08:41:08 +02:00
Frederic Junod 50343afa61 Remove unnecessary typecasts in constructors options 2019-06-03 09:08:41 +02:00
ahocevar 6123be726a Handle layer removal on shared containers 2019-06-02 13:59:06 +02:00
Tim Schaub deb00f20fe Include full filename in import specifier 2019-05-29 08:51:10 -06:00
Frédéric Junod c92bf29677 Fix spelling
Co-Authored-By: Tim Schaub <tschaub@users.noreply.github.com>
2019-05-29 09:07:05 +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
Frederic Junod 6b1bce2b9d Add missing className property to BaseTile layer options 2019-05-07 14:54:46 +02:00
Andreas Hocevar 6e3d3d4877 Merge pull request #9466 from ahocevar/declutter-global
Declutter in correct order and for all layers
2019-05-07 14:33:24 +02:00
ahocevar 6c8c8a6477 Fix decluttering on VectorImage layers 2019-05-05 14:54:23 +02:00
ahocevar ba6ac43a28 Fix zIndex handling for unmanaged layers 2019-05-05 13:24:46 +02:00
ahocevar 12289b8ef9 Declutter in correct order and for all layers 2019-05-05 12:20:38 +02:00
Frederic Junod 711dacf4b7 Remove unused private variables, remove trailing whitespaces 2019-04-15 11:31:18 +02:00
Olivier Guyot c6a859d1ed Webgl / clarify premultiplied alpha handling
By default, alpha premultiplying should be done by the initial rendering
(eg quads) and not the final post processing pass.

The default post processing pass expects premultiplied color values and
will not do this operation itself.
2019-04-02 22:12:47 +02:00
Tim Schaub d7905896f7 Merge pull request #9266 from tschaub/vector-image-options
Full type definition for image vector layer options
2019-02-28 21:43:23 -07:00
Frederic Junod 7c7b43ee91 Use the constructor options instead of changing the private variables 2019-02-27 15:11:08 +01:00
Frederic Junod 1338a868e9 Remove setDeclutter function
Changing the declutter value after the layer creating doesn't work, remove the function to avoid confusion.
2019-02-27 11:41:08 +01:00
Tim Schaub 36cf654f09 Full type definition for image vector layer options 2019-02-25 08:37:30 -07:00
Andreas Hocevar 88c213078e Merge pull request #9179 from gberaudo/allow_image_declutter
Allow declutter with image render mode
2019-02-05 20:29:15 +01:00
Guillaume Beraudo 168edac4a6 Allow declutter with image render mode
Using declutter in image render mode is legitimate: each tile is
decluttered, avoiding symbol/text overlaps.
2019-02-05 17:25:00 +01:00
Frederic Junod 0b53a3229b Remove unneeded type cast 2019-02-04 09:58:49 +01:00
Frederic Junod 5318d52036 Use type template for the source type of layers 2019-02-04 09:58:48 +01:00
ahocevar 47679a9686 Document the correct render events 2019-01-31 14:05:10 +01:00
Frederic Junod af8a22d34d Keep two digits for the opacity value in layer state 2019-01-22 12:47:34 +01:00
Frederic Junod 5195adea85 Remove 'layerStates' property from the FrameState 2018-12-18 09:49:38 +01:00
Frédéric Junod bbbed30848 Merge pull request #9044 from openlayers/indent
Fix comments indentation
2018-12-07 13:06:27 +01:00
Frederic Junod 1be17e44a2 Fix comments indentation 2018-12-07 11:57:58 +01:00
Olivier Guyot 2c4a959e55 Generally fixed the webgl heatmap layer
Things done:
- stay closer to the original rendering in canvas
- get rid of the intermediary blur step
- use the new callbacks in the webgl points renderer
- premultiply alpha in the last postprocessing step
2018-12-07 09:02:02 +01:00
jahow 78028893e2 Added missing attributes in PointsLayer
Attributes were used in the shader but not bound to a buffer, which made the
rendering failed in some implementations.
2018-12-01 00:01:55 +01:00
Niklas Alt e73931a9b2 Duplicate @property for style and renderOrder 2018-11-29 16:51:01 +01:00
Tim Schaub 8cea28e102 Add missing full stop in comment
Co-Authored-By: fredj <frederic.junod@camptocamp.com>
2018-11-23 08:24:20 +01:00
Andreas Hocevar d1df9dae0d Pass baseOptions to parent constructor
Co-Authored-By: fredj <frederic.junod@camptocamp.com>
2018-11-22 10:27:29 +01:00
Frederic Junod e66a84c897 Add imageRatio option for VectorImage layers 2018-11-22 09:38:08 +01:00
Frederic Junod cb44775306 Remove leftover comments and code for 'vector' render mode 2018-11-21 16:58:27 +01:00