Commit Graph

760 Commits

Author SHA1 Message Date
Andreas Hocevar 9f43716723 Merge pull request #4596 from ahocevar/tile-key
Use consistent tile coordinate keys
2016-01-04 19:27:47 +01:00
Petr Sloup 767ac44e99 Make ol.source.Tile#getTilePixelRatio work for all sources
Even for sources which serve dynamic tile sizes based on devicePixelRatio
2015-12-28 13:19:03 +01:00
Andreas Hocevar 300b5cad44 Use consistent tile coordinate keys
Tile coordinate keys from ol.tilecoord.toString() are different than the ones
from Array.prototype.toString(). Both were used, potentially causing problems.
This change makes them consistent and removes the now unnecessary
ol.tileCoord.toString() function.
2015-12-27 17:59:51 +01:00
Andreas Hocevar 38bb1569af Remove no longer needed buffer for direct rendering 2015-12-18 00:27:42 +01:00
Andreas Hocevar 9affb99899 More sensible split between direct and canvas rendering 2015-12-17 10:58:35 +01:00
Andreas Hocevar 80f10ce824 Avoid unnecessary calculation in loops 2015-12-17 00:17:28 +01:00
Andreas Hocevar 4f2df30f1d Avoid clipping by rendering tiles with rotated labels
This only works when the device pixel ratio is 1. Labels are incorrectly
positioned and not at all rotated for other pixel ratios. I cannot find the
cause for this problem.
2015-12-17 00:17:27 +01:00
Andreas Hocevar c1b16217f2 Conditionally render tiles to a separate tile canvas
Because clip geometries are anti-aliased in most browsers, there will be tiny
gaps between tiles. If tiles are rendered to a tile canvas which is then drawn
to the map canvas upon composition, these gaps can be avoided. For rotated
views, it is stil necessary to clip the tile, but in this case a 1-pixel
buffer is used.

This change also brings a huge performance improvement for panning, because
the fully rendered tiles can be reused.

Because of the added cost of using drawImage in addition to replaying the tile
replay group, we fall back to directly drawing to the map canvas when the tile
canvas would be too large, or during interaction/animation when resolution or
rotation change.
2015-12-17 00:17:27 +01:00
Bart van den Eijnden 25e0053a13 Rename defaultSort to numberSafeCompareFunction on ol.array 2015-12-16 13:40:05 +01:00
Bart van den Eijnden e0be143ed5 Always pass on a compare function to sort 2015-12-16 10:54:46 +01:00
Frederic Junod a4fb2501d8 Remove use of goog.array.sort
Fixes #4160
2015-11-19 16:53:11 +01:00
Frederic Junod bfd33becbc Remove unused local variables 2015-11-17 10:20:40 +01:00
Frederic Junod 764875147a Remove unused local variables 2015-11-17 09:57:56 +01:00
Éric Lemoine f5a148e6b3 Merge pull request #4389 from elemoine/dynamic-params
Smooth transitions on parameter changes
2015-11-13 08:41:42 +01:00
Tim Schaub a8a796f922 Merge pull request #4410 from openlayers/v3.11.x
Merge in changes from the 3.11.1 release.
2015-11-12 16:53:41 -07:00
Andreas Hocevar c5f4710b8d Revert "Merge pull request #4344 from bartvde/issue-2844"
This reverts commit e5c44b37c9, reversing
changes made to 7f4c6e3634.
2015-11-12 19:17:07 +01:00
Éric Lemoine 132861e175 Use interim tiles when changing dynamic parameters 2015-11-12 14:40:35 +01:00
Tim Schaub e8c99e4e63 Allow style function to return a style 2015-11-11 17:21:24 -07:00
Bart van den Eijnden 979342091a Support different resolutions in x and y direction for ol.source.ImageStatic 2015-10-30 19:27:31 +01:00
Andreas Hocevar 5d264d2bf0 Remove right-handed polygon handling in renderer
Since ol.render.Feature assumes right-handed polygons anyway, this
extra optimization is not needed.
2015-10-28 10:29:04 +01:00
Andreas Hocevar 5832943773 Make changes suggested during the review 2015-10-28 10:29:04 +01:00
Andreas Hocevar 2b2ac47b1f Remove ol.source.TileVector 2015-10-28 10:29:04 +01:00
Andreas Hocevar 80fa26ddd8 Reduce the use of goog.* 2015-10-28 10:29:03 +01:00
Andreas Hocevar 656023e569 Use new createLoadedTileFinder signature
The signature of this method was changed with the introduction of
raster reprojection.
2015-10-28 10:29:03 +01:00
Andreas Hocevar 0e8e104a2d Handle righthanded polygons in format, not source 2015-10-28 10:29:02 +01:00
Andreas Hocevar 29b64d8628 Improve readability and reduce garbage creation 2015-10-28 10:29:02 +01:00
Andreas Hocevar bda3a6803c Use tiles with lower or same resolution as view 2015-10-28 10:29:02 +01:00
Andreas Hocevar 9df280a884 Handle dirty tiles properly 2015-10-28 10:29:02 +01:00
Andreas Hocevar 6e2f82c397 Introduce ol.render.Feature 2015-10-28 10:29:02 +01:00
Andreas Hocevar dbedbc19ee Create replay group for the tile's native resolution only 2015-10-28 10:29:01 +01:00
Andreas Hocevar 4b942bc4f6 Add VectorTile renderer 2015-10-28 10:29:01 +01:00
Petr Sloup ed1e49045a Allow different source and view projection in image layer renderers
To enable image layer reprojection.
2015-10-16 09:28:41 +02:00
Petr Sloup e0cfa1951a Add projection parameter to ol.source.Tile#forEachLoadedTile 2015-10-16 09:28:41 +02:00
Frederic Junod ef9b64673e Remove unused local variables 2015-10-01 13:38:55 +02:00
Marc Jansen 138adf0509 Remove goog.isNull in renderer classes 2015-10-01 09:17:14 +02:00
Tim Schaub 6bdacced92 Merge pull request #4176 from tschaub/remove-isdefandnotnull
Remove use of goog.isDefAndNotNull().
2015-10-01 00:05:57 -06:00
Tim Schaub ed3dcd636f Replace !goog.isDefAndNotNull() with falsey checks 2015-09-29 09:32:51 -06:00
Tim Schaub ac7db89a91 Replace goog.isDefAndNotNull() with truthy checks 2015-09-29 09:32:51 -06:00
Frederic Junod d2dd7584d8 Remove use of goog.object.getKeys 2015-09-29 14:24:34 +02:00
Frederic Junod 496cece074 Remove use of goog.array.forEach 2015-09-29 10:55:17 +02:00
Frederic Junod 9e2a393426 Remove use of goog.array.map 2015-09-29 10:54:55 +02:00
Tim Schaub 29a1ea9ae3 Remove remaining goog.isDef() calls 2015-09-27 11:13:58 -06:00
Tim Schaub e3951fa3c6 Inline simple goog.isDef() calls 2015-09-27 10:34:44 -06:00
Tim Schaub 6638ae855d Inline simple !goog.isDef() checks 2015-09-27 10:23:30 -06:00
Tim Schaub b36d697585 Inline goog.isDef() property checks 2015-09-27 10:21:50 -06:00
Guillaume Beraudo 3811228ac7 Add Z-index to layers
This commit allows setting a z-index property on the layers and uses
it in the canvas, WEBGL and DOM map renderers for ordering the layers
before rendering.

Default z-index is 0 for managed layers and 1000 for unmanaged ones.
It allows always on bottom, always on top and more complex layer layouts.
2015-09-03 11:31:57 +02:00
Andreas Hocevar 86d9d691e4 Merge pull request #3806 from ahocevar/clip-wrapx
Do not clip canvas for vector layers when wrapping the world
2015-07-03 10:47:45 +02:00
Andreas Hocevar 7463a58066 Do not clip canvas for vector layers when wrapping the world 2015-06-19 14:55:20 +02:00
Andreas Hocevar f645a9e1e4 Make unmanaged vector layers behave more like ol.FeatureOverlay
* Skipped features need to be hit-detected on unmanaged layers.
* updateWhileAnimating and updateWhileInteracting are recommended to
  achieve the same instant visual feedback that ol.FeatureOverlay had.
2015-06-19 13:06:29 +02:00
Andreas Hocevar 817370a65b Use 'managed' instead of 'unmanaged' in LayerState 2015-06-11 18:34:20 +02:00