⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arcgis server development blog zooming to task results automatically.htm

📁 C#开发的ArcGIS Server9.2查询地物居中高亮显示控件
💻 HTM
📖 第 1 页 / 共 5 页
字号:
		<div class="comment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl08_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#436">#</a>
				<span>re: Zooming to task results automatically<a name="436"></a></span>
			</h4>
			<div class="commentsbody">
				This Microsoft article talks about this error.  http://support.microsoft.com/Default.aspx?id=320268  
It specifically talks about a virtual directory using a shared folder but I think your problem is because assembly containing the web control needs to be configured with FullTrust like the web site in the example.
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Tuesday, September 04, 2007 8:18 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl08_NameLink" title="Tom Brenneman" target="_blank">Tom Brenneman</a>
			</div>
		</div>
	
		<div class="altcomment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl09_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#440">#</a>
				<span>re: Zooming to task results automatically<a name="440"></a></span>
			</h4>
			<div class="commentsbody">
				Thanks, Tom. I overcame my ASP.NET trust issue. This article really helped me out: http://forums.asp.net/p/992339/1292466.aspx
But now when I assign the ZoomtoResults control to my pre-existing QueryAttributes task, I get the error: ESRI.ArcGIS.ADF.Web.UI.WebControls.BuddyControlCollection must have items of type 'ESRI.ArcGIS.ADF.Web.UI.WebControls.BuddyControl'. 'ESRI.ArcGIS.ADF.Web.UI.WebControls.BuddyControl' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
Perhaps I need to create a new task from scratch. It seems that nothing is easy for a novice programmer like me.
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Wednesday, September 05, 2007 11:09 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl09_NameLink" title="Matthew Lawton" rel="nofollow" href="/Dev/utility/Redirect.aspx?U=http%3a%2f%2fwww.washoecounty.us%2fgis" target="_blank">Matthew Lawton</a>
			</div>
		</div>
	
		<div class="comment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl10_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#441">#</a>
				<span>re: Zooming to task results automatically<a name="441"></a></span>
			</h4>
			<div class="commentsbody">
				Success!!! I got it to work. Apparently there is a bug when editing Tasks in the Web ADF, as described here: http://forums.esri.com/Thread.asp?c=158&f=2276&t=209983&mc=4#msgid632784 I changed the BuddyControl code back to "ESRI:BuddyControl" and now everything works! Thank you Tom and Rex!
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Wednesday, September 05, 2007 2:07 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl10_NameLink" title="Matthew Lawton" rel="nofollow" href="/Dev/utility/Redirect.aspx?U=http%3a%2f%2fwww.washoecounty.us%2fgis" target="_blank">Matthew Lawton</a>
			</div>
		</div>
	
		<div class="altcomment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl11_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#443">#</a>
				<span>re: Zooming to task results automatically<a name="443"></a></span>
			</h4>
			<div class="commentsbody">
				<p>Does anyone know of any documentation that can be used to help me create context menus for the task results? &nbsp;</p><p>With the out of the box tasks, you get built in functionality where you can right click on a result and get a menu where you can zoom to/pan to a result, remove a result... &nbsp;</p><p>The OOB Find task didnt work for my customer because they wanted some different functionality, with search criteria being dynamically added/removed to the search panel UI with callbacks... Also customized HTML results, not just the standard table. &nbsp;Got the UI working, trying to give them the functionality they want for the results... </p><p>&lt;a href = &quot;<a rel="nofollow" target="_new" href="http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_taskresults.htm&quot;&gt;Reading">http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/ADF/control_taskresults.htm&quot;&gt;Reading</a> This Article...&lt;/a&gt;</p><p>,and it seems after trying a couple methods that with a taskresultnode, you dont get any automatic context menus. &nbsp;With a dataset, you get the context menu to remove the result, but no panning/zooming tools. &nbsp;</p><p>How would I go about adding the rightclick context menus for panning/zooming etc? &nbsp;If I can at least get the menu setup I can figure out the callback js and server functions...</p><p>Appreciate any help I can get on this...</p><p>Thx!</p>
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Wednesday, September 05, 2007 7:25 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl11_NameLink" title="royjackson" href="/Dev/utility/Redirect.aspx?U=http%3a%2f%2fgispro.blogspot.com" target="_blank">royjackson</a>
			</div>
		</div>
	
		<div class="comment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl12_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#444">#</a>
				<span>re: Zooming to task results automatically<a name="444"></a></span>
			</h4>
			<div class="commentsbody">
				<p>How would someone use this sample with a custom task? &nbsp;What data has to be contained within the taskresult dataset for it to work properly?</p><p>Thx!</p>
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Wednesday, September 05, 2007 9:11 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl12_NameLink" title="royjackson" href="/Dev/user/Profile.aspx?UserID=3853" target="_blank">royjackson</a>
			</div>
		</div>
	
		<div class="altcomment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl13_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#445">#</a>
				<span>re: Zooming to task results automatically<a name="445"></a></span>
			</h4>
			<div class="commentsbody">
				<p>The ZoomToResults control expects the Results property of a custom task to be either a System.Data.Dataset that contains DataTables of type ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsLayer</p><p>-or-</p><p>a ESRI.ArcGIS.ADF.Web.UI.WebControls.GraphicsLayerNode. &nbsp;</p><p>Thanks,</p><p>-Rex</p>
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Thursday, September 06, 2007 12:23 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl13_NameLink" title="rexhansen" href="/Dev/user/Profile.aspx?UserID=3285" target="_blank">rexhansen</a>
			</div>
		</div>
	
		<div class="comment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl14_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#446">#</a>
				<span>re: Zooming to task results automatically<a name="446"></a></span>
			</h4>
			<div class="commentsbody">
				<p>Hi Roy, </p><p> &nbsp;The only SDK doc that demonstrates the use of ContextMenus is the Common_AddDynamicData sample where a ContextMenu is configured on a Map:</p><p><a rel="nofollow" target="_new" href="http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/Common_AddDynamicData/f80sedfd-ac48-4c81-ba00-5a17e1b09c4b.htm">http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/samples/Web_Applications/Common_AddDynamicData/f80sedfd-ac48-4c81-ba00-5a17e1b09c4b.htm</a></p><p> &nbsp;A full discussion of the ContextMenu control and its usage will be provided in 9.2 sp4 and 9.3. &nbsp;I'll write up a blog post on this topic shortly - so look for it coming soon.</p><p>Thanks,</p><p>-Rex </p>
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Friday, September 07, 2007 11:27 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl14_NameLink" title="rexhansen" href="/Dev/user/Profile.aspx?UserID=3285" target="_blank">rexhansen</a>
			</div>
		</div>
	
		<div class="altcomment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl15_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#450">#</a>
				<span>re: Zooming to task results automatically<a name="450"></a></span>
			</h4>
			<div class="commentsbody">
				I am having issues with writing a custom task based on the simple task sample, and getting the results formatted to work with this sample...  

The problem is the task code is in a seperate project, which doesnt know anything about the mapping application controls.  My mapping app sends the value for the Input Property, and the class performs the query and returns the results property and sends it to the taskresults control...  That is the only data that is being shared.  

How would I pass the Map's current graphicslayer to my task class, so the task can create the featuregraphicslayer?  Do I need the current graphicslayer, or can I just create a new one?  Is there any sample code available that would do this?

Thank you!
			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Tuesday, September 11, 2007 12:55 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl15_NameLink" title="roy jackson" target="_blank">roy jackson</a>
			</div>
		</div>
	
		<div class="comment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl16_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#453">#</a>
				<span>re: Zooming to task results automatically<a name="453"></a></span>
			</h4>
			<div class="commentsbody">
				Searching around I found the answer in one of Bryan Baker's posts:

http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/03/Follow_2D00_up-to-Extending-the-QueryAttributes-Task_3A00_-Zooming-to-selected-features.aspx

This is the key code:

  ' Get a reference to the Map - have to search the Page since

    '  task itself has no direct reference to the Map

    ' (the task's TaskResults does have the ID of the map)

    Dim mapCtrl As Map = Nothing

   Dim taskResultsId As String =

      Me.TaskResultsContainers(0).Name

    Dim taskResults As TaskResults = _

       CType(FindControlRecursive( _

       Me.Page, taskResultsId), TaskResults)

   If Not TaskResults Is Nothing Then

      mapCtrl = CType(FindControlRecursive( _

         Me.Page, taskResults.Map), Map)

   End If


and the function it calls:

  ' Finds the control in the Page's control tree

    Public Function FindControlRecursive(ByVal root As _

       Control, ByVal id As String) As Control

        If root.ID = id Then

            Return root

        End If

        Dim c As Control

        For Each c In root.Controls

            Dim t As Control = FindControlRecursive(c, id)

            If Not t Is Nothing Then

                Return t

            End If

        Next

        Return Nothing

    End Function


			</div>
			<div class="commentssubhead">
				<span class="commentspan"></span>Tuesday, September 11, 2007 3:24 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl16_NameLink" title="roy jackson" target="_blank">roy jackson</a>
			</div>
		</div>
	
		<div class="altcomment">
			<h4>
				<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl17_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#459">#</a>
				<span>re: Zooming to task results automatically<a name="459"></a></span>
			</h4>
			<div class="commentsbody">
				Upon opening this as a project in VS 2005 and build the solution to register the DLL(s)....

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -