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

235
Vistas
JavaScript HERE map not showing on Bootstrap Tabs until window resized

I'm trying to show a HERE map on Bootstrap tabs with this simple example: https://developer.here.com/documentation/maps/3.1.30.3/dev_guide/topics/map-controls-ui.html

The problem is the map won't appear on page load until the window is resized. As soon as I change the window size the map appears right away. Or if I move th emap outside of the tabs it works fine. I’ve already tried forcing window and document event triggering - doesn’t help. Tried delay - nothing.

What else can I do to show the map on the tab on page load?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I’ve finally got it! I thought I needed to load the map on either window or document load, that may be true without tabs, but with tabs it’s about the tab shown.bs.tab event:

$('a[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
    if (lat > 0 && lng > 0) {
        loadMap({ lat: lat, lng: lng });
    }
});
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