提交 add69efc 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(map): 修复高德地图callout偏移错误问题

上级 bad593bb
......@@ -34,9 +34,8 @@ export function createCallout(maps: QQMaps | GoogleMaps | AMap.NameSpace) {
this.Text = new (maps as AMap.NameSpace).Text({
text: option.content,
anchor: 'bottom-center', // 设置文本标记锚点
offset: new (maps as AMap.NameSpace).Pixel(0, option.offsetY!),
offset: new (maps as AMap.NameSpace).Pixel(0, option.offsetY!-16),
style: {
'margin-bottom': '1rem',
padding: (option.padding || 8) + 'px',
'line-height': (option.fontSize || 14) + 'px',
'border-radius': (option.borderRadius || 0) + 'px',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册