Commit Graph

69 Commits

Author SHA1 Message Date
Frederic Junod
1dcde66839 Fix ol.Feature 'change' event documentation
Setting the id also dispatch a `change` event
2014-09-23 17:40:46 +02:00
Éric Lemoine
d335318496 Make ol.Feature#setStyle accept null 2014-09-17 17:52:51 +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
239a90cd55 Add @api stable annotations for ol.Feature 2014-08-19 17:12:46 +02:00
Peter Robins
ed2f2befdf Move createDefaultEditingStyles() to ol.style 2014-08-11 15:39:21 +00:00
Peter Robins
bf3770a9da Improve docs for style 2014-08-05 09:04:35 +00:00
Antoine Abt
60f1874766 Give precedence to feature style 2014-07-16 11:25:16 +02:00
Paul Spencer
685265e1db Improve documentation for ol.Feature 2014-07-15 13:09:43 -04:00
Peter Robins
97f9527f41 Tag always exported methods as api/observable 2014-07-14 08:23:17 +00:00
Paul Spencer
4bcbda61c6 Merge pull request #2298 from probins/props
Document that options in layers and properties in features are set as object properties
2014-07-09 07:21:53 -04:00
Peter Robins
9915bb873c Document that feature properties are set as object properties 2014-07-09 06:39:42 -04:00
Tim Schaub
4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
Éric Lemoine
eafc2ac371 Change setValues to setProperties 2014-06-27 17:26:51 +02:00
Éric Lemoine
ec6a0548d1 Add ol.Feature#clone 2014-06-25 09:31:15 +02:00
Peter Robins
41d9f0360a Add @classdesc to classes 2014-06-09 12:10:19 -04:00
Tim Schaub
34cabd1579 Dispatch change on feature id change 2014-05-23 16:35:06 -06:00
Tim Schaub
a4d31147bc Do not set geometry by default
A feature can have a geometry whose value is an ol.geom.Geometry instance or null.  A feature can also have no geometry property.  By default, a feature has no geometry property.  To set a geometry, one can be passed to the constructor (including null) or passed to setGeometry().
2014-05-21 09:16:54 -06:00
Andreas Hocevar
b2805c58de Better document which events are fired
The map does not fire ol.render.Event#render. Change events are
now only listed for classes that fire them, and a description
about when they are fired is added.
2014-05-15 20:28:09 +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
Frederic Junod
74d83f29d2 Dispatch a change event when the geometry is set
Fixes #2016
2014-04-26 08:09:28 +02:00
Antoine Abt
5cc1a986c2 Share editing default styles 2014-03-31 10:24:17 +02:00
Tim Schaub
c2400f6dba Merge pull request #1815 from Intermedix/lazy-style-function
Lazily create styles returned by ol.defaultFeatureStyleFunction.
2014-03-12 17:26:49 -04:00
Éric Lemoine
814e5d2790 Re-render on feature changes 2014-03-12 10:03:42 +01:00
Austin Hyde
0e21d2c99d Lazily create ol.defaultFeatureStyleFunction
Besides the slight performance benefit of not prerendering the default
circle style until we need to, this change also allows loading OL3
in browsers that don't support the canvas API (IE 7-8). If the circle
style is rendered on load, the lack of HTMLCanvasElement#getContext
causes IE 7-8 to bomb, regardless of if vector styles are used at all.
2014-03-06 15:31:26 -05:00
Tim Schaub
0015331273 Provide a default style function 2014-02-20 08:57:11 -07:00
Éric Lemoine
aee620d2d9 Initialize properties in the constructor 2014-02-19 00:13:39 +01:00
Tim Schaub
a549df459b Merge pull request #1690 from tschaub/style
Accept a style option and provide setStyle and getStyle methods.
2014-02-14 13:44:15 -07:00
Bart van den Eijnden
87d651af04 Add documentation for API typedef functions 2014-02-14 15:32:12 +01:00
Tim Schaub
e9b4e42d84 Create anonymous functions in an execution context with limited scope 2014-02-13 10:49:01 -07:00
Tim Schaub
f4585331f2 Add setStyle and getStyle to ol.Feature
As with vector layers and feature overlays, feature style can be set by calling
setStyle.  Calling getStyle returns what was passed to setStyle.  Internally, we call getStyleFunction.
2014-02-13 10:25:17 -07:00
Tim Schaub
620a38d3e9 Avoid clashing with user property names
Features are records with any number of user set values.  Separate from this, we rely on feature properties like the feature identifier and feature style.  The two (user properties and our internal properties) should not be mixed.
2014-02-13 10:25:17 -07:00
Tim Schaub
c64c24d3dc Common code for creating a style function 2014-02-13 10:25:16 -07:00
Tom Payne
dc9cb31c27 Add stability annotation to ol.Feature 2014-02-03 14:59:13 +01:00
Tom Payne
911cb302e8 Use inherited dispatchChangeEvent and getRevision in ol.Feature 2014-01-21 11:42:43 +01:00
Tom Payne
061fed50b7 Move all styleFunction types into ol.feature 2014-01-03 17:23:11 +01:00
Antoine Abt
add3cf2233 Remove useless "geometry" FeatureProperty 2013-12-18 14:20:11 +01:00
Antoine Abt
59df68fe68 Update property change listener 2013-12-18 14:20:08 +01:00
Antoine Abt
4fc6c36724 Add support for features with multiples geometries 2013-12-18 11:37:35 +01:00
Tom Payne
a7d6730259 Add styleFunction property to ol.Feature 2013-12-13 22:59:34 +01:00
Tom Payne
554e17ac22 Set geometry to null if no geometry given 2013-12-07 19:51:54 +01:00
Frederic Junod
3d4199193f Allow ol.Feature to be constructed with no argument 2013-12-05 16:15:08 +01:00
Tom Payne
30503f5665 Add ol.Feature#{get,set}Id 2013-11-20 11:42:08 +01:00
Tom Payne
9c02b8e90c Add ol.Feature 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
Bart van den Eijnden
a6b2992a5d simplify the code 2013-11-19 19:08:07 +01:00
Bart van den Eijnden
89cac657dc use a more strict check for opt_nonGeometry 2013-11-19 15:41:40 +01:00
Bart van den Eijnden
8d03fa1197 add an optional argument to getAttributes so we can get a feature's attributes except for the geometry ones 2013-11-19 15:39:22 +01:00
ahocevar
fec638e8be Write modifications back to the original layer
With the feature's getOriginal() and setOriginal() methods, an
undo tree can be maintained now.
2013-11-13 00:44:36 +01:00