Z
Z
zlodiak2018-07-30 20:57:35
JavaScript
zlodiak, 2018-07-30 20:57:35

How to track the full screen mode of the map?

Please tell me with the help of which design you can track the inclusion and deactivation of the full-screen mode of the map. I searched here but didn't see anything useful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-07-30
@zlodiak

Have you looked here ? - events fullscreenenter, fullscreenexit.
UPD. Taken from the comments:

something is wrong with them

Handlers should be attached not to the map itself, but to the control responsible for switching the fullscreen mode:
const fs = map.controls.get('fullscreenControl');
fs.events.add('fullscreenenter', () => console.log('ON'));
fs.events.add('fullscreenexit', () => console.log('OFF'));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question