Dashed line layer
Supports adding dotted line layers.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Dashed line layer</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%;
}
</style>
<script src="https://delivery.mapmost.com/cdn/sdk/lite/v9.1.0/mapmost-lite-min.js"></script>
</head>
<body>
<div id="map"></div>
<script>
let map = new mapmost.Map({
container: 'map',
style: "<your style url>",
center: [120.7167750088779, 31.323951343532258],
zoom: 14.907143631939364,
pitch: 59.48725112156901,
bearing: -54.10626584095007,
userId: '***', // Authorization code,This parameter must be added
});
map.on('load', function () {
map.addSource('road', {
"type": "geojson",
data: "../example_data/road_seg.geojson"
})
map.addLayer({
"id": "road",
"type": 'line',
"source": "road",
"layout": {
// "line-cap":'square'
},
"paint": {
// "line-blur":5, // Line blur
"line-width": 2,
"line-color": "rgb(0, 0, 255)",
"line-dasharray": [2, 1],// dotted line 2m Just separate1unit length gap
// "line-gap-width":10, // Draws a line outside the actual path of the line.10Represents the width of the internal gap
// "line-offset":100,
}
})
})
</script>
</body>
</html>