I need to add capability to my Cesium app to drag-and-drop images(.png, .jpg, etc) onto it. Then, when the drop happens, I need to create a billboard with that image.
At first, I thought that the way to do it is to use Cesium.viewerDragDropMixin.
However it doesn't seem to have a way to specify function that is called when drop happens. I looked at the code for the Cesium.viewerDragDropMixinand saw a function handleDrop there which is specific to Czml.
When I tried to write my own mixin, using Cesium.viewerDragDropMixin as an example, Cesium crashed with message "Uncaught DeveloperError: mixin is required.".
So the questions I have are:
1. what is a proper way to implement Drag-andDrop
2. if I can use Cesium.viewerDragDropMixin, how do I specify function to process the drop?
3. If the proper way is to implement my own mixin, is there any tutorial on how to do it?
Thank you in advance,
Greg
I have similar issue. I need to modify the createOnLoadCallback function in order to handle geojson data before appearing (e.g. set the custom color and extrude polygons).
I'm a newbie in javascript so if one of you could explain to me what exactly should I do? To override the function in code or modify it in source code, make the modified copy and include it in the html script tag,...?
I am thankful and open to suggestions.
Best regards,
Paula
unfortunately I haven't managed to do anything with the issue and no one replied on my question.
Sorry
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
if (Cesium.defined(entity.billboard)) {
// billboard specific styling code
} else if (Cesium.defined(entity.polyline)) {
// polyline specific styling code
}Yes, indeed. It works. So, how can I detect on a billboard entity, if it is on (ex.point) or other (ex.polyline) from Drag-and Drop functionality???
Thanks