地理处理服务 - 调用后清空内存

发布于 2024-11-26 07:17:35 字数 1398 浏览 2 评论 0原文

我正在关注 ADF 库的此示例

http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/ArcGIS_Buffer_Geoprocessing/ee05ac98-384b-4dbe-b8e3-8d741180dc9a.htm

我实际上是在画一个圆圈具有地理处理服务的点。半径约为20公里。

该代码工作正常,但“清除”例程却不然。每次我从以前的数据中清除地图时,缓冲服务的内存也不会被清除,我得到这个

清除”例程的代码与示例相同,但不起作用:

// Clears features from all graphics layers in the resource specified by _graphicsResourceName
protected void ClearGraphics()
{
    // Retrieve the resource and clear its graphics dataset
    ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource graphicsMapResource =
        Map1.GetFunctionality(_graphicsResourceName).Resource as
        ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource;
    graphicsMapResource.Graphics.Clear();

// This won't work too
GeoprocessingResourceManager1.GetResource(0).ClearState();

// Refresh the resource and copy the map's callback results to the callback results collection so
// the graphics are removed from the map
Map1.RefreshResource(graphicsMapResource.Name);
_callbackResultCollection.CopyFrom(Map1.CallbackResults);
}

这应该很简单,但我不知道如何解决这个问题..我找到的唯一解决方案是重新启动IIS 服务器显然非常糟糕,

有人可以吗?帮帮我吗?

I'm following this sample for ADF libraries

http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/ArcGIS_Buffer_Geoprocessing/ee05ac98-384b-4dbe-b8e3-8d741180dc9a.htm

I'm practically drawing a circle around a point with a geoprocessing service. The radius is about 20 km.

The code is working fine, but the "Clear" routine isn't. Every time I clear the map from the previous data, the memory of the buffer service isn't cleared too and I get this

enter image description here

The code of the "Clear" routine is the same of the sample, but isn't working:

// Clears features from all graphics layers in the resource specified by _graphicsResourceName
protected void ClearGraphics()
{
    // Retrieve the resource and clear its graphics dataset
    ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource graphicsMapResource =
        Map1.GetFunctionality(_graphicsResourceName).Resource as
        ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource;
    graphicsMapResource.Graphics.Clear();

// This won't work too
GeoprocessingResourceManager1.GetResource(0).ClearState();

// Refresh the resource and copy the map's callback results to the callback results collection so
// the graphics are removed from the map
Map1.RefreshResource(graphicsMapResource.Name);
_callbackResultCollection.CopyFrom(Map1.CallbackResults);
}

This should be simple but I can't figure out how to solve this.. the only solution I found is to restart the IIS server which is obviously very bad

Can someone please help me out?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不再见 2024-12-03 07:17:35

通过清除作业队列解决

Solved by clearing the jobs' queue

恬淡成诗 2024-12-03 07:17:35

我通常使用 GraphicsLayerFunctionality.GraphicsDataSet.Tables.Clear();

ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource myMapResource
myMapResource.Graphics.Tables.Remove(图形元素);

您实际上正在处理 .NET 数据集

I usually use GraphicsLayerFunctionality.GraphicsDataSet.Tables.Clear();

or

ESRI.ArcGIS.ADF.Web.DataSources.Graphics.MapResource myMapResource
myMapResource.Graphics.Tables.Remove(graphics element);

You are actually dealing with a .NET DataSet

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文