Skip to content

[map] OpenLayers instance might not be initialized #2595

@sissbruecker

Description

@sissbruecker

Description

Follow up from comment here: #2576 (comment)

Currently the web components internal OpenLayers instance is initialized in onReady, which can be too late in certain cases, for example when using the map in a dialog. In that case the connector will not be able to initialize properly, and all subsequent calls to the connector will fail.

We should try to initialize the OpenLayers instance earlier, ideally when the element is constructed.

Expected outcome

Adding map to an invisible dialog causes no errors.

Actual outcome

Adding map to an invisible dialog results in Uncaught TypeError: mapElement.configuration is undefined

Minimal reproducible example

        Map map = new Map();
        Dialog dialog = new Dialog(map);
        add(dialog);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions