Transmembrane protein Golden goal (Gogo) interacts with atypical cadherin Flamingo (Fmi) to direct R8 photoreceptor axons in the Drosophila visual system. However, the precise mechanisms underlying Gogo regulation during columnar- and layer-specific R8 axon targeting are unknown. Our studies demonstrated that the insulin secreted from surface and cortex glia switches the phosphorylation status of Gogo, thereby regulating its two distinct functions. Non-phosphorylated Gogo mediates the initial recognition of the glial protrusion in the center of the medulla column, whereas phosphorylated Gogo suppresses radial filopodia extension by counteracting Flamingo to maintain a one axon-to-one column ratio. Later, Gogo expression ceases during the midpupal stage, thus allowing R8 filopodia to extend vertically into the M3 layer. These results demonstrate that the long- and short-range signaling between the glia and R8 axon growth cones regulates growth cone dynamics in a stepwise manner, and thus shapes the entire organization of the visual system.