Commit Graph

12208 Commits

Author SHA1 Message Date
Éric Lemoine
41fe103fa4 Export ol.Collection#extend 2013-08-19 14:25:38 +02:00
Éric Lemoine
6576a49178 Make ol.Collection#extend return this
This to be able to do this:

new ol.Map({
  controls: ol.control.defaults().extend([new MyControl()]),
  ...
})
2013-08-19 14:25:38 +02:00
Éric Lemoine
77adbdfa7a Use per-animation function modules
Currently the animation functions share the same module, namely ol.animation. We do differently for ol.control.defaults and ol.interaction.defaults, with ol.control.defaults and ol.interaction.defaults module. This commit replaces the ol.animation module by four modules, one for each animation function.

This makes things more consistent, and will make it possible to use the @exportFunction annotation for the exporting of the animation functions.
2013-08-19 14:25:38 +02:00
Éric Lemoine
a37f114e4b Add export annotation @exportFunction
This commit adds a new export annotation: @exportFunction. @exportFunction is to be used to declare functions that take an options object literal as their first arguments. @exportFunction is to regular functions as @exportClass is to constructors.

The usage of @exportFunction is as follows:

@exportFunction ol.control.defaults ol.control.DefaultsOptions ol.Collection

Note: the Function#export method uses a recursive function. This is to handle nested options.
2013-08-19 14:01:57 +02:00
Éric Lemoine
8d09be7134 No reference to internal types in externs file
Currently we have things like like in the generated externs file (types.js):

/**
 * @type {ol.control.AttributionOptions|undefined}
 */
olx.control.DefaultsOptionsExtern.prototype.attributionOptions;

It doesn't make sense to have external object properties whose types are
internal (ol.control.AttributionOptions in the above example).

With this commit, the generate-exports.py script generates this:

/**
 * @type {olx.control.AttributionOptionsExtern|undefined}
 */
olx.control.DefaultsOptionsExtern.prototype.attributionOptions;
2013-08-19 13:54:26 +02:00
Tom Payne
0ec1f33304 Merge pull request #910 from twpayne/reduced-check-examples
Only check examples in advanced mode
2013-08-19 02:19:48 -07:00
Frédéric Junod
6a276a408d Merge pull request #905 from fredj/css_classes_fixup
IE10 compatibility: full-screen-drag-rotate-and-zoom.html
2013-08-19 01:03:01 -07:00
Tim Schaub
0f9e269057 Ignore extra dimensions and pad with NaN for missing dimensions 2013-08-18 09:57:26 -04:00
Tim Schaub
94c4d420a6 Merge pull request #911 from tschaub/expression-literals
Parse literal nodes in expressions in addition to text nodes.
2013-08-16 08:36:25 -07:00
Tim Schaub
7ccc45b276 No need for rules if no rules have filter 2013-08-15 15:38:58 -04:00
Tim Schaub
9b90129b24 Merge pull request #904 from tschaub/test-correction
Correctly make assertions with expect.
2013-08-15 11:44:31 -07:00
Tim Schaub
183b51a1c0 Parse literal nodes in expressions in addition to text nodes 2013-08-15 14:32:47 -04:00
Tim Schaub
dd72408a88 Dependencies 2013-08-15 14:07:11 -04:00
Tim Schaub
4e053c4c0a No such thing as IconType 2013-08-15 13:57:36 -04:00
Tim Schaub
af1cd64018 Lint 2013-08-15 13:54:37 -04:00
Tim Schaub
966034e4f7 Alphabetize 2013-08-15 13:50:50 -04:00
Tim Schaub
bad401bc17 Add support for "else" symbolizers
When a style has no rules, the "else" symbolizers apply.  When a style has rules and none of them apply to the given feature, the "else" symbolizers apply.  Note that this is different than default symbolizer properties that might be merged into all symbolizers (as in OL2) - I don't think we should support that.
2013-08-15 10:37:18 -04:00
Tim Schaub
6078fe7b02 Line literal color instead of strokeColor etc. 2013-08-15 10:37:18 -04:00
Tim Schaub
a5991aee03 Remove applyDefaultStyle method 2013-08-15 10:37:18 -04:00
Tim Schaub
a670e225cd Clearer naming of method to create symbolizer literals 2013-08-15 10:37:18 -04:00
Tim Schaub
d5d0262b4c Create literal with feature or geometry type 2013-08-15 10:37:18 -04:00
Tim Schaub
c36ceab2a0 Separate stroke and fill 2013-08-15 10:37:18 -04:00
Tim Schaub
dc54128c77 Method to reduce polygon literals 2013-08-15 10:37:18 -04:00
Tim Schaub
36bcd26305 Separate literals from symbolizers 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
Tom Payne
b06a6d1aef Only check examples in advanced mode 2013-08-15 15:21:00 +02:00
Frédéric Junod
a12d41b1bc Merge pull request #908 from fredj/bing_key
Fix BingMaps API key in example
2013-08-15 06:11:19 -07:00
Frederic Junod
c793b18c44 Fix BingMaps API key in example 2013-08-15 14:10:29 +02:00
Frederic Junod
4afe025c75 Add missing space between CSS classes 2013-08-15 13:58:58 +02:00
Bart van den Eijnden
c3a920774b Merge pull request #852 from bartvde/ogcfilter2
Add parser for OGC Filter 1.0 and 1.1 (read/write) (r=@tschaub,@ahocevar)
2013-08-15 02:12:58 -07:00
Bart van den Eijnden
ab7d446e25 Merge pull request #3 from tschaub/bartvde-ogcfilter2
Suggestions for filter encoding
2013-08-15 02:12:03 -07:00
Tim Schaub
db658e491f Correct use of expect with spies 2013-08-14 11:57:53 -04:00
Tim Schaub
89daf91c0b Proper use of expect 2013-08-14 11:50:18 -04:00
Tim Schaub
6c8ec8ed95 Test names and instanceof checks 2013-08-14 11:35:44 -04:00
Tim Schaub
2d95488906 Remove special write-only handling for dates 2013-08-14 11:26:01 -04:00
Tim Schaub
824c950824 Parse distance as a number 2013-08-14 09:33:47 -04:00
Tom Payne
e23cbbac13 Merge pull request #902 from twpayne/fix-color
Fix opacity in createFromString
2013-08-14 05:29:09 -07:00
Tom Payne
362ace01da Fix opacity in createFromString 2013-08-14 12:02:23 +02:00
Bruno Binet
7b95509970 Merge pull request #899 from bbinet/renderer-refactoring
Renderer refactoring related to the layer groups
2013-08-13 08:25:33 -07:00
Bruno Binet
88da6da3a7 Trigger CHANGE event only when required
For example only when layer is both ready and visible.
2013-08-13 16:41:43 +02:00
Bruno Binet
8b435059f7 Update color matrices based on framestate values
In getColorMatrix method, we'll update the color matrices only if layerstate
color properties has changed in the framestate.
2013-08-13 16:24:44 +02:00
Bruno Binet
46ea218d0f Make layer renderers more stupid
Layer renderers should not be responsible for listening to layer
properties change and triggering a render.
Layer change events are now forwarded to the map which will trigger a render.
2013-08-13 16:24:44 +02:00
Bruno Binet
a13d4bdded Merge pull request #797 from bbinet/layergroup
Layer group support
2013-08-13 07:24:21 -07:00
Bruno Binet
54bf8c2d2a Bindto valueAsNumber in layer-group example
(now that #898 is in)
2013-08-13 12:37:00 +02:00
Bruno Binet
3ecb5b89ff Create a custom event type for vector layers
Vector layers will now dispatch ol.layer.VectorLayerEventType.ADD and
ol.layer.VectorLayerEventType.REMOVE event types instead of the generic
goog.events.EventType.CHANGE event type.
This will fix a maximum call stack size exceeded javascript error.
2013-08-13 12:27:38 +02:00
Bruno Binet
e4c36378ac ol.Map now have a LAYERGROUP property
The LAYERS property is gone.
2013-08-13 12:27:38 +02:00
Bruno Binet
d84477c1c0 Bind more layer properties in layer-group example
This allows to update hue, saturation, brightness, contrast values.
2013-08-13 12:27:38 +02:00
Bruno Binet
1100cc67da Get opacity from layerState in webglmaprenderer
instead of getting it from layer.getOpacity().
Fix the issue of changing opacity which didn't work with LayerGroups in webgl.
2013-08-13 12:27:38 +02:00
Bruno Binet
f3b63d9c2c Add a layer-group example 2013-08-13 12:27:38 +02:00
Bruno Binet
1aa695580b Add tests for layer.getLayerState() 2013-08-13 12:27:38 +02:00