Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-09-12 10:32:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f5f194448826e4ee4022ae66495c2656e1b6fd9b
f5f19444
1 parent
150bb75f
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
src/views/index.vue
src/views/index.vue
View file @
f5f1944
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-12 10:
05:39
* @LastEditTime: 2024-09-12 10:
30:25
* @FilePath: /map-demo/src/views/index.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -438,6 +438,7 @@ export default {
// let writing_mode = 'vertical'; // 文字方向
if (entity_info[i]?.writing_mode === 'vertical') { // 标题文字垂直
var textMarker = new AMap.Text({
zooms: [18, 20], // 点标记显示的层级范围,超过范围不显示。
text: entity_info[i].name, //标记显示的文本内容
anchor: "center", //设置文本标记锚点位置
// draggable: true, //是否可拖拽
...
...
@@ -445,18 +446,21 @@ export default {
// angle: 10, //点标记的旋转角度
style: {
//设置文本样式,Object 同 css 样式表
// "padding": ".75rem 1.25
rem",
"padding": ".5rem .3rem .5rem .2
rem",
// "margin-bottom": "1rem",
// "border-radius": ".25rem",
"background-color": "#965f13",
"width": "1rem",
"border-width": 0,
//
"border-width": 0,
// "box-shadow": "0 2px 6px 0 rgba(114, 124, 245, .5)",
"text-align": "center",
//
"text-align": "center",
"font-size": "0.8rem",
"color": "white",
"writing-mode": "vertical-rl",
"text-orientation": "mixed",
"display": "flex",
"justify-content": "center",
"align-items": "end",
},
position: entity_info[i].position, //点标记在地图上显示的位置
});
...
...
Please
register
or
login
to post a comment