VDS Technologies

 

how to define coord system in generate tiles

8/22/2014 6:42:37 AM
Total Posts 4

how to define coord system in generate tiles method

Hi

Please help me to define coordinate system in generate tiles method

here is the piece of code that`s not works

TileLayer tileLayer = TileLayer.Create("Map");
tileLayer.TileCacheMode = TileCacheMode.Static;
tileLayer.CoordinateSystem = CoordSystem.WGS1984;
tileLayer.FontQuality = FontQuality.AntiAlias;
tileLayer.ImageFormat = ImageFormat.Png;
tileLayer.TileSize = new Size (256, 256);
tileLayer.TileCacheDirectory = "~/TileCache";
tileLayer.GenerateTiles(2000, "/TileCache");

thanks

8/22/2014 7:54:39 AM
MVP
Total Posts 323

Re: how to define coord system in generate tiles

The coordinate system is already set in your code.

Call the TileLayer.Initialize method before GenerateTiles.

See the GeneratingStaticTiles.aspx sample and the 'Generating Static Tiles' topic in the documentation.

8/22/2014 9:16:18 AM
Total Posts 4

Re: how to define coord system in generate tiles

TileLayer tileLayer = TileLayer.Create("Map");
tileLayer.TileCacheMode =TileCacheMode.Static;
tileLayer.CoordinateSystem =CoordSystem.WGS1984;
tileLayer.FontQuality = FontQuality.AntiAlias;
tileLayer.ImageFormat = ImageFormat.Png;
tileLayer.TileSize = new Size (256, 256);
tileLayer.TileCacheDirectory = "~/TileCache";
// set a directory where the TileLayer will cache dynamically generated tile images
// this directory must have read/write/delete permissions
tileLayer.Initialize();
tileLayer.GenerateTiles(2000.0, "/TileCache");

it`s bring an error - directory not found

8/22/2014 2:01:19 PM
MVP
Total Posts 323

Re: how to define coord system in generate tiles

As described in the documentation, the cacheDirectory parameter specifies an absolute path to a directory where the tiles are stored.

This is demonstrated in the GeneratingStaticTiles.aspx sample and the 'Generating Static Tiles' topic.