您好,定位问题请参考:
http://qa.supermap.com/631/cxjgdwhglxs.html
sceneControl.get_scene().get_flyingOperator().flyToBounds(bounds, -1);方法中
Polygon对象能否直接替代bounds,或者需要进行什么样的转换
您好,那里面已经告诉方法了:
case "REGION": var geoRegion3D = new SuperMap.Web.Core.GeoRegion3D(); var pt3Ds = new SuperMap.Web.Core.Point3Ds(); var pt3D = new SuperMap.Web.Core.Point3D(0,0,0); for (var j = 0; j < geoVector.points.length; j++) { pt3D.x = geoVector.points[j].x; pt3D.y = geoVector.points[j].y; pt3D.z = 0; pt3Ds.add(pt3D); } geoRegion3D.addPart(pt3Ds); left = geoRegion3D.get_boundingBox().get_lower().get_x(); bottom = geoRegion3D.get_boundingBox().get_lower().get_y(); right = geoRegion3D.get_boundingBox().get_upper().get_x(); top = geoRegion3D.get_boundingBox().get_upper().get_y(); viewBounds.extend(new SuperMap.Bounds(left, bottom, right, top));
Polygon对象能否转换成 Rectangle2D对象
Rectangle2D对象都废弃了哈.
全部用Bounds,如:
viewBounds = new SuperMap.Bounds();
对对,那 Polygon对象能转换成Bounds()对象吗?
getBounds()可以吗?
您好,不能的,上面不是贴了Polygon怎么得到bounds?
循环节点,把polygon转为geoRegion3D再获取。