стоит arcgis server 9.3.1
почему Identify отрабатывает нормально
ESRI.ArcGIS.Server.IServerObjectManager serverObjectManager = agsServerConnection.ServerObjectManager;
ESRI.ArcGIS.Server.IServerContext serverContext = serverObjectManager.CreateServerContext(KMLserverobjectname, "MapServer");
ESRI.ArcGIS.Carto.IMapServer2 mapServer = serverContext.ServerObject as
ESRI.ArcGIS.Carto.IMapServer2;
ESRI.ArcGIS.Carto.IMapServerInfo2 mapServerInfo = mapServer.GetServerInfo(mapServer.DefaultMapName) as ESRI.ArcGIS.Carto.IMapServerInfo2;
ESRI.ArcGIS.Carto.IMapDescription mapDescription = mapServerInfo.DefaultMapDescription as ESRI.ArcGIS.Carto.IMapDescription;
IPoint pointAnalis = serverContext.CreateObject("esriGeometry.Point") as IPoint;
IPoint pSearchPnt = pointAnalis;
//new PointClass() as IPoint;
pSearchPnt.SpatialReference = mapDescription.SpatialReference;
pSearchPnt.X = SearchX;
pSearchPnt.Y = SearchY;
if (converDegree)
{
ISpatialReference sr1 = SpatialReferenceDegree();
IGeometry pGeometry = pSearchPnt;
pGeometry.SpatialReference = sr1;
pGeometry.Project(mapDescription.SpatialReference);
pSearchPnt = pGeometry as IPoint;
}
//IImageDisplay pImageDisplay = new ImageDisplayClass() as ImageDisplay;
IImageDisplay pImageDisplay = serverContext.CreateObject("esriCarto.ImageDisplay") as IImageDisplay;
pImageDisplay.Height = 4000;
pImageDisplay.Width = 5000;
pImageDisplay.DeviceResolution = 15;
LayerIDs = serverContext.CreateObject("esriSystem.LongArray") as ILongArray;
LayerIDs.Add(LayerID);
//executing Identify function
IMapServerIdentifyResults pIDResults = mapServer.Identify(mapDescription, pImageDisplay, pSearchPnt, Tolerance, esriIdentifyOption.esriIdentifyAllLayers, LayerIDs);
, а find
IMapServerFindResults pFResults = mapServer.Find(mapDescription, pImageDisplay, searchString, Contains, searchFields, esriFindOption.esriFindAllLayers, LayerIDs);
находит нужное число объектов, но у всех FeatureProperties и FeatureShape = null, использование :
pGeomResultOptions = serverContext.CreateObject("esriGeodatabase.GeometryResultOptions") as IGeometryResultOptions;
pGeomResultOptions.GeneralizeGeometries = true;
pGeomResultOptions.MaximumAllowableOffset = 2000;
//creating LayerResultOptions the server context
pLayerResultOptions = serverContext.CreateObject("esriCarto.LayerResultOptions") as ILayerResultOptions;
pLayerResultOptions.IncludeGeometry = true;
LayerDescription.LayerResultOptions = pLayerResultOptions;
ничего не дает