Commit Graph

98 Commits

Author SHA1 Message Date
Frederic Junod
69749dee55 Fix type error in ol.layer.Vector 2014-02-26 16:39:21 +01:00
Éric Lemoine
aee620d2d9 Initialize properties in the constructor 2014-02-19 00:13:39 +01:00
Tim Schaub
0ec5201f3a Documentation and exports 2014-02-13 10:37:10 -07:00
Tim Schaub
a1f714f7dc Add setStyle and getStyle methods to ol.layer.Vector
The setStyle method accepts a single style, an array of styles, or a style function.  The getStyle method returns what was set.  Internally, we use the getStyleFunction method which always returns a function.  When calling setStyle, a change event is dispatched (fixes #1671).
2014-02-13 10:25:17 -07:00
Tim Schaub
76f6961f83 Delete style option before passing to base 2014-02-13 10:25:16 -07:00
Tim Schaub
c64c24d3dc Common code for creating a style function 2014-02-13 10:25:16 -07:00
Tim Schaub
499ba4ac8f Add a style option for vector layers
This can be a single ol.style.Style, and array of styles, or a style function.
2014-02-13 10:25:16 -07:00
Tom Payne
76145fde74 Add stability annotation to ol.layer.Vector 2014-02-03 14:59:15 +01:00
Éric Lemoine
0eb72667c9 Add comments for setStyleFunction 2014-01-28 21:35:38 +01:00
Tom Payne
91b0831c68 Allow multiple renderGeometryFunctions on ol.layer.Vector 2014-01-16 20:09:42 +01:00
Tom Payne
1499af397d Use assertInstanceof instead of getVectorSource 2014-01-06 09:36:43 +01:00
Tom Payne
061fed50b7 Move all styleFunction types into ol.feature 2014-01-03 17:23:11 +01:00
Tom Payne
c672eca749 Add ol.layer.Vector.defaultStyleFunction 2013-12-13 22:59:34 +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
Tim Schaub
ec02e09ce8 Move render intent enum to feature 2013-11-27 12:22:32 -07:00
Tim Schaub
2000b0af78 Vector layer/source refactor
This moves the feature cache from ol.layer.Vector to ol.source.Vector.  These are the minimum changes required to maintain the existing functionality and make tests pass.  More refactoring to come.
2013-11-27 12:20:42 -07:00
Tom Payne
b11c34261b Rename renderFeatureFunction to renderGeometryFunction 2013-11-22 11:34:41 +01:00
Tom Payne
1acfa35783 Add ol.layer.Vector renderFeatureFunction 2013-11-20 11:44:47 +01:00
Tom Payne
711917db62 Add ol.layer.Vector 2013-11-20 11:41:09 +01:00
Tom Payne
4e65fefc00 Move vector code out of the way 2013-11-20 11:39:21 +01:00
ahocevar
1c3b839a6f Use new setCoordinates methods 2013-11-13 00:44:36 +01:00
ahocevar
292b851a74 Adding ModifyFeature interaction
This is a first draft. The way geometry changes are handled for
now is a bit clumsy. Both updating the feature cache RTree and
making the layer aware of feature and geometry changes could be
handled in a smarter way if these changes would be made through
the layer instead of directly on the geometry or feature.
2013-11-13 00:44:36 +01:00
ahocevar
1d23229d98 Allow to set the layer style
By firing a simple CHANGE event, we can redraw the layer when
a style is assigned.
2013-11-12 01:47:43 +01:00
Tim Schaub
61741669f6 Unregister for feature events when removing features 2013-11-11 16:17:33 -07:00
ahocevar
0ed208b710 Make renderIntent private and add a getter 2013-11-11 22:07:18 +01:00
ahocevar
299d729936 Make filter optional 2013-11-11 21:52:19 +01:00
ahocevar
467bcc8b62 Protect from features without geometry 2013-11-11 21:51:58 +01:00
ahocevar
26c8c954c3 Make selectedFeaturesFilter available to other components 2013-11-09 16:03:30 +01:00
ahocevar
97d38820fb Removing no longer used getFeatureWithUid method 2013-11-09 14:44:40 +01:00
ahocevar
9fca2c407d Add a getFeatures method on the vector layer 2013-11-09 14:15:35 +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
67fab12fef Listen for feature events and fire layer events 2013-10-03 15:51:00 -06:00
Tim Schaub
42115baabb Merge pull request #1092 from tschaub/vector-event
Extend goog.events.Event for custom vector layer events.
2013-10-03 11:23:39 -07:00
ahocevar
41e7a6a059 Marking sort function private 2013-10-03 12:02:29 -06:00
Tim Schaub
64dd5cfc1f Extend goog.events.Event for custom vector layer events
Vector events include features and extents.  In the case of feature change events, the extents array will include old and new extents for features with modified geometries.w
2013-10-03 11:25:30 -06:00
ahocevar
87e755e9e4 Sort symbolizer groups by zIndex
Now rendering order can be controlled by setting the zIndex
symbolizer property.
2013-10-03 09:37:08 -06:00
Tim Schaub
97b56add70 Unique event type value for this target
The goog.events.EventType.CHANGE type is already dispatched because layers are ol.Object instances.  To allow people to register for vector layer specific events without also having listeners get called with more general ol.Object change events, we need to give the types unique values.
2013-10-03 09:20:51 -06:00
ahocevar
dbb9525515 No longer group features by geometry type
With symbolizer literals now being geometry type specific, we no
longer need the overhead to query the RTree separately for each
geometry type and render symbolizer groups by geometry type.

The geometry type index of the FeatureCache is no longer needed.

The filtering functionality of the FeatureCache's
getFeaturesObject method can be removed because it is no longer
used.
2013-10-03 08:35:11 -06:00
Tim Schaub
0b5058f72e Remove shared vertex handling from vector layer 2013-09-27 23:18:34 +01:00
Tim Schaub
bbef15e50e Consider resolution when applying rules 2013-09-27 11:46:48 +02:00
Tim Schaub
3b20cc7b53 Rename ol.Projection to ol.proj.Projection 2013-09-15 22:01:56 -06:00
Tim Schaub
e806f51b3d Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
2013-09-15 00:31:32 -06:00
Tim Schaub
511e5ad5e8 Vector layer updates for new extent structure 2013-09-14 21:13:46 -06:00
Tim Schaub
13a937fad7 Lazily create default style 2013-09-07 09:19:11 -06:00
ahocevar
83720975f8 More specific INTENTCHANGE instead of SYMBOLIZER event 2013-08-30 12:10:55 +02:00
ahocevar
e5b095bfdf Simplifying setRenderIntent API for bulk changing all features 2013-08-29 16:50:53 +02:00
ahocevar
56c228d009 Removing option for temporary layer
Instead, adding setter and getter for a private temp_ property,
as suggested by @elemoine.
2013-08-29 16:50:52 +02:00
ahocevar
3a50a754aa Implementing renderIntent handling 2013-08-29 16:50:52 +02:00