private BufferedImage getView() {

		if (this.getWidth() > 0 && this.getHeight() > 0) {
			// maps size in pixels
			int mapSize = (mapImage_Scaled.getHeight());

			// checks new position is valid
			if (viewPort.x + this.getWidth() > mapSize) {
				int moveXBy = viewPort.x + this.getWidth() - mapSize;
				moveView(-moveXBy, 0);
			}

			// checks new position is valid
			if (viewPort.y + this.getHeight() > mapSize) {
				int moveYBy = viewPort.y + this.getHeight() - mapSize;
				moveView(0, -moveYBy);
			}

			int windowHeight = this.getHeight();
			int windowWidth = this.getWidth();
			// if window width > map image
			if (this.getHeight() > mapImage_Scaled.getHeight()) {
				windowHeight = mapImage_Scaled.getHeight();
				viewPort.y = 0;
			}
			if (this.getWidth() > mapImage_Scaled.getWidth()) {
				windowWidth = mapImage_Scaled.getWidth();
				viewPort.x = 0;
			}

			// get subimage
			mapImage_View = null;
			try {
				mapImage_View = mapImage_UnitAndBuildingsScaled.getSubimage(
						viewPort.x, viewPort.y, windowWidth, windowHeight);
			} catch (Exception e) {
				System.err.println("Error creating subview!");
			}
		}
		return mapImage_View;

	}