Query results for polygon layer do not contain the spatial reference information for each point in the ring.
上次发布: August 25, 2014ArcGIS Server (.NET)
漏洞 ID 编号
NIM052326
已提交
December 24, 2009
上次修改时间
June 5, 2024
适用范围
ArcGIS Server (.NET)
找到的版本
1.1
操作系统
Windows OS
操作系统版本
2003
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
To resolve this issue, you need to loop each point in the polygon rings and assign a spatial reference to it. The workaround works for the polygon with only one ring. If the polygon have multiple rings, the code doesn't work properly. There will be no errer, but return you empty buffer results.-------------------- ESRI.ArcGIS.Client.Geometry.Polygon polygon = new ESRI.ArcGIS.Client.Geometry.Polygon(); ESRI.ArcGIS.Client.Geometry.PointCollection pnts = new ESRI.ArcGIS.Client.Geometry.PointCollection(); ESRI.ArcGIS.Client.Geometry.Polygon selectedStatePolygon = (ESRI.ArcGIS.Client.Geometry.Polygon)selectedState.Geometry; int ringNm = selectedStatePolygon.Rings.Count; ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection> pointcoll = new ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection>(); for (int j = 0; j < ringNm; j++) { foreach (MapPoint pnt in selectedStatePolygon.Rings[j]) { pnt.SpatialReference = MyMap.SpatialReference; pnts.Add(pnt); } pointcoll.Add(pnts); } polygon.Rings = pointcoll; polygon.SpatialReference = MyMap.SpatialReference; Graphic graphic = new Graphic() { Symbol = CustomRainbowGradientFillSymbol, Geometry = polygon };