1. A method for controlling an electronic device, for an electronic apparatus, comprising: obtaining a position of the electronic apparatus in a spatial area; displaying a scene of the spatial area where the electronic apparatus is located in a display unit connected to the electronic apparatus; obtaining a position of a controllable target apparatus included in the scene and obtaining a relative position of the controllable target apparatus and the electronic apparatus by using the position of the electronic apparatus and searching in a target apparatus distribution database of the spatial area; dynamically displaying an apparatus image layer corresponding to the controllable target apparatus at a corresponding position of the scene according to the obtained relative position of the controllable target apparatus and the electronic apparatus; and transmitting a controlling command to the controllable target apparatus corresponding to the apparatus image layer via a network connection, when the apparatus image layer receives an enabling signal.