We've added the RadMap control to our WPF application. I have a custom tile provider that interfaces with a home-grown tile service. Tee provider basically makes HTTP calls to a custom URL in order to retrieve tiles. This provider does no caching of its own.
However, a tester here had map data for the US only, then uninstalled that map data and installed map data for Peru. When they went back into our application, they were able to see roads on Long Island, which they shouldn't have seen. For this reason, we believe that the RadMap control itself is caching tiles.
Does RadMap cache tiles? If so, where is this cache and how can we empty it?
Here is the code for the custom tile provider. As you can see, there's no code for caching in here at all.
public class SelexTileSource : TiledMapSource {
public string BaseURL { get; set; }
public SelexTileSource() : base( 1, 20, 256, 256 ) { }
public override void Initialize() {
this.RaiseIntializeCompleted();
}
protected override Uri GetTile( int tileLevel, int tilePositionX, int tilePositionY ) {
int zoomLevel = ConvertTileToZoomLevel( tileLevel );
string url = string.Format( BaseURL,
zoomLevel.ToString( CultureInfo.InvariantCulture ),
tilePositionX.ToString( CultureInfo.InvariantCulture ),
tilePositionY.ToString( CultureInfo.InvariantCulture ) );
return new Uri( url );
}
}
public class SelexMapProvider : TiledProvider {
public TiledMapSource Source {
get { return iSource; }
set {
if ( iSource != null && MapSources.ContainsKey( iSource.UniqueId ) )
MapSources.Remove( iSource.UniqueId );
iSource = value;
MapSources.Add( iSource.UniqueId, iSource );
}
}
private TiledMapSource iSource;
public override ISpatialReference SpatialReference {
get { return new MercatorProjection(); }
}
}