Answer the question
In order to leave comments, you need to log in
How to fix the height of the Yandex map?
There is a Yandex map:
There is a map initialization code:
$(document).ready(function(){
if ($('.invoices-map').length) {
ymaps.ready(initInvoicesMap);
}
console.log(ymaps);
})
function initInvoicesMap() {
var multiRoute,
mapText,
mapLink;
// Инициализация карту
myInvoiceMap = new ymaps.Map($('.invoices-map')[0], {
center: [55.752411, 37.623140],
zoom: 9
});
console.log(myInvoiceMap);
}
Answer the question
In order to leave comments, you need to log in
.invoices-map
must have some height before the map loads. If you use 100% for absolute positioning, then the parent must have some height, otherwise it will be 0.
Try 100%
using instead100vh
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question