border-top: 1px dashed #333;
font-family: Lato, sans-serif;
color: rgba(0, 0, 0, 0.87);
<h1 class="title sans">Annotation.get Example</h1>
<div id="annotation-details"></div>
var annotationDetails = document.getElementById('annotation-details');
function formatOutput(annotation, i) {
<h2 class="ann-title sans">Annotation ${i + 1}</h2>
${annotation.geometry.lat && annotation.geometry.lng ?
'<div class="coordinates"><span class="subtitle sans">Coordinates:</span> ' + annotation.geometry.lat + ',' + annotation.geometry.lng + '</div>'
<div class="type"><span class="subtitle sans">Type:</span> ${annotation.type}</div>
<div class="description"><span class="subtitle sans">Date Created:</span> ${new Date(annotation.dateCreation).toDateString()}</div>
.then(function(dronedeployApi) {
return dronedeployApi.Plans.getCurrentlyViewed()
return dronedeployApi.Annotations.get(plan.id, {
.then(function(annotations) {
annotationDetails.innerHTML = annotations.map(formatOutput).join('');