Map setCenter method issue

Hello friends,

Why doesnt webix see the setCenter method of map object. I got the maps
id… https://webix.com/snippet/e3699078

thanks in advance

Hello,

Firstly, Openmap uses setView() and panTo() methods to modify the map’s position.

The intergration code and documentation contains the reference to the setCenter method, but now it is a legacy one and is never called. So we will fix the code and related docs shortly.

Secondly, the getMap() method of a not yet rendered map expectely returns an undefined value. To “wait” for the map to render and get it as soon as it is available you can pass the “waitMap” argument into the method (added in
4.2):

$$("map").getMap(true).then(function(map){
    map.panTo([lat, lng]);
});

Check the working snippet, please: https://webix.com/snippet/ef18fb85

This is it. Thank you so much.

Edit: docs have been changed immediately. I think you should add open-map marker too.

Thank you for suggestion, but the API of maps itself is beyond Webix functionality. Webix allows you to access the map with the getMap() method, but for working with a map instance you should consult the proprietory APIs of these maps.

Ok then i am working my way back to yandex-map but… this time map doesnt load… only if i resize the page it works properly.
https://webix.com/snippet/7ac1883d

i added extra cdn tags because webix cdn source doesnt contain ymaps object …

There seems to be a collision between two Yandex API files included into the page. To avoid it, you can get the code of Yandex Map-Webix integration locally and change the url in the render() method of a “yandex-map” widget:

Check please: https://webix.com/snippet/d80bc79f