文本标记
html, body, #container {
height: 100%;
width: 100%;
}
var map = new AMap.Map("container", {
viewMode: '3D',
zoom: 13,
center: [116.4,39.92],
resizeEnable: true
});
// 创建纯文本标记
var text = new AMap.Text({
text:'纯文本标记',
anchor:'center', // 设置文本标记锚点
draggable:true,
cursor:'pointer',
angle:10,
style:{
'padding': '.75rem 1.25rem',
'margin-bottom': '1rem',
'border-radius': '.25rem',
'background-color': 'white',
'width': '15rem',
'border-width': 0,
'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)',
'text-align': 'center',
'font-size': '20px',
'color': 'blue'
},
position: [116.396923,39.918203]
});
text.setMap(map);