yet another Cache question

Topics: Help
Jul 26, 2012 at 9:24 AM

Hi all, sorry to inflame you with yet again "beginner" question.

Before resorting to ask in this forum, I have tried to comprehend related threads for weeks to no avail :(
I am no .NET master or advanced programmer. I am just a novice programmer. I have to say that this GMap control is awesome, but maybe a bit too overwhelmed for me coz it is so complex and the codes, documentations, tutorials are scattered all over the place and I often confuse where to start (as a beginner) so therefore I kindly ask anyone here to share their expertise.

I want to use my program on a computer that does not have access to internet at all (even for initial cache or prefetch), and also does not have access to the application data (so in my code i changed the local cache to @"C:\GMapCache\"; as suggested in this forum).

So I use a different PC that has internet to initially prefetched the maps - using the demo program, then exported it to .gmdb. and hope that I can use this file in my program to get the map offline.

In my program I defined the access mode to CacheOnly, and do this: put the gmdb in C:\GMapCache\TileDBv5\en folder, and the map does not load (blue tiles).

I then deleted the cache files from C:\GMapCache\TileDBv5\en  and added an import button. I imported the gmdb file, and i seen it sitting in the C:\GMapCache\TileDBv5\en folder. But again the map still does not load (blue screen).

I honestly have no idea as to why. Can anyone who has successfully access the map using CacheOnly enlighten and maybe share their piece of code?

Coordinator
Jul 26, 2012 at 10:05 AM

well it should work, you are missing something else

Jul 27, 2012 at 10:50 AM

hi radioman. thx for the response.

i started over from scratch and tidy up the code. now it works.

however i still wonder why the form is slow to load (as mentioned by others too in this forum).

I use bing map and use the release mode, but the form still needs around 22 seconds to come up? why is that? Is there anything can be done about it?

Coordinator
Jul 27, 2012 at 12:29 PM

you still use debug build, your problem ;}

Jul 30, 2012 at 8:21 AM
Edited Jul 30, 2012 at 8:22 AM

hi radioman,

 

I have used the release build.

If I execute the release build from the development PC, it will fire up in 8 seconds max. Also tried in another spare PC and the form shows up after 8 sec.

But when opened on Target PC it is 22 seconds. The target PC is actually newer (more powerful) than the development PC. However it is admin restricted and I wont have access to admin account.

also i tried to compile with dot.net 3.5 and 4, no difference.

Coordinator
Jul 30, 2012 at 8:46 AM

is it only the first time or everytime?

Jul 30, 2012 at 10:45 AM

it is  always 22sec on the target PC each time opened.

the one on development PC, the second time seems faster, maybe only 3 sec.

Coordinator
Jul 30, 2012 at 12:14 PM

you definitely use debug build

Jul 31, 2012 at 10:46 AM

no I am very sure I use the release build from the release folder. I have set the compilation to Release in the configuration manager.

I then copied to the target PC, and also copied to a spare PC. The one on spare PC takes 8 sec to come up.

Also today I have access to the admin account in the target PC but it still fired up in 22 seconds.  

Set your compilation to Release in the configuration manager.

Coordinator
Jul 31, 2012 at 11:03 AM

can you test there 'official' hot build?

Jul 31, 2012 at 11:34 AM

hi

 

what do you mean by official hot build?

Coordinator
Jul 31, 2012 at 12:40 PM

http://greatmaps.codeplex.com/releases/view/73162

Aug 2, 2012 at 11:24 AM
Edited Aug 2, 2012 at 11:25 AM

I have tried your hot build on the target PC and it fired up after 50 sec. The second time even nearly 2 minutes. In both occasion it did not pop up the message box "no internet connection, going into cache mode?".   It fired up 8 sec on my spare PC with a pop up box asking about using the cache mode only.

My program is only using cache mode.

I am puzzled. there must be something missing/wrong with the target pc?

Coordinator
Aug 2, 2012 at 11:33 AM

i've no idea ;/