Question:
It is necessary that a certain layer or the entire site has a Yandex map in the background.
Answer:
Here is an example
// Как только будет загружен API и готов DOM, выполняем инициализацию ymaps.ready(init); function init () { // Создание экземпляра карты и его привязка к контейнеру с // заданным id ("map") var myMap = new ymaps.Map('map', { // При инициализации карты, обязательно нужно указать // ее центр и коэффициент масштабирования center: [56.326944, 44.0075], // Нижний Новгород zoom: 13 }); }
*{ padding: 0; margin: 0; box-sizing: border-box; } html { height:100% } body { height: 100%; margin:0px; padding:0px } #map{ height:100%; width: 100%; position: absolute; top: 0; left: 0; } .content{ width: 300px; min-height: 200px; margin: 0 auto; background: #fff; position: relative; z-index: 1; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU" type="text/javascript"></script> <div class="content"> </div> <div id="map"> </div>