📄 default.aspx.cs
字号:
// Copyright 2006 ESRI
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
//
// See use restrictions at /arcgis/developerkit/userestrictions.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page, ICallbackEventHandler
{
public string sADFCallBackFunctionInvocation;
private string returnstring = "";
public void RaiseCallbackEvent(string eventArgs)
{
if (eventArgs.Contains("clearallbutton"))
{
ClearAllLayers();
}
}
public string GetCallbackResult()
{
return returnstring;
}
protected void ClearAllLayers()
{
ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality ags_mf = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality)Map1.GetFunctionality(0);
ESRI.ArcGIS.ADF.ArcGISServer.MapDescription mapdescription = ags_mf.MapDescription;
mapdescription.CustomGraphics = null;
Map1.Refresh();
returnstring = Map1.CallbackResults.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
sADFCallBackFunctionInvocation = Page.ClientScript.GetCallbackEventReference(this, "message", "processCallbackResult", "context", "postBackError", true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -