init()
, you initialize the card and connect the controls to it:map.hideControls ();But that's not all: if you leave everything as it is, the controls will not appear. In order for them to appear when hovering over a div and disappear when the pointer is output from the zone of this div, you need to insert the following code immediately after the previous one:
GEvent.addListener (map, "mouseover" , function () {Everything turned out to be very, very simple! A working example is here .
map.showControls ();
});
GEvent.addListener (map, "mouseout" , function () {
map.hideControls ();
});
Source: https://habr.com/ru/post/39433/
All Articles