dlr-eoc / ukis-frontend-libraries

A collection of angular ui-components, services, interfaces... to help you create geospatial mapping applications for the web.
Apache License 2.0
17 stars 4 forks source link

InterpolationLayer - no renderDeclutter #57

Closed voinSR closed 3 years ago

voinSR commented 3 years ago

Describe the bug

When you create an instance of InterpolationLayer, just like in the example shown in route-map4.component.ts

https://github.com/dlr-eoc/ukis-frontend-libraries/blob/128c9e311ffab9854bf2bb67193deb0fca4912a0/projects/demo-maps/src/app/route-components/route-example-custom-layers/route-map4.component.ts#L401

in the current master branch olMap complains that there is no renderDeclutter defined:

ERROR TypeError: this.getRenderer().renderDeclutter is not a function
    renderDeclutter BaseVector.js:226
    renderFrame Composite.js:135
    renderFrame_ PluggableMap.js:1402
    animationDelay_ PluggableMap.js:186
...

To Reproduce

Steps to reproduce the behavior:

run mentioned above example

Expected behavior

no error and working interpolation renderer

Versions

App

Device:

Additional context

as a temporal workaround I use following after constructing the layer:

InterpolationLayer.custom_layer.renderDeclutter = () => {};

MichaelLangbein commented 3 years ago

Oooh, interesting! rendererDeclutter has been added in the latest version of openlayers: see here. @voinSR : your solution is actually the correct way to go! The interpolation renderer does not require anything to actually happen in the renderDeclutter body. I'll add this to the renderer, so it's available with the next release. Thanks a lot!!

MichaelLangbein commented 3 years ago

PS: @voinSR , which version of Openlayers are you using?

MichaelLangbein commented 3 years ago

Issue handled with PR 59