Zooming in causes buildings on the map to dissapear
There is currently a current maximum zoom limit where buildings are visible on the map. When zooming in more, they dissapear. Is this intended behavior? Seems like the building polygons get culled when too close, which I would not expect to happen:
Before zooming in:
After zooming in:
Thanks for reporting. We just released an update for the Maps Control, so I will report back when the team has had a change to look at this issue.
The building footprints are a tile layer added to the map style. Digging into this I'm finding that the building data source in the map style has a max source zoom of 22, however, for building tiles with zoom > 20, the tile server is returning empty tiles. So possibly an issue in the tile service. That said, a simpler solution would be to update the max source zoom in the map style to 20. I believe the building layer style does not specify a max zoom for the display, so it should overscale the tiles to snap to the limits on the map (22 to 24 depending on if this has been changed in the map options).
As a temporary workaround, using some undocumented/unsupported methods, we could override the max zoom of that source within the map style as a workaround. Note, this could break with any update, although most likely only in a major version number update. Using the following code I'm able to see the building footprints at all zoom levels. Note that they do get a bit blurry as you get into the deep zoom levels since the tiles are being over scaled.
map.events.add('ready', () => {
//Monitor the map style for changes as we have to set this each time the style changes.
map.events.add('stylechanged',extendBuildingZooomRange);
//Update the current style.
extendBuildingZooomRange();
});
function extendBuildingZooomRange(){
//Get the "building" source from the underlying libre map instance. (this is a workaround). The source ID name chould change in the future, as well as access to the underlying map libre instance removed.
const source = map._getMap().getSource("buildings");
//Verify we were successful in getting the source.
if(source) {
//Update the max zoom property.
source.maxzoom = 20;
//Resize the map to trigger a repaint.
map.resize();
}
}
@rbrundritt The temp fix works, thanks!
Hi, @Jxlle , Thanks for reporting this issue. We're trying to fix it. I will update in this issue once it's being resolved.
@Jxlle , we had fixed this issue. Please let us know if same issue happens. Thanks.