-
Notifications
You must be signed in to change notification settings - Fork 4
/
ttt.html
100 lines (92 loc) · 3.17 KB
/
ttt.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
88
89
90
91
92
93
94
95
96
97
98
99
100
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<!--
ArcGIS API for JavaScript, https://js.arcgis.com
For more information about the layers-vectortilelayer sample, read the original sample description at developers.arcgis.com.
https://developers.arcgis.com/javascript/latest/sample-code/layers-vectortilelayer/index.html
-->
<title>VectorTileLayer | Sample | ArcGIS API for JavaScript 4.17</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link
rel="stylesheet"
href="https://gis.cloud.cityworks.cn/arcgisapi/4.16/esri/css/main.css"
/>
<script src="https://gis.cloud.cityworks.cn/arcgisapi/4.16/dojo/dojo.js"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/views/SceneView",
"esri/layers/VectorTileLayer"
], function (Map, MapView, SceneView,VectorTileLayer) {
// Create a Map
var map = new Map();
// Make map view and bind it to the map
var view = new SceneView({
container: "viewDiv",
map: map,
center: [-98.5795, 39.8282],
zoom: 3
});
/********************************************************************
* Add a vector tile layer to the map
*
* The url must point to the style or the vector tile service
*********************************************************************/
var tileLayer = new VectorTileLayer({
url:
"http://192.168.100.51/server/rest/services/Hosted/BASW_JSC_BASEMAP_VECTOR/VectorTileServer"
});
map.add(tileLayer);\
"getPosition": function (item) {
if(item){
return [item.lon.value, item.lat.value]
}
return null;
},
"getArr": function(arr) {
const newArr: any = [];
// eslint-disable-next-line no-restricted-syntax
for (const item of arr) {
newArr.push({
lat: item.lat,
lon: item.lon,
camera_id: item.camera_les_number.value,
});
}
return newArr;
}
"getArr": function(arr) {
const newArr: any = [];
// eslint-disable-next-line no-restricted-syntax
for (const item of arr) {
newArr.push({
lat: item.lat.value,
lon: item.lon.value,
camera_id: item.camera_lens_number.value,
});
}
return newArr;
}
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>