Reconstruct a maps component within a layout

I have a layout of components, one of which is an open-maps. I would like to reconstruct just the maps component, or “reset” it to what it originally was when rendered for the first time.

I do not want to reconstruct the entire layout as some components need to retain their values. How can I achieve this?

Minimal layout with multiple components, similar to my setup: Code Snippet

Hello @username12345,

If you need to completely reinitialize the component, then the common way is to call the webix.ui() constructor, passing the necessary config and the id of the view to be reinitialized there: Code Snippet

However, it’s better to do without a full reconstruction. There are 2 different ways to do it:
a. Get the instance of the object with the map through getMap(), and work with the api of the object by setView(). Please, check out the snippet with example: Code Snippet
b. You can use define() method (Please note that for the animation to work correctly, you must set setTimeout()): Code Snippet

1 Like

Thank you for the solutions

1 Like