Commit Graph

155 Commits

Author SHA1 Message Date
Tom Payne fe03ebe99c Re-use ol.Extent objects 2013-04-09 19:19:45 +02:00
Tom Payne e556c87a7c Re-use ol.TileRange objects 2013-04-09 19:19:20 +02:00
Tom Payne 8da1f3400b Use high resolution tiles in Canvas renderer 2013-04-09 13:15:16 +02:00
Tom Payne e132943eef Use goog.asserts.fail 2013-04-08 19:14:16 +02:00
Tom Payne f1cc5b87da Fix whitespace errors in JavaScript source 2013-04-08 13:25:01 +02:00
Tom Payne 4be8c991f7 Add missing Closure Library requires 2013-04-06 14:28:12 +02:00
Tom Payne da1e5aadd3 Factor out css.js and fix requires 2013-04-05 20:59:16 +02:00
Tom Payne 5680b89c48 Update logos in renderers 2013-04-05 18:27:51 +02:00
Tom Payne 02196c94b5 Redefine ol.Coordinate to be Array.<number> 2013-04-05 12:30:37 +02:00
Frederic Junod cade8eaf7e Remove unused local variable 2013-04-05 11:59:07 +02:00
Marc Jansen 6ca21b32a9 More renames as suggested by @elemoine. 2013-04-04 10:25:11 +02:00
Éric Lemoine e128bab625 Do not pass tile grid to getTile and tileUrlFunc
getTile and the tileUrlFunc are functions of the source, so they do need to be passed the tile grid. The tile source knows its tile grid, and can get the projection's tile grid if it doesn't have a tile grid.
2013-04-02 11:12:43 +02:00
Tom Payne 494d61250e Make tile pre-loading a per-layer option 2013-03-27 14:34:29 +01:00
Tom Payne 62877fdf02 Reuse ol.Size object 2013-03-25 11:54:50 +01:00
Tom Payne 4e883b7099 Don't shrink canvas 2013-03-25 11:54:50 +01:00
Tom Payne 6cfe918501 Merge pull request #428 from twpayne/gc-optimizations
GC optimizations
2013-03-25 03:54:15 -07:00
Tom Payne 65e6ed3485 Rename getTileZXY to getTile 2013-03-25 10:10:03 +01:00
ahocevar 560f645384 Merge pull request #420 from ahocevar/icon-defer
Don't create tile if rendering needs to be deferred. r=@bartvde
2013-03-25 02:04:50 -07:00
Tom Payne dfb631a08f Replace getTile with getTileZXY
This massively reduces the number of temporary ol.TileCoord objects.

Previously an ol.TileCoord object was generated for every potentially
visible tile at the current zoom level and lower, every frame.  This
commit eliminates all of those.  Now new ol.TileCoord objects are only
allocated when a new tile is created.
2013-03-24 15:24:49 +01:00
ahocevar 28f29e9d40 Don't create tile if rendering needs to be deferred
Rendering vector tiles with mixed geometry types does not work
as expected, because the tile is created without the geometries
that need another rendering pass because of missing icons. This
was discovered by @bartvde when working on the KML parser, where
mixed geometry types are common.

This change fixes the issue by breaking out from rendering
entirely when renderFeaturesByGeometryType returns a deferred
state. In addition, there was a related bug because icons are
added to the cache regardless of its loaded state. This is also
fixed now.
2013-03-23 11:34:38 +01:00
Tom Payne 80df629319 Premptively load low resolution tiles 2013-03-22 21:02:09 +01:00
Tom Payne e3abe376f1 Remove ol.source.TileSource.useLowResolutionTiles 2013-03-22 21:02:06 +01:00
Éric Lemoine a12d10e912 Merge pull request #409 from elemoine/tilequeue
Tile renderers needn't listen for tile change
2013-03-22 09:17:46 -07:00
Jeff Williams 97879a3572 remove descriptions from JSDoc type tags 2013-03-21 09:54:52 -07:00
Éric Lemoine 1d575309da Tile renderers needn't listen for tile change 2013-03-21 10:29:01 +01:00
Tim Schaub 825a6d65e8 Properly maintain dirty state during animation
The previous logic assumed that if there were any tiles to render, the dirty state should be false.  The correct logic is to say that if we don't render during animation, dirty is true.
2013-03-19 07:27:59 -06:00
Frederic Junod bce9e9d0de Fix typecast
Fix JSC_MISPLACED_TYPE_ANNOTATION warnings with the plovr 2013 release
candidate (http://plovr.com/plovr-2013-rc.jar)
2013-03-14 15:59:21 +01:00
Bruno Binet 9b1c389c80 Remove unused goog.require directives 2013-03-14 11:39:43 +01:00
ahocevar 84154d7bb2 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-12 13:27:41 +01:00
Marc Jansen 06f8d1356d Merge pull request #352 from marcjansen/unselectable-css-const
Use constant for CSS class 'ol-unselectable'.
2013-03-12 03:30:38 -07:00
Marc Jansen 5e5e4d110a Use constant for CSS class 'ol-unselectable'. 2013-03-12 10:34:49 +01:00
ahocevar acd4f50f15 Making the linter happy 2013-03-12 10:23:38 +01:00
ahocevar eeecd424bf Moving vector rendering to ol.renderer.canvas.VectorRenderer 2013-03-12 10:05:47 +01:00
ahocevar fad036aa53 Merge branch 'master' of github.com:openlayers/ol3 into vector
Conflicts:
	src/objectliterals.exports
2013-03-12 08:39:16 +01:00
Tom Payne 8b5194da38 Merge pull request #338 from twpayne/snap-center-to-pixel2
Snap center to pixel
2013-03-11 08:41:28 -07:00
ahocevar a66f26f839 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-11 15:21:01 +01:00
Tom Payne c01068642b Use snapCenterToPixel in Canvas renderer 2013-03-10 16:14:01 +01:00
Tom Payne b729f969a7 Add EMPTY tile state instead of using null for empty tiles 2013-03-08 14:41:14 +01:00
Tim Schaub 4422e3e73b Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-07 23:10:06 -07:00
Tim Schaub faee18bae1 Use fillColor and strokeColor instead of fillStyle and strokeStyle
The color names are more intuitive.  And if we want to support pattern strokes or fills, we'll need additional proerties to represent other pattern properties.
2013-03-07 22:51:14 -07:00
Tim Schaub f93bf2ad77 Avoid filling/stroking parts of multi-polygons twice 2013-03-07 21:39:34 -07:00
Tim Schaub db4e62477d Nicer caps and joins
As mentioned in the TODOs, caps and joins should be user configurable on the symbolizers.
2013-03-07 10:37:48 -07:00
ahocevar 5af71a488a No need to continue rendering when we need to defer 2013-03-07 18:13:22 +01:00
ahocevar f4a16e7f57 Collect features before rendering to the sketch canvas
This avoids features being rendered multiple times when they
cross tile borders. Currently this makes the style-rules.html
example extremely slow. Fix for that to come in my next commit.
2013-03-07 16:57:22 +01:00
ahocevar f0039ee460 Additional index dimension for RTree; use RTree again
The RTree can easily maintain an additional index dimension,
by passing a type with each added item. Now instead of
maintaining an RTree for each geometry type, we have a single
RTree with a type filter. With this change, using the RTree
finally speeds up rendering as expected.
2013-03-07 14:36:09 +01:00
Éric Lemoine f55423d575 Register change listeners for loading tiles only
With this commit we register a change listener at a time when we are guaranteed that the listener will be called. In this was we don't need to remove listeners when the tile is dropped from the tile queue. And to avoid busy-polling between IDLE and LOADING we rely on the map to call requestRenderFrame when new tiles change to LOADING from IDLE.
2013-03-07 11:03:20 +01:00
Tim Schaub 84527c4b56 Disable bbox filtering for now
The RTree doesn't appear to be performing properly
2013-03-06 19:07:26 -07:00
Tim Schaub 2e4dc430e9 Render multi-part geometries
As noted in the comment, filtering/rendering once per geometry type will be replaced by rendering once per symbolizer type.
2013-03-06 19:06:41 -07:00
Tim Schaub 00fa7ff3a9 Listen for layer changes and expire tiles
We need a more flexible event system.  We could have a VectorLayerEvent type and dispatch 'featuresadded' here.  But listeners want features typically and perhaps extent.  This won't be true for all vector layer events (suggesting a more specific VectorFeatureEvent type or something).
2013-03-06 19:05:35 -07:00
Tim Schaub 7c4c3c547c Draw multi-part geometries
Polygons still need holes.
2013-03-06 19:01:16 -07:00