Skip to main content

Surface excavation analysis

Supports surface excavation of vector and raster data, and can set the excavation depth and excavation part map.

show
   <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Surface excavation analysis</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<style>
body {
margin: 0;
padding: 0;
}

#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}

.btn-group {
position: absolute;
top: 20px;
left: 20px;
color: white;
}
</style>
<script src="https://delivery.mapmost.com/cdn/sdk/webgl/v9.16.0/mapmost-webgl-min.js"></script>
</head>
<body>
<div id="map"></div>
<div class="btn-group">
<button onClick="add()">Add surface excavation analysis</button>
<button onClick="clear()">Clear analysis results</button>
</div>
<script>
let map = new mapmost.Map({
container: "map",
style: "<your style url>",
center: [120.67287475351259, 31.320097198762696],
zoom: 16,
pitch: 62,
userId:"***", //Authorization code
});

let excavation;

//Add excavation analysis
function add() {
excavation = new mapmost.ExcavationAnalysis(map);
excavation.analyse({
range: [
[120.67315864678835, 31.317114830759607],
[120.67250888359933, 31.31987574694101],
[120.67458298302142, 31.32163926950146],
[120.6753580544011, 31.32017624607974],
[120.67581891774245, 31.316551049511048],
[120.67315864678835, 31.317114830759607],
], //Set the excavation range
depth: 40, //Set the excavation depth
sideImg: "./excavationAnalysis/excavate_kuangqu.jpg", // Set the excavation side texture
bottomImg: "./excavationAnalysis/excavate_bottom.jpg", // Set the excavation bottom texture
});
}

//Clear the analysis results, retain the analysis instance, and update the analysis results
function clear() {
excavation.clear();
}

</script>
</body>
</html>