使用产品:iserver 8c 操作系统:win10 x64
数据类型: 文件型
问题详细描述:SuperMap.Geometry.Point()中点的坐标使用经纬度,之后使用SuperMap.Geometry.Polygon构建多边形,在地图上无法显示
问题重现步骤:
源代码如下:
for(var j=0;j<each_geometry.coordinates.length;++j){
//console.log(each_geometry.coordinates.length);//
each_coordinate=each_geometry.coordinates[j];
var points=[];
//console.log(each_coordinate.length);
for(var k=0;k<each_coordinate.length-1;++k){
var each_coordinates=each_coordinate[k];
//console.log(each_coordinates);
var point=new SuperMap.Geometry.Point(parseFloat(each_coordinates[0]),parseFloat(each_coordinates[1]));
//console.log(each_coordinates[0]);
//console.log(each_coordinates[1]);
points.push(point);
}
console.log(points);
var linearRings = new SuperMap.Geometry.LinearRing(points);
var polygon = new SuperMap.Geometry.Polygon([linearRings]);//geometry对象
var polyFeature = new SuperMap.Feature.Vector(polygon,null,style);
f.push(polyFeature);
}