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

234
Visualizações
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 Respostas
Responde à pergunta

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 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