Tile3DLayer Layer still loading and rendering when visible property is false? #6115
-
I'm not sure if this is a problem in my code or a possible bug? const osmLayer = new TileLayer({
data: "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png",
visible: osmLayerVisible,
minZoom: 0,
maxZoom: 19,
tileSize: 256,
renderSubLayers: (props) => {
const {
bbox: { west, south, east, north },
} = props.tile;
return new BitmapLayer(props, {
data: null,
image: props.data,
bounds: [west, south, east, north],
});
},
}); I successfully toggle the visibility of the layer with a checkbox: <input
type="checkbox"
checked={osmLayerVisible}
onChange={onOsmLayerVisibleChange}
/> And useState: const [osmLayerVisible, setOsmLayerVisible] = useState(true);
const onOsmLayerVisibleChange = useCallback(() => {
setOsmLayerVisible(!osmLayerVisible);
}); This works really well, but when I try the same thing with a Tile3DLayer like this const buildingsLayer = new Tile3DLayer({
id: "3d-buildings",
data: "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/SanFrancisco_Bldgs/SceneServer/layers/0",
visible: buildingsLayerVisible,
loader: I3SLoader,
}); I can only toggle the visibility if all loading of the buildingsLayer is finished. If I toggle the checkbox before that it hides the layer but renders it again when there are still some tiles loading in the background. Is there a way to stop loading tiles for a Tiles3DLayer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Can you open a bug? Thank you! |
Beta Was this translation helpful? Give feedback.
Can you open a bug? Thank you!