var sjlystyle2 = { // 边界显示样式
strokeColor:"#FFD700",
strokeOpacity:1,
strokeWidth:2,
fillColor:"#FFD700",
fillOpacity:1,
fill:true
};
var line1 = new SuperMap.Geometry.LinearRing(firpoint1);
if(line1.getArea()>line.getArea()){
var lineVector = new SuperMap.Feature.Vector(line,null,sjlystyle2);
polygonLayer.addFeatures([lineVector]);
}else{
var lineVector = new SuperMap.Feature.Vector(line1,null,sjlystyle2);
polygonLayer.addFeatures([lineVector]);
}
使用产品:iserver 8c 810 操作系统:win7 x64
数据类型: shp文件
问题详细描述:线环填充的颜色在地图等级低的时候显示,地图等级高线环显示不全时不显示
问题重现步骤: 1.地图等级低显示颜色 2.放大地图 3.图等级高颜色不显示
就是在一个县级边界图层画一个折线,渲染小的那一部分,小的那部分地图放大填充颜色就没有了
追加
点应该是在原来位置的,就是填充颜色没了
放小一级又有了
问题已解决:
方案:
var line1 = new SuperMap.Geometry.LinearRing(firpoint1);
if(line1.getArea()>line.getArea()){
var region = new SuperMap.Geometry.Polygon([line]);
var lineVector = new SuperMap.Feature.Vector(region,null,sjlystyle2);
polygonLayer.addFeatures([lineVector]);
}else{
var region = new SuperMap.Geometry.Polygon([line1]);
var lineVector = new SuperMap.Feature.Vector(region,null,sjlystyle2);
polygonLayer.addFeatures([lineVector]);
}
}
包装了一下线环类,成面