This is a migrated thread and some comments may be shown as answers.

RadMap ItemsVirtualization example throws 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll

1 Answer 158 Views
Map
This is a migrated thread and some comments may be shown as answers.
Dan M
Top achievements
Rank 1
Dan M asked on 23 Sep 2010, 02:52 PM
Hi I just ran the Rad Map ItemsVirtualization example from the demo code and I notice certain sluggishness when running the map. Looking at the output window of Visual studio I've noticed a large amount of the errors

A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Any idea why are those thrown?
And also if I increase the density of the grid like the next line of code

 this.dynamicLayer.ZoomGridList.Add(new ZoomGrid(2 << 13, 2 << 13, 13));
the number of the errors increases tremendously.
EDIT>> I looked more into the call stack and this is the error thrown




System.ArgumentOutOfRangeException occurred Message=The added or subtracted value results in an un-representable DateTime.
Parameter name: t
  Source=mscorlib
  ParamName=t
  StackTrace:
       at System.DateTime.op_Addition(DateTime d, TimeSpan t)
  InnerException:

 

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 27 Sep 2010, 02:40 PM
Hello Dan M,

The exception you found is handled inside the tile cache subsystem of RadMap, and you shouldn't worry about it.
It is thrown when the MaxExpirationTime is not specified. If you want to avoid this exception, then you should specify MaxExpirationTime property.
Sample code is below.
(this.radMap.Provider.CacheStorage as FileSystemCache).MaxExpirationTime = TimeSpan.FromDays(15);

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Dan M
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or