由于这个是官方的api,官方中也有案例,这里就不细说了,直接上代码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title>途经点</title>
<style>
html,
body,
#container {
width: 100%;
height: 100%;
}
.label {
padding: 10px 20px;
color: #fff;
font-size: 16px;
}
.label0 {
background: blueviolet;
border: 1px solid blueviolet;
}
.label1 {
background: pink;
border: 1px solid pink;
}
.label2 {
background: yellow;
border: 1px solid yellow;
}
.label3 {
background: red;
border: 1px solid red;
}
.amap-marker-label {
border: none;
}
#panel {
position: fixed;
background-color: white;
max-height: 90%;
overflow-y: auto