pipeWGVectorLayer = new SuperMap.Layer.Unique("pipeWGVectorLayer"); // 图层基础样式 pipeWGVectorLayer.style = { shadowBlur: 3, shadowColor: "#000000", shadowOffsetX: 1, shadowOffsetY: 1, strokeWidth: 2, strokeOpacity: 1 }; // 开启 hover 高亮效果 pipeWGVectorLayer.isHoverAble = true; // hover 高亮样式 pipeWGVectorLayer.highlightStyle = { stroke: true, strokeWidth: 3, strokeColor: 'blue', strokeOpacity: 1 }; // 用于单值专题图的属性字段名称 pipeWGVectorLayer.themeField = "grade"; // 风格数组,设定值对应的样式 //水质颜色映射表 pipeWGVectorLayer.styleGroups = [ { value: 1, style: { strokeColor: "#c5ffff"//Ⅰ类 } }, { value: 2, style: { strokeColor: "#34c3f6"//Ⅱ类 } }, { value: 3, style: { strokeColor: "#03ff03"//Ⅲ类 } }, { value: 4, style: { strokeColor: "#faff19"//Ⅳ类 } }, { value: 5, style: { strokeColor: "#FF9000"//Ⅴ类 } }, { value: 6, style: { strokeColor: "#ff0000"//劣Ⅴ类 } } ] //专题图层 mousemove 事件 pipeWGVectorLayer.on("mousemove", featureHovered); pipeConstructionLayer = new SuperMap.Layer.Vector("pipeConstructionLayer", { renderers: ["Canvas2"] }); loadConstructionData(); selectCtrl = new SuperMap.Control.SelectFeature([pipeConstructionLayer], { onSelect: featureSelected });
iclaiss 版本SuperMap-8.1.1-16820.js
是在这里下载最新的包吗?试了,好像还是不行。你测试代码贴我看一下吧?