Commit Graph

231 Commits

Author SHA1 Message Date
mike-000 27a9f056e0 remove deprecated imageSmoothing 2022-08-03 13:25:43 +01:00
MoonE 15329aad00 Merge pull request #13915 from MoonE/fix-map-render-test
Fix map render test
2022-07-31 21:17:42 +02:00
Maximilian Krög e3987dfdbf Fix Map render test
The value set to id2 was never read, postrender fires in renderSync
2022-07-31 20:04:59 +02:00
Maximilian Krög b2d2f44f43 No need to wait for postrender in Map test 2022-07-31 20:04:55 +02:00
Tim Schaub 85ef563ba8 Remove PluggableMap 2022-07-31 10:08:13 -06:00
Maximilian Krög 417753422e Remove unused 2nd parameter for querySelector call
I guess the intention was to only serch for nodes contained in the
2nd parameter. That should have been `node.querySelector('...')`
but it doesn't matter in the test environment.
2022-07-31 02:23:35 +02:00
Maximilian Krög c90c4c84c5 Remove MousePosition's deprecated undefinedHTML option
Simplify the placeholder option to only accept strings or undefined.
2022-07-31 02:23:35 +02:00
MoonE e17640c95a Merge pull request #13905 from MoonE/replace-enums
Replace enums with typedefs
2022-07-30 18:12:34 +02:00
Tim Schaub ab48290bd7 Accept an object literal for static layer styling 2022-07-30 09:48:10 -06:00
Maximilian Krög 2caa071a08 Replace MouseWheelZoom Mode enum with typedef 2022-07-30 15:06:12 +02:00
Maximilian Krög 361f1ab837 Replace VectorTileRenderType enum with typedef 2022-07-30 15:06:12 +02:00
Tim Schaub 55e3ed6f74 Merge pull request #13893 from tschaub/grat
Omit minutes and seconds from HDMS formatting if zero
2022-07-28 13:47:29 -06:00
Tim Schaub 25d47ed752 Use Object.assign 2022-07-28 13:23:16 -06:00
Tim Schaub 82dfba2520 Omit minutes and seconds if zero 2022-07-28 08:13:05 -06:00
Tim Schaub 70acfc99e5 Merge pull request #13892 from tschaub/unused-worker
Remove unused worker
2022-07-27 18:10:04 -06:00
Tim Schaub 1dc4f85ed1 Merge pull request #13887 from tschaub/array-find
Remove find and findIndex from array module
2022-07-27 18:09:42 -06:00
Tim Schaub c9b2b3d76a Remove unused worker 2022-07-27 15:51:34 -06:00
Tim Schaub 641bd7af33 Use Object.values 2022-07-27 15:03:47 -06:00
Tim Schaub 157bdc5208 Use Array.prototype.find 2022-07-27 13:57:35 -06:00
Maximilian Krög 2897f03ea5 Remove deprecated method PluggableMap#forEachLayerAtPixel 2022-07-26 00:57:21 +02:00
Olivier Guyot 7d56c56210 Merge pull request #13461 from jahow/webgl-shape-renderer
WebGL vector renderer for polygons, lines and points
2022-07-22 10:05:31 +02:00
Andreas Hocevar a1d68b4f66 Fix reloading tiles in case of an error with tile.load() 2022-07-21 23:23:40 +02:00
Tim Schaub 7e424be66b Only pass the feature to the attribute getter 2022-07-21 13:49:06 -07:00
Tim Schaub 5182b16452 Private if not used elsewhere; underscore suffix only if private 2022-07-21 13:03:10 -07:00
Maximilian Krög 62e335ceda Replace IconOrigin enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög 7ec2725c1e Replace IconAnchorUnits enum with typedef 2022-07-19 23:24:25 +02:00
Maximilian Krög 185485b0f7 Replace GeometryLayout enum with typedef 2022-07-19 23:24:22 +02:00
Andreas Hocevar 69ae6c85cf Merge pull request #13835 from ahocevar/source-state
Recover from incorrect rebase after removal of string enums
2022-07-18 22:42:58 +02:00
Andreas Hocevar 085fca6a9f Merge pull request #13832 from mike-000/vector-tile-grids
Base vector tile render tile grid on the source grid
2022-07-18 10:07:52 +02:00
Andreas Hocevar 4fec8d4615 Recover from incorrect rebase after removal of string enums 2022-07-18 09:42:52 +02:00
mike-000 8dcb78bcd9 Base render tile grid on the source grid
Use source zDirection for both grids
2022-07-16 10:06:42 +01:00
Olivier Guyot 998dc82592 fixes after rebase 2022-07-15 22:53:48 +02:00
Olivier Guyot f603ce7456 WebGL / Support DPR > 1 in linestring shader
A u_pixelRatio uniform was added to be used in the shaders. this is necessary
since we're relying on the builtin gl_FragCoord vector, which will be scaled
relative to the u_sizePx uniform in case of a device pixel ratio != 1.

Also added tests for computed uniform values, instead of just testing
that they were indeed set.
2022-07-15 22:33:52 +02:00
Olivier Guyot 9e35acaa0a Adapt the batch renderers to trigger a repaint after buffer rebuild 2022-07-15 22:33:52 +02:00
burleight 8769ea519e WebGL / render multiple worlds to wrap X in vector renderer
From https://github.com/jahow/openlayers/pull/1

Adds logic in WebGLVectorLayerRenderer to handle multiple worlds visible at once.

Co-authored-by: Tomas Burleigh <t.burleigh@gmail.com>
Co-authored-by: Olivier Guyot <olivier.guyot@camptocamp.com>
2022-07-15 22:33:52 +02:00
Olivier Guyot 7e9c620914 Fix linting and typechecking errors 2022-07-15 22:33:52 +02:00
Olivier Guyot a2ba7ecaa7 Make some adaptations to the PointsLayer renderer to make it work 2022-07-15 22:33:52 +02:00
Olivier Guyot cfaf9a14e5 Rework a bit the webgl helper to allow having several programs
Without this, doing render passes with different programs using one
helper instance was not really doable
2022-07-15 22:33:52 +02:00
Olivier Guyot 7892c31715 Adapt the WebGL worker to use the new buffer generation utils 2022-07-15 22:33:52 +02:00
Olivier Guyot 143c19ca03 Add utils for generating webgl buffers from lines and polygons
Uses @mapbox/earcut for polygon (what else), and a home made logic for lines
2022-07-15 22:33:52 +02:00
Olivier Guyot a18ffaed54 Move webgl utils out of ol/renderer/webgl/Layer module into their own module 2022-07-15 22:33:52 +02:00
Olivier Guyot eb0db9e3df Introduce batch renderers for each type of geometry
Batch renderers are responsible for generating render instructions and
interacting with the worker to obtain the final webgl buffers
2022-07-15 22:33:52 +02:00
Olivier Guyot b5fbed5437 Introduce MixedGeometryBatch for webgl rendering
This class keeps an up-to-date list of line, polygon and point geometries
to render as well as vertices counts, geometries count, rings count etc.
2022-07-15 22:33:52 +02:00
Andreas Hocevar 884c0c6129 Resolve conflicts 2022-07-15 10:51:08 +02:00
Tim Schaub 9a6f8493fb Use union instead of enum for geometry type 2022-07-15 10:48:37 +02:00
Tim Schaub 04ad0e0c5a Additional uses of new source state type 2022-07-15 10:46:44 +02:00
mike-000 4271dcc5b5 Include displacement and declutterMode in clone 2022-06-30 23:08:37 +01:00
Andreas Hocevar 6dcc583e06 Add tests to ensure correct pointer tracking 2022-06-16 14:36:17 +02:00
Andreas Hocevar 04ffcbfd08 Fix source band calculation when configured with multiple sources 2022-06-13 14:35:16 +02:00
Andreas Hocevar 9b6f94e194 Merge pull request #13745 from hargasinski/fix-modifying-polygons
Fix modifying polygons with overlapping vertices
2022-06-12 13:44:15 +02:00