CN-116340671-B - Map display method and device, terminal equipment and readable storage medium
Abstract
The application is applicable to the technical field of maps and provides a map display method, a device, terminal equipment and a readable storage medium, wherein the method comprises the steps of responding to a dragging operation of a user, determining a first map area, wherein the first map area is a map area which is newly added in a global map moving process and needs to be displayed, and a first attachment is associated with the first map area; and obtaining an empty object from the object pool, configuring the empty object according to the display characteristics of the first attachments to obtain the first attachments, and displaying the map based on the first map area and the first attachments. The application can solve the problem of blocking caused by long-time excessive occupation of the memory.
Inventors
- ZHOU HAOXIANG
- Shi Shipo
- FU YAO
Assignees
- 深圳市东方博雅科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230315
Claims (8)
- 1. A map display method, the method comprising: Responding to a dragging operation of a user, determining a first map area, wherein the first map area is a map area which is newly added in the global map moving process and needs to be displayed, and the first map area is associated with a first attachment; acquiring an empty object from an object pool, and configuring the empty object according to the display characteristics of the first attachment to obtain the first attachment; map display is performed based on the first map area and the first attachments; Determining a second map area in response to the dragging operation, wherein the second map area is a map area to be hidden in the global map moving process, and a second attachment is associated in the second map area; Acquiring an initial ablation index of the second attachment, wherein the initial ablation index is related to the interaction attribute of the second attachment; acquiring the transparency of the second attachment; Acquiring the interval distance between the second attachments and a third map area, wherein the third map area is a map area to be displayed after the global map stops inertial movement; calculating a target ablation index according to the initial ablation index, the transparency and the interval distance; and determining the ablation effect of the second attachment in the inertial movement process based on the target ablation index.
- 2. The map display method of claim 1, wherein the first map region corresponds to target data in the global map, and wherein the determining the first map region in response to a drag operation by a user comprises: Determining a terrain feature parameter based on the current scene data; And after the topographic feature parameters are written into the target fields of the target data, loading the target data to obtain the first map area.
- 3. A map display method as defined in claim 1, wherein the global map is divided into a plurality of map grids, the method further comprising, prior to said acquiring empty objects from the object pool: Determining a target map grid corresponding to the first map region; And searching attachments associated with each target map grid to obtain the first attachments associated with the first map area.
- 4. A map display method according to claim 1, wherein before said configuring said empty object according to said display characteristics of said first deposit, said method further comprises: And determining the display characteristics of the first attachments based on the association relation between the regional characteristics corresponding to the first map area and the attachment characteristics.
- 5. A map display method as defined in claim 1, further comprising: Restoring the second attachment to an empty object based on the display characteristics of the second attachment and storing the empty object in the object pool; and releasing the data of the second map area.
- 6. A map display apparatus, characterized in that the apparatus comprises: the first determining module is used for determining a first map area in response to the dragging operation of a user, wherein the first map area is a map area which is newly added in the global map moving process and needs to be displayed, and the first map area is associated with first attachments; the acquisition module is used for acquiring an empty object from the object pool, and configuring the empty object according to the display characteristics of the first attachment to obtain the first attachment; the display module is used for displaying a map based on the first map area and the first attachments; The second determining module is used for determining a second map area in response to the dragging operation, wherein the second map area is a map area needing to be hidden in the global map moving process, and a second attachment is associated in the second map area; The system comprises an index acquisition module, a transparency acquisition module, a target ablation index calculation module and a global map acquisition module, wherein the index acquisition module is used for acquiring an initial ablation index of the second attachment, the initial ablation index is related to the interaction attribute of the second attachment, acquiring the transparency of the second attachment, acquiring the interval distance between the second attachment and a third map area, wherein the third map area is a map area to be displayed after the global map stops inertial movement; And the ablation module is used for determining the ablation effect of the second attachment in the inertial movement process based on the target ablation index.
- 7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements a map display method according to any one of claims 1 to 5 when executing the computer program.
- 8. A computer-readable storage medium storing a computer program, wherein the computer program when executed by a processor implements a map display method according to any one of claims 1 to 5.
Description
Map display method and device, terminal equipment and readable storage medium Technical Field The application belongs to the technical field of maps, and particularly relates to a map display method, a map display device, terminal equipment and a readable storage medium. Background Because of the limitation of the size of the display screen, a user needs to drag the map back and forth when viewing the map, and the current map display method always occupies the memory of the device no matter whether the map is displayed in the display screen or not, so that the memory is excessively occupied for a long time, and the phenomenon of clamping and stopping occurs. Disclosure of Invention The embodiment of the application provides a map display method and a map display device, which can solve the problem of stuck memory caused by long-time excessive occupation of a memory. In a first aspect, an embodiment of the present application provides a map display method, including: Responding to a dragging operation of a user, determining a first map area, wherein the first map area is a map area which is newly added in the global map moving process and needs to be displayed, and the first map area is associated with a first attachment; acquiring an empty object from an object pool, and configuring the empty object according to the display characteristics of the first attachment to obtain the first attachment; and displaying the map based on the first map area and the first attachments. In a second aspect, an embodiment of the present application provides a map display apparatus, including: the first determining module is used for determining a first map area in response to the dragging operation of a user, wherein the first map area is a map area which is newly added in the global map moving process and needs to be displayed, and the first map area is associated with first attachments; the acquisition module is used for acquiring an empty object from the object pool, and configuring the empty object according to the display characteristics of the first attachment to obtain the first attachment; And the display module is used for displaying the map based on the first map area and the first attachments. In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements a map display method as described in the first aspect when the processor executes the computer program. In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program that when executed by a processor implements a map display method as described in the first aspect above. In a fifth aspect, an embodiment of the present application provides a computer program product, which when run on a terminal device, causes the terminal device to perform a map display method as described in the first aspect above. Compared with the prior art, the method and the device have the advantages that the first map area is determined in response to the dragging operation of a user, the first map area is a map area which is newly added in the whole map moving process and needs to be displayed, the first map area is associated with first attachments, empty objects are obtained from the object pool, the empty objects are configured according to the display characteristics of the first attachments to obtain the first attachments, and map display is performed based on the first map area and the first attachments. The application creates the first attachment based on the empty object when the first attachment needs to be displayed, and avoids the data corresponding to the first attachment from occupying the memory for a long time, so the application can solve the problem of blocking caused by the memory being excessively occupied for a long time. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art. FIG. 1 is a flow chart of a map display method according to an embodiment of the present application; FIG. 2 is a schematic diagram of a map grid provided in an embodiment of the present application; FIG. 3 is a flowchart of a map display method according to another embodiment of the present application; Fig. 4 is a schematic block diagram of a map display apparatus according to an embodiment of the present application; fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. Detailed Descr