Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

200
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda