Commit Graph

594 Commits

Author SHA1 Message Date
Tom Payne
fbc23499e4 Add @struct annotation for simple classes 2013-12-13 18:59:26 +01:00
Tom Payne
2bcfa9ee00 Fix type errors in ol.renderer.webgl.Map 2013-12-13 18:59:25 +01:00
Tom Payne
fd733eca82 Use assertInstanceof instead of typecast 2013-12-13 18:59:25 +01:00
Tom Payne
b12bed8949 Use assertInstanceof instead of getImageSource 2013-12-13 18:59:25 +01:00
Tom Payne
c9b0d0bf0e Use assertInstanceof instead of getImageLayer 2013-12-13 18:59:25 +01:00
Tom Payne
e11d8bf717 Use assertInstanceof instead of getTileSource 2013-12-13 18:59:25 +01:00
Tom Payne
8d5e46622c Use assertInstanceof instead of getTileLayer 2013-12-13 18:59:25 +01:00
Tom Payne
3681b3c669 Always use goog.vec.Mat4.Number instead of goog.vec.Mat.AnyType 2013-12-13 18:59:25 +01:00
Éric Lemoine
93e605b119 Merge pull request #1350 from elemoine/gutter
Add gutter support to ol.source.TileWMS
2013-12-13 01:11:42 -08:00
Éric Lemoine
701b2d63ef Add gutter support to ol.renderer.webgl.TileLayer 2013-12-12 10:59:32 +01:00
Éric Lemoine
5c71ec4922 Add gutter support to ol.renderer.dom.TileLayer 2013-12-12 10:59:32 +01:00
Éric Lemoine
2db8ce566b Add gutter support to ol.renderer.canvas.TileLayer 2013-12-12 10:59:32 +01:00
Tim Schaub
4ee9605d61 Using CONSTANT_CASE for geometry type 2013-12-05 14:00:04 -07:00
Tom Payne
d6dc1a2c6f Don't use WebGL if there is a major performance caveat 2013-12-04 11:58:05 +01:00
Tim Schaub
1877f92d46 Add forEach method to rtree, use it in feature cache
This saves having to create feature lookup objects and iterate through lookup properties multiple times.
2013-11-27 12:22:33 -07:00
Tim Schaub
8cc4ae8dbd Separate load requests from feature requests
This separates the action of requesting an extent to be loaded from the action of requesting cached features.  The renderer (or any other consumer of a vector source) calls load to request a data extent.  A `featureload` event fires when new features are loaded.  The renderer (or any other consumer) separately asks for cached features given an extent.  This vector source only loads features once, but this separation will also work with sources that make multiple requests for data in different extents.

This also removes the `data` option from the vector source in favor of a `features` option.  Since we no longer have shared data structures for geometries, people can manually create features and pass them to a vector source.  The `addFeatures` method is exported as well.  This is used to add features to a source that don't have a representation on the "remote" (or server).
2013-11-27 12:22:32 -07:00
Tim Schaub
ec02e09ce8 Move render intent enum to feature 2013-11-27 12:22:32 -07:00
Tim Schaub
bfaed4d52d Moving all style functionality from source to style 2013-11-27 12:20:43 -07:00
Tim Schaub
2000b0af78 Vector layer/source refactor
This moves the feature cache from ol.layer.Vector to ol.source.Vector.  These are the minimum changes required to maintain the existing functionality and make tests pass.  More refactoring to come.
2013-11-27 12:20:42 -07:00
Tim Schaub
b235fe25ea Return for getFeatureInfoForPixel
In b8a9aeb14e a return was added to `ol.renderer.Layer.prototype.getFeatureInfoForPixel`.  The `ol.renderer.canvas.VectorLayer.prototype.getFeatureInfoForPixel` method needs the same.
2013-11-25 15:29:40 -07:00
Tom Payne
900bc176ae Avoid clearing canvas twice 2013-11-25 08:58:18 +01:00
Frederic Junod
6762e70f4c Better canvas sizing handling (canvas and webgl) 2013-11-21 17:08:49 +01:00
ahocevar
912ac29f31 Merge pull request #1298 from ahocevar/gfi-callback
The source determines who can do GetFeatureInfo
2013-11-20 07:11:51 -08:00
ahocevar
b8a9aeb14e Avoid source check in map renderer
By returning true or false from the layer renderer's
getFeatureInfoForPixel method, we know whether the source
supports GetFeatureInfo or not.
2013-11-20 16:05:00 +01:00
ahocevar
0238fa54de The source determines who can do GetFeatureInfo
Now that the ol.renderer.Layer base class has a
getFeatureInfoForPixel method, we have to check whether the
source supports GetFeatureInfo, not the layer renderer.
2013-11-20 13:05:06 +01:00
Tom Payne
fb2878c200 Merge pull request #1296 from twpayne/improve-type-checking
Improve type checking
2013-11-20 02:27:42 -08:00
Tom Payne
64021b130a Improve type checking in ol.renderer.webgl.TileLayer 2013-11-20 11:13:47 +01:00
Tom Payne
06b1456499 Improve type checking in ol.renderer.webgl.Layer 2013-11-20 11:13:47 +01:00
Tom Payne
2ba33b8cad Improve type checking in ol.renderer.webgl.ImageLayer 2013-11-20 11:13:46 +01:00
Tom Payne
a613b19360 Improve type checking in ol.renderer.Layer 2013-11-20 11:13:46 +01:00
Tom Payne
0221f74e5c Improve type checking in ol.renderer.dom.TileLayer 2013-11-20 11:13:46 +01:00
Tom Payne
68bf12b5e1 Improve type checking in ol.renderer.dom.Map 2013-11-20 11:13:46 +01:00
Tom Payne
d3981e2891 Improve type checking in ol.renderer.canvas.Map 2013-11-20 11:13:46 +01:00
Frederic Junod
7052884913 Don't use ol.size.equals function
To avoid creating an array on each frame (60 times per second).
2013-11-19 17:43:46 +01:00
Frederic Junod
1816d8d160 Don't set the canvas size too early 2013-11-19 16:23:21 +01:00
Frederic Junod
00186413f8 Remove canvasSize_ property 2013-11-19 16:23:21 +01:00
Tim Schaub
22da054774 Determine the callback count while iterating through all layers
Previously, if a layer didn't have a `getFeature*ForPixel` type method, the loop count would be decremented.  This means that all layers would not be considered.  Instead, the callback count should be incremented before requests are made and decremented in the callback.
2013-11-13 07:36:54 -07:00
Tim Schaub
75b40a60c0 Remove ol.layer.Vector2 and associated renderer 2013-11-12 19:25:08 -07:00
Frederic Junod
ca5960666d Be more strict with {Element} types 2013-11-12 13:53:37 +01:00
ahocevar
0ed208b710 Make renderIntent private and add a getter 2013-11-11 22:07:18 +01:00
Tim Schaub
dbc3109ddb Only call expireTiles_ if already rendered 2013-11-07 10:30:58 -07:00
Tim Schaub
b355c1f412 When expiring tiles, consider max symbol size
When an extent is invalidated, we have to expire tiles outside of that extent to account for symbolizer size.
2013-11-04 13:21:23 -07:00
Olivier Terral
cc3660f32a Fix getImageElement calls in canvas and webgl renderer 2013-10-28 14:04:40 +01:00
ahocevar
33f426fd85 Merge pull request #1135 from ahocevar/no-blur
Use integers when positioning on the target canvas
2013-10-16 09:03:08 -07:00
ahocevar
386fac2429 Use integers when positioning on the target canvas
This avoids blurred images after view center changes (dx, dy)
and at fractional zoom levels (dw, dh).
2013-10-16 16:39:45 +02:00
Tim Schaub
b02f47a5a5 Align pixels when drawing icons or shapes
The floor before setting the transform ensures that we translate by integer pixels for odd and even dimenstions.  The round before drawing the image ensures pixels are aligned.
2013-10-15 22:12:12 -06:00
Tim Schaub
2011e02364 Avoid calling lineTo on the same pixel for polygon stroke 2013-10-14 17:07:06 -06:00
Tim Schaub
71a6c4f270 Only call lineTo if we are in a new pixel for linestring
Rendering performance degrades as the context lineWidth increases when calling lineTo many times for the same pixel coordinate.  This appears to be a widespread performance issue and is very clearly improved by only calling lineTo when in a new pixel coordinate.
2013-10-14 17:06:44 -06:00
Tim Schaub
2ee776d9f6 Support fontWeight in text symbolizer 2013-10-09 11:59:30 -06:00
Tim Schaub
539ecbdd9c Add stroke support for text symbolizers 2013-10-07 16:17:38 -06:00