Commit Graph

10327 Commits

Author SHA1 Message Date
Tim Schaub
8190178fc9 Missing test dependency 2013-08-23 18:28:44 -04:00
Tim Schaub
6ddef67cd9 Add KML earthquake example 2013-08-23 18:17:42 -04:00
Tim Schaub
3c993168c4 Cast to numbers for literals
There are times when we parse from XML without a schema (e.g. KML).  In these cases, features attributes will always be strings.  We can cast to number when creating literals from symbolizers and then assert `!isNaN` instead of asserting that they are numbers before.
2013-08-23 17:30:24 -04:00
Tim Schaub
43953c8efa Call concat instead of using math op in FE expression parsing 2013-08-23 16:46:33 -04:00
Tim Schaub
3b615fa312 Add a concat function for concatenating strings 2013-08-23 13:05:12 -04:00
Frédéric Junod
637bbeb2a7 Merge pull request #903 from fredj/keyboard
Don't react to keyboard events when the focus is on editable inputs
2013-08-22 23:40:42 -07:00
Tom Payne
9a994eab47 Merge pull request #918 from twpayne/source-change-events
Source change events
2013-08-21 07:40:54 -07:00
Tom Payne
0170c426ee Propagate change events from sources via layers 2013-08-21 12:29:49 +02:00
Tom Payne
788ac5f41d Add ol.source.Source#dispatchChangeEvent 2013-08-21 12:29:28 +02:00
Frederic Junod
9e8d559c1b Don't react to keyboard events when the focus is on editable inputs 2013-08-20 14:44:40 +02:00
Tim Schaub
554a725d1a Merge pull request #912 from tschaub/seperate-fill-stroke
Separate fill and stroke symbolizers.  Allow styles with no rules (and also support "else" symbolizers).
2013-08-19 15:43:06 -07:00
Éric Lemoine
9e43719ffb Merge pull request #682 from elemoine/export-func
missing exports
2013-08-19 09:14:16 -07:00
Éric Lemoine
d0f793b7a0 Fix bad option name in ol.control.defaults 2013-08-19 17:00:43 +02:00
Éric Lemoine
d6d15db6e8 Use @exportFunction to export animation functions 2013-08-19 17:00:43 +02:00
Éric Lemoine
f67d3dc165 Use @exportFunction to export ol.interaction.defaults 2013-08-19 17:00:43 +02:00
Éric Lemoine
29a2d2a9f7 Use @exportFunction to export ol.control.defaults 2013-08-19 17:00:43 +02:00
Éric Lemoine
169e986b28 Remove 2nd arg to ol.interaction.defaults 2013-08-19 17:00:43 +02:00
Éric Lemoine
3d2d45e01f Remove 2nd arg to ol.control.defaults 2013-08-19 17:00:37 +02:00
Éric Lemoine
3f6b9c9434 Use ol.Collection#extend in examples
This commit changes the examples to using ol.control.defaults().extend to extend the collection of controls. This is in preparation for a future commit that will remove the 2nd argument to ol.control.defaults. The same is done for ol.interaction.defaults.
2013-08-19 14:25:38 +02:00
É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