Map information display method and device, computer equipment, readable storage medium and program product
By decoupling map elements into display elements and virtual elements, using bounding box collision detection to stabilize the collision area of virtual elements, and using animation to switch states, the problem of visual flickering in traditional map displays is solved, achieving a stable map display effect.
Patent Information
- Application Number
- CN202511933164.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-02-03
AI Technical Summary
In traditional map display methods, when map elements switch icons due to collisions, the synchronous shrinking of the bounding box causes a change in the collision state, resulting in map elements switching frequently between large and small icons, producing visual flickering and affecting the display effect.
Map elements are decoupled into visible elements and virtual elements. The state information of virtual elements is determined by bounding box collision detection, the collision area of virtual elements is stabilized, and the visible elements are prevented from frequently switching between visible and hidden states. The state switching is achieved through display animation or hide animation.
It improves the stability of collision detection, avoids frequent switching of displayed elements, provides a stable and flicker-free map view, and enhances the map interaction experience.
Smart Images

Figure CN121456076A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for displaying map information. Background Technology
[0002] Digital maps have become an indispensable tool in people's daily lives. With the increasing richness of map data, when a large number of map elements (e.g., markers) need to be displayed simultaneously, severe visual overlap and occlusion occur, making it difficult for users to effectively identify key information and causing interaction difficulties (such as accidental touches). To solve this problem, traditional solutions perform collision detection based on the bounding boxes of map elements during map adjustments. When a map element collides with another map element, or with the screen viewport boundary, it is converted from a large icon to a smaller icon for display. However, traditional solutions have the following problems:
[0003] When a map element switches from a large icon to a small icon due to a collision, the synchronized shrinking of its bounding box immediately changes the current collision state. This may lead to the collision being determined to be resolved in the next detection cycle, causing the map element to switch back to a large icon. In this situation, the same map element switches frequently between large and small icons, inevitably causing visual flickering during dynamic interactions and affecting the map display. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for displaying map information to address the aforementioned technical problems. This method can avoid frequent switching of display elements between displayed and hidden states, providing users with a stable and flicker-free map view.
[0005] Firstly, this application provides a method for displaying map information, including:
[0006] In response to the completion event of a map interaction operation, determine multiple map elements to be displayed within the current view area; each map element includes a display element and a virtual element;
[0007] For each map element, based on the state information of the virtual element corresponding to the map element, the corresponding display element is shown or hidden within the current view area; the state information is obtained by performing bounding box collision detection on the virtual elements involved in map interaction operations.
[0008] In one embodiment, the method further includes:
[0009] During the execution of map interaction operations, identify multiple virtual elements involved in the map interaction operations;
[0010] Perform bounding box collision detection on multiple virtual elements and obtain the collision detection results;
[0011] Based on the collision detection results, the state information of multiple virtual elements is updated.
[0012] In one embodiment, the method further includes:
[0013] During the execution of map interaction operations, multiple display elements involved in the map interaction operations are shown or hidden based on their status information.
[0014] In one embodiment, for each map element, based on the state information of the virtual element corresponding to the map element, the display element corresponding to the map element is shown or hidden within the current view area, including:
[0015] For each map element, determine the state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element;
[0016] Based on the status difference information, the display elements corresponding to the map elements are shown or hidden within the current view area.
[0017] In one embodiment, based on state difference information, the display elements corresponding to the map elements within the current view area are shown or hidden, including:
[0018] Based on the state difference information, determine the display animation or hide animation of the corresponding display element of the map element;
[0019] Play a show or hide animation at the location corresponding to the map element within the current view area.
[0020] In one embodiment, for each map element, after hiding the corresponding display element within the current view area based on the state information of the virtual element corresponding to the map element, the method further includes:
[0021] Retrieve the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element.
[0022] Display the target element corresponding to the map element at the location corresponding to the map element within the current view area.
[0023] In one embodiment, after obtaining the target element corresponding to the map element, the method further includes:
[0024] If the target element corresponding to the map element meets the preset aggregation rules, add the target element corresponding to the map element to the point aggregation component;
[0025] Based on the point aggregation component, the corresponding aggregation element is displayed.
[0026] In one embodiment, after determining the multiple map elements to be displayed within the current view area in response to a completion event of a map interaction operation, the method further includes:
[0027] Perform bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results;
[0028] Based on the collision detection results, determine the state information of the virtual elements corresponding to multiple map elements.
[0029] In one embodiment, the method further includes:
[0030] In response to a configuration operation, the collision area of the virtual element corresponding to at least one map element is configured.
[0031] Secondly, this application also provides a map information display device, comprising:
[0032] The determination module is used to determine multiple map elements to be displayed within the current view area in response to the completion event of map interaction operations; each map element includes a display element and a virtual element;
[0033] The display module is used to show or hide the corresponding display element of each map element within the current view area based on the state information of the virtual element corresponding to the map element. The state information is obtained by performing bounding box collision detection on the virtual elements involved in map interaction operations.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first aspect above.
[0035] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.
[0037] The aforementioned map information display method, apparatus, computer equipment, computer-readable storage medium, and computer program product, in response to the completion event of a map interaction operation, determine multiple map elements to be displayed within the current view area. Each map element includes a display element and a virtual element. For each map element, based on the state information of the corresponding virtual element, the display element corresponding to the map element is displayed or hidden within the current view area. The state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation. Through this method, each map element is decoupled into a display element for display and a virtual element for collision detection. During map adjustments, the collision area of the virtual element does not change due to changes in the state of the display element, improving the stability of collision detection and avoiding frequent switching between display and hidden states of the display element, thus solving the visual flickering problem present in traditional solutions. After the map interaction operation is completed, the state of the display element is switched. Regardless of how virtual elements collide or resolve collisions, the state of the display element remains stable, providing users with a stable, flicker-free map view and improving the map interaction experience. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the display interface for map element collisions in a traditional solution;
[0040] Figure 2 This is an application environment diagram of a map information display method in one embodiment;
[0041] Figure 3 This is a flowchart illustrating a method for displaying map information in one embodiment;
[0042] Figure 4 This is a schematic diagram of the map zooming display interface in one embodiment;
[0043] Figure 5 This is a schematic diagram illustrating the process of displaying map elements in one embodiment;
[0044] Figure 6 This is a structural block diagram of a map information display device in one embodiment;
[0045] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0047] Before describing the embodiments of this application, it should be noted that the term "in response to" used in the embodiments of this application refers to a state in which a corresponding event occurs or a condition is met. It is understood that the timing of the subsequent action performed in response to the event or condition is not necessarily strongly correlated with the time when the event occurs or the condition is met. For example, in some cases, the subsequent action can be performed immediately when the event occurs or the condition is met; while in other cases, the subsequent action can be performed some time after the event occurs or the condition is met. "Operation" refers to an operation performed on information (such as controls) provided by a computer device. Through this operation, corresponding instructions can be issued to the computer device, triggering the computer device to execute the next task. The next task triggered by performing different operations on different information can all be pre-set in the program. This operation can be performed manually by the user, such as clicking, double-clicking, long-pressing, swiping, etc., on content displayed on the screen by the computer device, or various interactive operations such as gesture operations, voice operations, head movements, and eye movements. In some cases, this operation can also be performed by the computer device based on a set program.
[0048] In this embodiment, "map" refers to a digital map stored and viewed digitally using computer technology. "Map element" refers to a visual marker on the map used to identify location information. These elements are dynamic layers superimposed on the map base, representing and displaying the location and attributes of specific geographic entities, such as shops marked with icons and name tags. As a visual carrier for user interaction, the density and position of "map elements" dynamically change with map zooming and translation. The collision detection mechanism in this embodiment manages visual overlap between map elements, ensuring clear visibility of map information and a clean interface through automatic hiding, avoidance, or aggregation.
[0049] The "map interactive operation" involved in this application refers to a series of behaviors in which a user communicates bidirectionally with a digital map through various input devices (such as mouse, keyboard, touch screen, gesture, voice, etc.) to dynamically change the map's display state, obtain detailed information, or manipulate map content. For example, map interactive operations include, but are not limited to, one or more combinations of zoom operations, double-click operations, drag operations, and location change operations.
[0050] Zooming refers to the interactive behavior of dynamically increasing or decreasing the map display scale through specific gestures or commands. For example, scrolling the mouse wheel forward or spreading two fingers outward on the touchscreen zooms in, while scrolling the mouse wheel backward or pinching two fingers inward on the touchscreen zooms out. Another example is clicking the "+" and "-" buttons on the map interface to zoom in or out.
[0051] Double-clicking refers to the interactive behavior of quickly clicking the same location on a map twice in a short period of time. Double-clicking can be used to quickly zoom in on the map; for example, double-clicking a point on the map will zoom in by a fixed amount of time around that point.
[0052] Dragging refers to pressing and holding a mouse button or touching and holding a finger on the screen while moving the map in any direction, thereby changing the interactive behavior of the central area displayed on the map. Dragging is used to pan the map view. For example, when the area of interest to the user is not within the current view area, dragging allows the map canvas to be moved left, right, up, or down to explore areas outside the current view without changing the zoom level.
[0053] Location change operations refer to interactive behaviors that alter the central area of the map display. For example, using navigation controls (such as a return button) to smoothly move or instantly jump between map locations. Another example is automatically changing the map's central display area to the location when an address or place name is entered in the search box.
[0054] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0055] Understandably, digital maps have become an indispensable tool in people's daily lives. However, with the increasing richness of map data, when a large number of map elements (e.g., markers) need to be displayed simultaneously, severe visual overlap and occlusion occur, making it difficult for users to effectively identify key information and causing interactive difficulties (such as accidental touches). To solve this problem, traditional solutions perform collision detection based on the bounding boxes of map elements during map adjustments. When a map element collides with another map element, or with the screen viewport boundary, it is converted from a large icon to a smaller icon for display. However, traditional solutions have the following problems:
[0056] When a map element switches from a large icon to a small icon due to a collision, the synchronized shrinking of its bounding box immediately changes the current collision state. This may lead to the collision being determined to be resolved in the next detection cycle, causing the map element to switch back to a large icon. In this situation, the same map element switches frequently between large and small icons, inevitably causing visual flickering during dynamic interactions and affecting the map display. (See reference...) Figure 1 During map zooming, the bounding box of map element 10 collides with the bounding box of map element 20, causing map element 20 to switch from a large icon to a small icon. After switching to a small icon, the collision between the bounding boxes of map element 10 and map element 20 is resolved, and map element 20 switches from a small icon to a large icon. After switching to a large icon, the bounding boxes of map element 10 and map element 20 collide again, causing map element 20 to switch frequently between large and small icons.
[0057] Based on this, embodiments of this application propose a method, apparatus, computer device, computer-readable storage medium, and computer program product for displaying map information. In response to a completion event of a map interaction operation, multiple map elements to be displayed within the current view area are determined. Each map element includes a display element and a virtual element. For each map element, based on the state information of the corresponding virtual element, the display element corresponding to the map element is displayed or hidden within the current view area. The state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation. Through this method, each map element is decoupled into a display element for display and a virtual element for collision detection. During map adjustments, the collision area of the virtual element does not change due to changes in the state of the display element, improving the stability of collision detection and avoiding frequent switching between display and hidden states of the display element, thus solving the visual flickering problem present in traditional solutions. After the map interaction operation is completed, the state of the display element is switched. Regardless of how virtual elements collide or resolve collisions, the state of the display element remains stable, providing users with a stable, flicker-free map view and improving the map interaction experience.
[0058] In addition, currently, when switching between large and small icons, map elements generally do not support icon scaling animations. Forcing a scaling animation will cause the bounding box of the map element to change, affecting collision detection and resulting in visual flickering.
[0059] To address this issue, this embodiment determines the display animation or hiding animation of the corresponding display element based on state difference information; and plays the display animation or hiding animation at the location corresponding to the map element within the current view area. In this way, by playing the display animation or hiding animation, the display element smoothly switches between display and hidden states, improving the user's visual experience. It also decouples the animation rendering sequence from the collision detection logic: during animation playback, the bounding box of the virtual element used for collision detection remains unchanged; only the visual presentation layer changes, solving the visual flickering problem caused by real-time bounding box changes in traditional solutions.
[0060] In addition, currently, large icons of map elements do not support overlapping display, which may result in insufficient information integrity within the current view area and affect the user's map browsing experience.
[0061] To address this issue, this application embodiment configures the collision area of the virtual element corresponding to at least one map element in response to a configuration operation. This introduces a configurable virtual collision area, enabling dynamic adjustment between information integrity and visual clarity. On one hand, the virtual collision area can be appropriately reduced to allow more large icons to be displayed simultaneously with slight overlap, ensuring information integrity and allowing users to quickly grasp the overall distribution. On the other hand, the virtual collision area can be increased to ensure sufficient visual space for each visible map element in dense areas, avoiding any overlap and providing a clearer reading experience.
[0062] The map information display method provided in this application embodiment can be applied to, for example, Figure 2 In the application environment shown, terminal 202 communicates with server 204 via a network. A data storage system can store the data that server 204 needs to process. The data storage system can be integrated onto server 204 or placed on a cloud or other network server. Optionally, terminal 202 has an application installed. This application can be, but is not limited to, a client of a geographic information system or a client of a platform providing map functionality. The map information display method provided in this embodiment can be implemented through this application. For example, a map platform server is deployed on server 204, providing map services for multiple user accounts. The client of terminal 202 is logged into the current account, and terminal 202 communicates with server 204 based on the current account. Server 204 can distinguish different users based on their accounts.
[0063] For example, a user performs map interaction operations through terminal 202. In response to the completion event of the map interaction operation, terminal 202 displays or hides the display elements corresponding to each map element within the current view area using the map information display method provided in this application embodiment. Terminal 202 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 204 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0064] A method according to an embodiment of the present invention, such as Figure 3 As shown, a method for displaying map information is provided, which can be applied to... Figure 2 Taking terminal 202 as an example, the explanation includes:
[0065] Step 302: In response to the completion event of the map interaction operation, determine the multiple map elements to be displayed in the current view area; each map element includes a display element and a virtual element.
[0066] In this context, map interaction operations can be understood as an interactive process involving multiple stages, such as start, movement (potentially), and end, rather than a single instantaneous event. The completion event of a map interaction operation can be understood as a specific program signal indicating that the animation or continuous calculation process of a map interaction operation has ended and the view has entered a stable state. For example, when a user zooms in on the map by spreading two fingers outwards on the touchscreen, the completion event of this map interaction operation can be understood as the point in time when the user's fingers leave the screen, the entire zooming dynamic effect completely stops, and the map view enters a stable state. It is understood that, based on the map information display method provided in this application embodiment, the terminal does not recalculate and load data for every minor drag or zoom operation by the user. Instead, it waits until the operation is complete and the view stabilizes before performing a comprehensive data update, effectively avoiding performance waste and interface lag.
[0067] The current view area refers to the geographical region currently displayed on the terminal screen, which can be defined by a rectangular bounding box corresponding to a range of latitude and longitude. Map elements to be displayed refer to all map objects that, after filtering, need to be drawn within the current view area or for which logical space needs to be reserved.
[0068] Optionally, the terminal filters all map elements obtained from the local cache and / or the server to determine multiple map elements to be displayed within the current view area.
[0069] In one optional implementation, the filtering process includes: filtering based on the latitude and longitude range of the current view area to identify map elements whose geographical locations fall within this range. Optionally, for map elements matching the geographical location, further map elements matching the detail level are determined based on the zoom level of the current view area.
[0070] Each map element is divided into a display element and a virtual element. The display element is used for display, animation, and interaction, while the virtual element is used for collision interaction. This decouples the display and collision of map elements. It is understood that the display and virtual elements of the same map element share the same latitude and longitude, and the size of the virtual element can be the same as or different from the size of the display element; this embodiment does not impose any limitations on this. For example, refer to... Figure 4 The virtual element corresponding to map element 30 refers to the transparent collider represented by the dashed box. Taking map elements as markers as an example, the markers displayed on the map include large markers, small markers, and aggregated markers. Large markers can be converted into small markers based on priority during collisions, and small markers can be aggregated into aggregated markers within certain rules. These three will be converted as the map is zoomed. In this embodiment, the large marker is split into the display element DisplayMarker and the virtual element ShadowMarker.
[0071] In one alternative implementation, the terminal continuously listens for user map interaction operations. When the animation of a map interaction operation ends, a completion event is generated. In response to this completion event, the terminal calculates the precise latitude and longitude range of the current view area, uses this range as a condition, and initiates a query to the map data source to obtain multiple map elements to be displayed within the current view area. This map data source can be an in-memory data structure, a local database, or a server.
[0072] Step 304: For each map element, based on the state information of the virtual element corresponding to the map element, show or hide the display element corresponding to the map element within the current view area; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
[0073] The state information of virtual elements refers to the label assigned to them by the system after collision detection is completed. This state information includes a display state or a hidden state, which can be represented by Boolean values, enumeration types, binary values, etc., and this embodiment does not impose any restrictions on this. If the state information of a virtual element corresponding to a map element is display, it indicates that the map element has not collided with any other higher-priority map element, and its corresponding display element can be drawn. If the state information of a virtual element corresponding to a map element is hidden, it indicates that the map element has collided with a higher-priority map element, and its corresponding display element needs to be hidden to avoid overlap.
[0074] The display or hiding of display elements refers to the rendering behavior of the terminal. Based on the state information of the virtual elements, the graphics engine will perform specific operations: submit the display elements to the rendering pipeline and finally draw them on the screen; or, explicitly instruct the rendering engine to skip the drawing of the corresponding display elements, making them invisible to the user.
[0075] Specifically, the system detects the bounding box collisions of virtual elements involved in map interaction operations and determines the state information of each virtual element based on the collision detection results. Optionally, during continuous map interaction operations, map elements within the view area may change in each frame. Bounding box collision detection is performed in each frame or at short time intervals. The state information in this embodiment is the final result determined by frame-by-frame or multiple bounding box collision detections from the start of the map interaction operation to its completion event. Optionally, during continuous map interaction operations, the system does not perform bounding box collision detection. In response to the completion event of the map interaction operation, the system determines the state information of all virtual elements within the current view area by checking whether their bounding boxes overlap or overlap within the screen space.
[0076] For example, compared to performing bounding box collision detection between pairs of virtual elements, in order to improve the detection efficiency of bounding box collisions of a large number of virtual elements, the system uses algorithms such as quadtrees and spatial hashing to quickly find which virtual elements may collide, perform bounding box collision detection on these virtual elements, and determine the state information of the virtual elements.
[0077] For example, bounding box collision detection for a virtual element refers to detecting whether the bounding boxes of the virtual element overlap or overlap with the bounding boxes of other virtual elements, or detecting whether the bounding box of the virtual element is partially located outside the screen window boundary.
[0078] In the implementation, each map element is assigned a priority, which determines the order of map elements. The higher the priority, the higher the priority of the map element will be displayed. Before a low-priority map element is displayed, it needs to undergo collision detection with the already displayed high-priority map elements. The collision detection result determines whether the low-priority map element needs to be displayed.
[0079] In one alternative implementation, for each map element, the display element corresponding to that map element is determined to be shown or hidden based on the state information of the virtual element corresponding to that map element. For example, if the state information of the virtual element corresponding to a map element is hidden, then the display element corresponding to that map element is hidden.
[0080] In one optional implementation, the display elements have initial state information. To avoid visual stuttering caused by repeated display or hiding, for each map element, the decision to show or hide the element is based on the difference between the state information of the corresponding virtual element and the state information of the corresponding display element. For example, if the display element is in a displayed state and the virtual element is in a hidden state, then the display element is hidden. If the display element is in a hidden state and the virtual element is in a displayed state, then the display element is shown. If both the display element and the virtual element are in a displayed state, then the display element's displayed state remains unchanged. If both the display element and the virtual element are in a hidden state, then the display element's hidden state remains unchanged.
[0081] In one optional implementation, an element loading strategy is pre-set based on the terminal's current memory usage. This strategy includes a first strategy and a second strategy. If the current memory usage is higher than a preset threshold, the first strategy is used; conversely, if the current memory usage is lower than the preset threshold, the second strategy is used. Under the second strategy, after hiding the display elements corresponding to the target map element, a small icon element corresponding to the target map element is displayed at the corresponding position within the current view area. Taking a map element as a marker as an example, after hiding the large marker, if memory usage is low, the small marker continues to load on the screen, thus switching from the large marker to the small marker.
[0082] For example, refer to Figure 4 Using the map information display method provided in the embodiments of this application, during map zooming, the bounding box of the virtual element of map element 30 ( Figure 4The dashed outline shown 30 and the bounding box of the virtual element of map element 40 collide, causing map element 40 to switch from a large icon to a small icon. After switching to a small icon, the bounding box of the virtual element of map element 40 does not change, while the bounding boxes of the virtual elements of map element 30 and map element 40 remain in a collision state and do not collide. Figure 1 The high-frequency switching shown keeps the state of map element 40 stable, providing users with a stable, flicker-free map view.
[0083] In the above method for displaying map information, in response to the completion event of a map interaction operation, multiple map elements to be displayed within the current view area are determined. Each map element includes a display element and a virtual element. For each map element, based on the state information of the corresponding virtual element, the display element corresponding to the map element is shown or hidden within the current view area. The state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation. By decoupling each map element into a display element for display and a virtual element for collision detection, the collision area of the virtual element does not change due to changes in the state of the display element during map adjustments, improving the stability of collision detection and avoiding frequent switching between display and hidden states of the display element, thus solving the visual flickering problem present in traditional solutions. After the map interaction operation is completed, the state of the display element is switched. Regardless of how virtual elements collide or resolve collisions, the state of the display element remains stable, providing users with a stable, flicker-free map view and improving the map interaction experience.
[0084] According to an embodiment of the present invention, the method further includes: during the execution of a map interaction operation, determining multiple virtual elements involved in the map interaction operation; performing bounding box collision detection on the multiple virtual elements to obtain collision detection results; and updating the state information of the multiple virtual elements based on the collision detection results.
[0085] The execution period of map interaction operation refers to the entire process of user interaction with the map. Taking screen touch operation as an example, the execution period of map interaction operation includes the entire continuous time period from when the user touches the screen with their finger, to when they drag, zoom or rotate the map, until their finger leaves the screen and all the animations end.
[0086] Understandably, during the execution of map interaction operations, map elements within the real-time view area may change in each frame, and bounding box collision detection is performed in each frame or at short time intervals. Each bounding box collision detection process includes: identifying virtual elements corresponding to multiple map elements within the real-time view area (i.e., multiple virtual elements involved in the map interaction operation); for each virtual element, detecting whether its bounding box overlaps or overlaps with other virtual elements, or detecting whether its bounding box is partially outside the screen window boundary, thus obtaining the collision detection result for that virtual element. In this way, multiple bounding box collision detections are performed during the execution of map interaction operations. After each bounding box collision detection, the state information of the virtual element is updated based on the collision detection result. For example, if a map element collides with another higher-priority map element, the state information of the virtual element corresponding to that map element is updated to a hidden state. Conversely, if the collision of a map element is resolved, the state information of the virtual element corresponding to that map element is updated to a displayed state. In response to the completion event of the map interaction operation, the terminal decides whether to show or hide the displayed elements based on the updated state information of the virtual elements.
[0087] In one optional implementation, after the map interaction begins, the terminal system continuously monitors changes in the map view. For each frame (or every few frames), the system calculates the latitude and longitude range of the real-time view area. Based on this latitude and longitude range, a dynamically updated list of map elements is determined. This list includes map elements newly entering the real-time view area, still within the real-time view area, and about to leave the real-time view area. The virtual elements corresponding to these map elements are the virtual elements involved in the map interaction. According to the map element list, the system identifies virtual elements that may collide. For these virtual elements, the system performs bounding box collision detection to check whether the bounding boxes of the virtual element overlap or overlap with the bounding boxes of other virtual elements, or whether the bounding box of the virtual element is partially outside the screen window boundary. The collision detection result is used to record which virtual elements conflict with each other or which virtual elements conflict with the screen window boundary. Based on the collision detection result and the preset priority of each virtual element within the real-time view area, the terminal system updates the status information of the virtual elements. Specifically, for virtual elements that have not collided, the terminal system sets their status information to the display state. When two or more virtual elements collide, the terminal system sets the state information of the virtual element with the highest priority to the displayed state, and sets the state information of all virtual elements that collide with it and have a lower priority to the hidden state. When the bounding box of a virtual element is outside the screen window boundary, the virtual element's priority is set to the lowest, and its state information is set to the hidden state. All virtual elements that collide with it but do not collide with other virtual elements or the screen window boundary are set to the displayed state. Optionally, all virtual elements in the real-time view area are sorted by priority, starting with the highest priority virtual element. If it does not collide with the screen window boundary, its state is set to the displayed state, and then the next priority element is processed, and so on. In response to the completion event of the map interaction operation, the rendering engine queries the state information of the virtual element corresponding to each map element in the current view area. If the state information is displayed, the displayed element corresponding to that map element is drawn. If the state information is hidden, the drawing of the displayed element corresponding to that map element is skipped.
[0088] In one alternative implementation, bounding box collision detection is performed internally by the map SDK (Software Development Kit). After the map SDK completes the bounding box collision detection, the collision detection result is passed as a parameter to a pre-registered callback function, which the terminal system then uses to make subsequent decisions and display processing.
[0089] In this embodiment, during the execution of the map interaction operation, the terminal has gradually completed the update calculation of the state information of most virtual elements. When the map interaction operation is completed, the system can immediately synchronize the final state to the display elements, eliminating the delay of state switching and improving the display smoothness of map elements.
[0090] According to an embodiment of the present invention, the method further includes: during the execution of a map interaction operation, displaying or hiding multiple display elements involved in the map interaction operation based on the state information of multiple display elements involved in the map interaction operation.
[0091] During map interaction operations, map elements within the real-time view area may change in each frame. For each frame's real-time view area, the terminal system determines the display elements corresponding to multiple map elements within that area (i.e., the multiple display elements involved in the map interaction operation) and obtains the status information of these display elements. For each display element, based on its status information, the system either shows or hides the display element. In this way, during map interaction operations, display elements are shown or hidden in real-time and stably based on their status information. For example, if the status information of a display element corresponding to a map element is hidden, then that display element is hidden. It can be understood that, based on the display element's status information, the graphics engine will perform specific operations: submit the display element to the rendering pipeline for final rendering on the screen; or explicitly instruct the rendering engine to skip the rendering of the corresponding display element, making it invisible to the user.
[0092] For example, after step 304, the method further includes: updating the state information of the display elements according to the display or hidden state of the display elements corresponding to each map element in the current view area. The state information of the multiple display elements obtained in this embodiment refers to data that is dynamically updated based on the display results of historical interactive operations.
[0093] For example, the status information of the display elements corresponding to each map element is predefined at multiple zoom levels. Based on the zoom level of the real-time view area, the status information of the multiple display elements involved in the map interaction operation to be used is determined from the predefined parameters.
[0094] Understandably, in traditional solutions, the map view changes continuously during user interaction with the map, and high-frequency collision detection can cause the display or hiding state of map elements to change continuously, resulting in visual flickering.
[0095] In this embodiment, during the execution of map interaction operations, the state information of the displayed elements remains stable. Regardless of whether virtual elements collide or resolve, the state of the displayed elements remains stable, providing users with a stable and flicker-free map view. Furthermore, during the execution of map interaction operations, the display elements that need to be drawn are continuously displayed, providing users with a continuous flow of information and improving the map browsing experience.
[0096] According to an embodiment of the present invention, step 304 includes: for each map element, determining state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element; and displaying or hiding the display element corresponding to the map element within the current view area based on the state difference information.
[0097] The state information of virtual elements can be understood as the target state calculated by the collision detection system, representing the state that a map element should be in according to the current view area and collision rules. The state information of displayed elements can be understood as the state currently being used by the terminal system, representing whether the map element was drawn on the screen in the previous frame. State difference information refers to the comparison result obtained by comparing the state information of virtual elements with that of displayed elements. State difference information can be used to indicate any of the following: needs to be displayed (from hidden to displayed), needs to be hidden (from displayed to hidden), or consistent (no change).
[0098] To avoid visual stuttering caused by repeated display or hiding, for each map element, the decision to show or hide the element is based on the state difference between the virtual element and the displayed element. For example, if a displayed element is shown and the virtual element is hidden, the displayed element is hidden. If a displayed element is hidden and the virtual element is shown, the displayed element is shown. If both the displayed and virtual elements are shown, the displayed element remains shown. If both the displayed and virtual elements are hidden, the displayed element remains hidden.
[0099] In this embodiment, the terminal system does not need to traverse and redraw all display elements in every frame. It only displays or hides display elements whose state changes, significantly reducing computational overhead and improving system resource utilization. This ensures that the final visual result presented to the user is completely synchronized with the internal collision detection results, improving the reliability of map display.
[0100] According to an embodiment of the present invention, a method for displaying or hiding a map element corresponding to a map element within a current view area based on state difference information includes: determining a display animation or a hiding animation for the map element corresponding to the map element based on the state difference information; and playing the display animation or hiding animation at the location corresponding to the map element within the current view area.
[0101] Specifically, when the status difference information indicates that a displayed element needs to be changed from hidden to visible, the terminal system plays a display animation to smoothly introduce the new map element or switch the map element's small icon to a large icon. When the status difference information indicates that a displayed element needs to be changed from visible to hidden, the terminal system plays a hiding animation to smoothly remove the map element or switch the map element's large icon to a small icon. The location corresponding to the map element refers to the coordinates of the map element on the current screen after projecting and transforming its latitude and longitude. The terminal system plays a display or hiding animation at these coordinates to ensure that the displayed element appears or disappears from the correct position.
[0102] For example, if the status information determines that the displayed element is in a displayed state and the virtual element is in a hidden state, then a hiding animation is played at the location of the map element. If the status information determines that the displayed element is in a hidden state and the virtual element is in a displayed state, then a display animation is played at the location of the map element.
[0103] In this embodiment, by playing display or hide animations, the displayed elements smoothly switch between displayed and hidden states, improving the user's visual experience. The animation rendering sequence and collision detection logic are decoupled: during animation playback, the bounding boxes of the virtual elements used for collision detection remain unchanged; only the visual presentation layer changes, solving the visual flickering problem caused by real-time bounding box changes in traditional solutions.
[0104] According to an embodiment of the present invention, for each map element, after hiding the display element corresponding to the map element in the current view area based on the state information of the virtual element corresponding to the map element, the method further includes: obtaining the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element; and displaying the target element corresponding to the map element at the position corresponding to the map element in the current view area.
[0105] The target element is a simplified visual representation of the map element. For example, for a given map element, the display element can be understood as a large icon of the map element, and the target element as a small icon of the map element. After the display element is hidden, the simplified target element is displayed in the same position. Taking a map element as a marker as an example, after the large marker is hidden, the corresponding small marker is displayed, achieving a switch between the two. By hiding the display element and displaying the target element, less screen space is occupied.
[0106] In one optional implementation, for each map element, based on the state information of the virtual element corresponding to the map element, the corresponding display element within the current view area is hidden. Then, the current memory usage is obtained. If the current memory usage is lower than a preset threshold, the following steps are performed: the target element corresponding to the map element is obtained; the size of the target element is smaller than the size of the display element corresponding to the map element; the target element is displayed at the position corresponding to the map element within the current view area. This method rationally utilizes memory resources, providing a buffer for other operations and sudden memory demands of the terminal system, thus enhancing the overall stability of the system.
[0107] In this embodiment, after hiding the displayed elements, simplified target elements are displayed in the same position. This avoids element overlap while preserving the contextual information of spatial distribution, allowing users to understand location and density information through simplified target elements, thus improving the readability of the map.
[0108] According to an embodiment of the present invention, after obtaining the target element corresponding to the map element, the method further includes: adding the target element corresponding to the map element to the point aggregation component if the target element corresponding to the map element satisfies a preset aggregation rule; and displaying the corresponding aggregation element based on the point aggregation component.
[0109] The preset aggregation rules refer to predefined aggregation logic and specific conditions used to determine how to aggregate target elements corresponding to multiple map elements. For example, the preset aggregation rules include spatial rules and hierarchical rules. The spatial rules determine whether the screen pixel distance between two or more target elements is less than a set value, and the hierarchical rules determine whether the current map zoom level has reached a preset threshold for triggering aggregation. For a target element corresponding to a map element, if the current map zoom level reaches the preset threshold for triggering aggregation, and the screen pixel distance between this target element and other target elements or existing aggregated elements is less than a set value, then the target element corresponding to this map element is added to the point aggregation component.
[0110] For example, the point aggregation component can be understood as a software module responsible for performing aggregation calculations, such as an aggregation manager. This module receives all target elements that meet the criteria and merges clusters of target elements that are close to each other into aggregate elements. An aggregate element represents a collection of multiple map elements within a corresponding area. Optionally, the point aggregation component can determine the number of target elements in an aggregate element and also determine the display position of the aggregate element. This display position can be the center point of the target element cluster or the position with the highest density among the target element clusters.
[0111] Alternatively, the aggregation element can be a single graphic carrying a quantitative summary, such as a circular or bubble-shaped graphic containing numbers. In this way, spatial location information is converted into a quantitative summary within the region.
[0112] Optionally, refer to Figure 4 An aggregated element can consist of two parts: a stacked icon and an overflow indicator. Its display logic is based on a comparison between the aggregated number and a preset threshold: when the number of target elements in the aggregate does not exceed the threshold, only the stacked icon corresponding to the number of target elements is rendered to intuitively reflect the cluster size. When the number of target elements in the aggregate exceeds the threshold, the stacked icon corresponding to the threshold is rendered, and the overflow indicator clearly marks the number of remaining target elements exceeding the threshold to indicate the existence of folded data that is not fully displayed.
[0113] For example, taking map elements as markers, based on the visibility state of each DisplayMarker (i.e., the display element), the small markers (i.e., the target elements) in the aggregation component are added, removed, or deduplicated. After the DisplayMarker is hidden, a small marker with the same latitude and longitude is added to the point aggregation manager to ensure that the small markers can be correctly displayed, hidden, and aggregated.
[0114] In this embodiment, dense point groups are converted into aggregated elements for display, which can preserve position and density information while ensuring interface cleanliness.
[0115] In one alternative implementation, refer to Figure 5The method for displaying map information includes the following steps: The terminal system monitors map interaction events, which include, but are not limited to, zoom events, double-click events, drag events, and location change events. In response to the completion of a map interaction event, the terminal system performs state management and obtains collision detection results through the map SDK collision callback. Boundary box collision detection can be performed on virtual elements within each frame of the view area in real time during the execution of the map interaction operation, or it can be performed on all virtual elements within the current view area after the map interaction event is completed. The state recorder records the states of virtual elements and displayed elements respectively. After the map interaction event is completed, a difference calculator calculates state difference information based on the recorded states of virtual elements and displayed elements. If the state difference information indicates that display is required, a display animation is played. If the state difference information indicates that hiding is required, a hiding animation is played. The point aggregation component decides whether to display or hide the target element (i.e., small dots), and based on the point aggregation logic, several target elements in the point aggregation component are merged into at least one aggregated element for display.
[0116] According to an embodiment of the present invention, after step 302, the method further includes: performing bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results; and determining the state information of virtual elements corresponding to multiple map elements based on the collision detection results.
[0117] During the execution of map interaction operations, the terminal system may not perform bounding box collision detection. In response to the completion event of the map interaction operation, the terminal system determines whether the bounding boxes of all virtual elements in the current view area overlap or overlap in the screen space, thereby determining the state information of the virtual elements.
[0118] In one optional implementation, in response to the completion event of a map interaction operation, the terminal system determines the latitude and longitude range of the current view area and, based on this range, determines a list of map elements. According to the map element list, the system identifies virtual elements that may collide. For these virtual elements, the system performs bounding box collision detection to check whether the bounding boxes of the virtual element overlap or overlap with those of other virtual elements, or whether the bounding box of the virtual element is partially outside the screen window boundary. The collision detection result is used to record which virtual elements collide with each other or which virtual elements collide with the screen window boundary. Based on the collision detection result and the preset priority of each virtual element within the real-time view area, the terminal system determines the state information of each virtual element. Specifically, for virtual elements that have not collided, the terminal system determines their state information as "display state." When two or more virtual elements collide, the terminal system determines the state information of the virtual element with the highest priority as "display state," and determines the state information of all virtual elements that collide with it and have lower priority as "hidden state." When the bounding box of a virtual element is outside the screen viewport boundary, that virtual element is set to the lowest priority and its state is determined to be hidden. All virtual elements that collide with it but do not collide with other virtual elements or the screen viewport boundary are determined to be displayed. Optionally, all virtual elements within the live view area are sorted by priority, starting with the highest priority virtual element. If it does not collide with the screen viewport boundary, its state is determined to be displayed, and then the next priority element is processed, and so on.
[0119] In one alternative implementation, bounding box collision detection is performed internally by the map SDK (Software Development Kit). After the map SDK completes the bounding box collision detection, the collision detection result is passed as a parameter to a pre-registered callback function, which the terminal system then uses to make subsequent decisions and display processing.
[0120] In this embodiment, after the map interaction operation is completed, the view area is in a stable state. The terminal determines the final display state of all elements based on the data in this state, ensuring the stability of the visual effect. Compared with the real-time multiple bounding box collision detection method, merging the repeated detection tasks into a single detection task in a stable state eliminates a large amount of redundant calculation and improves the overall processing efficiency.
[0121] According to an embodiment of the present invention, the method further includes: configuring the collision area of a virtual element corresponding to at least one map element in response to a configuration operation.
[0122] Configuration operations refer to user-initiated commands to modify map parameters. Examples include calling relevant SDK APIs (Application Programming Interfaces) and providing the necessary map parameters; dragging a slider or entering a value in the editor's graphical interface; and loading a predefined configuration file.
[0123] The collision area of a virtual element refers to the geometric dimensions of the virtual element used for collision detection by the user; it can be understood as the size of the virtual element's bounding box.
[0124] Understandably, configuration operations can be used to set the size of the virtual element's bounding box to be the same as the size of the displayed element's bounding box. Optionally, compared to the size of the displayed element's bounding box, configuration operations can be used to appropriately reduce the size of the virtual element's bounding box, allowing more displayed elements to be displayed simultaneously with slight overlap. Optionally, compared to the size of the displayed element's bounding box, the size of the virtual element's bounding box can be increased to ensure that each visible map element has sufficient visual space in dense areas.
[0125] For example, through configuration operations, a specific map element (or a class of map elements or all map elements) can have its virtual element collision area set to a new target value. For instance, the collision area of the subway station icon's virtual element can be changed from the default 44*44 pixels to 66*66 pixels. In subsequent map interactions, bounding box collision detection is performed based on the updated collision area.
[0126] In this embodiment, a configurable virtual collision area is introduced to dynamically adjust the balance between information integrity and visual clarity. On one hand, the virtual collision area can be appropriately reduced to allow more large icons to be displayed simultaneously with slight overlap, ensuring information integrity and allowing users to quickly grasp the overall distribution. On the other hand, the virtual collision area can be expanded to ensure that each visible map element has sufficient visual space in dense areas, avoiding any overlap and providing a clearer reading experience.
[0127] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0128] Based on the same inventive concept, this application also provides a map information display device for implementing the map information display method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more map information display device embodiments provided below can be found in the limitations of the map information display method described above, and will not be repeated here.
[0129] An apparatus according to an embodiment of the present invention, such as Figure 6 As shown, a map information display device is provided, including:
[0130] The determination module 602 is used to determine multiple map elements to be displayed within the current view area in response to the completion event of the map interaction operation; each map element includes a display element and a virtual element.
[0131] The display module 604 is used to show or hide the corresponding display element of the map element within the current view area based on the state information of the virtual element corresponding to the map element for each map element; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
[0132] In the aforementioned map information display device, each map element is decoupled into a display element for display and a virtual element for collision detection. During map adjustments, the collision area of the virtual element remains unchanged regardless of the state of the display element, improving the stability of collision detection and preventing frequent switching between displayed and hidden states, thus resolving the visual flickering problem inherent in traditional solutions. After map interaction is completed, the state of the display element is switched. Regardless of how virtual elements collide or resolve collisions, the state of the display element remains stable, providing users with a stable, flicker-free map view and enhancing the map interaction experience.
[0133] According to an embodiment of the present invention, the apparatus further includes a collision detection module, which is configured to determine multiple virtual elements involved in the map interaction operation during the execution of the map interaction operation; perform bounding box collision detection on the multiple virtual elements to obtain a collision detection result; and update the state information of the multiple virtual elements based on the collision detection result.
[0134] According to an embodiment of the present invention, the display module 604 is further configured to display or hide multiple display elements involved in the map interaction operation during the execution of the map interaction operation, based on the state information of multiple display elements involved in the map interaction operation.
[0135] According to an embodiment of the present invention, the display module 604 is further configured to, for each map element, determine state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element; and, based on the state difference information, display or hide the display element corresponding to the map element within the current view area.
[0136] According to an embodiment of the present invention, the display module 604 is further configured to determine, based on state difference information, the display animation or the hidden animation of the display element corresponding to the map element; and to play the display animation or the hidden animation at the position corresponding to the map element within the current view area.
[0137] According to an embodiment of the present invention, the display module 604 is further configured to acquire a target element corresponding to a map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element; and display the target element corresponding to the map element at the position corresponding to the map element within the current view area.
[0138] According to an embodiment of the present invention, the display module 604 is further configured to add the target element corresponding to the map element to the point aggregation component when the target element corresponding to the map element satisfies the preset aggregation rules; and display the corresponding aggregation element based on the point aggregation component.
[0139] According to an embodiment of the present invention, the determining module 602 is further configured to perform bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results; and determine the state information of virtual elements corresponding to multiple map elements based on the collision detection results.
[0140] According to an embodiment of the present invention, the apparatus further includes a configuration module, configured to configure the collision area of a virtual element corresponding to at least one map element in response to a configuration operation.
[0141] The various modules in the aforementioned map information display device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0142] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for displaying map information.
[0143] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0144] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: in response to a completion event of a map interaction operation, determining a plurality of map elements to be displayed within a current view area; each map element includes a display element and a virtual element; for each map element, based on the state information of the virtual element corresponding to the map element, displaying or hiding the display element corresponding to the map element within the current view area; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
[0145] In one embodiment, when the processor executes the computer program, it further performs the following steps: during the execution of the map interaction operation, determining multiple virtual elements involved in the map interaction operation; performing bounding box collision detection on the multiple virtual elements to obtain collision detection results; and updating the state information of the multiple virtual elements based on the collision detection results.
[0146] In one embodiment, when the processor executes the computer program, it further performs the following steps: during the execution of the map interaction operation, displaying or hiding multiple display elements involved in the map interaction operation based on the state information of multiple display elements involved in the map interaction operation.
[0147] In one embodiment, when the processor executes the computer program, it further performs the following steps: for each map element, determining state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element; and displaying or hiding the display element corresponding to the map element within the current view area based on the state difference information.
[0148] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the display animation or hiding animation of the display element corresponding to the map element based on the state difference information; and playing the display animation or hiding animation at the position corresponding to the map element within the current view area.
[0149] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element; and displaying the target element corresponding to the map element at the position corresponding to the map element within the current view area.
[0150] In one embodiment, when the processor executes the computer program, it further performs the following steps: if the target element corresponding to the map element satisfies the preset aggregation rules, the target element corresponding to the map element is added to the point aggregation component; based on the point aggregation component, the corresponding aggregation element is displayed.
[0151] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results; and determining the state information of virtual elements corresponding to multiple map elements based on the collision detection results.
[0152] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to a configuration operation, configuring the collision area of a virtual element corresponding to at least one map element.
[0153] In an exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the computer program performs the following steps: in response to a completion event of a map interaction operation, determining multiple map elements to be displayed within the current view area; each map element includes a display element and a virtual element; for each map element, displaying or hiding the display element corresponding to the map element within the current view area based on the state information of the virtual element corresponding to the map element; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
[0154] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: during the execution of the map interaction operation, determining multiple virtual elements involved in the map interaction operation; performing bounding box collision detection on the multiple virtual elements to obtain collision detection results; and updating the state information of the multiple virtual elements based on the collision detection results.
[0155] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: during the execution of the map interaction operation, displaying or hiding multiple display elements involved in the map interaction operation based on the state information of multiple display elements involved in the map interaction operation.
[0156] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each map element, determining state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element; and displaying or hiding the display element corresponding to the map element within the current view area based on the state difference information.
[0157] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the display animation or hiding animation of the display element corresponding to the map element based on the state difference information; and playing the display animation or hiding animation at the position corresponding to the map element within the current view area.
[0158] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element; and displaying the target element corresponding to the map element at the position corresponding to the map element within the current view area.
[0159] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the target element corresponding to the map element satisfies the preset aggregation rules, the target element corresponding to the map element is added to the point aggregation component; based on the point aggregation component, the corresponding aggregation element is displayed.
[0160] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: performing bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results; and determining the state information of virtual elements corresponding to multiple map elements based on the collision detection results.
[0161] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a configuration operation, configuring the collision area of a virtual element corresponding to at least one map element.
[0162] In an exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: in response to a completion event of a map interaction operation, determining a plurality of map elements to be displayed within the current view area; each map element includes a display element and a virtual element; for each map element, displaying or hiding the display element corresponding to the map element within the current view area based on the state information of the virtual element corresponding to the map element; the state information is obtained by performing bounding box collision detection on the virtual element involved in the map interaction operation.
[0163] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: during the execution of the map interaction operation, determining multiple virtual elements involved in the map interaction operation; performing bounding box collision detection on the multiple virtual elements to obtain collision detection results; and updating the state information of the multiple virtual elements based on the collision detection results.
[0164] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: during the execution of the map interaction operation, displaying or hiding multiple display elements involved in the map interaction operation based on the state information of multiple display elements involved in the map interaction operation.
[0165] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: for each map element, determining state difference information based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element; and displaying or hiding the display element corresponding to the map element within the current view area based on the state difference information.
[0166] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the display animation or hiding animation of the display element corresponding to the map element based on the state difference information; and playing the display animation or hiding animation at the position corresponding to the map element within the current view area.
[0167] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element; and displaying the target element corresponding to the map element at the position corresponding to the map element within the current view area.
[0168] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the target element corresponding to the map element satisfies the preset aggregation rules, the target element corresponding to the map element is added to the point aggregation component; based on the point aggregation component, the corresponding aggregation element is displayed.
[0169] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: performing bounding box collision detection on virtual elements corresponding to multiple map elements to obtain collision detection results; and determining the state information of virtual elements corresponding to multiple map elements based on the collision detection results.
[0170] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a configuration operation, configuring the collision area of a virtual element corresponding to at least one map element.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for displaying map information, characterized in that, The method includes: In response to the completion event of a map interaction operation, determine multiple map elements to be displayed within the current view area; each map element includes a display element and a virtual element; For each map element, based on the state information of the virtual element corresponding to the map element, the display element corresponding to the map element is shown or hidden within the current view area; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
2. The method according to claim 1, characterized in that, The method further includes: During the execution of the map interaction operation, multiple virtual elements involved in the map interaction operation are determined; Perform bounding box collision detection on the multiple virtual elements to obtain the collision detection results; Based on the collision detection results, the state information of the multiple virtual elements is updated.
3. The method according to claim 2, characterized in that, The method further includes: During the execution of the map interaction operation, the multiple display elements involved in the map interaction operation are displayed or hidden according to the status information of the multiple display elements involved in the map interaction operation.
4. The method according to claim 3, characterized in that, For each map element, based on the state information of the virtual element corresponding to the map element, the step of showing or hiding the display element corresponding to the map element within the current view area includes: For each map element, state difference information is determined based on the state information of the virtual element corresponding to the map element and the state information of the display element corresponding to the map element. Based on the state difference information, the display elements corresponding to the map elements are shown or hidden within the current view area.
5. The method according to claim 4, characterized in that, The step of showing or hiding the display elements corresponding to the map elements within the current view area based on the state difference information includes: Based on the state difference information, determine the display animation or hidden animation of the display element corresponding to the map element; Play the display animation or the hiding animation at the location corresponding to the map element within the current view area.
6. The method according to claim 1, characterized in that, For each map element, after hiding the corresponding display element within the current view area based on the state information of the virtual element corresponding to the map element, the method further includes: Obtain the target element corresponding to the map element; the size of the target element corresponding to the map element is smaller than the size of the display element corresponding to the map element. The target element corresponding to the map element is displayed at the location corresponding to the map element within the current view area.
7. The method according to claim 6, characterized in that, After obtaining the target element corresponding to the map element, the method further includes: If the target element corresponding to the map element satisfies the preset aggregation rules, the target element corresponding to the map element is added to the point aggregation component; Based on the point aggregation component, the corresponding aggregation element is displayed.
8. The method according to claim 1, characterized in that, After determining the multiple map elements to be displayed within the current view area in response to the completion event of the map interaction operation, the method further includes: Perform bounding box collision detection on the virtual elements corresponding to the multiple map elements to obtain the collision detection results; Based on the collision detection results, the state information of the virtual elements corresponding to the multiple map elements is determined.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: In response to a configuration operation, the collision area of the virtual element corresponding to at least one map element is configured.
10. A map information display device, characterized in that, The device includes: The determination module is used to determine multiple map elements to be displayed within the current view area in response to the completion event of map interaction operations; each map element includes a display element and a virtual element; The display module is used to show or hide the display element corresponding to the map element within the current view area for each map element, based on the state information of the virtual element corresponding to the map element; the state information is obtained by performing bounding box collision detection on the virtual elements involved in the map interaction operation.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.