function spec()
{
	this.tile_size = 256;
	this.min_x = 0;
	this.max_x = 99999999;
	this.min_y = -10000000;
	this.max_y = 99999999;

	this.min_level = 1;
	this.max_level = 11;

	this.empty_tile_url = 'http://static.naver.com/local/map_img/blank.png';

	
	this.base_map_url = 'http://imap.local.naver.com/img/';
}

spec.prototype.distance_per_pixel =
	function (level)
	{
		return Math.pow(2, level-1)*100;
	}

spec.prototype.get_row_count = 
	function (level)
	{
		var row_image_count = Math.floor((this.max_x - this.min_x)  / (Math.pow(2, level-1)* this.tile_size *100));
		return row_image_count;
	}

spec.prototype.get_col_count = 
	function (level)
	{
		var col_image_count = Math.floor((this.max_y - this.min_y) / (Math.pow(2, level-1)* this.tile_size *100));
		return col_image_count;
	}


spec.prototype.get_tile_url = 
	function (x_index,y_index,level)
	{
		var row_image_count = this.get_row_count(level);
		var col_image_count = this.get_col_count(level);
		var x = x_index;
		var y = y_index;

		x_index = (row_image_count*(level+1) + x_index ) % row_image_count;
		y_index = (col_image_count*(level+1) + y_index ) % col_image_count;

		
		var image_index = y_index * row_image_count + x_index;
		var dir = Math.floor(image_index / 1000)*1000;
		var img_url = this.base_map_url + level + "/" + dir + "/" + image_index +".png?" + x + "+" + y ;

		return img_url;
	}

spec.prototype.get_overlay_url =
	function (x_index,y_index,level)
	{
		return "";
	}


spec.prototype.point2pixel = 
	function (point,level)
	{

		var distance_per_pixel =	this.distance_per_pixel(level);
		var pixel = new P(Math.round((point.x - this.min_x)/distance_per_pixel),Math.round((point.y - this.min_y)/distance_per_pixel));
		return pixel;
	}

spec.prototype.pixel2point = 
	function (pixel,level)
	{

		var distance_per_pixel =	this.distance_per_pixel(level);
		var point = new P(Math.round(pixel.x*distance_per_pixel)+this.min_x,Math.round(pixel.y*distance_per_pixel)+this.min_y);
		return point;
	}

spec.prototype.has_overlay = return_false;

