--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
var kmlfiles = Cesium.IonResource.fromAssetId(assetID)
.then(function (resource) {
return Cesium.KmlDataSource.load(resource, {
camera: viewer.scene.camera,
canvas: viewer.scene.canvas
});
})
.then(function (dataSource) {
return viewer.dataSources.add(dataSource);
});
viewer.zoomTo(kmlfiles );
I want to show/hide kml file on checkbox click. Problem is that I have collection of kml datasources in kmlfiles object and i didn't get the filename or assetid in kmlfiles object, So that i will remove particular kml datasource. Any solution?
Thanks
Did you ever find a solution to this Rohit? I'd be interested in doing something similar if you got it working.
Omar,
If I used the viewer.resources.removeAll() then it seems to work OK without crashing. When I was trying to remove things individually is when I was running into problems. Fortunately, I only need to have one datasource at a time, so removeAll should work for me, thank you.
To unsubscribe from this group and stop receiving emails from it, send an email to cesiu...@googlegroups.com.