Here is my workflow for creating tiles and linking them to a layer.

1) load shapefile
2) grab layer representing shapefile
3) init & execute mapcruncher
4) turn on dynamic display
5) create dynamiccachelayermanager and init with my layer
6) save layer as layerfile

I've managed to successfully modify this sample: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000mm8000000

It creates my png files and a file called conf.xml. In conf.xml it has the following data:

<LODInfo xsi:type="typens:LODInfo">

I thought if I set my mapScale to 485413.57628360949 then it would grab my generated tiles instead of regenerating them, but no luck, it still wants to regenerate them. I think its just a mapscale issue, do you know how to get the mapscale of the generated tiles so I can put it set it via the IMapControl.mapScale interface?

Here's what happened next:

1) I used mapcruncher to generate tiles, it also generated a conf.xml
2) I open conf.xml to get the mapscales
3) I hard coded those mapscales in as my zoom levels
4) Dynamically generate the tiles at my hard coded zoom level
5) compare the mapcruncher generated tiles to the tiles which are dynamically created

The MapCruncher files start at Level 0 - 8, and the images are numbered in an orderly fashion.

C0000000.png C0000001.png... etc.

But the dynamically generated pngs are in the following format

C0000003d.png even if only 1 png represents the whole map. One would expect C00000000.png here....

I am truely lost here.

1 Answer 1


I found another angle to solve my problem, but it doesn't use the MapCruncher sample. As far as I can tell MapCruncher is gigantic untested waste of time and it's my belief that it cannot be made to work. After analyzing the code there are not enough public variables for me to manipulate to give me a hope of solving the problem. But enough with that. Here's the workaround:

Basically you have a list of doubles which hold your desired mapscales.

for (int i = 0; i < this.mapScales.Count; i++)

  dynamicCacheLayerManager.Update(layer.AreaOfInterest, this.mapScales[i] - 1000, this.mapScales[i], esriMapCacheUpdateMode.esriMapCacheUpdateRecreateAll);

This sample starts quite a few threads and takes a while, so be patient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.