Commit Graph

705 Commits

Author SHA1 Message Date
Andreas Hocevar 1b46f38696 Do not use Array.prototype.forEach for potentially large arrays 2017-07-29 23:16:23 +02:00
Andreas Hocevar dd878e2a4c Remove lint 2017-07-25 10:42:18 +02:00
Guillaume Beraudo 645e359cde Render transparent vector layers to an intermediate canvas
Until now, the features of transparent vector layers were rendered using
the layer opacity. This caused colors to mix together and the opacities
to stack up to an higher value than the expected layer opacity.

With this commit, the features are rendered at 100% opacity to an
intermediate canvas which ensures colors do not mix up even in the case
of features using an array of styles. The intermediate canvas is then
composed to the map canvas using the layer opacity.

Transparent layers are automatically detected, non-transparent layers
are not affected by the change.
2017-07-12 09:23:04 +02:00
Andreas Hocevar 59d8d749e3 Merge pull request #6998 from openlayers/greenkeeper/eslint-4.2.0
Update eslint to the latest version 🚀
2017-07-09 16:52:47 +02:00
Andreas Hocevar cff9ef5e63 Remove lint 2017-07-09 16:11:36 +02:00
Andreas Hocevar 7739239e89 Make VectorTile source work with multiple layers 2017-07-09 14:08:08 +02:00
Andreas Hocevar a0e0e76995 Add missing type annotations 2017-07-06 12:31:57 +02:00
Andreas Hocevar 970265acb0 Give preloaded lower resolution tiles a chance to display immediately 2017-06-29 00:02:24 +02:00
Andreas Hocevar fe18636ff9 Remove lint 2017-06-26 14:56:07 +02:00
Marc Jansen d0ef05977b Autofix indentation issues (eslint --fix) 2017-06-19 11:58:00 +02:00
Frédéric Junod aeed1f79bb Merge pull request #6832 from oterral/fix_5269
Force state of error tiles when usInterimTilesOnError is false
2017-05-24 15:27:11 +02:00
oterral c1abe4a550 Force state of error tiles when usInterimTilesOnError is false 2017-05-22 09:31:07 +02:00
Andreas Hocevar 9af01c515f Make ol.VectorTile#getFeatures and #getProjection exportable 2017-05-16 22:57:03 +02:00
Andreas Hocevar 9b9ac03760 Merge pull request #6796 from ahocevar/rendered-resolution
Re-add accidently dropped condition
2017-05-11 08:55:03 +02:00
Andreas Hocevar 4a6945ac17 Merge pull request #6779 from ahocevar/vector-tile-grid
Decouple source and rendered tile grid of vector tile sources
2017-05-10 19:07:21 +02:00
Andreas Hocevar c9ca9737a7 Re-add condition accidently dropped in 5061555 2017-05-10 19:04:55 +02:00
Andreas Hocevar 50615557d9 Create intermediate canvas when resolutions have changed 2017-05-10 11:58:38 +02:00
Andreas Hocevar 55e3746554 Avoid garbage creation on frame preparation/composition 2017-05-09 14:04:05 +02:00
Andreas Hocevar 785e7135a7 Decouple source and rendered tile grid of vector tile sources 2017-05-09 14:04:04 +02:00
Thomas Chandelle 76ddcd405d Clip image only if the layer extent intersects the view extent 2017-04-10 14:42:57 +02:00
Andreas Hocevar 7db5eea56b Performance improvement: only create context when it is needed 2017-02-14 22:20:38 +01:00
Andreas Hocevar db58db396f Remove renderedResolution which is defined in superclass 2017-02-14 22:19:38 +01:00
Jan Klaas Kollhof b152f06973 Fix rendered.canvas.TileLayer to calculate correct canvas height for drawing. 2017-02-13 13:50:09 +11:00
Andreas Hocevar e561504d27 Save and restore context when rotating 2017-02-10 10:05:07 +00:00
Andreas Hocevar ca23c7337f Merge pull request #6361 from tchandelle/canvas-margin
Remove "margin" at the bottom of the canvas
2017-02-06 14:47:16 +01:00
Thomas Chandelle ade0b7898b Remove "margin" at the bottom of the canvas 2017-02-03 16:54:29 +01:00
Andreas Hocevar ec8d8228cf Less redraws while zooming in 2017-02-02 22:14:01 +01:00
Andreas Hocevar 72af545a4a Avoid oversampling when view resolution lower than tile resolution 2017-02-02 22:13:25 +01:00
Frederic Junod 546fc97cd4 Add abstract tag at class level 2017-01-30 17:16:01 +01:00
Frederic Junod 01e161e19f Remove unused private variable 2017-01-10 08:50:39 +01:00
Tim Schaub 137cdc04c8 Remove ol.DEBUG 2017-01-01 20:37:52 -07:00
Tim Schaub afefe66af8 Make layers responsible for creating layer renderers 2016-12-28 14:09:13 -07:00
Tim Schaub 5b937f02ae Shared module for vector tile render type enum 2016-12-27 13:42:44 -07:00
Tim Schaub 895a506025 Remove state enum from tile constructor 2016-12-27 10:17:26 -07:00
Tim Schaub 3852c0da83 Remove hint enum from view constructor 2016-12-27 10:17:26 -07:00
Tim Schaub 7a95947dbb Dedicated module for render event type enum 2016-12-27 10:17:17 -07:00
Andreas Hocevar 0e55e0625e Use interim tiles 2016-12-21 14:42:12 +01:00
Tim Schaub 35b950cc40 Avoid modifying coordinate in forEachLayerAtCoordinate 2016-12-19 14:00:34 -07:00
Tim Schaub 3a61344b1c Add missing require for ol.View 2016-12-18 15:26:21 -07:00
Andreas Hocevar 3e8c8791d0 Take image pixel ratio into account for rendered resolution 2016-12-14 23:53:44 +01:00
Andreas Hocevar 85f7a7c843 Re-render vector tiles when layer has changed 2016-12-14 14:45:02 +01:00
simonseyock f28e0ebc1f Added hitTolerance parameter to reworked files 2016-12-08 10:21:57 +01:00
simonseyock 00a4f3b410 buffering extent by resolution*hitTolerance 2016-12-08 10:14:09 +01:00
simonseyock eede027417 Added buffer to ol.renderer.canvas.VectorTileLayer#forEachFeatureAtCoordinate
buffering by pointResolution times hitTolerance
2016-12-08 10:14:09 +01:00
simonseyock 5ce0d8aa2a changed signature of internal methods 2016-12-08 10:13:47 +01:00
Andreas Hocevar d854222c4b Fix forEachLayerAtPixel and improve class hierarchy 2016-12-07 19:39:52 +01:00
Andreas Hocevar 93d86e63fc Defer frame preparation when too much time was spent 2016-12-06 08:51:55 +01:00
Andreas Hocevar ee7b894350 Refactor VectorTile renderer and add lower resolution clipping 2016-12-06 08:51:55 +01:00
Andreas Hocevar 2aa4f0c01c Fix forEachLayerAtPixel for the canvas renderer 2016-12-06 08:47:41 +01:00
Andreas Hocevar ccdb955cd9 Simplify canvas tile renderer with image composition 2016-12-06 08:47:40 +01:00