Commit Graph

800 Commits

Author SHA1 Message Date
Tim Schaub
153df45f95 Math expressions
Just simple binary type expressions supported here.  These can be serialized in a variety of formats.  More complex operations to be supported by call expressions.
2013-06-25 12:11:44 -06:00
Tim Schaub
b2ff793ea1 Comparison expressions 2013-06-25 12:11:44 -06:00
Tim Schaub
052b973b39 Reduce to a single literal 2013-06-25 12:11:44 -06:00
Tim Schaub
20b66fc447 Proper specs 2013-06-25 12:11:43 -06:00
Tim Schaub
0abcbb9854 Stray not 2013-06-25 12:11:43 -06:00
Tim Schaub
a87ebfe97b Specific expression types 2013-06-25 12:11:43 -06:00
Tim Schaub
063b461ffd Fewer calls to charCodeAt 2013-06-25 12:11:43 -06:00
Tim Schaub
f272350e00 Expose next and peek methods 2013-06-25 12:11:42 -06:00
Tim Schaub
5baa38b82c Test punctuator scanning 2013-06-25 12:11:42 -06:00
Tim Schaub
50f94911b1 Scan string literals 2013-06-25 12:11:42 -06:00
Tim Schaub
0844df8cc2 Scanning identifiers
This includes code that is likely not necessary.  The escape sequence scanning will likely not be used in our case, but I'm committing it here so it can be brought back if needed later.
2013-06-25 12:11:42 -06:00
Tim Schaub
040c80a5ad Expectations about token type 2013-06-25 12:11:42 -06:00
Tim Schaub
193cf4de50 Scan numeric literals 2013-06-25 12:11:41 -06:00
Tim Schaub
a5343161bf Separate lexer 2013-06-25 12:11:41 -06:00
Frederic Junod
cd13e700ac Pass options to the base class 2013-06-25 13:13:41 +02:00
Tim Schaub
99ba5a0da8 Store rings so exerior is clockwise and interior is counter-clockwise
KML and WKT don't specify a winding order, so we write those out in CW/CCW order (for exterior/interior).  GML references ISO 19107 that specifies CCW/CW, so we serialize in that winding order.

Having hand generated all this GML data the first time around, I reserve the right to modify it for the tests.
2013-06-24 17:46:36 -06:00
Tim Schaub
e292d8fa12 Add method to determine winding order of linear rings 2013-06-24 17:43:22 -06:00
ahocevar
a14b21d80c Use ol.Projection#.getMetersPerUnit()
As a follow-up to #815, this change makes
ol.tilegrid.createForProjection work in cases where a Proj4
projection does not have units set. For better code readability,
a new variable is used when calculating the resolution.
2013-06-25 00:29:50 +02:00
Tim Schaub
388967d00c Merge pull request #814 from tschaub/814-min-resolution
Fix vector rendering for projections that do not specify units
2013-06-24 11:08:50 -07:00
Tim Schaub
d10eff97a2 Allow getMetersPerUnit to work without units identifier (see #814) 2013-06-24 11:34:16 -06:00
Tim Schaub
d6be28a7bb Get rid of unnecessary waitsFor function
This was a relic from the Jasmine tests.  Mocha tests have a built-in timeout.  Async tests are registered with a function that takes a callback.
2013-06-23 11:20:57 -06:00
Tim Schaub
7a620de1bf Calling callback in WMS capabilities tests 2013-06-23 11:08:34 -06:00
Tim Schaub
be33fd58b3 Calling callback in GML v3 tests 2013-06-23 11:04:03 -06:00
Tim Schaub
54378f394a Calling callback in GML v2 tests 2013-06-23 11:02:38 -06:00
Tim Schaub
7bf24eb918 Calling callback in kml tests
Also reordering things so we have `expect(got).to.xmleql(expected)`.
2013-06-23 11:00:41 -06:00
Tom Payne
b7a1ada94d Merge pull request #798 from twpayne/fix-layer-setters
Don't attempt to constrain values in setters
2013-06-20 09:52:40 -07:00
Tom Payne
aa1a71ed96 Don't attempt to constrain values in setters 2013-06-19 13:38:57 +02:00
Tim Schaub
2ee0805075 Taking advantage of GitHub's rendering of .geojson 2013-06-18 15:39:45 -06:00
Tom Payne
bf9b0b4dd2 Merge pull request #779 from twpayne/ch-projection
Add native support for Swiss projections
2013-06-18 06:36:29 -07:00
ahocevar
4392feef1b Merge pull request #794 from ahocevar/simplify-ranges
Simplifying ranges structure by adding compiler hints. r=@tschaub,@twpayne,@elemoine
2013-06-18 01:27:24 -07:00
ahocevar
11cbbab901 Simplifying ranges structure by adding compiler hints
In JavaScript, keys of object literals are always strings, and
internal type conversions are performed. Now if we tell the
compiler that keys are numbers, we get inconsistent types when
iterating through keys. So instead we set the key type to string
and do a type cast to make the compiler happy. Note that we
could also do toString() instead of a type cast, but it would
add a performance penalty (see
http://jsperf.com/internal-type-conversion-vs-tostring-for-object-keys).
2013-06-17 17:37:48 +02:00
Tom Payne
7b9ac53ace Merge pull request #749 from openlayers/webgl-vector
Skeleton WebGL vector support
2013-06-17 07:08:33 -07:00
Tom Payne
941432af75 Use rigorous Swiss grid / EPSG:4326 transforms 2013-06-17 12:23:29 +02:00
Tom Payne
0968e2b00b Add ol.proj.EPSG2056 and factor out common code 2013-06-17 12:23:29 +02:00
Tom Payne
c02e2530f1 Add ol.proj.EPSG21781 2013-06-17 12:23:28 +02:00
Tim Schaub
e7d6bae0ad Providing proj in ol.test 2013-06-10 09:34:43 -06:00
Tim Schaub
a631c50979 Rename spec to be like src 2013-06-10 09:29:00 -06:00
Tom Payne
bbb95e15fa Fix line collection arguments in tests, thanks @ahocevar 2013-06-10 14:43:01 +02:00
Tom Payne
e260255ce8 Return Uint16Array from ol.geom2.LineStringCollection#getIndices 2013-06-01 18:16:43 +02:00
Tom Payne
38c0e24bcd Add Assertion#arreql
Needed because expect.js's eql does not support typed arrays.
2013-06-01 18:16:43 +02:00
Tom Payne
3225a07f6f Add ol.geom2.LineStringCollection#getIndices 2013-06-01 18:16:43 +02:00
Tom Payne
db2f805ed9 Return split values in a single interleaved Float32Array 2013-06-01 18:16:43 +02:00
Tom Payne
42f15f000b Add ol.structs.Buffer#getSplit32 2013-06-01 18:16:43 +02:00
Tom Payne
1690cb9cae Add ol.geom2.LineStringCollection 2013-06-01 18:16:42 +02:00
Tom Payne
93ba55d357 Add ol.geom2.PointCollection 2013-06-01 18:09:29 +02:00
Tom Payne
d51cdc0e48 Add ol.geom2 utility functions 2013-06-01 18:09:29 +02:00
Frederic Junod
a1a7e21f92 Redefine ol.Size to be Array.<number> 2013-06-01 10:22:06 +02:00
Tom Payne
075f4aadc7 Merge pull request #748 from twpayne/rename-projection-to-proj
Rename ol.projection to ol.proj
2013-05-31 04:34:22 -07:00
Frederic Junod
984002a7ec Change ol.Object event name syntax
'changed' to 'change' and '<attribute>_changed' to 'change:<attribute>'.
2013-05-31 12:38:37 +02:00
Tom Payne
46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00