I want the MapCooker sample to generate tiles with a projected spatial reference of GCS WGS 1984. I currently initialize it with a path to a layer with the NAD_1983_HARN_Adj_MN_Isanti_Feet coordinate system. The sample is here:


I already modified the sample to produce .pngs, by changing the StorageFormat to

cacheStorageInfo.StorageFormat = esriMapCacheStorageFormat.esriMapCacheStorageModeExploded; 

Now I want to control the projected .pngs spatial reference. Any idea how to do this? I've been messing around with it for 2 hours with no luck.

I'm using ArcEngine 10 with C# and VS2010

  • 1
    Did you try setting the spatialreference of the map (i.e. dataframe) in the mxd to WGS 84? Not sure, but you might need to set a geotransformation too. Dec 15, 2010 at 17:38

1 Answer 1


I played around with projections quite a bit and then I tried something obvious and it worked.

Load the target file. Then change the function: IMap GetMapFromDocument(string mapDocFullPath)

To this:

IMap GetMapFromDocument()
    IMap map = YourMapThatHasTargetLayerLoaded.activeView as IMap; 
    return map; 

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.