-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpointCloudLayer.html
87 lines (80 loc) · 3.37 KB
/
pointCloudLayer.html
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html ng-app="pointCloudLayer">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Search Widget</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.5/esri/css/main.css">
<style type="text/css">
.esri-view {
height: 97.5vh;
}
</style>
</head>
<body>
<div ng-controller="controlador as sceneView">
<esri-scene-view map="sceneView.map" on-create="sceneView.onViewCreated"
view-options="{
camera: {
heading: 210,
tilt: 78,
position: {
x: -8249335,
y: 4831005,
z: 50.7,
spatialReference: {
wkid: 3857
}
}
}
}">
<esri-home-button view="sceneView.sceneView"
view-ui-position="{
position: 'bottom-left',
index: 2
}"
ng-show="sceneView.viewLoaded">
</esri-home-button>
</esri-scene-view>
</div>
<script src="https://js.arcgis.com/4.5"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://unpkg.com/angular-esri-map@2"></script>
<script type="text/javascript">
'use strict';
angular.module('pointCloudLayer', ['esri.map'])
.controller('controlador', function(esriLoader, $scope) {
const self = this;
esriLoader.require([
'esri/Map',
'esri/widgets/Search',
'esri/layers/PointCloudLayer'
], function(Map, Search, PointCloudLayer) {
self.map = new Map({
basemap: 'streets-relief-vector',
ground: 'world-elevation'
});
self.pcLayer = new PointCloudLayer({
url: "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/BARNEGAT_BAY_LiDAR_UTM/SceneServer"
});
self.map.add(self.pcLayer);
self.onViewCreated = function(view) {
self.sceneView = view;
self.viewLoaded = true;
const searchWidget = new Search({
view: view
});
searchWidget.startup();
view.ui.add(searchWidget, {
position: 'top-left',
index: 0
});
$scope.$on('$destroy', function() {
searchWidget.destroy();
});
};
});
});
</script>
</body>
</html>