Problem with zoom change

May 17, 2010 at 2:33 PM
Edited May 17, 2010 at 3:37 PM

Hi!

I'm developing a windows mobile application and when I change the zoom level quickly I obtain a mscorlib exception and the image doesn't appear. Do you know what it can be?

The output messages are:

A first chance exception of type 'System.SystemException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll
A first chance exception of type 'System.SystemException' occurred in mscorlib.dll

Thanks,
BemDisposto

Coordinator
May 17, 2010 at 4:26 PM

try latest changeset, i decreased some values

May 17, 2010 at 11:39 PM

I tried with the lastest changeset and it's still happening. I think the problem is when I make two requests in a short period of time, the program crashes. After a long period of time (like 3 or 4 minutes), the map is reloaded, I don't know why.

Thank you!

Coordinator
May 18, 2010 at 6:01 AM

strange, whats your mobile? Did you tried to debug it?

May 18, 2010 at 1:01 PM
Edited May 18, 2010 at 1:10 PM

I have a HTC Touch2. As I said in the first post, I get:

A first chance exception of type 'System.SystemException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll
A first chance exception of type 'System.SystemException' occurred in mscorlib.dll

This occurred after pressing the zoom button 2 times.

That button has the following code:

private void zoomInButt_Click(object sender, EventArgs e)
{
if (mapCenter.Zoom < map.MaxZoom)
{
map.Zoom = (int) (map.Zoom) + 1;
}
}

Should I do anything different??

Coordinator
May 18, 2010 at 1:13 PM

hm..

May 18, 2010 at 3:08 PM
Hi,
What is the mapCenter? And Can you try this?
private void zoomInButt_Click(object sender, EventArgs e)
{
   if (map.Zoom < map.MaxZoom)
   {
      map.Zoom = (int) (map.Zoom) + 1;
   }
}
May 18, 2010 at 3:15 PM
ramazanulucay wrote:
Hi,
What is the mapCenter? And Can you try this?
private void zoomInButt_Click(object sender, EventArgs e)
{
   if (map.Zoom < map.MaxZoom)
   {
      map.Zoom = (int) (map.Zoom) + 1;
   }
}

mapCenter was a variable where I saved the coordinates and the the zoom level of the map. Currently, I'm not using that and my code is exactly what you wrote. I still have the problem...

May 18, 2010 at 3:32 PM
Edited May 18, 2010 at 3:33 PM
I see. I don't use for mobile application. Do you use the Cache? 
map.Manager.Mode = AccessMode.ServerOnly
May 18, 2010 at 3:36 PM

Yes, I'm using server and cache mode.

map.Manager.Mode = AccessMode.ServerAndCache;

May 18, 2010 at 3:38 PM

Can you try to change it?

May 18, 2010 at 3:39 PM

yes, I already try with serverOnly.

 

Coordinator
May 18, 2010 at 5:39 PM

but you need CacheOnly ;]