📄 arcgis server development blog zooming to task results automatically.htm
字号:
I tried to do this and got an error:
Error1--Assembly 'ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=9.2.3.1380, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' uses 'ESRI.ArcGIS.ADF.Web.DataSources, Version=9.2.3.1380, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' which has a higher version than referenced assembly 'ESRI.ArcGIS.ADF.Web.DataSources, Version=9.2.2.1350, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86'c:\Program Files\ArcGIS\DotNet\ESRI.ArcGIS.ADF.Web.UI.WebControls.dll ZoomToResults
An issue with software compatibility? I have server 9.2 with sp3 installed, in my .NET assembly not up to date?
Thanks guys, looking forward to this.
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Wednesday, September 12, 2007 4:19 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl17_NameLink" title="emarshall" target="_blank">emarshall</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl18_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#460">#</a>
<span>re: Zooming to task results automatically<a name="460"></a></span>
</h4>
<div class="commentsbody">
<p>Could it be that this web application was created with an earlier version of the Web ADF? If so, you may need to update your assembly references in that web application. Do you get the same results when you try it with a new web application? --Tom</p>
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Wednesday, September 12, 2007 5:21 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl18_NameLink" title="tbrenneman@esri.com" href="/Dev/user/Profile.aspx?UserID=3871" target="_blank">tbrenneman@esri.com</a>
</div>
</div>
<div class="altcomment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl19_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#462">#</a>
<span>re: Zooming to task results automatically<a name="462"></a></span>
</h4>
<div class="commentsbody">
Tom, I haven't actually gotten that far. I was just trying to buld it in Visual Studio, and got this error. Haven't ried it in a web app yet.
Thanks.
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Thursday, September 13, 2007 7:18 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl19_NameLink" title="emarshall" target="_blank">emarshall</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl20_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#466">#</a>
<span>re: Zooming to task results automatically<a name="466"></a></span>
</h4>
<div class="commentsbody">
I got it working guys, it's great.
Wondering however if you have a task description that we can add to tasks.xml to be used through manager?
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Thursday, September 13, 2007 3:42 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl20_NameLink" title="emarshall" target="_blank">emarshall</a>
</div>
</div>
<div class="altcomment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl21_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#469">#</a>
<span>re: Zooming to task results automatically<a name="469"></a></span>
</h4>
<div class="commentsbody">
I am having a problem with this control. First, I added the dll and the control to the page and set the Map property.
Here is the code for the ZoomToResults control:
<customControls:ZoomToResults ID="ZoomToResults1" runat="server" BackColor="#ffffff"
Font-Names="Verdana" Font-Size="8pt" ForeColor="#000000" Height="200px" Width="200px" Map="Map1" MaxResultsForMapZoom="100" RenderOnDemand="True" />
Then, the instructions say that I should:
5. To associate this container with a task, at design-time in design view click on the smart tag on the task and select Choose Task Results container.
However, a smart tag does not appear when I go to design mode and select the control.
So, I added the ZoomToResults1 to the buddy controls in the taskmanager manually:
<TaskResultsContainers>
<esri:BuddyControl Name="ZoomToResults1">
</esri:BuddyControl>
<esri:BuddyControl Name="TaskResults1">
</esri:BuddyControl>
</TaskResultsContainers>
And the control makes the map zoom to the results as expected. The problem is that the context menus for the result no longer function- cant remove, cant pan/zoom. If I remove the ZoomToResults control, the context menus work properly.
Does anyone have advice for how to make this work properly??
Thanks,
Roy
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Friday, September 14, 2007 6:30 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl21_NameLink" title="Roy Jackson" target="_blank">Roy Jackson</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl22_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#473">#</a>
<span>re: Zooming to task results automatically<a name="473"></a></span>
</h4>
<div class="commentsbody">
With regard to adding a task description for this control. This web control isn't a task so that approach wouldn't work. It is a custom results container. ArcGIS Server Manager isn't setup to deal with custom results containers so the only real way to take advantage of this control is with Visual Studio.
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Monday, September 17, 2007 12:32 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl22_NameLink" title="Tom Brenneman" target="_blank">Tom Brenneman</a>
</div>
</div>
<div class="altcomment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl23_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#476">#</a>
<span>re: Zooming to task results automatically<a name="476"></a></span>
</h4>
<div class="commentsbody">
Roy,
The problem you're encountering seems to indicate that the control assembly is not registered in the page correctly. Do you have a Register tag at the top of your aspx page? If so, can you post it? If not, try adding this:
<%@ Register Assembly="ZoomToResults" Namespace="CustomControls" TagPrefix="customControls" %>
Have you changed anything in the ZoomToResults class library project (e.g. version, tagprefix, etc.)?
-Rex
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Monday, September 17, 2007 8:59 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl23_NameLink" title="Rex Hansen" target="_blank">Rex Hansen</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl24_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#477">#</a>
<span>re: Zooming to task results automatically<a name="477"></a></span>
</h4>
<div class="commentsbody">
<p>Rex-</p><p>Havent changed anything with the class library project.... Ill check the Register tag this evening and get back to you. If it isnt added automatically, I doubt it is in there. </p><p>Thanks!</p>
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Tuesday, September 18, 2007 11:29 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl24_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_ctl25_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#484">#</a>
<span>re: Zooming to task results automatically<a name="484"></a></span>
</h4>
<div class="commentsbody">
Rex-
That seems to have fixed it - adding the register tag. Still dont get a smart tag when clicking on the control in design view, I guess that doesnt really matter...
Thx!
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Wednesday, September 19, 2007 2:24 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl25_NameLink" title="roy jackson" target="_blank">roy jackson</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl26_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#493">#</a>
<span>re: Zooming to task results automatically<a name="493"></a></span>
</h4>
<div class="commentsbody">
I have tried to load the control by following the steps and keep getting this assembly error?
There was an error loading types from Assembly w:\ZoomToResults\bin\Debug\ZoomToResults.dll
Could not load file or assembly 'ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=9.2.3.1380, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependcies. The system cannot find the file specified.
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Wednesday, September 26, 2007 4:57 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl26_NameLink" title="Mickey" target="_blank">Mickey</a>
</div>
</div>
<div class="altcomment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl27_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#515">#</a>
<span>re: Zooming to task results automatically<a name="515"></a></span>
</h4>
<div class="commentsbody">
Mickey, I am having that same problem. Have you found a solution? I cannot figure this out.
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Monday, October 08, 2007 11:20 AM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl27_NameLink" title="Steve" target="_blank">Steve</a>
</div>
</div>
<div class="comment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl28_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#520">#</a>
<span>re: Zooming to task results automatically<a name="520"></a></span>
</h4>
<div class="commentsbody">
Tom and/or Rex,
This control is awesome. It has saved me a lot of coding time, but I am having one small problem with it. I wrote a command that is launched from a button on a toolbar that fires up a floating panel where the user enters some address information. I geocode it behind the scenes, convert the results to a GraphicsDataSet, and return that info to your control as callback results. Everything works great and displays great, but the automatic zoom to selected behavior and selection of the check box are not functioning properly. I'm wondering if there is something that is not getting sent to your control that is normally sent with out of the box tasks. Something is missing that causes those events to fire. Maybe something in the callback results?
Any help would be appreciated. Thanks ...
</div>
<div class="commentssubhead">
<span class="commentspan"></span>Tuesday, October 09, 2007 2:15 PM by <a id="ctl00___ctl00___ctl01___Comments___Comments_ctl28_NameLink" title="Andy" target="_blank">Andy</a>
</div>
</div>
<div class="altcomment">
<h4>
<a id="ctl00___ctl00___ctl01___Comments___Comments_ctl29_PermaLink" Title="permalink" href="/Dev/blogs/arcgisserver/archive/2007/08/28/Automatically-zooming-to-task-results.aspx#524">#</a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -