Commit Graph

114 Commits

Author SHA1 Message Date
Tim Schaub
7659e47e07 Inline simple goog.isDef() checks 2015-09-27 10:18:44 -06:00
Tim Schaub
cf5eadebaa Define options 2015-09-27 10:11:30 -06:00
Andreas Hocevar
8f7cbc5ed6 Clear features properly when there is no spatial index
Previously clear() only kept the features collection in sync whern there
was also a features RTree.
2015-07-15 15:15:41 +02:00
Guillaume Beraudo
d48e818390 Fix assert documentation typo 2015-06-10 15:36:43 +02:00
Andreas Hocevar
57e1dda5f1 Make sure that #clear() keeps the collection in sync 2015-06-09 15:44:39 +02:00
Andreas Hocevar
f186ed3deb Alternatively manage features in an ol.Collection
ol.layer.Vector can now manage both an RTree and a Collection of features.
The new useSpatialIndex option allows to opt out of RTree management, and
the new ol.Collection type of the features option allows to opt in for
Collection management.
2015-06-09 15:44:18 +02:00
Andreas Hocevar
513677fecd Render map replay group on the correct world instead of wrapping it
By using the frameState's focus, we can adjust extent and transform and
render it for the world of interest instead of wrapping it and rendering
for every visible world.
2015-04-22 09:11:19 +02:00
Andreas Hocevar
a90a012e5d Replay vector batches for each world 2015-04-18 19:10:53 +02:00
Éric Lemoine
ce83fbdbe3 Rename rBush_ to featuresRtree_ in ol.source.Vector 2015-04-08 10:22:56 +02:00
Éric Lemoine
c3658de75a Make addFeature(s) ignore features with same id 2015-04-08 10:22:56 +02:00
Éric Lemoine
09b90c8424 Add loader and strategy to ol.source.Vector 2015-04-08 10:22:56 +02:00
Tim Schaub
5fe6f07969 Make the source.getFeaturesInExtent() method exportable 2015-04-02 16:23:53 +02:00
Marc Jansen
fb9ba22c30 Add message to assertions. 2015-03-30 22:53:03 +02:00
tsauerwein
f4500c8f89 Rename *AtPixel to *AtCoordinate if coordinate 2015-01-30 10:00:37 +01:00
Guillaume Beraudo
e3947fb09a Add optional fast parameter for clearing vector source 2014-12-05 18:06:23 +01:00
Guillaume Beraudo
17e56d8357 Introduce clear event on vector source
Three seconds speed up when clearing 100'000 features.
Clearing is now around 350ms.
2014-12-05 15:03:23 +01:00
tsauerwein
56e3ba4578 Use bulk insertion for addFeatures 2014-10-24 17:10:02 +02:00
Tim Schaub
473023d146 Document exportable vector source symbols 2014-10-22 09:12:37 -06:00
Frederic Junod
cf8738f9f6 Rename updatefeature event to changefeature 2014-09-30 09:02:53 +02:00
Frederic Junod
79b8ef3a53 Dispatch an 'updatefeature' from the vector source 2014-09-23 16:19:00 +02:00
Éric Lemoine
227f3bae18 Add ol.source.Vector#forEachFeatureIntersectingExtent 2014-09-17 12:26:26 +02:00
Andreas Hocevar
ebe3b48e0a Rename ol.Observable#dispatchChangeEvent() to #changed()
Since dispatchChangeEvent does not only dispatch a change event, but
also increases the revision counter, the method name should reflect
this.
2014-09-04 19:30:48 -06:00
Éric Lemoine
02dc7bcc9e Add @api stable annotations for ol.source.Vector 2014-08-22 10:19:36 +02:00
Éric Lemoine
711c4bbc8c Merge pull request #2450 from probins/events
Improve and standardise event docs
2014-08-18 17:35:59 +02:00
Peter Robins
7a5a5d75e7 Improve and standardise event docs 2014-08-18 15:17:02 +00:00
Éric Lemoine
a16a678ca7 Be stricter with types 2014-08-14 10:56:48 +02:00
Tim Schaub
caa0b568ad Remove extent option for sources
Most of our uses of source extent were cargo cult programming.  The source extent was seldom and inconsistently used.  Instead, layers can now be configured with an extent, and layer renderers limit rendering (and data requests) to the layer extent.

For vector sources, the `getExtent` method returns the extent of currently loaded features (this was the case before and after this change).  For tile based sources, we will likely want to allow easy construction of tile grids based on an extent (this is not possible before or after this change, but could be added later).
2014-07-24 10:30:06 -06:00
Tim Schaub
4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
tsauerwein
5adb3a6a8e Export ol.source.Vector.clear() 2014-07-02 11:53:58 +02:00
Frederic Junod
a172eda242 Remove uniqueness constraint check 2014-06-26 17:55:38 +02:00
Tim Schaub
2a42e7736a Merge pull request #2178 from probins/classdesc
Use @classdesc notation.
2014-06-09 11:18:14 -06:00
Peter Robins
41d9f0360a Add @classdesc to classes 2014-06-09 12:10:19 -04:00
Tim Schaub
13d964488f Make getFeatureById method exportable 2014-06-03 11:42:47 -06:00
Tim Schaub
a2b81d6bd0 Disallow adding the same feature twice 2014-05-23 16:52:11 -06:00
Tim Schaub
652f11cefa Provide a method for retrieving features by id 2014-05-23 16:35:07 -06:00
Tim Schaub
097909516a Account for null or undefined geometry
The change in #2098 made it so a feature's geometry could be undefined.  This is consistent with the return type for the getGeometry method.  Where calling code needs to ensure that it has a geometry instance, it can use instanceof, goog.isDefAndNotNull(), or test for a truthy value.
2014-05-23 10:00:15 -06:00
Andreas Hocevar
547334e211 Move oli.* stability notes to the corresponding ol.* symbol 2014-05-22 16:01:35 +02:00
Andreas Hocevar
7271b50d5a Simplify fires annotations 2014-05-01 22:17:56 +02:00
Andreas Hocevar
fbdbbfb7a7 Get rid of stability annotations and document stability with api
This change adds a stability value to the api annotation, with
'experimental' as default value.

enum, typedef and event annotations are never exportable, but
api annotations are needed there to make them appear in the
docs.

Nested typedefs are no longer inlined recursively, because the
resulting tables get too wide with the current template.
2014-04-29 09:53:07 -06:00
Andreas Hocevar
c17ac0cae3 Greatly simplify and document the usage of JSDoc
This commit simplifies the exports.js plugin so it only relies
on the stability notes to generate the documentation, which
completely decouples it from the exportable API.

As a rule of thumb, whenever something has an 'api' annotation,
it should also have a 'stability' annotation. A more verbose
documentation of ol3 specific annotation usage is available in
the new 'apidoc/readme.md' file.

This commit also modifies all source files to implement these
usage suggestions.
2014-04-29 09:53:06 -06:00
Tim Schaub
fb497f5288 Annotations for exports 2014-04-29 09:53:05 -06:00
Tom Payne
3a8504b799 Add ol.source.Vector#forEachFeatureInExtentAtResolution 2014-04-03 15:12:23 +02:00
Tom Payne
b24e122d4f Add projection argument when loading features 2014-04-03 15:12:22 +02:00
Tom Payne
8c984cc8f7 Load features before rendering 2014-04-03 15:08:03 +02:00
ahocevar
a3b5376520 Add missing event documentation and stability tags 2014-03-26 14:04:58 +01:00
Éric Lemoine
934664296f Merge pull request #1842 from elemoine/1798
Re-render on feature changes
2014-03-12 10:43:22 +01:00
Éric Lemoine
814e5d2790 Re-render on feature changes 2014-03-12 10:03:42 +01:00
Tom Payne
e5ee44f8ad Rename ol.structs.RBush#getAllInExtent to getInExtent 2014-03-06 14:30:56 +01:00
Tim Schaub
2e47777794 Rename getAllFeaturesAtCoordinate to getFeaturesAtCoordinate 2014-03-05 12:32:09 -07:00
Tim Schaub
30dc8195ca Rename getAllFeatruesInExtent to getFeaturesInExtent 2014-03-05 12:31:09 -07:00