阅读:1637回复:1
arcgis server中两个map控件互动??
<P>我在page页中加了两个map控件,在事件中我加了下面的代码,在map1缩放时,Map2中的范围没有变化,请问该怎么样处理??万分谢谢!<BR>Protected Sub Map1_ExtentChanged(ByVal sender As Object, ByVal args As ESRI.ArcGIS.ADF.Web.UI.WebControls.ExtentEventArgs) Handles Map1.ExtentChanged<BR> If (Not Map1.Extent Is Nothing) And (Not Map2.Extent Is Nothing) Then<BR> Map2.Extent = Map1.Extent<BR> Map2.Refresh()<BR> End If</P>
<P> End Sub</P> |
|
1楼#
发布于:2008-04-28 23:42
<P>arcgis server的鹰眼关联就可以看出其中的装换</P>
<P> protected void Page_PreRenderComplete(object sender, EventArgs e)<BR> {<BR> // If no tasks have been defined, hide the tasks panel<BR> if (TaskMenu.Items.Count == 0)<BR> Tasks_Menu_Panel.Visible = false;<BR> // check to see if any of the resource items are non-pooled<BR> if (!Page.IsCallback || !Page.IsPostBack)<BR> {<BR> CloseHyperLink.Visible = HasNonPooledResources();<BR> OverviewMap ov = Page.FindControl("OverviewMap1") as OverviewMap;<BR> if (ov!=null ;; !OverviewMapResourceIsValid(ov))<BR> ov.OverviewMapResource = Map1.PrimaryMapResource;<BR> }<BR> CopyrightTextHolder.Visible = HasCopyrightText();</P> <P> }<BR> </P> <P> protected void Page_PreInit(object sender, EventArgs e)<BR> {<BR> // Make the overview enabled property match floatingpanel expanded property<BR> FloatingPanel ovPanel = Page.FindControl("OverviewMap_Panel") as FloatingPanel;<BR> if (ovPanel != null)<BR> {<BR> OverviewMap ov = ovPanel.FindControl("OverviewMap1") as OverviewMap;<BR> if (ov != null)<BR> ov.Enabled = ovPanel.Expanded;<BR> }</P> <P> }</P> |
|
|