Commit Graph

1291 Commits

Author SHA1 Message Date
Andreas Hocevar 08af207724 Add decluttering for images and text 2017-10-31 11:33:48 +01:00
Andreas Hocevar dbeb3d2795 Only render parts of source tile that are needed for the view tile 2017-10-31 11:33:48 +01:00
Tim Schaub 55b5d0c719 Merge pull request #7327 from tschaub/tile-management
Prune the tile cache after updating a source's URL
2017-10-09 17:01:12 -06:00
Tim Schaub 5558994827 Merge pull request #7333 from waxenegger/pluggable_calling
Pluggable Map/Layers - function calls to handles and create
2017-10-09 16:59:59 -06:00
Harald Waxenegger 01b17de36d access functions via bracked/string to avoid compilation mangling 2017-10-09 15:23:56 +10:00
Tim Schaub 2dd8fdb5b7 Reworked attribution handling 2017-10-08 20:29:02 -06:00
Tim Schaub c692b98fa9 Maintain rendering order in the LRU cache 2017-10-08 08:51:09 -06:00
Tim Schaub ad4a258c87 Only clear the canvas when needed 2017-10-06 09:12:52 -06:00
Tim Schaub 68a1a497b0 Don't look for alt tiles if alpha is 1 2017-09-27 11:55:45 -06:00
Tim Schaub 8033e25663 Vector tile rendering requires canvas to be cleared 2017-09-27 11:55:45 -06:00
Tim Schaub 79e9dc8128 Render the view resolution tiles last 2017-09-27 11:55:45 -06:00
Tim Schaub 0f53d04361 Only clear canvas when necessary, add tests 2017-09-27 11:55:45 -06:00
Tim Schaub ecc2a9059e Check for alt tiles when in transition, always prefer higher z 2017-09-27 11:55:45 -06:00
Tim Schaub f7bfee8497 Ensure tile transitions complete 2017-09-27 11:55:45 -06:00
Tim Schaub 16e6d13700 Make tile transitions configurable 2017-09-27 11:55:45 -06:00
Tim Schaub 76726a3a6f Render tiles with an opacity transition 2017-09-27 11:55:45 -06:00
Andreas Hocevar efc86d59b0 Implement text rendering along paths
This commit also changes the TextReplay.drawText() signature, and moves
geometry calculation into drawText(). This improves performance where no
text needs to be rendered (TextStyle.getText() == ''), which is used often
in applications.
2017-09-11 16:54:27 +02:00
Andreas Hocevar c15aa414bd Fix hit detection for image layers 2017-09-06 07:33:07 +02:00
Tim Schaub f77c9180a0 Merge pull request #7209 from tschaub/work-with-z
Remove grid.getTileRangeForExtentAndResolution()
2017-09-02 15:14:17 -06:00
Tim Schaub 5e6a4e8cb7 Avoid unnecessary calls to tileGrid.getZForResolution() 2017-09-02 14:34:08 -06:00
Andreas Hocevar ba3570a268 Remove unnecessary array creation 2017-09-01 13:56:14 +02:00
Andreas Hocevar 6469d3e864 Handle pixelRatio on replay creation instead of replay 2017-08-31 21:41:07 +02:00
Andreas Hocevar 35bd92b713 Prerender labels and cache them as images 2017-08-31 21:41:07 +02:00
Andreas Hocevar cf8c72c992 Fix provide/require structure for autogenerated shader files 2017-08-29 23:11:24 +02:00
Andreas Hocevar 4b4f383043 Transform tile-pixels coordinates only once
This allows us to simplify the vector tile renderer significantly, because
there are no more coordinates that need special tile-pixel handling.
2017-08-28 19:32:16 +02:00
Andreas Hocevar 5161a99925 Remove ol.ENABLE_WEBGL condition from webgl files 2017-08-17 13:21:53 -04:00
Andreas Hocevar 44558b7c89 Merge pull request #7125 from ahocevar/remove-error-vector-tiles
Do not try to render error tiles from VectorTile source
2017-08-15 16:34:16 -04:00
Tim Schaub 8a08ab6463 Correct types 2017-08-15 15:37:37 -04:00
Tim Schaub 8e90976bf2 Indentation fix 2017-08-15 15:37:37 -04:00
Tim Schaub cada78459f Only use WebGL renderer if ol.has.WEBGL 2017-08-15 15:37:37 -04:00
Tim Schaub 9271df7e1d Pluggable renderers 2017-08-15 15:37:37 -04:00
Andreas Hocevar ee81a5e817 Do not try to render error tiles from source 2017-08-14 10:18:03 -04:00
Andreas Hocevar 992cf2b2d6 Fix hit detection for overzoomed vector tiles 2017-08-13 22:53:58 -04:00
Tim Schaub ff9ef481db Merge pull request #7064 from ahocevar/no-foreach
Do not use Array.prototype.forEach when dealing with potentially large arrays
2017-08-09 13:59:49 -06:00
Andreas Hocevar d4d371a4c2 Remove the tilePixelRatio option from ol.source.VectorTile 2017-08-03 00:20:29 +02:00
Andreas Hocevar b3be7e7ba9 Get tilePixelRatio from MVT tiles 2017-08-02 20:11:14 +02:00
Andreas Hocevar 1b46f38696 Do not use Array.prototype.forEach for potentially large arrays 2017-07-29 23:16:23 +02:00
Andreas Hocevar c6b942f185 Allow styles to configure a custom renderer
Two new examples show how custom renderers can be used to render text along
paths, and to declutter labels using 3rd party libraries.
2017-07-29 17:57:38 +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 4a0f97ac6a Merge pull request #6988 from ahocevar/vectortile-types
Add missing type annotations
2017-07-06 16:53:23 +02:00
Andreas Hocevar a0e0e76995 Add missing type annotations 2017-07-06 12:31:57 +02:00
Andreas Hocevar 4f0bfbc1db Merge pull request #6970 from cmortazavi/patch-1
Fix Bug when adding/removing layer with no cache
2017-07-03 20:34:13 +02:00
cmortazavi db63cc1b23 Fix Bug when adding/removing layer with no cache 2017-07-02 09:34:14 +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 feabb6440d Add reindented shader sources 2017-06-20 11:45:48 +02:00