In this paper, a kind of classic generalized Riemann problem for 2-dimensional isothermal Euler equations for compressible gas dynamics is considered. The problem is the gas \((u_{0}, v_{0}, r_{0} \mid x \mid ^{\beta })\) in the rectangular region expands into the vacuum. We construct the solution of the following form \(\begin{aligned} u=u(\xi , \eta ),\ v=v(\xi , \eta ),\ \rho =t^{\beta } \varrho (\xi , \eta ),\ \xi =\frac{x}{t},\ \eta =\frac{y}{t}, \end{aligned}\) where \(\rho \) and (u, v) denote the density and the velocity fields respectively, and \(u_{0}, v_{0}, r_{0}>0\) and \(\beta \in (-1,0) \cup (0,+\infty )\) are constants. The continuity of the self-similar solution depends on the value of \(\beta \) . Under certain conditions, we get a weak solution with shock wave, which is necessarily generated initially and move apart along a plane. Furthermore, by the method of characteristic analysis, we explain the mechanism of the shock wave.