Commit Graph

2454 Commits

Author SHA1 Message Date
Tim Schaub ce4b95f960 Decoupling canvas tile grid from vector source grid
If we have a gridded vector source, the grid should have something to do with the source data (e.g. the vector data is available in a regular grid).  The vector layer renderer's internal grid is for rendering canvas tiles and doesn't have anything to do with the source.
2013-02-18 17:54:13 -07:00
Tim Schaub 8b19751264 Making it explicit that this is a range of tiles
With tile range extending rectangle, a tile range that represented a single tile was not allowed.
2013-02-18 17:07:31 -07:00
Tim Schaub 0d6c54847b Removing logic that assumes occasionally stretched tiles
When the dom renderer included logic to stretch tiles so that gaps were properly filled for fractional zoom levels, we needed to take this into account when getting a tile coordinate for a given coordinate and resolution.  This was never the proper logic for a renderer that wasn't stretching occassional tiles (e.g. the WebGL renderer, the Canvas renderer, or the new DOM renderer).
2013-02-18 15:55:27 -07:00
Tim Schaub 6aa4e99fe5 Fix return from findLoadedTiles
Previously, the findInterimTiles method was returning undefined if the min x/y coord for a tile range was already in the lookup.  The return says it indicates whether all tiles for the given z are loaded.  This change corrects the return.

This change also reveals a misunderstanding of the tile range returned by `getTileRangeForExtentAndZ`.  The previous findInterimTiles method was treating max values as inclusive.  This is intuitive.  It looks like the method returns a range where max values are exclusive.
2013-02-18 14:51:39 -07:00
Tim Schaub ddf993f0c9 Factor out common code and test
The findInterimTiles method was used in three renderers.  This change makes it available on the tile source and adds some basic tests.
2013-02-18 14:18:08 -07:00
Tim Schaub e9fb83d4ee Use post render frame for tile pruning
We should discuss whether post render functions must be run after each render frame or not.  If these can be run after multiple render frames, it would make sense to increase the timeout.  As it is, it looks like post render functions are run for every render.  Hard to see what the benefit is in this case.
2013-02-18 11:58:43 -07:00
Tim Schaub e30b0959e0 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-18 10:11:00 -07:00
Frederic Junod e4a5744e06 Remove x,y params from ol.Kinetic.begin 2013-02-18 16:43:20 +01:00
Tom Payne 3a20eaed32 Merge pull request #198 from twpayne/ellipsoid
Add ellipsoid geometry functions
2013-02-18 06:27:36 -08:00
Tom Payne 281f01889e Merge pull request #196 from twpayne/sphere
Add spherical geometry functions
2013-02-18 03:35:44 -08:00
Tom Payne 36a3d02816 Add ellipsoid geometry functions 2013-02-18 12:32:43 +01:00
Tom Payne 684a336dd4 Merge pull request #197 from twpayne/geolocation-all-properties
Add remaining geolocation properties
2013-02-18 01:53:04 -08:00
Tom Payne fc9f323f83 Store heading in radians, thanks @fredj 2013-02-17 23:53:37 +01:00
Éric Lemoine d713c9b8ed Deal with null images 2013-02-17 23:07:58 +01:00
Éric Lemoine be6c1a1a27 Test the image layer renderer's transform matrix 2013-02-17 22:47:19 +01:00
Éric Lemoine 85eec4e9b8 Avoid busy-waiting while images load
This is to be in conformance with the work done with #184.
2013-02-17 22:47:19 +01:00
Tom Payne 7de6cb4fd4 Add remaining geolocation properties 2013-02-16 20:19:38 +01:00
Tom Payne 544f399e04 Add spherical geometry functions 2013-02-15 18:07:19 +01:00
Éric Lemoine a3c65978d1 Make ol.Image emit change events 2013-02-15 17:57:05 +01:00
Éric Lemoine 1e4229497d Do not sort resolutions array
We assert that the resolutions array is sorted instead of sorting it ourselves. This is to consistent with ol.TileGrid.
2013-02-15 17:52:06 +01:00
ahocevar 59fe714fa6 Making the linter happy 2013-02-15 17:44:09 +01:00
Éric Lemoine e1505abe0d Rename ol.Rectangle scale to scaleFromCenter 2013-02-15 17:43:27 +01:00
ahocevar 8cc65756bc Only attempt fast lane for AND filters 2013-02-15 16:25:29 +01:00
Tim Schaub be255ed6c7 Adding ol.Expression
This simple expression constructor will be used for symbolizer properties and the layer will generate symbolizer literals for rendering by evaluating any expressions with a feature as the this argument and feature attributes as the scope.  This allows generating labels that concatenate multiple attribute values together or displaying point symbols that are sized according to a population attribute divided by an area attribute, for example.

This implementation will not work in environments where the content security policy disallows the use of the Function constructor.  This is the case on browser extensions.  A more content-security-policy-friendly implementation would be to come up with a restricted grammar and write a lex/parser.  This is the road I started down, but this verison is far less code, and I think the security policy limitations are minor at this point.  This version will always be faster/lighter than a parser, so one is written in the future, it should only be pulled in where content security policy mandates it.
2013-02-14 17:19:15 -07:00
Tim Schaub 59a203b2b7 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-14 17:18:00 -07:00
Éric Lemoine 02843939e3 Add ol.renderer.webgl.ImageLayer 2013-02-14 23:36:36 +01:00
Éric Lemoine 17a17b01b6 Add ol.renderer.dom.ImageLayer 2013-02-14 23:36:36 +01:00
Éric Lemoine 238c695265 Add FIXME to ol.control.Attribution 2013-02-14 23:36:36 +01:00
Éric Lemoine 8ae25684f9 Add ol.source.StaticImage 2013-02-14 23:36:36 +01:00
Éric Lemoine 62b10cf878 Add ol.source.SingleImageWMS 2013-02-14 23:36:36 +01:00
Éric Lemoine aa9f820723 Add scale to ol.Rectangle 2013-02-14 23:36:36 +01:00
Éric Lemoine 35a6cac37f Add containsExtent to ol.Extent 2013-02-14 23:36:36 +01:00
Tom Payne f581040b0f Add ol.renderer.canvas.ImageLayer 2013-02-14 23:36:36 +01:00
Tom Payne 5a0adf2345 Add ol.source.ImageSource 2013-02-14 23:36:36 +01:00
Tom Payne 27125640ef Add ol.layer.ImageLayer 2013-02-14 23:36:36 +01:00
Éric Lemoine cf206a103d Add ol.Image class 2013-02-14 23:36:36 +01:00
Éric Lemoine 49696390fc Add ol.ImageUrlFunction 2013-02-14 23:36:36 +01:00
Éric Lemoine 8b83345bd2 Add equals to Rectangle 2013-02-14 23:36:35 +01:00
Bart van den Eijnden 234f6bc411 Merge pull request #180 from bartvde/wmscapsclean
add WMS GetCapabilities parser for WMS 1.1.0, 1.1.1, 1.1.1 WMS-C profile
2013-02-14 05:02:39 -08:00
Frédéric Junod b305d7fdfa Merge pull request #192 from fredj/rotation
Change view.rotate params: rotation and optional anchor.
2013-02-14 04:48:42 -08:00
Frederic Junod 34975428c4 Change view.rotate params: rotation and optional anchor. 2013-02-14 12:17:26 +01:00
Éric Lemoine daaff1611c Merge pull request #193 from elemoine/shaders
Apply transform matrix to text coords
2013-02-14 03:01:18 -08:00
Éric Lemoine b6b493c198 Use vec2 for vTexCoord 2013-02-14 11:54:01 +01:00
Éric Lemoine de7a1d8f81 Apply transform matrix to text coords
With this commit the transform matrix is applied to each texture coordinate, as opposed to each fragment. This leads to less calculation on the GPU.
2013-02-14 09:56:45 +01:00
Tim Schaub 2082ba7637 Fewer, bigger tiles 2013-02-13 15:51:06 -07:00
Tim Schaub f5c627ab51 Only listen once for tile events
Assuming browser garbage collection cannot happen while we have listeners in the global registry, we need to listenOnce to avoid memory leaks with the tile queue.
2013-02-13 15:37:33 -07:00
Bart van den Eijnden 13d95b90a3 use namespace URI instead of prefix as suggested by @tschaub and discussed with @ahocevar 2013-02-13 20:58:48 +01:00
ahocevar 6b43435262 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-13 12:30:16 +01:00
ahocevar e155f870cd Fixing RTree, and using it for retrieving geometries 2013-02-13 12:29:14 +01:00
Frederic Junod f4e9dd5c37 view.getRotation default value already set to 0. 2013-02-12 15:37:08 +01:00