I'm attempting to prove that a space is connected and compact. I have a continuous function $f:X \rightarrow S^{1}$. $X$ is metrizable and locally connected. $f$ is non-constant, surjective and non-injective. Generally the fibers of $f$ are not connected. X is a one-dimensional CW complex, so a graph, which is of genus 2.
What additional properties of $X$ or $f$ are sufficient for such a proof? And how would I go about the proof?
Thanks!