Unable to restrict zoom to Full Extent to the extent of specific customer data.
上次发布: August 25, 2014ArcGIS Server (.NET)
漏洞 ID 编号
NIM046855
已提交
July 14, 2009
上次修改时间
April 2, 2025
适用范围
ArcGIS Server (.NET)
找到的版本
9.3.1
操作系统
Windows OS
操作系统版本
2003
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
The behavior reported here is by design. The customers data is in WGS84 and that matches the coordinate system of ArcGIS Online. When you cache the local service and overlay it on ArcGIS Online, the scale levels of the two services will be unioned together and that is why there are more than 18 scale levels displayed in the ZoomLevel control. Clicking FullExtent in this situation will change the extent to the unioned extent. The California/Portland/USA_Data services are not in WGS84. When you overlay these services on top of ArcGISOnline and set the local service as the primary map resource, the ZoomLevel will only display the scale levels of the local service and dynamic images will be generated for the ArcGISOnline layer. Navigation, including the FullExtent command, will be restricted to the scale levels of the locally cached service.If you want overlay a cached service (that is in WGS84) on top of ArcGISOnline and have the FullExtent command only zoom to the extent of your cached service, please implement this code:1) In Visual Studio, open the application's Default.aspx file. 2) Find the markup for Toolbar1. If the application has not been customized, the markup begins on line 71. 3) If necessary, add the attribute OnCommandClick to the markup and assign it a value of "Toolbar1_CommandClick." If this is added to the end of the first line of the Toolbar's markup, that line will appear as follows: <esri:Toolbar ID="Toolbar1" runat="server" BuddyControlType="Map" Group="Toolbar1_Group" Height="28px" OnCommandClick="Toolbar1_CommandClick" 4) Open the Default page's code-behind file, Default.aspx.cs. 5) Inside the closing bracket of the _Default class definition, on line 204, insert the following method: protected void Toolbar1_CommandClick(object sender, ToolbarCommandClickEventArgs toolbarCommandClickEventArgs){ if (toolbarCommandClickEventArgs.CommandName == "MapFullExtent") { Map1.CallbackResults.Clear(); Map1.Zoom(Map1.PrimaryMapResourceInstance.MapInformation.FullExtent); }}