-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
vaadin/web-components
#3388Labels
Description
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);