Commit Graph

69 Commits

Author SHA1 Message Date
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
67fab12fef Listen for feature events and fire layer events 2013-10-03 15:51:00 -06:00
ahocevar
87e755e9e4 Sort symbolizer groups by zIndex
Now rendering order can be controlled by setting the zIndex
symbolizer property.
2013-10-03 09:37:08 -06:00
ahocevar
dbb9525515 No longer group features by geometry type
With symbolizer literals now being geometry type specific, we no
longer need the overhead to query the RTree separately for each
geometry type and render symbolizer groups by geometry type.

The geometry type index of the FeatureCache is no longer needed.

The filtering functionality of the FeatureCache's
getFeaturesObject method can be removed because it is no longer
used.
2013-10-03 08:35:11 -06:00
Tom Payne
167b309242 Replace source ready flag with loading/ready/error enum 2013-09-30 13:30:54 +02:00
Tim Schaub
bbef15e50e Consider resolution when applying rules 2013-09-27 11:46:48 +02:00
Bruno Binet
fa484cca8c Fix tests for min/maxResolution 2013-09-19 16:59:38 +02:00
Tim Schaub
511e5ad5e8 Vector layer updates for new extent structure 2013-09-14 21:13:46 -06:00
Tom Payne
fc2975f346 Rename ol.layer.LayerGroup to ol.layer.Group 2013-09-09 14:23:16 +02:00
Tim Schaub
6078fe7b02 Line literal color instead of strokeColor etc. 2013-08-15 10:37:18 -04:00
Tim Schaub
c36ceab2a0 Separate stroke and fill 2013-08-15 10:37:18 -04:00
Bruno Binet
1aa695580b Add tests for layer.getLayerState() 2013-08-13 12:27:38 +02:00
Bruno Binet
31c8644716 Add tests for ol.layer.LayerGroup 2013-08-13 12:27:38 +02:00
ahocevar
9095032014 Removing unused methods and changing getFeaturesObjectForExtent
With this change, getFeaturesObjectForExtent may return null if
the source does not have data loaded for the provided extent.
A callback can be passed to getFeaturesObjectForExtent to get
notified when the requested data is available.
2013-07-17 11:28:48 +02:00
Frédéric Junod
07d790260c Merge pull request #690 from fredj/layer-options
ol.layer.Layer: default values
2013-06-27 04:35:02 -07:00
Tim Schaub
2577d3f7d6 Rename ol.expression to ol.expr 2013-06-25 12:15:34 -06:00
Tim Schaub
b04a36ede7 Replace use of filter with expressions
The canvas vector layer still has the (API candidate) `getFeatures` method that accepts an arbitrary expression (was filter).  This, and the `getFeaturesObject` method under it are only used in the tests.  The rendering code that was using filters is now calling `layer.getFeaturesObjectForExtent` with an explicit extent and optional geometry type.
2013-06-25 12:15:33 -06:00
Tim Schaub
5e309e244b Using ol.expression.parse 2013-06-25 12:11:50 -06:00
Frederic Junod
cd13e700ac Pass options to the base class 2013-06-25 13:13:41 +02:00
Tom Payne
aa1a71ed96 Don't attempt to constrain values in setters 2013-06-19 13:38:57 +02:00
Tom Payne
46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00
Tom Payne
71e06761f0 Fix use of dispose in ol.layer.Vector tests 2013-04-22 17:16:44 +02:00
Tom Payne
3c541045bb Fix use of dispose in ol.layer.Layer tests 2013-04-22 17:16:43 +02:00
Tom Payne
01168e805a Port ol.filter.ExtentFilter to new extents 2013-04-19 10:03:35 +02:00
Bruno Binet
9b1c389c80 Remove unused goog.require directives 2013-03-14 11:39:43 +01:00
Tobias Bieniek
47261124fc test: Added expect(spy).to.be.called() syntactic sugar 2013-03-13 17:18:23 +01:00
Tobias Bieniek
d5d8afc858 Converted "vector" branch unit tests to mocha, expect.js and sinon 2013-03-13 04:48:08 +01:00
Tobias Bieniek
8273d880d5 Merge remote-tracking branch 'origin/master' into mocha
Conflicts:
	test/jasmine-extensions.js
2013-03-13 04:46:16 +01:00
Tobias Bieniek
89ab68cde7 Replaced jasmine testing framework by mocha, expect.js and sinon
as discussed in #319
2013-03-13 04:32:43 +01:00
Tim Schaub
ee75c4b90e Use new projection getter 2013-03-07 23:48:10 -07: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
Tom Payne
afcbec469a Rename ol.projection.getFromCode to ol.projection.get 2013-03-07 13:29:39 +01:00
Tim Schaub
e1c3faa53e Vector related exports 2013-03-05 18:13:10 +01:00
Tim Schaub
12bee3178e Moving the feature management to the layer
The source will be responsible for fetching vector data.
2013-03-05 12:46:55 +01:00
Tim Schaub
1d6cd1bd1b Lint-free tests 2013-03-04 21:30:23 +01:00
Tim Schaub
c29fabebef Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-04 21:06:13 +01:00
Tom Payne
df5f74b3c0 Add missing requires to specs 2013-03-04 20:02:55 +01:00
ahocevar
f1120287c3 Features can now have symbolizers
If specified, feature symbolizers take precedence over rule
based styling.
2013-03-03 18:55:52 +01:00
Tim Schaub
d3c4869917 Work with new ol.projection package 2013-03-03 16:09:00 +01:00
Tim Schaub
5a73529da5 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-03 15:52:40 +01:00
ahocevar
5535a26d4a Adding unit tests for rule based styling 2013-03-03 15:25:20 +01:00
Tom Payne
fcc620af7d Separate ol.projection module from ol.Projection class 2013-03-03 13:09:13 +01:00
Éric Lemoine
b6ed5f2164 Use namespaces for tests
With this commit test files provide namespaces (using goog.provide). This fixes the issue reported by @bartvde where goog objects cannot be used in Jasmine "describe" functions. It also frees us from having to add script tags for the test files in test/ol.html.
2013-01-31 10:18:21 +01:00
tschaub
4d97b583c6 Match the current Filter Effects spec
This commit is a cherry-pick of 19f7778.

The current draft of the [filter spec](https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html)
describes brightness, contrast, hue-rotate, and saturate functions that
roughly match our layer's setBrightness, setContrast, setHue, and
setSaturation methods.  These changes make the range of our methods match
the corresponding functions in the spec.  The one exception is the
brightness function.  The spec says it has a range of 0 to positive infinity.
The WebKit implementation accepts a range of -1 to 1 (as of
https://github.com/WebKit/webkit/commit/8f4765e569).  There's an open
(ticket)[https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647] recommending
that the spec be changed to match.

I'm not stuck on having our methods match those of the filter spec, but the
parity would be nice.

These changes leave the WebGL map renderer "broken" (whacky colors).  It would
be straightforward to update the current fragment shader to handle the new
range of hue, but the brightness, contrast, and saturation handling will
need to be reworked.

For inspiration, here are the color transformation
matrix calculations the WebKit filters:
8f4765e569/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp (L64-80)

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:18:34 +01:00
Tom Payne
65b8e0f915 Use object literals and use generic tile layer 2012-09-27 12:45:00 +02:00
Tom Payne
96bd703271 s/tilesource/source/ 2012-09-27 09:36:55 +02:00
Tom Payne
290d03e76f s/store/source/ 2012-09-26 19:43:23 +02:00
Tom Payne
228e5a8dbf Move requires to end of the file to ensure tests run even if goog.require fails 2012-09-26 19:40:16 +02:00
Éric Lemoine
b249b0aaa9 Jasmine tests for ol.tilestore.XYZ 2012-09-25 10:13:41 +02:00