(转载)移动图层位置,刷新toc,不刷新整个页面<esri:Toolbar ID="Toolbar3" runat="server" BuddyC Group="Toolbar3_Group" Height="50px" ToolbarItemDefaultStyle-BackColor="White" ToolbarItemDefaultStyle-Font-Names="Arial" ToolbarItemDefaultStyle-Font-Size="Smaller" ToolbarItemDisabledStyle-BackColor="White" ToolbarItemDisabledStyle-Font-Names="Arial" ToolbarItemDisabledStyle-Font-Size="Smaller" ToolbarItemDisabledStyle-ForeColor="Gray" ToolbarItemHoverStyle-BackColor="White" ToolbarItemHoverStyle-Font-Bold="True" ToolbarItemHoverStyle-Font-Italic="True" ToolbarItemHoverStyle-Font-Names="Arial" ToolbarItemHoverStyle-Font-Size="Smaller" ToolbarItemSelectedStyle-BackColor="White" ToolbarItemSelectedStyle-Font-Bold="True" ToolbarItemSelectedStyle-Font-Names="Arial" ToolbarItemSelectedStyle-Font-Size="Smaller" WebResourceLocation="/aspnet_client/ESRI/WebADF/" Width="126px">
(转载)移动图层位置,刷新toc,不刷新整个页面        
<toolbaritems>
(转载)移动图层位置,刷新toc,不刷新整个页面
<esri:Command JavaScriptFile="" DisabledImage="~/images/up.jpg" ServerActi HoverImage="~/images/up.jpg" ClientAction="" SelectedImage="~/images/up.jpg" ServerActi Name="MoveUp" DefaultImage="~/images/up.jpg" Text="Move Up"></esri:Command>
(转载)移动图层位置,刷新toc,不刷新整个页面
<esri:Command JavaScriptFile="" DisabledImage="~/images/down.jpg" ServerActi HoverImage="~/images/down.jpg" ClientAction="" SelectedImage="~/images/down.jpg" ServerActi Name="MoveDown" DefaultImage="~/images/down.jpg" Text="Move Down"></esri:Command>
(转载)移动图层位置,刷新toc,不刷新整个页面
</toolbaritems>
(转载)移动图层位置,刷新toc,不刷新整个页面    
(转载)移动图层位置,刷新toc,不刷新整个页面    
<BuddyControls>
(转载)移动图层位置,刷新toc,不刷新整个页面
<esri:BuddyControl Name="Map1"></esri:BuddyControl>
(转载)移动图层位置,刷新toc,不刷新整个页面
</BuddyControls>
(转载)移动图层位置,刷新toc,不刷新整个页面    
</esri:Toolbar>
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面(PS: the namespace is myControls and import it into default.aspx.vb)
(转载)移动图层位置,刷新toc,不刷新整个页面
****
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面    Public Class SContext
(转载)移动图层位置,刷新toc,不刷新整个页面        Dim mapresource As MapResourceLocal 
= Nothing
(转载)移动图层位置,刷新toc,不刷新整个页面        Public Function GetServerContext(ByVal mapObject As ESRI.ArcGIS.ADF.Web.UI.WebControls.Map) As ESRI.ArcGIS.Server.IServerContext
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim mf As IMapFunctionality 
= mapObject.GetFunctionality(0)
(转载)移动图层位置,刷新toc,不刷新整个页面            mapresource 
= mf.Resource
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim servercontext As ESRI.ArcGIS.Server.IServerContext 
= mapresource.ServerContextInfo.ServerContext
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Return servercontext
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        End Function
(转载)移动图层位置,刷新toc,不刷新整个页面        Public Sub RefreshResourceLocal()
(转载)移动图层位置,刷新toc,不刷新整个页面            mapresource.RefreshServerObjects()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        End Sub
(转载)移动图层位置,刷新toc,不刷新整个页面    End Class
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面    Public Class MoveUp
(转载)移动图层位置,刷新toc,不刷新整个页面        Implements ESRI.ArcGIS.ADF.Web.UI.WebControls.Tools.IMapServerCommandAction
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        Sub ServerAction(ByVal info As ToolbarItemInfo) Implements IMapServerCommandAction.ServerAction
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Get map object from toolbar
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim map As ESRI.ArcGIS.ADF.Web.UI.WebControls.Map = CType(info.BuddyControls(0), ESRI.ArcGIS.ADF.Web.UI.WebControls.Map)
(转载)移动图层位置,刷新toc,不刷新整个页面            map.RaisePostDataChangedEvent()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Set up server context and serverobjects
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim servercontext As ESRI.ArcGIS.Server.IServerContext
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim context As myControls.SContext 
= New myControls.SContext
(转载)移动图层位置,刷新toc,不刷新整个页面            servercontext 
= context.GetServerContext(map)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim mapper As IMapServer 
= servercontext.ServerObject
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim mso As IMapServerObjects 
= servercontext.ServerObject
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim map2 As IMap 
= mso.Map(mapper.DefaultMapName)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Grab selected layer index stored in hidden field
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim field As HiddenField = info.Toolbar.FindControl("Layer")
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Assign layer index, move to index variables
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim layer As Integer = CType(field.Value, Integer)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim moved As Integer 
= layer - 1
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim Toc1 As Toc 
= info.Toolbar.FindControl("Toc3")
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Move layer and refresh the map
(转载)移动图层位置,刷新toc,不刷新整个页面
            map2.MoveLayer(map2.Layer(layer), moved)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            context.RefreshResourceLocal()
(转载)移动图层位置,刷新toc,不刷新整个页面            mso.RefreshServerObjects()
(转载)移动图层位置,刷新toc,不刷新整个页面           
(转载)移动图层位置,刷新toc,不刷新整个页面            Toc1.Refresh()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim sw As System.IO.StringWriter 
= New System.IO.StringWriter
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim writer As HtmlTextWriter 
= New HtmlTextWriter(sw)
(转载)移动图层位置,刷新toc,不刷新整个页面            Toc1.RenderControl(writer)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim htmlContent As String 
= sw.ToString
(转载)移动图层位置,刷新toc,不刷新整个页面            sw.Close()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim cr As New CallbackResult(Toc1, 
"content", htmlContent)
(转载)移动图层位置,刷新toc,不刷新整个页面            info.Toolbar.CallbackResults.Add(cr)
(转载)移动图层位置,刷新toc,不刷新整个页面            info.Toolbar.CallbackResults.CopyFrom(Toc1.CallbackResults)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面  
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            map.Refresh()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        End Sub
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面    End Class
(转载)移动图层位置,刷新toc,不刷新整个页面    Public Class MoveDown
(转载)移动图层位置,刷新toc,不刷新整个页面        Implements ESRI.ArcGIS.ADF.Web.UI.WebControls.Tools.IMapServerCommandAction
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        Sub ServerAction(ByVal info As ToolbarItemInfo) Implements IMapServerCommandAction.ServerAction
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Get map object from toolbar
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim map As ESRI.ArcGIS.ADF.Web.UI.WebControls.Map = CType(info.BuddyControls(0), ESRI.ArcGIS.ADF.Web.UI.WebControls.Map)
(转载)移动图层位置,刷新toc,不刷新整个页面            map.RaisePostDataChangedEvent()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Set up server context and serverobjects
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim servercontext As ESRI.ArcGIS.Server.IServerContext
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim context As myControls.SContext 
= New myControls.SContext
(转载)移动图层位置,刷新toc,不刷新整个页面            servercontext 
= context.GetServerContext(map)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim mapper As IMapServer 
= servercontext.ServerObject
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim mso As IMapServerObjects 
= servercontext.ServerObject
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim map2 As IMap 
= mso.Map(mapper.DefaultMapName)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Grab selected layer index stored in hidden field
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim field As HiddenField = info.Toolbar.FindControl("Layer")
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Assign layer index, move to index variables
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim layer As Integer = CType(field.Value, Integer)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim moved As Integer 
= layer + 1
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim Toc1 As Toc 
= info.Toolbar.FindControl("Toc3")
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Move layer and refresh the map
(转载)移动图层位置,刷新toc,不刷新整个页面
            map2.MoveLayer(map2.Layer(layer), moved)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Refresh whatever
(转载)移动图层位置,刷新toc,不刷新整个页面
            context.RefreshResourceLocal()
(转载)移动图层位置,刷新toc,不刷新整个页面            mso.RefreshServerObjects()
(转载)移动图层位置,刷新toc,不刷新整个页面            Toc1.Refresh()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'render control to htmlContent
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim sw As System.IO.StringWriter = New System.IO.StringWriter
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim writer As HtmlTextWriter 
= New HtmlTextWriter(sw)
(转载)移动图层位置,刷新toc,不刷新整个页面            Toc1.RenderControl(writer)
(转载)移动图层位置,刷新toc,不刷新整个页面            Dim htmlContent As String 
= sw.ToString
(转载)移动图层位置,刷新toc,不刷新整个页面            sw.Close()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'Add changes to toc callback
(转载)移动图层位置,刷新toc,不刷新整个页面
            Dim cr As New CallbackResult(Toc1, "content", htmlContent)
(转载)移动图层位置,刷新toc,不刷新整个页面            info.Toolbar.CallbackResults.Add(cr)
(转载)移动图层位置,刷新toc,不刷新整个页面            info.Toolbar.CallbackResults.CopyFrom(Toc1.CallbackResults)
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面     
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面            
'refresh the map
(转载)移动图层位置,刷新toc,不刷新整个页面
            map.Refresh()
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面        End Sub
(转载)移动图层位置,刷新toc,不刷新整个页面
(转载)移动图层位置,刷新toc,不刷新整个页面    End Class

来自:http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=19143&extra=page%3D1

相关文章:

  • 2021-11-26
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2021-12-24
  • 2022-02-10
  • 2021-12-15
猜你喜欢
  • 2021-12-29
  • 2021-07-29
  • 2021-11-06
  • 2021-07-20
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案