Commit ba929db7 authored by zhengke's avatar zhengke

修改

parent 4064f003
......@@ -120,7 +120,7 @@
if (x.lat && x.lng) {
let obj = {
location: x.lat + ',' + x.lng,
tyle: x.type
type: x.type
}
if (!_this.checkItemIsExists(waypoints, obj)) {
waypoints.push(obj);
......@@ -159,12 +159,23 @@
// icon: '../../assets/img/active/x1.png'
// // labelClass:"classA"
// });
var image = {
url: 'http://imgfile.oytour.com/static/location_01.png', // image is 512 x 512
scaledSize: new google.maps.Size(30, 40),
};
//let image='http://imgfile.oytour.com/static/location_01.png'
let marker = new MarkerWithLabel({
var image={}
var type=waypoints[i].type;
//交通
if(type==1){
image = {
url: 'http://imgfile.oytour.com/static/location_01.png', // image is 512 x 512
scaledSize: new google.maps.Size(30, 40),
};
}
//住宿
if(type==3){
image = {
url: 'http://imgfile.oytour.com/static/location_hotel.png',
scaledSize: new google.maps.Size(40, 40),
}
}
let marker = new MarkerWithLabel({
position: new google.maps.LatLng(loc[0], loc[1]),
icon: image, //标记自定义图标
draggable: false, //不可拖动
......@@ -174,7 +185,10 @@
labelClass: "labels", // the CSS class for the label
labelStyle: { background:'#fff', borderRadius:'50%',marginLeft:'-10px',marginTop:'-35px',width:'19px',height:'19px',textAlign:'center',lineHeight:'20px' }
});
if(type==3){
marker.labelContent=''
marker.labelStyle='background:transparent'
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment