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
ahocevar
8c0f1f979a
Store the feature's commonly used id
...
To not clobber the feature's attributes, this is a separate
member property.
2013-05-23 11:16:17 -05:00
Frederic Junod
6b74dcf75b
Update ol.Feature jsdoc
2013-04-24 12:35:24 +02:00
ahocevar
f1120287c3
Features can now have symbolizers
...
If specified, feature symbolizers take precedence over rule
based styling.
2013-03-03 18:55:52 +01:00
Tim Schaub
7ce89f1fbe
Proper getAttributes method
...
With a59aa9bb37 we can now provide an object with user set attributes.
2013-02-20 10:33:42 -07:00
Tim Schaub
735f490f56
Treating geometry as just another attribute
...
The first set geometry is considered the default. As an added bonus, we're back to a single argument constructor. Later, we could allow a schema to be set. This would be done before setting values (calling constructor with no args).
2013-02-20 00:02:50 -07:00
Tim Schaub
7141721bb1
Symbolizers with method for creating literals
2013-02-19 22:24:21 -07:00
ahocevar
61e4452c83
Adding missing and removing unused goog.requires
2013-02-06 16:26:24 +01:00
Tim Schaub
7ef127cfac
Shorter name for ol.Feature
2013-01-21 14:46:02 -07:00