Olivier Guyot
2a2783c086
ShaderBuilder / better handling of strings variables/attributes
...
Now values which are not mentioned in the style are still added to
the string literals mapping.
Also an error will be thrown if a style references a missing variable.
2019-10-28 15:21:44 +01:00
Olivier Guyot
2f49876180
Expressions / add != operator & slightly better doc
2019-10-28 15:13:43 +01:00
Andreas Hocevar
db6314b6b2
Merge pull request #10187 from ahocevar/tabindex-scrollover
...
Set touch-action to allow native touch gestures
2019-10-28 13:49:44 +01:00
Olivier Guyot
4462608991
Expressions / adds color and array conversion operators
...
Also fixes existing error throwingtests which were essentially doing nothing.
2019-10-25 14:55:44 +02:00
Olivier Guyot
ff3cc9b4d0
Expressions / renamed operator pow to ^
...
To be more in line with Mapbox style spec
2019-10-25 14:55:44 +02:00
Olivier Guyot
acf973751b
Webgl / added time and resolution as default uniforms
...
Also added the `zoom` and `resolution` style operators
2019-10-25 14:55:44 +02:00
Olivier Guyot
e843b2cfc0
Expressions / adaptation and cleanup after stretch operator removal
...
The examples have been fixed as well.
2019-10-25 14:55:44 +02:00
Olivier Guyot
719495587c
Expressions / rework the interpolate operator
...
This operator is now able to map numbers to output ranges as well as colors,
making the stretch operator unnecessary. Also allows giving multiple stops,
like in Mapbox style spec.
2019-10-25 14:55:44 +02:00
Olivier Guyot
d643951a74
Shader Builder / add option to generate hit detection shaders
2019-10-25 14:55:44 +02:00
Olivier Guyot
a39f751981
Shader Builder / adapt logic & test to the new expression types
...
Also fixes a sneaky bug where the two last texture coordinates were inverted.
2019-10-25 14:55:44 +02:00
Olivier Guyot
fc98704bcb
Expressions / adds a test for a complex combination of operators
2019-10-25 14:55:44 +02:00
Olivier Guyot
27c530ec64
Expressions / introduce the match operator
...
This operator allows mapping from input values to output values of different
kinds and handles variable arguments count.
2019-10-25 14:55:44 +02:00
Olivier Guyot
e3f7d29bb2
Expressions / add utilities for using strings in GLSL & more type checking
...
It is now possible to specify a type hint when parsing an expression, which
helps determine the output value type.
When no single output type can be inferred, an error is thrown.
For strings, every literal value will be replaced by a number and a map of
these associations will be kept in the parsing context, which is passed
recursively.
2019-10-25 14:55:44 +02:00
Olivier Guyot
31dae929f5
ShaderBuilder / adapt logic & tests to new expressions module
2019-10-25 14:55:44 +02:00
Olivier Guyot
5712792772
Expressions / add more tests for conversion to GLSL
2019-10-25 14:55:44 +02:00
Olivier Guyot
bcf7649b9a
Expressions / store the variables & attributes in the context
2019-10-25 14:55:44 +02:00
Olivier Guyot
7e4119d580
Expressions / restored the parsing logic with better type checking
...
Converting expressions to GLSL is now done in ol/style/expressions, with the
same logic as before in ol/webgl/ShaderBuilder.
2019-10-25 14:55:44 +02:00
Olivier Guyot
72903d6454
Expressions / added operator declarations & type checking logic
2019-10-25 14:55:44 +02:00
Olivier Guyot
35af80b433
Style / add an ol/style/expressions module
...
This module will contain the utilities and operator declarations
for literal style expressions, boh for type checking and parsing
2019-10-25 14:55:44 +02:00
Andreas Hocevar
cc24ec1be6
Set touch-action to allow page scrolling
2019-10-24 16:18:40 +02:00
Andreas Hocevar
062614388c
Merge pull request #10161 from ahocevar/vectorimage-getfeatures
...
Implement getFeatures() for ol/layer/VectorImage
2019-10-23 11:26:08 +02:00
Olivier Guyot
8c5be52462
Merge pull request #10168 from jahow/webgl-style-add-filter
...
Webgl / Add support for filtering and color interpolation in style expressions
2019-10-23 09:45:16 +02:00
Olivier Guyot
d837166a1b
Literal Style / add new math operators
2019-10-22 23:17:00 +02:00
Olivier Guyot
c659c05de8
ShaderBuilder / fix stretch operator GLSL expression
2019-10-22 23:17:00 +02:00
Olivier Guyot
485ade42b5
Literal Style / add support for color interpolation
2019-10-22 23:17:00 +02:00
Olivier Guyot
85c3aae454
ShaderBuilder / add support for color interpolation in parse
2019-10-22 23:17:00 +02:00
Olivier Guyot
a29fc016f5
ShaderBuilder / formatColor/Array utilities now output vecX(...)
2019-10-22 23:17:00 +02:00
Olivier Guyot
19eadaea24
Shader Builder / add type checking in expressions parsing
...
All expressions will now be type checked before actually being parsed.
2019-10-22 23:17:00 +02:00
Olivier Guyot
b8e8d30df0
Shader Builder / add utilities for checking an expression type
...
Type checking is done either against a literal value (number, string...)
or against the operator in case of an expression.
Sometimes it is not possible to infer only one type, for example
the value 'transparent' could either be a color or a string. This
is covered by the fact that all operators expect exactly one type
for their arguments.
2019-10-22 23:17:00 +02:00
Olivier Guyot
f43637cc33
Shader Builder / support strings in formatColor
2019-10-22 23:17:00 +02:00
Olivier Guyot
56faf4c3ad
Color / add an isStringColor utility function
2019-10-22 23:17:30 +02:00
Olivier Guyot
a0b271a812
Literal Style / add support for variables in the style
...
These variables are accessed using the `var` operator, and are meant
to be mutated directly in the style object. When doing so,
the new value will always be used for the render.
This is intended to be used for modifying the style through external
parameters such as an input field, a slider, mouse position etc.
2019-10-22 23:17:00 +02:00
Olivier Guyot
94b8cf6af3
Webgl / add support for a time operator in literal styles
...
This required adding `u_time` as one of the default uniforms provided by the
webgl helper.
2019-10-22 23:17:23 +02:00
Olivier Guyot
0c0c8c5d56
Literal Style / add support for a filter property
2019-10-22 23:17:00 +02:00
Andreas Hocevar
fef4d4e9b7
Merge pull request #10093 from mike-000/patch-3
...
Set label text for Graticule option styles
2019-10-22 15:23:01 +02:00
Olivier Guyot
e38250ee14
ShaderBuilder / add fragment discard expression in shader params
2019-10-22 11:39:30 +02:00
Andreas Hocevar
39012a58f8
Implement getFeatures() for ol/layer/VectorImage
2019-10-22 11:27:26 +02:00
Olivier Guyot
9ee93cd2cf
ShaderBuilder / refactoring to use an actual builder pattern
...
There is now a ShaderBuilder class with chainable methods
to specify more easily the contents of the final shaders.
This is to avoid passing around large objects to different functions,
and allow for a richer API.
The documentation has also been corrected and clarified.
2019-10-22 11:12:06 +02:00
Edward Nash
ed18310136
Improve test in case of async call
2019-10-22 10:21:52 +02:00
Edward Nash
ee653a8e0d
Add regression test for event target on Control
...
* Check possible name collision of target element with EventTarget
2019-10-22 09:37:05 +02:00
mike-000
7edd10d66f
Test that label text is set in styles
2019-10-21 16:00:54 +01:00
Andreas Hocevar
54884314ee
Merge pull request #10094 from ahocevar/immediate-hitdetection
...
New Layer#getFeatures method with fast hit detection
2019-10-14 22:21:08 +02:00
Andreas Hocevar
0cb9d73848
No ERROR state for render tiles
2019-10-11 14:58:22 +02:00
Olivier Guyot
87414256e2
Heatmap / use worker events instead of timeout for test
2019-10-11 14:06:27 +02:00
Olivier Guyot
b44a6ab26a
Heatmap / add hit detection shaders
2019-10-08 13:27:31 +02:00
Andreas Hocevar
f477fc18f2
Add tests
2019-10-08 08:23:38 +02:00
Andreas Hocevar
315695eeb8
New Layer#getFeatures method with fast hit detection for VectorLayer
2019-10-08 08:23:38 +02:00
Olivier Guyot
176dccd6df
Merge pull request #10060 from mike-000/patch-1
...
Ensure zoom level is not less than minimum integer zoom level for extent
2019-09-30 17:34:45 +02:00
Tim Schaub
d3b47c794e
Make the immediate API work with a user projection
2019-09-30 08:28:50 -06:00
Tim Schaub
7c8b2215d4
Remove unused code
2019-09-29 07:05:48 -06:00