17 Commits

Author SHA1 Message Date
Tomas Burleigh
d524d46969 WebGLPointsLayer wrapX support - partially addressing #11131
WebGLPointsLayer renderFrame and renderHitDetection will now draw
multiple worlds if the source and projection support wrapX.

Hit detection needs additional improvement. It stops working after
more than one wrap around the world. If 0 is the middle world, then
the hit detection works for worlds -1, 0, and -1, but not for worlds
> 2 or < -2.

The example has hit detection enabled, demonstrated with a colour
change on hover for the circle styles. When moving the mouse, the hit
detection is unreliable and flickers on/off. This needs improvement.

The webgl-points renderer test has been updated.
2022-04-01 13:35:13 +13:00
Tim Schaub
054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Olivier Guyot
33e24e9ce9 Updated webgl-points-layer example to add a style with rotation
Also made it so that the map re-renders continously, to be able to
use the ["time"] operator.
2019-12-20 21:54:06 +01:00
jahow
f7b0f6750b Resolve memory leak when deleting a webgl layer
Various references were kept, preventing the layer and underlying
renderer and webgl context to be garbage collected.

Also, the Helper was simplified because it turns out deleting manually
all Webgl objects is useless: these objects will be released when
the context is garbage collected anyway.

Note: this touches the Layer and BaseLayer classes, as the following were
preventing the layer from being garbage collected:
* layer reference in the `state_` object in BaseLayer
* dangling listener for source change in Layer
2019-11-04 09:31:38 +01:00
Olivier Guyot
e63bb45e6f Webgl points layer / allow disabling hit detection
Having hit detection enabled has an overhead as it means
continously generating additional render instructions and rendering
to an offscreen canvas
2019-10-25 15:11:37 +02:00
Olivier Guyot
a844691d7b Added new example styles in the webgl points layer example 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
1fe5a68e16 Fix the triangles style in the wbegl-points-layer example 2019-10-22 23:27:26 +02:00
Maximilian Krög
db49842f63 Display error message instead of 'style not valid yet...' 2019-10-03 17:06:39 +02:00
Maximilian Krög
d0cd1064ff Also check predefined styles for validity. 2019-10-03 03:02:58 +02:00
Maximilian Krög
b4a996e760 Catch errors in style definition
Do not replace the layer if the style is invalid.
Thrown errors are caught and the layer will not be changed.
2019-10-03 01:59:42 +02:00
Maximilian Krög
dee114d4c4 Guard against JSON.parse errors.
Also show successful style parse status after a style error was corrected
but it is the same style as previously.
2019-10-03 01:59:42 +02:00
Maximilian Krög
db34a338d6 Reset status message when selecting from select element. 2019-10-03 01:59:21 +02:00
Maximilian Krög
c1921a6b16 Preselect the 'circles' style in the select input
The text in the editor element already is from the circles style..
2019-10-03 01:57:49 +02:00
Olivier Guyot
858f0fc0cc Update the webgl-points-layer example to reflect new possibilities 2019-09-26 16:30:19 +02:00
Olivier Guyot
7da3b60061 Webgl Layer / rename literalStyle property to style 2019-09-26 14:44:32 +02:00
Olivier Guyot
cb2c596a6d Add an example for the WebGLPointsLayer with editable style 2019-09-24 17:59:21 +02:00