The basemap layer does not display the correct extent and displays wrong values for latitude and longitude when turning off the ‘IBaseMapLayer::InvalidateCache’ method.
上次发布: August 25, 2014ArcGIS Engine
漏洞 ID 编号
NIM075542
已提交
November 17, 2011
上次修改时间
June 5, 2024
适用范围
ArcGIS Engine
找到的版本
10.0
编程语言
C#
操作系统
Windows OS
操作系统版本
7
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
NotifyMapPropertiesChanged after the maps spatial reference has been updated.
解决办法
Need to call NotifyMapPropertiesChanged after the maps spatial reference is updated. Below you see a modified version of the customers CenterMapAt procedure with this call added. Friend Sub CenterMapAt(ByVal pCenter As IPoint) Dim geo As CGeoGraphicsCjmtk = CGeoGraphicsCjmtk.Instance If m_MapControl IsNot Nothing Then 'Test to see if we are getting near the edge of the map If ResetCentralMeridian(m_ProjectedCoordinateSystem.CentralMeridian(True), New CPosition(pCenter.Y, pCenter.X)) Then 'If so, move the central meridian to the center point entered and re-project the map m_MapControl.SpatialReference = UpdateMapCentralMeridian(pCenter.X) Refresh(MapLayer.All) End If pCenter = geo.ConvertGeographicPointToProjectedPoint(pCenter.X, pCenter.Y) m_MapControl.CenterAt(pCenter) Dim baseLayer As IBasemapLayer = TryCast(m_MapControl.Layer(m_MapControl.LayerCount - 1), IBasemapLayer) If baseLayer IsNot Nothing Then If m_UseInvalidateCache Then baseLayer.InvalidateCache() Else baseLayer.NotifyMapPropertiesChanged(m_MapControl.Map, True) End If End If End If End Sub