Commit 4064f003 authored by zhengke's avatar zhengke

修改

parent 216f4e92
......@@ -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";
};
/**
......
......@@ -170,22 +170,11 @@
draggable: false, //不可拖动
map: _this.map, //地图实例
labelContent: i+1, //label的内容
labelAnchor: new google.maps.Point(202, 200), //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'
// });
}
}
}
......
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