Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!