A map display method, device, terminal equipment and readable storage medium
By responding to user dragging actions and dynamically creating and recycling attachments displayed on the map, the issue of lag caused by map data occupying memory for extended periods is resolved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BOYAA INTERACTIVE INT LTD
- Filing Date
- 2023-03-15
- Publication Date
- 2026-05-05
AI Technical Summary
Due to the limited screen size, users need to drag the map back and forth when viewing it, which causes map data to occupy device memory for a long time and results in lag.
In response to the user's drag operation, the newly added map area is determined, and an empty object is obtained from the object pool. The object is configured according to its display characteristics, and the object is created only when it is needed to avoid data occupying memory for a long time.
By dynamically creating and recycling attachments, excessive memory usage is avoided, the lag issue is resolved, and a better user experience is provided.
Smart Images

Figure CN116340671B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of map technology, and in particular relates to a map display method, apparatus, terminal device and readable storage medium. Background Technology
[0002] Due to the limitations of screen size, users need to drag the map back and forth when viewing it. However, the current map display method will continuously occupy the device memory regardless of whether the map is displayed on the screen, resulting in excessive memory usage for a long time and thus causing lag. Summary of the Invention
[0003] This application provides a map display method and apparatus that can solve the lag problem caused by excessive memory usage over a long period of time.
[0004] In a first aspect, embodiments of this application provide a map display method, the method comprising:
[0005] In response to the user's drag operation, a first map area is determined. The first map area is a newly added map area that needs to be displayed during the movement of the global map. The first map area is associated with a first attachment.
[0006] An empty object is obtained from the object pool, and the empty object is configured according to the display characteristics of the first attachment to obtain the first attachment;
[0007] The map is displayed based on the first map area and the first attached object.
[0008] Secondly, embodiments of this application provide a map display device, the device comprising:
[0009] The first determining module is used to determine a first map area in response to the user's drag operation. The first map area is a map area that needs to be displayed when the whole map is moved. The first map area is associated with a first attachment.
[0010] The acquisition module is used to acquire an empty object from the object pool and configure the empty object according to the display characteristics of the first attachment to obtain the first attachment;
[0011] The display module is used to display a map based on the first map area and the first attached object.
[0012] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a map display method as described in the first aspect above.
[0013] Fourthly, embodiments of this application provide 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.
[0014] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute a map display method as described in the first aspect above.
[0015] The beneficial effects of this application embodiment compared with the prior art are as follows: In response to a user's drag operation, this application determines a first map region, which is a newly added map region that needs to be displayed during the movement of the global map. The first map region is associated with a first attachment. An empty object is obtained from the object pool, and the empty object is configured according to the display characteristics of the first attachment to obtain the first attachment. The map is then displayed based on the first map region and the first attachment. This application creates the first attachment based on an empty object only when the first attachment needs to be displayed, avoiding the data corresponding to the first attachment occupying memory for a long time. Therefore, this application can solve the lag problem caused by excessive memory occupation for a long time. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic flowchart of a map display method provided in an embodiment of this application;
[0018] Figure 2 This is a schematic diagram of a map grid provided in one embodiment of this application;
[0019] Figure 3 This is a flowchart illustrating a map display method according to another embodiment of this application;
[0020] Figure 4 This is a schematic structural block diagram of a map display device provided in one embodiment of this application;
[0021] Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0022] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0023] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0024] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0025] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0026] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0027] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0028] Example 1:
[0029] Please see Figure 1 , Figure 1This paper illustrates a schematic flow of a map display method provided in this application.
[0030] Step 101: In response to the user's drag operation, determine the first map area. The first map area is a newly added map area that needs to be displayed during the movement of the global map. The first map area is associated with the first attachment.
[0031] A global map can refer to a complete map of a specific area, or it can refer to a scene map within a specific scenario. For example, in a game with multiple scenes, the global map could refer to the map corresponding to each scene.
[0032] Users often drag the map while viewing it, for example, when playing a game, they might drag the map to locate enemies. The entire map moves as the user drags it, but the screen size of the terminal device is fixed. Therefore, when the user drags the map, a new map area needs to be displayed on the screen, which is the first map area.
[0033] In one optional embodiment, determining a first map region in response to a user's drag operation includes: determining a newly added map coordinate range to be displayed in response to the drag operation; extracting target data from map data corresponding to the global map based on the map coordinate range; and loading the target data to obtain the first map region.
[0034] When a user opens a map or enters a game, map data can be loaded into the terminal device's memory. Map data can include the display features of objects and terrain images; the display features of objects can refer to information such as the object's transparency, its corresponding map coordinates, and the size and storage location of its image. The object images can be static or dynamic.
[0035] The map data corresponds to a global map; therefore, target data relative to the first map region can be extracted from the map data. The target data can refer to the terrain image corresponding to the first map region.
[0036] It's important to note that when a user opens the map or enters the game, it's not necessary to load all the attachment images into memory; instead, the display features of the attachments can be loaded into memory. The attachment images themselves can be stored in the terminal device's memory.
[0037] The basic map display attributes corresponding to the first map area can include terrain attributes, which can reflect terrain information such as surface undulation and surface texture.
[0038] Optionally, in response to the drag operation, determining the newly added map coordinate range to be displayed includes: determining the first map coordinate range to be displayed on the screen after dragging, i.e., the map area to be displayed on the screen after dragging, based on the map coordinates corresponding to the center point of the display screen and the size of the display screen; obtaining the second map coordinate range of the area displayed on the screen before dragging; and determining the newly added map coordinate range to be displayed based on the first map coordinate range and the second map coordinate range.
[0039] As an example rather than a limitation, the map coordinate range that is included in the first map coordinate range but not included in the second map coordinate range can be defined as the newly added map coordinate range that needs to be displayed.
[0040] In another optional embodiment, the first map region corresponds to the target data in the global map. In response to the user's drag operation, the first map region is determined by: determining terrain feature parameters based on the current scene data; writing the terrain feature parameters into the target field of the target data; and loading the target data to obtain the first map region.
[0041] Different scenarios result in different terrain styles on the global map, meaning there is a correlation between the scenario and the terrain feature parameters. For example, if the current scenario is a desert scenario, the terrain feature parameters under the desert scenario can be determined based on the aforementioned correlation. The terrain feature parameters can include parameters such as surface relief features and surface texture features.
[0042] Optionally, the first attachment can refer to an object attached to the terrain, such as a building, tree, box, game player, etc.
[0043] Optionally, the global map is divided into multiple map grids. Before obtaining an empty object from the object pool, the method further includes: determining the target map grid corresponding to the first map region; finding the attachment associated with each target map grid to obtain the first attachment associated with the first map region.
[0044] To better edit and manage the global map, it can be divided into grids to obtain multiple map grids.
[0045] The target map grid corresponding to the first map area is the newly added grid that needs to be displayed. Therefore, the first attachment can be determined by finding the attachments associated with the target map grid.
[0046] Optionally, the global map can be recursively partitioned hierarchically to obtain a tree structure of the map grid. Specifically, the global map can first be divided into n equal sub-maps. For each sub-map obtained after equal division, the sub-map can be further divided into n equal parts, and this process can be repeated recursively until the size of the sub-maps after equal division is a set size or the tree reaches a set depth, resulting in multiple map grids. It should be noted that, to improve bitwise operation efficiency, the side length of the map grid can be an integer power of 2.
[0047] As an example, and not a limitation, the value of n can be 4. See also Figure 2 , Figure 2 The diagram illustrates a map grid. The entire map is divided into four sub-maps (A, B, C, and D) at the first level. Taking sub-map A as an example, the second level of division is explained: sub-map A can be further divided into four sub-maps (E, F, G, and H). Taking sub-map H as an example, the third level of division is explained: sub-map H can be divided into four sub-maps (I, J, K, and L). If the sizes of I, J, K, and L are set, then the sub-maps obtained after the third level of division constitute the map grid.
[0048] Step 102: Obtain an empty object from the object pool and configure the empty object according to the display characteristics of the first attachment to obtain the first attachment.
[0049] Alternatively, in addition to obtaining the display features of the first attachment based on map data, the method for obtaining the display features of the first attachment can also be: determining the display features of the first attachment based on the correlation between the regional features corresponding to the first map area and the features of the attachment.
[0050] There is a certain correlation between a region and its attached objects. Different regions have different architectural styles, plant species, clothing styles, etc. Therefore, the display characteristics of the first attached object can be determined based on the region corresponding to the first map area. For example, if the region corresponding to the first map area is a primitive tribal area, the display characteristics of the first attached object, such as buildings and game players, can be determined based on the regional characteristics of the primitive tribal area.
[0051] Optionally, an object pool can be created when a user opens the map or enters the game; the object pool is used to store empty objects.
[0052] Optionally, the display characteristics of the first attachment can be obtained from memory. Based on the display characteristics of the first attachment, the attributes of the empty object can be modified to obtain the first attachment. Modifying the attributes of the empty object can be understood as changing the texture of the empty object to the texture of the first attachment.
[0053] Alternatively, if there are no empty objects in the object pool, a new empty object can be created.
[0054] Step 103: Display the map based on the first map area and the first attachment.
[0055] Optionally, the first map region and the first attachment can be placed into a rendering pool for rendering, and the first map region and the first attachment can be displayed on the display screen.
[0056] In an optional embodiment, the method further includes:
[0057] In response to the drag operation, a second map region is determined. The second map region is the map region that needs to be hidden during the movement of the global map. The second map region is associated with a second attachment. Based on the display characteristics of the second attachment, the second attachment is restored to an empty object and stored in the object pool. The data of the second map region is released.
[0058] When a user drags the map, since there will be newly added map areas that need to be displayed on the screen, there must also be map areas that need to disappear from the screen, namely, the second map area.
[0059] Optionally, determining the second map area includes: determining the map coordinate range that needs to be hidden based on the first map coordinate range and the second map coordinate range.
[0060] As an example rather than a limitation, the map coordinate range that is included in the second map coordinate range but not included in the first map coordinate range can be determined as the map coordinate range that needs to be hidden.
[0061] Optionally, restoring the second attachment to an empty object can be understood as clearing the properties of the object corresponding to the second attachment. Releasing the data of the second map region can be understood as removing the second map region from the rendering pool. It should be noted that removing the second map region from the rendering pool does not mean clearing the data corresponding to the second map region from memory.
[0062] Dynamically creating and recycling the first attached object based on the object pool can avoid excessive memory consumption and memory fragmentation, and can provide users with a better service experience at a lower hardware cost.
[0063] This application responds to user dragging operations by determining a first map region, which is a newly added map region that needs to be displayed during the movement of the global map. The first map region is associated with a first attachment. An empty object is obtained from the object pool, and the empty object is configured according to the display characteristics of the first attachment to obtain the first attachment. The map is then displayed based on the first map region and the first attachment. This application creates the first attachment based on an empty object only when the first attachment needs to be displayed, avoiding prolonged memory occupation of the data corresponding to the first attachment. Therefore, this application can solve the lag problem caused by excessive and prolonged memory occupation.
[0064] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0065] Example 2:
[0066] Please see Figure 3 , Figure 3 This paper illustrates a schematic flow of a map display method provided in this application.
[0067] Step 301: In response to the user's drag operation, determine the second map area, and the entire map begins to move inertially under the control of the drag operation.
[0068] Typically, an inertial movement effect is added during map movement, meaning that after the user stops dragging the map, it continues to move a short distance due to inertia. Dragging can refer to the user lifting their finger off the screen or releasing the mouse.
[0069] The content of the second map area can be found in the description in Example 1, and will not be repeated here.
[0070] Step 302: Obtain the target ablation index of the second attachment.
[0071] Optionally, obtaining the target ablation index of the second attachment includes: obtaining the initial ablation index of the second attachment, which is related to the interaction attributes of the second attachment; obtaining the transparency of the second attachment; obtaining the distance between the second attachment and the third map region, which is the map region that will be displayed after the global map stops inertial movement; and calculating the target ablation index based on the initial ablation index, transparency, and distance.
[0072] Optionally, if the second attachment is interactive, it indicates that the second attachment is of high importance on the map. For example, a box in a game map may contain supplies such as bullets, and the user may open the box at any time. Therefore, to ensure that the user can interact with it during inertial movement on the map, the initial ablation index corresponding to the box can be a slow ablation speed. If the second attachment is non-interactive, it indicates that the second attachment is of low importance on the map. For example, a rock, since the user will not interact with it, the initial ablation index corresponding to it can be a fast ablation speed. The smaller the initial ablation index, the slower the ablation speed; the larger the initial ablation index, the faster the ablation speed. As an example and not a limitation, the initial ablation index of an interactive second attachment can be smaller than the initial ablation index of a non-interactive second attachment.
[0073] Optionally, the transparency of the second attachment is preset. The transparency value can be in the range of [0, 255]. The higher the transparency, the less transparent the second attachment is, and the lower the transparency, the more transparent the second attachment is.
[0074] Optionally, the third map region corresponds to the first map coordinate range in Embodiment 1. The process of obtaining the third map region will not be described again here. The smaller the interval distance, the closer it is to the third map region, and the slower the corresponding ablation speed can be. The larger the interval distance, the farther it is from the third map region, that is, the earlier it disappears, and the faster the corresponding ablation speed can be.
[0075] Optionally, obtaining the interval distance between the second attachment and the third map area includes: obtaining the first map coordinates corresponding to the second attachment; obtaining the second map coordinates corresponding to the center point of the third map area; and calculating the interval distance based on the first map coordinates and the second map coordinates.
[0076] As an example rather than a limitation, the interval distance can be calculated based on the following formula:
[0077]
[0078] Distance is the interval distance, and the X and Y axes are established along two mutually perpendicular sides of the display screen, respectively. Pixel X Pixel is the length of the display screen along the X-axis. Y Distance is the length of the display screen along the Y-axis. X Distance is the distance between the X coordinates of the first and second map coordinates. Y This represents the distance between the Y-coordinates in the first and second map coordinate systems.
[0079] Optionally, the third map region corresponds to multiple associated map grids. Obtaining the distance between the second attachment and the third map region includes: calculating the distance between the second attachment and each associated map grid based on the above formula, calculating the average of the aforementioned distances, and obtaining the distance between the second attachment and the third map region. Specifically, the distance can be calculated based on the first map coordinates corresponding to the second attachment and the third map coordinates corresponding to the associated map grids. X and Distance Y .
[0080] Based on the above analysis, it can be seen that if the second attachment is interactive, the ablation speed will be slow; the greater the transparency, the slower the ablation speed; and the smaller the interval distance, the slower the ablation speed. That is, the initial ablation index and the target ablation index are positively correlated, transparency and the target ablation index are negatively correlated, and the interval distance and the target ablation index are positively correlated. As an example, and not a limitation, the target ablation index can be calculated using the following formula:
[0081] Ablation_Value'=Distance*(255-Alpha)*Ablation_Value
[0082] Ablation_Value is the target ablation index. The larger the value, the faster the ablation speed; the smaller the value, the slower the ablation speed. Distance is the distance between the second attachment and the third map area. Alpha is the transparency. Ablation_Value is the initial ablation index.
[0083] Step 303: Based on the target ablation index, determine the ablation effect of the second attachment during inertial movement.
[0084] Based on the target ablation index, different ablation animation effects can be added to each second attachment, causing the second attachment to gradually dissolve during inertial movement. When the ablation animation finishes playing, the second attachment fades off the screen due to inertia. This method can highlight interactive, opaque second attachments that are close to the third map area, preventing the user's attention from being distracted by non-interactive second attachments, thereby improving the user's interactive experience.
[0085] This application responds to a user's dragging operation, defines a second map region, and the entire map begins inertial movement under the control of the dragging operation; it obtains the target ablation index of the second attachment; and based on the target ablation index, it determines the ablation effect of the second attachment during the inertial movement. This application adds an ablation effect to the second attachment during the inertial movement of the entire map, causing the second attachment to gradually dissolve during the inertial movement. When the ablation animation finishes playing, the second attachment fades off the screen due to inertia, improving the user's interactive experience.
[0086] Example 3:
[0087] Please see Figure 4 , Figure 4 A schematic structure of a map display device provided in this application is shown. For ease of explanation, only the parts relevant to the embodiments of this application are shown in the figure.
[0088] Reference Figure 4 The device includes a first determining module 41, an acquiring module 42, and a display module 43; the specific functions of each module are as follows:
[0089] The first determining module 41 is used to determine a first map area in response to the user's drag operation. The first map area is a map area that needs to be displayed when the whole map is moved. The first map area is associated with a first attachment.
[0090] The acquisition module 42 is used to acquire an empty object from the object pool and configure the empty object according to the display characteristics of the first attachment to obtain the first attachment;
[0091] Display module 43 is used to display a map based on the first map area and the first attached object.
[0092] Optionally, the first map region corresponds to the target data in the global map, and the first determining module 41 is specifically used to: determine the terrain feature parameters based on the current scene data; write the terrain feature parameters into the target field of the target data, load the target data, and obtain the first map region.
[0093] Optionally, the device further includes an attachment acquisition module, configured to: determine the target map grid corresponding to the first map region before acquiring an empty object from the object pool; and locate the attachment associated with each target map grid to obtain the first attachment associated with the first map region.
[0094] Optionally, the device further includes:
[0095] The display feature acquisition module is used to determine the display features of the first attachment based on the correlation between the regional features corresponding to the first map area and the attachment features before configuring the empty object according to the display features of the first attachment.
[0096] Optionally, the device further includes:
[0097] The second determination module is used to determine the second map area in response to the drag operation. The second map area is the map area that needs to be hidden during the movement of the whole map. The second map area is associated with the second attachment.
[0098] The restoration module is used to restore the second attachment to an empty object and store it in the object pool based on the display characteristics of the second attachment;
[0099] The data release module is used to release data from the second map area.
[0100] Optionally, the global map is controlled to begin inertial movement upon dragging, and the device also includes:
[0101] The index acquisition module is used to acquire the target ablation index of the second attachment.
[0102] The ablation module is used to determine the ablation effect of the second attachment during inertial movement based on the target ablation index.
[0103] Optionally, the index acquisition module includes:
[0104] The first acquisition unit is used to acquire the initial ablation index of the second attachment, which is related to the interaction properties of the second attachment.
[0105] The second acquisition unit is used to acquire the transparency of the second attachment.
[0106] The third acquisition unit is used to acquire the distance between the second attachment and the third map area, which is the map area that will be displayed after the global map stops its inertial movement.
[0107] The calculation unit is used to calculate the target ablation index based on the initial ablation index, transparency, and interval distance.
[0108] The map display device provided in this application embodiment can be applied in the aforementioned method embodiment one and embodiment two. For details, please refer to the description of the aforementioned method embodiment one and embodiment two, which will not be repeated here.
[0109] Example 4:
[0110] Please see Figure 5 , Figure 5 A schematic structure of a terminal device according to an embodiment of this application is shown. The terminal device 5 of this embodiment includes: at least one processor 50 ( Figure 5 The above describes a map display method in Embodiments 1 and 2, which is shown in only one example. It also includes a memory 51 and a computer program 52 stored in the memory 51 and executable on the at least one processor 50. When the processor 50 executes the computer program 52, it implements the steps of the map display method described in Embodiments 1 and 2.
[0111] The terminal device 5 can be a desktop computer, laptop, handheld computer, or other computing device. The terminal device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of terminal device 5 and does not constitute a limitation on terminal device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0112] The processor 50 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0113] In some embodiments, the memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or memory of the terminal device 5. In other embodiments, the memory 51 may be an external storage device of the terminal device 5, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device 5. Furthermore, the memory 51 may include both internal and external storage units of the terminal device 5. The memory 51 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 51 can also be used to temporarily store data that has been output or will be output.
[0114] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0116] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0117] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0118] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0119] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0120] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A map display method, characterized in that, The method includes: In response to the user's drag operation, a first map area is determined. The first map area is a newly added map area that needs to be displayed during the movement of the global map. The first map area is associated with a first attachment. An empty object is obtained from the object pool, and the empty object is configured according to the display characteristics of the first attachment to obtain the first attachment; The map is displayed based on the first map area and the first attachment. In response to the drag operation, a second map region is determined, which is a map region that needs to be hidden during the movement of the global map, and a second attached object is associated with the second map region; the global map is controlled to start inertial movement in response to the drag operation; Obtain the initial ablation index of the second attachment, the initial ablation index being related to the interaction properties of the second attachment; Obtain the transparency of the second attachment; Obtain the distance between the second attachment and the third map area, where the third map area is the map area that will be displayed after the global map stops its inertial movement; The target ablation index is calculated based on the initial ablation index, the transparency, and the interval distance; Based on the target ablation index, the ablation effect of the second attachment during inertial movement is determined.
2. The map display method as described in claim 1, characterized in that, The first map region corresponds to the target data in the global map. Determining the first map region in response to a user's drag operation includes: Based on the current scene data, determine the terrain feature parameters; After writing the terrain feature parameters into the target field of the target data, the target data is loaded to obtain the first map region.
3. The map display method as described in claim 1, characterized in that, The global map is divided into multiple map grids, and before retrieving an empty object from the object pool, the method further includes: Determine the target map grid corresponding to the first map region; Locate the attachments associated with each of the target map grids to obtain the first attachments associated with the first map region.
4. The map display method as described in claim 1, characterized in that, Before configuring the empty object according to the display characteristics of the first attachment to obtain the first attachment, the method further includes: Based on the correlation between the regional features and the features of the attachments corresponding to the first map area, the display features of the first attachments are determined.
5. The map display method as described in claim 1, characterized in that, The method further includes: Based on the display characteristics of the second attachment, the second attachment is restored to an empty object and stored in the object pool; Release the data from the second map area.
6. A map display device, characterized in that, The device includes: The first determining module is used to determine a first map area in response to the user's drag operation. The first map area is a map area that needs to be displayed when the whole map is moved. The first map area is associated with a first attachment. The acquisition module is used to acquire an empty object from the object pool and configure the empty object according to the display characteristics of the first attachment to obtain the first attachment; The display module is used to display a map based on the first map area and the first attached object; The second determining module is used to determine a second map region in response to the dragging operation. The second map region is a map region that needs to be hidden during the movement of the global map. The second map region is associated with a second attached object. The global map is controlled to start inertial movement under the dragging operation. An index acquisition module is used to acquire the initial ablation index of the second attachment, which is related to the interaction attributes of the second attachment; acquire the transparency of the second attachment; acquire the interval distance between the second attachment and a third map area, which is the map area that will be displayed after the global map stops inertial movement; and calculate the target ablation index based on the initial ablation index, the transparency, and the interval distance. The ablation module is used to determine the ablation effect of the second attachment during inertial movement 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, When the processor executes the computer program, it implements a map display method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a map display method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Tile map display method, system and terminal and storage medium
CN109325090A