private void zoomtoRouteArea()
	{
		final double fromNodeX = fromNode.getxCoord();
		final double fromNodeY = fromNode.getyCoord();
		final double toNodeX = toNode.getxCoord();
		final double toNodeY = toNode.getyCoord();
		
		
		final double xDistance = Math.max(fromNodeX, toNodeX) - Math.min(fromNodeX, toNodeX);
		final double yDistance = Math.max(fromNodeY, toNodeY) - Math.min(fromNodeY, toNodeY);
		
		final double zoomconstant;
		if (xDistance > yDistance)
		{
			zoomconstant = (xDistance) / xlength;
		} else
		{
			zoomconstant = (yDistance+yDistance) / xlength;
		}
		final double newXLength = zoomconstant*xlength*2;
		final double newYLength = zoomconstant*ylength*2;
		
		visibleArea.setCoord(Math.min(fromNodeX, toNodeX)+xDistance/2-xlength/2, Math.min(fromNodeY, toNodeY)+yDistance/2-ylength/2, xlength, ylength);
		
		searchXCoord = getWidth() / 2;
		searchYCoord = getHeight() / 2;
		
		timer.purge();
		timer.cancel();
		timer = new Timer();
		TimerTask task = new TimerTask() {
			@Override
			public void run()
			{
				if (xlength <= newXLength)
				{
					visibleArea.setCoord(Math.min(fromNodeX, toNodeX)+xDistance/2-newXLength/2, Math.min(fromNodeY, toNodeY)+yDistance/2-newYLength/2, newXLength, newYLength);
					timer.cancel();
					timer.purge();
					searchYCoord = 0;
					searchXCoord = 0;
					zoomInConstant = 0.98;
					repaint();
				}
				else
				{
					zoomInConstant = 0.99 - Math.log(xlength)*0.0014;
					zoomIn(searchXCoord, searchYCoord);
					repaint();
				}
			}
		};
		timer.scheduleAtFixedRate(task, 10, 10);
	}