Where does RadMap cache tiles?

5 posts, 0 answers
  1. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 07 Apr 2015 Link to this post

    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() {
        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(); }

  2. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 09 Apr 2015 in reply to Tony Link to this post

    I've found the answer to my own question.

    If you do not set the MapProvider's IsTileCachingEnabled to true, tiles are not cached at all.  If you do set it to true, tiles get cached in

    %USERPROFILE%\AppData\Local\TelerikMapCache\<Map Provider Class Name>

     So in my case, they're cached in C:\Users\tony.vitabile\AppData\Local\TelerikMapCache\SelexMapProvider.

  3. DevCraft banner
  4. Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 10 Apr 2015 Link to this post

    Hello Tony,

    The tile provider has a public CacheStorage property which you can set when necessary. By default the tile provider uses a file-system-cache and caches the tiles in the file system in the app-data folder in the sub folder you indicated.

    Petar Marchev

    See What's Next in App Development. Register for TelerikNEXT.

  5. Pete
    Pete avatar
    2 posts
    Member since:
    Apr 2012

    Posted 04 Oct in reply to Petar Marchev Link to this post

    I noticed that even if I disable caching on the tile provider and then disconnect from the network, some tile data would still be displayed. It seems that map data is also stored in the Internet Explorer browser cache - is that correct?



  6. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 07 Oct Link to this post

    Hi Pete,

    You mentioned InternetExplorer, does it mean you use RadMap for Silverlight ? In Silverlight, the RadMap internally uses MultiScaleImage class which has its own caching turned on by default (check its CacheMode which is inherited from UIElement). I don't think the IE manages the caching folders and caching options.
    Please check out this post regarding Clearing the Silverlight Cache.

    Petar Mladenov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
DevCraft banner