Tell me, please, how to apply a mask in Yandex maps regions?

The example from http://dimik.imtqy.com/ymaps/examples/regions/ I know. In all runet only to him and link. Specifically for two files - mask-overlay.js and region-selector-map-mask-view.js, but they do not work for me.

The API is connected 2.1 and in the example this is 2.0. Maybe because of this? Or do you need to fix something in these files? Are there those who have already encountered this question and managed to realize it?

  • What exactly does not work? - tutankhamun
  • The mask is not displayed on the maps. stumbles on the line: ymaps.util.augment (MaskOverlay, ymaps.overlay.staticGraphics.Polygon - throws a mistake Cannot read property 'Polygon' of undefined - Eugene
  • Apparently there is no such layer on the map. What exactly is your task? Give the code you are working on (preferably the part of the code that reproduces the problem) - tutankhamun
  • collected code that highlights the map of Russia and some areas on it. It works. You need to hide everything else outside the selected area, for this you added the code from these two js files to yourself, but nothing happened. of the error so far only the above. - Eugene
  • API 2.1 and 2.0 are backwards incompatible. Therefore, code written for 2.0 may not work with API 2.1. There are instructions for switching from version to version: tech.yandex.ru/maps/doc/jsapi/2.1/update/concepts/… - Reni

0