Commit Graph

58 Commits

Author SHA1 Message Date
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
ahocevar
0ed208b710 Make renderIntent private and add a getter 2013-11-11 22:07:18 +01:00
ahocevar
7cf636147b Call setRenderIntent on the feature, not the layer 2013-11-09 14:15:35 +01:00
Paul Spencer
bada596b45 Add default stability level to docs of exported things. 2013-10-24 18:20:24 -04:00
Tim Schaub
adf99d592a Listen for geometry events and fire feature events 2013-10-03 15:50:23 -06:00
Frederic Junod
764aacb568 Rename {get|set}FeatureId to {get|set}Id 2013-09-17 12:50:56 +02:00
ahocevar
0c1f2328f9 Do not implement a specific clone method
What we need here is a mix of deep and shallow cloning, and we
do not want to do this in a generic ol.Feature#clone() method.
2013-08-29 16:50:55 +02:00
ahocevar
3a50a754aa Implementing renderIntent handling 2013-08-29 16:50:52 +02:00
ahocevar
f05629b3c3 Work with clones rather than the original features 2013-08-29 16:50:51 +02:00
Tim Schaub
c36ceab2a0 Separate stroke and fill 2013-08-15 10:37:18 -04:00
Tim Schaub
90fb37c220 Rename ol.style.SymbolizerLiteral to ol.style.Literal 2013-08-15 10:37:18 -04:00
Bart van den Eijnden
8dc97790bc Add more content for the API doc
Involves additions to (there will be subsequent pull requests for other
classes):
- ol.Attribution
- ol.Collection
- ol.Expression
- ol.Feature
- ol.Geolocation
- ol.Map
- ol.Object
- ol.Overlay
- ol.Projection
- ol.View2D
- ol.control.Attribution
- ol.control.Control
- ol.control.FullScreen
- ol.control.Logo
- ol.control.MousePosition
- ol.control.ScaleLine
- ol.control.Zoom
- ol.control.ZoomSlider
- ol.dom.Input
- ol.filter.Filter
- ol.filter.Geometry
- ol.filter.Logical
2013-06-11 20:56:04 +02:00