新手,求大神给代码实现多边形内的白色半透明层给去掉。
//创建经纬度数组 冼村街道var xiancunCenter = new BMap.Point(113.340128,23.128283);
var xiancun = [new BMap.Point(113.327839,23.133434),new BMap.Point(113.327696,23.118844),new BMap.Point(113.349722,23.116584),new BMap.Point
(113.350153,23.131939)];
//创建多边形
var xiancunPolygon = new BMap.Polygon(xiancun, {strokeColor:"blue", strokeWeight:5, strokeOpacity:0.5});
//添加多边形到地图上
map.addOverlay(xiancunPolygon);
xiancunPolygon.addEventListener("mouseover",function(){ xiancunPolygon.setStrokeColor("red");});
xiancunPolygon.addEventListener("mouseout",function(){ xiancunPolygon.setStrokeColor("blue");});
xiancunPolygon.addEventListener("click",function(){ map.zoomIn(); xiancunPolygon.setStrokeColor("red"); map.setCenter(xiancunCenter);});
var xiancunLabel2 = new BMap.Label("冼村",{offset: new BMap.Size(10,-20), position: xiancunCenter});xiancunLabel2.setStyle({"padding":
"2px"});map.addOverlay(xiancunLabel2);