Commit Graph

121 Commits

Author SHA1 Message Date
Tim Schaub
9b47c15bd8 Make geometries event targets
Previously, the tests were using eql to make assertions about matching geometries.  This is inappropriate for structures with circular references (as with goog.events.EventTarget);
2013-10-03 12:28:34 -06:00
Tim Schaub
626a319222 Accessor for polygon rings 2013-10-03 12:28:34 -06:00
Bart van den Eijnden
17356bc3ee Merge pull request #1063 from oterral/parsing_stylemap
Parsing styleMap (r=@bartvde)
2013-10-03 08:01:56 -07:00
Tim Schaub
1aa83e133b Remove dimension property from geometries
This was only necessary when using the shared vertices structure.
2013-09-27 23:18:34 +01:00
Tim Schaub
e1ba1d8887 Remove use of shared structures in feature parsers 2013-09-27 23:18:34 +01:00
Olivier Terral
a35219545e Add new line at the end of file 2013-09-26 17:26:43 +02:00
Olivier Terral
5c128abc5d Add kml file for test 2013-09-26 09:50:46 +02:00
Olivier Terral
67a6703e50 Remove space 2013-09-26 09:24:30 +02:00
Olivier Terral
518658d7de Add styleMap writer 2013-09-26 08:54:22 +02:00
Frederic Junod
764aacb568 Rename {get|set}FeatureId to {get|set}Id 2013-09-17 12:50:56 +02:00
Tim Schaub
b192335e56 Merge pull request #1027 from tschaub/closure-util
Use the closure-util package.  Documentation will come when this is a more complete solution.  See #1027 for basic usage instructions.
2013-09-15 15:36:13 -07: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
65863614bb GeoJSON and TopoJSON tests for new extent structure 2013-09-14 21:11:53 -06:00
Tim Schaub
7d00159bff WMS capabilities parsing with new extent structure 2013-09-14 21:11:53 -06:00
Tim Schaub
3ea6041714 GML parsing with new extent structure 2013-09-14 21:11:53 -06:00
Tim Schaub
3dc2b69615 Test conventions
* use `be` or `equal` for strict equality tests
 * use `be.a` for `instanceof` checks
 * use dot instead of bracket notation
2013-09-14 18:10:13 -06:00
Tim Schaub
0c555e6e7d Accept null crs 2013-08-27 10:54:00 -06: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
7e2bd66417 Read crs from top-level object when parsing as features 2013-08-25 12:32:22 -06:00
Tim Schaub
8190178fc9 Missing test dependency 2013-08-23 18:28:44 -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
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
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
af1cd64018 Lint 2013-08-15 13:54:37 -04:00
Tim Schaub
6078fe7b02 Line literal color instead of strokeColor etc. 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
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
Bart van den Eijnden
8792973c08 make sure the _expression reader can deal with combined propertyname and literals 2013-08-09 15:57:29 +02:00
Bart van den Eijnden
1948233d1f merge with master - solving conflicts 2013-08-09 09:55:44 +02:00
Tim Schaub
254f325f29 Provide a method for parsing any GeoJSON as an array of features 2013-08-07 11:50:37 -06:00
Tim Schaub
5d0b4563a8 Optionally stroke and fill polygons (closes #475)
This also removes the unsupported width property from PolyStyle (closes #891).
2013-08-05 11:16:49 -06:00
Tim Schaub
f210d6d0e1 Rename line symbolizer opacity to strokeOpacity for consistency
We already have strokeColor and strokeWidth.  Having strokeOpacity makes sense.
2013-08-05 11:16:49 -06:00
ahocevar
cc29ea912b Updating the TopoJSON parser to return a ReadFeaturesResult 2013-08-04 15:10:11 +02:00
ahocevar
9578da0cfb Renaming readFeaturesWithMetadata* back to readFeatures*
Since this is not exported and we do not have a counterpart that
does not return the metadata, it should be fine to use a shorter
name.
2013-08-04 15:10:11 +02:00
ahocevar
0aed05a413 Renaming handleWriteOptions to applyWriteOptions 2013-08-04 15:10:10 +02:00
Bart van den Eijnden
17fefda8fd implement GMLReadOptions and GMLWriteOptions as discussed with @ahocevar 2013-08-04 15:10:10 +02:00
Bart van den Eijnden
2f4f508d1a move srsName and axisOrientation from the instance to the read and write functions as discussed with @ahocevar 2013-08-04 15:10:10 +02:00
ahocevar
6f3fa14c53 Sensible axisOrientation and srsName defaults 2013-08-04 15:10:09 +02:00
ahocevar
56e8b1cfb4 Get projection and axis order from GML data
To make tests pass, the winding order of the coordinates in the
test data had to be reversed to conform to common gml practice.
2013-08-04 15:10:09 +02:00
Bart van den Eijnden
a4ceb41938 fix up KML tests 2013-08-04 15:10:09 +02:00
Bart van den Eijnden
33dd188f9b fix up the geojson tests 2013-08-04 15:10:08 +02:00
Tim Schaub
3061fc6941 Missing requires in test and example lint 2013-07-26 16:20:33 -06:00
Tim Schaub
3023c5b9e6 Tests for parsing world-110m.json 2013-07-26 15:52:22 -06:00
Tim Schaub
a0fd3eec19 Initial spec 2013-07-26 15:05:53 -06:00
Bart van den Eijnden
499319fb99 address most of @tschaub's review comments, use dot notation where possible still needs to be done, and I have some questions on the _expression reader still 2013-07-08 17:04:27 +02:00
Tim Schaub
087b4d04a6 Merge pull request #809 from tschaub/clockwise
Consistent winding order for polygon rings.
2013-07-05 17:04:50 -07:00
Bart van den Eijnden
ab40ab6208 Add parser for OGC Filter 1.0 and 1.1 (read/write)
This work is based on the ol.expr package by @tschaub.
It adds a few named expression functions to that package:

 * INTERSECTS, CONTAINS, DWITHIN, WITHIN (no client-side implementation as yet)
 * LIKE (like comparison with wildcard, singleChar and escapeChar)
 * IEQ (case-insensitive equality)
 * INEQ (case-insensitive non-equality)

It also adds a few extra parameters to the existing EXTENT function to be able
to deserialize and serialize all info (i.e. projection and property name).

Some changes were needed for the GML parser as well:

 * createGeometry function needed to be public
 * when parsing Box (GML2) and Envelope (GML3) also parse the srsName
 * fix up writing for Box and Envelope now that bounds is an array

Also added createDocumentFragment function to the XML parser. Implementation
is similar to OpenLayers 2.

Some addtional notes on the implementation:

 * PropertyIsBetween was implemented as an ol.expr.Logical with operator
   ol.expr.LogicalOp.AND and two ol.expr.Comparison instances with operator
   ol.expr.ComparisonOp.GTE and ol.expr.ComparisonOp.LTE
 * In OGC Filter And and Or can contain more than 2 sub filters, so this
   is translated into a hierarchy of ol.expr.Logical
2013-07-03 13:09:25 +02:00