Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

201
Visualizações
Adapt width of leaflet popup using Vue2Leaflet's l-popup component

I am programming a web application and using leaflet to display a map. I defined markers and popups which appear upon click on the respective markers.

Unfortunately the popups look weird at the moment (the height is too large and the width too small). For this reason I am trying adapt the width of the popups.

I saw in the Vue2Leaflet documentation (https://vue2-leaflet.netlify.app/components/LPopup.html) that I can pass an options prop to the l-popup component. So I tried the following:

<l-popup :options="{ width: 600 }" id="popup"></l-popup>

But it did not work. How do I pass the width options correctly, so that the width of the popup changes? Or am I on a completely wrong path? If yes, how can I modify the width of the l-popup component?

Thanks for any help!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I just had the same issue. Finally, I didn't use the options in but used CSS instead.

Example:

<l-popup class="map-popup"></l-popup>

and then simply styled my element in CSS:

.map-popup {
    min-width: 600px;
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda