三维场景滤镜设置
可添加LUT滤镜实现场景风格转换。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>滤镜</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.3.0/mapmost-webgl-min.js"></script>
</head>
<body>
<div id="map"></div>
<div class="btn-group">
<button onclick="addLUT()">打开滤镜</button>
<button i onclick="removeLUT()">关闭滤镜</button>
</div>
<script>
var map = new mapmost.Map({
container: 'map',
style: "<your style url>",
center: [120.67287475351259, 31.320097198762696],
zoom: 16.035248396661892,
pitch: 62.48725112156906,
bearing: -66.90626584095008,
sky: 'light',
userId: '***', // 授权码
});
// 添加滤镜
function addLUT() {
map.setLutEffect(true, {
lut: './35 Free LUTs/Hyla 68.CUBE',
intensity: 1
})
}
// 移除滤镜
function removeLUT() {
map.setLutEffect(false)
}
</script>
</body>
</html>