[Vuejs]-Resizing a map dynamically?

0👍

My guess is, you need to set a width on the iframe explicitly in CSS, something like:

.map { width: /* here your actual width in px */ }
.map iframe { width: 100%; } /* so it's always 100% of the parent */

However, note that an iframe’s height will never adapt automatically and keep the ratio.
So you need to set another height yourself.

So you may also want to do something like:

@media (my breakpoint A) {
  .map iframe { width: XX; height: XX } /* fixed with and height for this break point */
}

@media (my breakpoint B) {
  .map iframe { width: XX; height: XX } /* fixed with and height for this break point */
}

@media (my breakpoint C) {
  .map iframe { width: XX; height: XX } /* fixed with and height for this break point */
}

Leave a comment