Skip to content Skip to sidebar Skip to footer

Angular-Leaflet-Directive - Issue Where The Map Is Technically Rendering, But None Of Its Tiles Appear .

. . . because the tiles are absolutely positioned within parent containers whose heights are equal to zero. Here is the directive: https://github.com/tombatossals/angular-leaflet-

Solution 1:

This selector in my CSS was the problem:

img {
  max-height: 100%;
  max-width: 100%;
}

The solution was simply to allow images to render as they normally would within the leaflet map 's container:

.leaflet-container img {
  max-height: none;
  max-width: none;
}

Solution 2:

Hard to tell, without seeing any of your project's code. But it sounds like you need to apply a height to you #map container element. Check out one of the leaflet tutorials for possible css examples.

Something like the following would work:

#map{ height: 600px; width: 100% }

or

#map{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

Post a Comment for "Angular-Leaflet-Directive - Issue Where The Map Is Technically Rendering, But None Of Its Tiles Appear ."