Commit Graph

141 Commits

Author SHA1 Message Date
ahocevar
92a30bcbf7 Use ol.structs.RBush in ol.source.Vector 2013-11-28 16:16:52 +01:00
Tim Schaub
1f6d9fc5ae Test for vector source load method 2013-11-27 12:22:33 -07:00
Tim Schaub
6229c0a1d4 Unused getFeaturesByIds_ method 2013-11-27 12:22:33 -07: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
bfaed4d52d Moving all style functionality from source to style 2013-11-27 12:20:43 -07:00
Tim Schaub
307e425891 Remove unused method 2013-11-27 12:20:42 -07:00
Tim Schaub
01a0b9ff8d Private source methods 2013-11-27 12:20:42 -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
Éric Lemoine
2211aec553 Use rBush.getAll and rBush.getAllInExtent 2013-11-27 15:54:00 +01:00
Frederic Junod
aac16a3ba1 Fix doc typos 2013-11-27 13:43:11 +01:00
Frederic Junod
2f3a85a86a Add ol.source.Vector#getAllFeatures function 2013-11-27 12:14:33 +01:00
Frederic Junod
a3b43f21e4 Add ol.source.Vector#forEachFeature function 2013-11-27 12:14:32 +01:00
Tom Payne
4de5cda4a1 Keep R-Tree up-to-date in ol.source.Vector 2013-11-26 11:57:38 +01:00
Tom Payne
8294ca9f57 Port ol.source.Vector to ol.structs.RBush 2013-11-26 11:57:37 +01:00
Tom Payne
0221fd2216 Add ol.source.Vector#getAllFeaturesAtCoordinate 2013-11-20 11:42:08 +01:00
Tom Payne
afca110b49 Add ol.source.Vector#forEachFeatureAtCoordinate 2013-11-20 11:42:07 +01:00
Tom Payne
9f2ce8f50e Add more FIXMEs 2013-11-20 11:41:50 +01:00
Tom Payne
67cd0597bb Add ol.source.Vector#forEachFeatureInExtent and #getAllFeaturesInExtent 2013-11-20 11:41:08 +01:00
Tom Payne
db40842487 Add ol.source.Vector 2013-11-20 11:41:07 +01:00
Tom Payne
4e65fefc00 Move vector code out of the way 2013-11-20 11:39:21 +01:00
Paul Spencer
bada596b45 Add default stability level to docs of exported things. 2013-10-24 18:20:24 -04:00
Tim Schaub
3b20cc7b53 Rename ol.Projection to ol.proj.Projection 2013-09-15 22:01:56 -06:00
Bart van den Eijnden
7b31ec26ea fix up build 2013-08-04 15:10:08 +02:00
ahocevar
55697dea28 getProjection method on parsers
With this, vector sources/layers do not need to make
assumptions on the data projection.
2013-08-04 15:10:08 +02:00
ahocevar
a9fcc5ff15 Addressing @elemoine's review comments 2013-07-19 13:30:14 +02:00
ahocevar
f325046a95 Allow VectorSource to load and parse data
This adds url, data and parser options to the source, and makes
EPSG:4326 the default projection. It also adds a prepareFeatures
method, which is used to load/parse data once the target
projection is known.
2013-07-17 11:24:34 +02:00
Bruno Binet
9b1c389c80 Remove unused goog.require directives 2013-03-14 11:39:43 +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
0b05432faa Vector source isn't a tile source 2013-03-04 18:43:46 +01:00
ahocevar
da7820121f Renaming the 'evaluate' method to 'applies' 2013-03-02 12:50:53 +01:00
ahocevar
59fe714fa6 Making the linter happy 2013-02-15 17:44:09 +01:00
ahocevar
8cc65756bc Only attempt fast lane for AND filters 2013-02-15 16:25:29 +01:00
ahocevar
4e971b6041 Faster extent + geometry type queries
By maintaining separate R-Trees for each geometry type, we cover
the most critical query from the canvas renderer at higher
speeds. Using the filter's own evaluate method, we can now also
serve arbitrary queries, but they won't be fast.

Still needs unit tests.
2013-02-06 16:42:55 +01:00
ahocevar
61e4452c83 Adding missing and removing unused goog.requires 2013-02-06 16:26:24 +01:00
ahocevar
dafa48da2e Using spatial index and combined filters
This should significantly speed up feature access. Needs unit
tests.
2013-02-04 22:51:58 +01:00
ahocevar
9a0f509a94 Use objects instead of arrays for geometry type cache
Also trying to reference features directly here instead of
storing feature ids in the index. We'll see if this is good when
we have an index for tile coords as well and want to filter
with multiple filters, accessing multiple indices.
2013-01-30 18:03:27 +01: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
Tim Schaub
1dd17fc88f Rendering vector layers 2013-01-22 01:36:32 -07:00
Tim Schaub
1a63bf078f Basic vector source and layer
The vector source maintains a cache of features.  These are indexed by geometry type in anticipation of the renderer's needs.
2013-01-21 17:59:09 -07:00