Commit Graph

213 Commits

Author SHA1 Message Date
Tom Payne 3d68a3550e Convert ol.CollectionEvent#getElement method into element property 2014-01-27 15:52:03 +01:00
Tom Payne 863e77e16e Use inherited dispatchChangeEvent in ol.layer.Base 2014-01-21 14:13:10 +01:00
Tom Payne 91b0831c68 Allow multiple renderGeometryFunctions on ol.layer.Vector 2014-01-16 20:09:42 +01:00
Tom Payne 7ce7bb2187 Merge remote-tracking branch 'openlayers/master' into vector-api 2014-01-09 11:42:14 +01:00
Éric Lemoine dacb747eb5 Source state of a layer doesn't depend on group 2014-01-07 13:03:31 +01:00
Tom Payne 1499af397d Use assertInstanceof instead of getVectorSource 2014-01-06 09:36:43 +01:00
Tom Payne f4ab0cbac0 Merge remote-tracking branch 'openlayers/master' into vector-api 2014-01-04 15:02:56 +01:00
Tom Payne 061fed50b7 Move all styleFunction types into ol.feature 2014-01-03 17:23:11 +01:00
Tom Payne c6a1967cce Move layer.jsdoc into src/ol/layer 2014-01-03 14:55:02 +01:00
Tom Payne c672eca749 Add ol.layer.Vector.defaultStyleFunction 2013-12-13 22:59:34 +01:00
Tom Payne b59eec7a83 Merge remote-tracking branch 'openlayers/master' into vector-api 2013-12-13 20:22:06 +01:00
Tom Payne ee2098743d Correct types in ol.layer.Group 2013-12-13 19:16:31 +01:00
Tom Payne 59779bdcc5 Correct return types of ol.layer.Base methods 2013-12-13 18:59:26 +01:00
Tom Payne b12bed8949 Use assertInstanceof instead of getImageSource 2013-12-13 18:59:25 +01:00
Tom Payne e11d8bf717 Use assertInstanceof instead of getTileSource 2013-12-13 18:59:25 +01:00
Tim Schaub 0ed59f7be3 Merge pull request #1348 from tschaub/beforechange
Add `ol.ObjectEvent` for changes to `ol.Object` properties.  Previously, `ol.Object` dispatched instances of `goog.events.Event` with type `change`.  Now `ol.ObjectEvent` instances will be dispatched on property changes.  The events include a `getKey` method to get the name of the property being changed.  The `beforepropertychange` type event is fired before a property value changes, and the `propertychange` type event fires after the property value changes.
2013-12-13 07:28:36 -08: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 7b81bfab5c Change @exportClass to @exportSymbol
sed command used: find src/ol -name '*.exports' -exec sed -ri 's/@exportClass\s+(\S+)\s+(\S+)$/@exportSymbol \1/' \{\} \;
2013-12-12 15:05:52 +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 625007f364 Make enum property name like its value
Where an enum value is used as an event type, it should be alllowercase (to follow DOM events).  Property names should be ALLUPPERCASE in this case (just as camelCase and PascalCase are converted to CONSTANT_CASE).
2013-12-11 16:54:01 -07:00
Tim Schaub c8985b9906 Using unique event type values for distinct events
Any event target can be used to dispatch generic goog.events.Event instances with an arbitrary type.  In cases where we dispatch custom events, we should not use type values that collide with those used for generic events (at least internally).  This allows listeners a better chance of knowing what kind of argument they will receive.

As subsequent change will clean up the enumeration and add a bit more consistency.
2013-12-11 16:53:52 -07:00
Tim Schaub 17e91feb52 Listen for property changes in layer group
This avoids a future bug when the ol.ObjectEventType.CHANGE value becomes something different than the goog.events.EventType.CHANGE value.
2013-12-11 12:23:05 -07:00
Tim Schaub 5a5d1dec40 Remove unused handleLayerVisibleChange 2013-12-11 01:38:44 -07:00
Tim Schaub a792a224f6 Avoid duplicate change event on visibility change 2013-12-11 01:28:55 -07:00
Tim Schaub 858fe14163 No need for handleLayerChange in base layer 2013-12-11 01:23:51 -07:00
Tim Schaub 8fbfac52d4 Avoid firing duplicate change events in ol.layer.Layer 2013-12-11 01:20:07 -07: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 a990f0921e Rename ol.layer.VectorEvent to ol.render.RenderEvent 2013-11-20 11:42:05 +01:00
Tom Payne e1c54266d9 Export ol.layer.VectorEvent methods 2013-11-20 11:42:04 +01:00
Tom Payne 712993da52 Add ol.layer.VectorEvent 2013-11-20 11:42:04 +01:00
Tom Payne ea2ba4e7ad Export ol.source.Vector 2013-11-20 11:41:52 +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
Tim Schaub 75b40a60c0 Remove ol.layer.Vector2 and associated renderer 2013-11-12 19:25:08 -07: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
Tim Schaub 048dec1644 Updated sketch style 2013-11-12 10:30:36 -07: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 4e657e464c Add @todo observable documentation for observable properties
This PR adds documentation for observable properties, which will then be pulled into the docs correctly once #1180 is merged.  This is a first pass based on searching for definition of observable properties being defined as enums after lines ending with `Property = {`.  If there are observable properties implemented that don't follow this pattern then they are not included.

I've added simple descriptions based on what I know or could easily figure out, there may be some properties (like preload) that are not correctly described.

I've also added `readonly` annotations where I knew that a property was readonly.  I may have missed some readonly properties.

ol.layer.Base has a bunch of properties but I don't think it is exported so the documentation of these properties will not show up, so I added the documentation to ol.layer.Layer instead even though this isn't really where it should be documented.
2013-10-29 10:24:54 -04:00