Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
Athena
Commits
4064f003
Commit
4064f003
authored
Jan 03, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
216f4e92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
index.html
public/index.html
+5
-5
tripMap.vue
src/components/global/tripMap.vue
+2
-13
No files found.
public/index.html
View file @
4064f003
...
...
@@ -702,11 +702,11 @@
* @private
*/
MarkerLabel_
.
prototype
.
setAnchor
=
function
()
{
var
anchor
=
this
.
marker_
.
get
(
"labelAnchor"
);
this
.
labelDiv_
.
style
.
marginLeft
=
-
60
+
"px"
;
this
.
labelDiv_
.
style
.
marginTop
=
-
90
+
"px"
;
this
.
eventDiv_
.
style
.
marginLeft
=
-
60
+
"px"
;
this
.
eventDiv_
.
style
.
marginTop
=
-
90
+
"px"
;
//
var anchor = this.marker_.get("labelAnchor");
//
this.labelDiv_.style.marginLeft = -60 + "px";
//
this.labelDiv_.style.marginTop = -90 + "px";
//
this.eventDiv_.style.marginLeft = -60 + "px";
//
this.eventDiv_.style.marginTop = -90 + "px";
};
/**
...
...
src/components/global/tripMap.vue
View file @
4064f003
...
...
@@ -170,22 +170,11 @@
draggable
:
false
,
//不可拖动
map
:
_this
.
map
,
//地图实例
labelContent
:
i
+
1
,
//label的内容
labelAnchor
:
new
google
.
maps
.
Point
(
202
,
20
0
),
//label的位置,可以调
labelAnchor
:
new
google
.
maps
.
Point
(
0
,
0
),
//label的位置,可以调
labelClass
:
"labels"
,
// the CSS class for the label
labelStyle
:
{
background
:
'#fff'
,
padding
:
'5px'
,
borderRadius
:
'50%
'
}
labelStyle
:
{
background
:
'#fff'
,
borderRadius
:
'50%'
,
marginLeft
:
'-10px'
,
marginTop
:
'-35px'
,
width
:
'19px'
,
height
:
'19px'
,
textAlign
:
'center'
,
lineHeight
:
'20px
'
}
});
// marker = new google.maps.MarkerWithLabel({
// position: new google.maps.LatLng(loc[0], loc[1]),
// labelContent:'测试', //需要显示的标题的内容
// //labelAnchor: point, //当前标题基于marker左上角的偏移
// labelStyle:{ //标题的style样式
// color: "#fff",
// fontSize: "12px"
// },
// labelClass:"classA", //支持直接绑定class名,将样式写在css里面
// icon: 'http://imgfile.oytour.com/static/marker.png'
// });
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment