Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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. – Kirk Kuykendall Dec 15 '10 at 17:38
up vote 1 down vote accepted

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; 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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