4

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:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Multithreaded_MapCruncher/000100000mmm000000/

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

patrick
  • 2,730
  • 26
  • 50
  • 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. – Kirk Kuykendall Dec 15 '10 at 17:38

1 Answers1

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; 
}
patrick
  • 2,730
  • 26
  • 50