Commit Graph

140 Commits

Author SHA1 Message Date
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
Tim Schaub
333e4a9625 Rename getAllFeatures to getFeatures 2014-03-05 12:29:24 -07:00
Tom Payne
ccfae72e8e Add stability annotation to ol.source.Vector 2014-02-03 14:59:14 +01:00
Tom Payne
ec81a77cdb Convert ol.source.VectorEvent#getFeature method into feature property 2014-01-27 15:54:00 +01:00
Tom Payne
651bdcbd73 Use opt_this instead of opt_obj in ol.source.Vector 2014-01-15 15:01:58 +01:00
Tom Payne
752a2acd11 Use toString() instead of + '' 2014-01-02 22:12:34 +01:00
Tom Payne
8a7ae264e1 Handle feature's geometries changing to and from null in ol.source.Vector 2013-12-20 14:44:21 +01:00
Tom Payne
4b9451de81 Add extra assertion that feature's geometry is not null 2013-12-20 14:42:08 +01:00
Tom Payne
b2c822c9ca Clear null geometry features in ol.source.Vector#clear 2013-12-19 14:53:22 +01:00
Tom Payne
f1fac356dd Change ol.source.Vector#removeFeatureInternal from private to protected 2013-12-19 14:53:22 +01:00
Tom Payne
3af6521ee3 Use addFeaturesInternal in ol.source.Vector constructor 2013-12-19 14:53:21 +01:00
Tom Payne
0912c8f6ea Add ol.source.Vector#addFeatures 2013-12-19 14:53:21 +01:00
Tom Payne
e6c66d3678 Add ol.source.Vector#addFeaturesInternal 2013-12-19 14:53:21 +01:00
Tom Payne
387fcfbdb0 Factor out ol.source.Vector#addFeatureInternal 2013-12-19 14:53:21 +01:00
Tom Payne
4510510477 Handle features with null geometries in ol.source.Vector 2013-12-16 12:47:29 +01:00
Tom Payne
975e0c0576 Add ol.source.Vector#getExtent 2013-12-16 12:47:29 +01:00
Éric Lemoine
35d5158454 Merge remote-tracking branch 'upstream/master' into vector-api
Conflicts:
	src/objectliterals.jsdoc
	src/ol/attribution.js
	src/ol/geom/geometry.js
	src/ol/geom/geometrycollection.js
	src/ol/geom/linestring.js
	src/ol/layer/vectorlayer.exports
	src/ol/layer/vectorlayer.js
	src/ol/map.js
	src/ol/proj/proj.js
	src/ol/renderer/canvas/canvasvectorlayerrenderer.js
	src/ol/source/imagewmssource.js
	src/ol/source/tilewmssource.js
	src/ol/source/vectorsource.exports
	src/ol/source/vectorsource.js
	src/ol/source/wmssource.js
	src/ol/style/style.js
	src/ol/tilegrid/tilegrid.js
	src/ol/tilegrid/wmtstilegrid.js
	src/ol/tilegrid/xyztilegrid.js
2013-12-13 12:53:57 +01:00
Éric Lemoine
315c42f0a7 Use olx namespace for options types in source code
sed command used: find src/ol -name '*.js' -exec sed -ri 's/\{ol(\.(\w|\.)+Options\=?\})/{olx\1/' \{\} \;
2013-12-12 15:02:03 +01:00
Tom Payne
b4c6a36a4f Fix and accelerate ol.source.Vector#getClosestFeatureToCoordinate
The previous implementation contained a bug (the reduced extent was
calculated around the closest point found, it should have been
calculated around the coordinate being searched for).  This allows a
speed-up that requires only a single traversal of the R-Tree (as opposed
to many traversals).
2013-12-09 18:45:16 +01:00
Tom Payne
1076c5cad1 Add ol.source.Vector#getClosestFeatureToCoordinate 2013-12-09 16:40:54 +01:00
Tom Payne
79c6787e52 Add ol.source.Vector#clear 2013-12-04 14:59:30 +01:00
Tom Payne
ae3ab95b56 Factor out ol.source.Vector#removeFeatureInternal_ 2013-12-04 14:59:18 +01:00
Tom Payne
66457a7aaf Add ol.source.Vector#isEmpty 2013-12-04 14:49:25 +01:00
Tom Payne
a06ba8d4aa Fire addfeature and removefeature events from ol.source.Vector 2013-11-28 20:53:17 +01:00
ahocevar
92a30bcbf7 Use ol.structs.RBush in ol.source.Vector 2013-11-28 16:16:52 +01:00