Description This function saves all the annotations drawn on the current file displayed in CSPanorama Viewer. By default, the annotation is saved as a .ann file in the server annotation directory. is there are two modes you can save annotations in the server. The modes are append and overwrite. In append mode, the new annotations are saved after the existing annotations present on that file. In overwrite mode, the new annotations are saved by replacing the existing annotations present on that file. The function is a JavaScript Promise. Below is a sample function that describes how to chain multiple functions in JavaScript Promise.
var fileName = PanoramaAPI.fileName;
        if (fileName != "") {
            var saveMode = "overwrite";
            PanoramaAPI.saveAnnotation(saveMode).then(function (data) {
            }).catch(function (error) {
                if (error.errorResponse == "EmptyAnno") {
        else {
            alert("Source Image not available");
Syntax PanoramaAPI.saveAnnotation(saveMode).then(function (d) {})
Parameters saveMode:string
Returns SaveAnnotationResult:JavaScriptObject {"SaveAnnotationResult":"Annotation saved successfully"}


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment