private void WriteTileFile(byte[] jsonContent, string tilePath, int layerId, int zoomLevel, int row)
{
// Create the directory path if it doesn't already exist
this.CreateTilePath(layerId, zoomLevel, row);
// Write to file
using (System.IO.FileStream fs = new System.IO.FileStream(tilePath, FileMode.Create, FileAccess.ReadWrite))
{
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(jsonContent);
bw.Close();
}
}