0

I implemented leaflet map and it shows correctly outside tab or if it is an active tab but if I put it inside tab that is not active then I can see only the little corner of the map and zoom in and out controls. Interestingly if I zoom in or out the browser with CTRL and + or - the map is shown correctly. How can I sort this out? Any idea?

Thanks.

Screenshot https://ibb.co/iPS8TL

Dražen
  • 37
  • 1
  • 5
  • 1
    Possible duplicate of [Data-toggle tab does not download Leaflet map](https://stackoverflow.com/questions/36246815/data-toggle-tab-does-not-download-leaflet-map) – ghybs Oct 30 '18 at 08:56
  • 1
    Possible duplicate of [Leaflet Map not showing in bootstrap div](https://stackoverflow.com/questions/31030949/leaflet-map-not-showing-in-bootstrap-div) – peeebeee Oct 30 '18 at 09:26
  • No guys. The corner of the map is still downloaded. – Dražen Oct 30 '18 at 09:35
  • 1
    Yes guys. Both of the suggested dupes describe exactly that. "Typically, it downloads tiles only for the fraction of the container it thinks is shown. This can be a single tile in the top left corner in the case of a container that was entirely hidden at map initialization time." – peeebeee Oct 30 '18 at 10:02
  • Could I send you Peeebeee the source code to PM to take a look? – Dražen Oct 30 '18 at 10:17
  • 1
    Have you tried the solutions in the suggested dupes? – peeebeee Oct 30 '18 at 10:22
  • Yes, I tried all things that you posted. It doesn't work for me but you pointed right. This is the same problem that I face but I couldn't sort this out with map.invalidateSize(true); – Dražen Oct 31 '18 at 09:07

0 Answers0