Commit Graph

10189 Commits

Author SHA1 Message Date
Éric Lemoine
9f2c351057 Use ol.CollectionEvent#getElement in LayerGroup 2013-08-27 22:07:45 +02:00
Éric Lemoine
b9f2f7bcb4 Add ol.CollectionEvent#getElement 2013-08-27 22:07:03 +02:00
Tim Schaub
0c555e6e7d Accept null crs 2013-08-27 10:54:00 -06:00
Éric Lemoine
6b6639f620 Merge pull request #924 from elemoine/getextent
Export ol.source.Source.prototype.getExtent
2013-08-27 08:02:49 -07:00
Éric Lemoine
f273be6597 Export ol.source.Source#getExtent 2013-08-27 15:42:55 +02:00
Tim Schaub
e8ddecc8b1 Merge pull request #920 from tschaub/point-examples
Cast to number when creating literals from symbolizers where literal properties must be numeric.
2013-08-26 11:57:09 -07:00
Tim Schaub
ecba1d78c2 Merge pull request #921 from tschaub/geojson-crs
Parse top-level crs member when reading features from GeoJSON.
2013-08-26 10:41:14 -07:00
Tim Schaub
0a3e46b88d Remove unnecessary cast and save 15 bytes using goog.isDef 2013-08-26 09:26:07 -06:00
Tim Schaub
eaf447759f Merge pull request #913 from tschaub/dimension
Allow for vector data with unknown or inconsistent dimension.
2013-08-26 05:59:50 -07:00
Tim Schaub
7e2bd66417 Read crs from top-level object when parsing as features 2013-08-25 12:32:22 -06:00
Tim Schaub
379c11e1ce Add externs for GeoJSON crs member 2013-08-25 12:22:08 -06:00
Tim Schaub
9755240cac Leaving the + operator as a convenience for concatenating strings
When people need to serialize in a format that differentiates string concatenation from addition, they can use the new `concat` function in an expression.  But I don't think we need to throw if people use `+` with strings.
2013-08-23 18:33:52 -04:00
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