viewerDragDropMixin feature for adding kml removes my 3d model


I used cesium viewerDragDropMixin to drag and drop my kml file but when kml filed loaded to viewer 3d model deleted immediately. i think there is a line code in viewerDragDropMixin removes all entity that cause this problem.

How can i add my local kml file to cesium and i have both 3model and kml file ?

Hi @mohamad,

Welcome to the community! :grinning: :rocket:

You are correct, by default viewerDragDropMixin has the property clearOnDrop set to true. This means that dropping files will clear all existing data sources. I recommend setting clearOnDrop set to false, as I think it is more appropriate for your use case.


1 Like

Thank you

@mohamad of course! Happy to help out :grinning: