Hi folks,
I am running into an issue with my app where my tiled layers sometimes are not visible, depending on the zoom level.
Starting with the SDK example with an empty basemap, I add a layer and then set the viewpoint. Many scales work fine, but sometimes it does not. For example if I do this inside the setMapView API:
if (!mapView || mapView == m_mapView) {
return;
}
m_mapView = mapView;
m_mapView->setMap(m_map);
auto layer = new WebTiledLayer("https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png", QStringList { "a", "b", "c" });
m_map->basemap()->baseLayers()->append(layer);
connect(m_map, &Map::loadStatusChanged, this, [&](LoadStatus loadStatus)
{
if (loadStatus == LoadStatus::Loaded)
{
auto point = Point(-109.37801138359127, -27.102741576507512, SpatialReference::wgs84());
auto viewpoint = Viewpoint(point, 701.4829384369524);
m_mapView->setViewpointAsync(viewpoint, 0.0);
}
});
emit mapViewChanged();
Some observations:
1. Zooming in/out brings the tiles back
2. Other layer types (like ArcGISTiledLayer) work fine
3. If the initial map constructor is set like this "m_map(new Map(BasemapStyle::OsmStandard, this))", then that works.
4. I believe this happens on all platforms
Thanks!