-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin.html
More file actions
60 lines (53 loc) · 2.59 KB
/
Copy pathplugin.html
File metadata and controls
60 lines (53 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
<head>
<title>3D Context Creator</title>
<!-- interface with FormIt -->
<script type="text/javascript" src="https://formit3d.github.io/SharedPluginUtilities/FormIt.js"></script>
<script type="text/javascript" src="https://formit3d.github.io/SharedPluginUtilities/FormItInterface.js"></script>
<!-- UI and styling -->
<script src="https://cdn.jsdelivr.net/npm/osmtogeojson@3.0.0-beta.4/osmtogeojson.js"></script>
<script src="https://unpkg.com/@turf/turf@6/turf.min.js"></script>
<script type="text/javascript" src="https://formit3d.github.io/SharedPluginUtilities/FormItPluginUI.js"></script>
<link rel="stylesheet" type="text/css" href="https://formit3d.github.io/SharedPluginUtilities/FormItPluginStyling.css">
<link href="plugin.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800&display=swap');
</style>
<!-- plugin scripts -->
<script type="text/javascript" src="plugin.js"></script>
<script type="text/javascript">
FormItInterface.Initialize(async function () {
// on location set, update the UI to capture the new location
// and indicate whether 3D context can be generated
FormItInterface.SubscribeMessage("FormIt.Message.kSetLocation", async function(msg)
{
await FormIt3DContextCreator.updateUI();
});
// on satellite image import, update the UI to capture the new location
// and indicate whether 3D context can be generated
FormItInterface.SubscribeMessage("FormIt.Message.kSatelliteImageIsVisible", async function(msg)
{
await FormIt3DContextCreator.updateUI();
});
// on new sketch, update the UI to capture the new location
// and indicate whether 3D context can be generated
FormItInterface.SubscribeMessage("FormIt.Message.kNewModelRequested", async function(msg)
{
await FormIt3DContextCreator.updateUI();
});
// on open file, update the UI to capture the new location
// and indicate whether 3D context can be generated
FormItInterface.SubscribeMessage("FormIt.Message.kLoadComplete", async function(msg)
{
await FormIt3DContextCreator.updateUI();
});
// initialize the UI
FormIt3DContextCreator.initializeUI();
await FormIt3DContextCreator.updateUI();
}); // DOMContentLoaded
</script>
</head>
<body>
</body>
</html>