map.js
/*
 * Clears the map and resets things
 */
Clears the map and resets things
Clears the map and resets things
function clearMap() {
	mapContext.clearRect(0, 0, mapCanvas.width, mapCanvas.height);
	mapCanvas.width = 4000;
	mapCanvas.height = 4000;
	scale = 0.4;
	viewport.x = -500;
	viewport.y = -500;
	viewport.width = mapCanvas.width * scale;
	viewport.height = mapCanvas.height * scale;
	mapContext.beginPath();
	mapContext.strokeStyle = 'rgb(0, 200, 0)';
	mapContext.lineWidth = LINE_THICKNESS;
	mapContext.lineCap = 'round';
	mapContext.lineJoin = 'round';
}
function clearMap ( ) { mapContext . clearRect ( 0 , 0 , mapCanvas . width , mapCanvas . height ) ; mapCanvas . width = 4000 ; mapCanvas . height = 4000 ; scale = 0.4 ; viewport . x = - 500 ; viewport . y = - 500 ; viewport . width = mapCanvas . width * scale ; viewport . height = mapCanvas . height * scale ; mapContext . beginPath ( ) ; mapContext . strokeStyle = 'rgb(0, 200, 0)' ; mapContext . lineWidth = LINE_THICKNESS ; mapContext . lineCap = 'round' ; mapContext . lineJoin = 'round' ; }
Clears the map and resets things
Clears the map and resets things