DroneDeploy
Search…
Plans.create
1
<!DOCTYPE html>
2
<html lang="en">
3
4
<head>
5
<meta charset="UTF-8">
6
<title>Document</title>
7
<style>
8
.author {
9
font-size: 0.9em;
10
}
11
12
.title {
13
font-size: 1.1em;
14
font-weight: 500;
15
border-bottom: 1px dotted black;
16
}
17
18
.sans {
19
font-family: Lato, sans-serif;
20
color: rgba(0, 0, 0, 0.87);
21
}
22
23
.key {
24
font-weight: 700;
25
}
26
27
ul {
28
padding: 5px;
29
}
30
31
li {
32
list-style: none;
33
}
34
</style>
35
</head>
36
37
<body>
38
<h1 class="title sans">Plans.create example</h1>
39
<ul id="plan-id"></ul>
40
<script>
41
var planOutput = document.getElementById('plan-id');
42
var geometry = [
43
{lat: 35.92778956007768, lng: -96.74685001373292},
44
{lat: 35.92524492896255, lng: -96.74667120678352},
45
{lat: 35.92532220011748, lng: -96.74959659576417},
46
{lat: 35.92778151526379, lng: -96.7496186761855},
47
];
48
var options = {name: 'Example Plan'};
49
50
new DroneDeploy({ version: 1})
51
.then(function(dronedeployApi) {
52
return dronedeployApi.Plans.create(geometry, options)
53
})
54
.then(function(planId) {
55
planOutput.innerHTML = 'Newly created plan ID:' + planId;
56
});
57
</script>
58
</body>
59
60
</html>
Copied!
Last modified 2yr ago
Copy link