Commit Graph

1200 Commits

Author SHA1 Message Date
Tim Schaub a7737150fe Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-24 22:21:25 -07:00
Tim Schaub 4e3f984796 Properly rendering features to canvas tiles
It looks like this approach will work well for panning (as anticipated).  For animated zooming, it is not going to work as is.  It looks like the canvas tile generation is too much for this type of animation loop.  Though there are clearly still areas for optimization:

 * Don't create new tiles while animating between zoom levels.  Using existing tiles only while animating should bring a significant performance gain.
 * Simple spatial index for tiles - each tile coord in the matrix could have a feature lookup object (keyed by id).  This needs to account for rendered dimension (as witnessed by the point being cut by a tile).  Given that the current example uses only three features, adding the spatial index should only be a minor improvement.
 * Reuse a fixed set of canvas tiles that are generated at construction (and increased/decreased with view size changes).
 * If a fixed set of tiles is not used, at least new ones could be cloned from existing ones (minor).
 * Do some profiling to look for more ideas.

In addition, world-wrapping needs addressed.  I don't think this renderer is the right (or at least the only) place to address this.  And the cache of tiles needs to be managed for real.  But hey, at least we've got a working tiled vector renderer now.
2013-01-24 21:57:12 -07:00
Tim Schaub f2b325b430 Adding convenient tile labels for debugging
This will be removed when behavior is right.
2013-01-24 17:16:54 -07:00
Tim Schaub 033daa425b Reverting b0a7badc8f
I think it's complicating things at this point to deal with this.  Unfortunately, it's not proper dateline wrapping as is (only arbitrary tile range extent wrapping).
2013-01-24 17:15:32 -07:00
Éric Lemoine 98b264e8ce Add comment 2013-01-24 22:31:57 +01:00
Éric Lemoine 80b38e608b No more need for listener keys array 2013-01-24 22:31:53 +01:00
Éric Lemoine 4a64837ba1 Make map handle background color changes 2013-01-24 22:31:08 +01:00
Éric Lemoine 15898b559b Make map handle size changes 2013-01-24 22:31:08 +01:00
Éric Lemoine 71a462cd54 Make map handle view changes
With the frameState stuff the map renderer need not listen to view changes. The map renderer receives orders from the map. These orders are renderFrame_ calls with frameState objects representing the current state.
2013-01-24 22:31:06 +01:00
ahocevar b0a7badc8f Started on proper date line wrapping
What we want in the end is vector tiles repeated just as raster
tiles. This change only avoids repeated tiles with the same
content being rendered and stored in the cache.
2013-01-24 17:29:21 +01:00
Tom Payne 8cac270234 Use + rather than Number for string to number conversion 2013-01-24 16:31:56 +01:00
ahocevar fe605ceebb Better, but still not all the way there 2013-01-24 16:21:30 +01:00
Tim Schaub 9bd1ab99d1 Toward tiled vector rendering 2013-01-24 02:06:40 -07:00
ahocevar 4a54cc69ce Tiled vector rendering
This needs more work still - see inline TODOs. It also has a
major bug - rendered vector features do not scale and do not
change their offset during panning. So only the initial view is
correct.
2013-01-23 21:37:06 +01:00
Tom Payne 0d7196c098 Expire old textures from texture cache 2013-01-23 19:59:02 +01:00
Tom Payne b770aaa2f5 Add tile cache expiry infrastructure 2013-01-23 14:31:24 +01:00
Tim Schaub 35f6984e69 Unused var and some notes 2013-01-22 11:21:35 -07:00
Tom Payne 4ab09d6df2 Merge pull request #140 from twpayne/array-clean-ups
Array clean ups
2013-01-22 06:00:04 -08:00
ahocevar 4e6b864e27 Making default symbolizers compiler safe 2013-01-22 14:09:04 +01:00
Tim Schaub c50fcecf42 Vector rendering example
There is a ton of room for optimization here.  The vector layer renderer should only render dirty areas and could maintain a cache of rendered canvas tiles.  The vector source could have a simple spatial index for features (by tile coord).  Need to also discuss how to work with this animation framework (to avoid the excess work while waiting for tiles to load on every other layer).
2013-01-22 01:46:27 -07:00
Tim Schaub 1dd17fc88f Rendering vector layers 2013-01-22 01:36:32 -07:00
Tim Schaub 0f33561af2 Skeleton canvas renderer for vector layer 2013-01-21 18:02:28 -07:00
Frédéric Junod 9969a64d81 Merge pull request #143 from fredj/get-renderer-canvas
Get renderer canvas
2013-01-21 07:09:18 -08:00
Tom Payne c0ef84fd5d Remove stale dependencies 2013-01-21 16:07:06 +01:00
Frederic Junod 2f2ea373ca Add ol.renderer.Map.getCanvas function. Only valid with the canvas and webgl renderers 2013-01-21 15:18:18 +01:00
Tom Payne 386bb636bb Add missing dependencies on goog.array 2013-01-21 14:20:11 +01:00
Tim Schaub 497eac82c2 Polygon rendering (no holes yet) 2013-01-19 17:50:04 -07:00
Tom Payne 4846a6a7b3 Only update wanted tiles if not all tiles are loaded 2013-01-19 15:03:01 +01:00
Tom Payne 3ec2014ad1 Rename tileUsage to usedTiles 2013-01-19 15:03:01 +01:00
Tom Payne 1c524caae6 Discard unwanted tiles from tile queue 2013-01-19 15:03:01 +01:00
Tom Payne 111b4585a8 Fix key usage 2013-01-19 14:50:25 +01:00
Tim Schaub 0414e337b3 Render lines 2013-01-18 17:57:32 -07:00
Tim Schaub 140e9ba355 General purpose canvas renderer
Currently only renders points as circles.  Eventually will have methods for other geometry types and other symbolizer types.  Also provides static methods to render point symbolizers (returning a canvas that can be drawn on another).
2013-01-18 17:42:12 -07:00
Tim Schaub 278d32061f To be reworked for rendering like geoms with same symbolizer 2013-01-18 15:55:24 -07:00
Tim Schaub 3ac437393a To be reworked as ol.renderer.canvas.VectorLayer 2013-01-18 15:54:48 -07:00
Peter Robins 11938d2264 Add missing dependencies, refs #116 2013-01-18 13:01:10 +01:00
Tim Schaub 74281d2b00 Merge from master 2013-01-17 18:12:06 -07:00
Tim Schaub fe56b15c52 Clear canvas with opacity 1 2013-01-17 15:30:16 -07:00
Tim Schaub 10672ad303 Standardizing color ranges (see #129) 2013-01-17 14:19:50 -07:00
Tim Schaub b36eab1dfa Properly set transform before filling background (closes #128)
Order of args is m11, m12, m21, m22, dx, dy
2013-01-17 13:40:00 -07:00
Tom Payne 54327fb750 Add canvas renderer 2013-01-17 13:54:52 +01:00
Tom Payne 04b18a8a83 Merge pull request #121 from twpayne/attribution-control-refactoring
Attribution control refactoring
2013-01-17 04:46:57 -08:00
Tom Payne 4657b7ca97 Remove removeLayer, thanks @fredj 2013-01-17 12:40:54 +01:00
Tom Payne c56e1f8b92 Ensure DOM element is removed when layer is removed 2013-01-17 12:12:09 +01:00
Tom Payne b880ab80ee Factor out updateTileUsage 2013-01-17 11:51:38 +01:00
ahocevar 8a38f9aa9d Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-16 16:34:59 +01:00
Tom Payne 9fbabc3696 Refactor attribution control 2013-01-16 16:34:31 +01:00
Tom Payne c679bccbb9 Join short lines 2013-01-14 20:53:00 +01:00
Tom Payne 183aac90fa Remove unused requires 2013-01-14 20:52:47 +01:00
Tom Payne 8966e17b89 Structure DOM renderer code to be more similar to WebGL renderer code 2013-01-14 16:33:15 +01:00