Network map loading method and device, equipment and medium
By downloading the surrounding tile data that users may view in advance, the problem of tile loading delays in map applications when network performance is poor, achieving the effect of fast display and efficient response.
Patent Information
- Application Number
- CN202411617485.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-18
AI Technical Summary
In the case of poor network performance, when the map application is applied, the tile request and download time increases significantly when the user slides or zooms the map, resulting in the new tile being unable to be displayed in time.
By listening to user gesture operations, generating operation instructions, calculating the number information of target tile and preloaded tile, and when these data are not stored, the corresponding tile data is downloaded and stored in advance for quick display.
Reduces the display time of blank tiles, improves the speed and responsiveness of map displays, and significantly improves the user experience when network connections are unstable.
Smart Images

Figure CN119473485A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic maps, and in particular to a method, device, equipment and medium for loading a network map. Background Art
[0002] In modern electronic map clients, users usually browse map information through gestures (such as sliding and zooming). In order to provide map data efficiently, most map applications use tile technology. The core idea of tile technology is to divide the map into several small image blocks (i.e. tiles), each tile corresponding to a specific area of the map. When the user browses the map, the client requests and displays the corresponding tile image according to the user's current location and zoom level. This technology greatly improves the loading speed and smoothness of the map, because the client only needs to load the tiles in the current window, instead of loading the high-resolution image of the entire map.
[0003] However, although tile technology performs well in most cases, there are still some problems in actual use, especially in cases of poor network performance. For example, when the user slides or zooms the map through gestures, the client needs to send a request to the server to obtain new tiles. In the case of slow or unstable network connection, the request and download time of tiles will increase significantly, resulting in the failure of new tiles to be displayed in time. Therefore, there is room for improvement. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, equipment and medium for loading a network map, which can display a map interface in a timely manner.
[0005] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:
[0006] The present invention provides a method for loading a network map, comprising:
[0007] Monitor and judge the user's gesture behavior when operating the map display interface;
[0008] When operating the map display interface, generating corresponding operation instructions based on the gesture behavior;
[0009] Calculating the target tile data to be displayed on the map display interface and the number information of the preloaded tile data on the preload interface according to the operation instruction;
[0010] Query and determine the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, download and store the corresponding target tile data and the preloaded tile data based on the numbering information of the target tile data and the preloaded tile data that is not stored.
[0011] In one embodiment of the present invention, when a sliding screen operation is performed on the map display interface, the operation instruction is a sliding screen instruction, and the step of calculating the number information of the target tile data to be displayed on the map display interface and the preloaded tile data of the preload interface according to the operation instruction includes:
[0012] Calculating the size data of the map display interface according to the map level of the map display interface, and calculating the numbering information of all target tile data to be displayed in the map display interface according to the sliding screen instruction;
[0013] Calculating the size data of the preload interface at the map level according to the sliding screen instruction and the size data of the map display interface; wherein the preload interface is located at the periphery of the map display interface;
[0014] According to the size data of the preloading interface, the serial number information of all the preloaded tile data in the preloading interface is calculated.
[0015] In one embodiment of the present invention, the ratio of the size data of each side length of the preloading interface to the size data of the corresponding side length of the map display interface is the same.
[0016] In one embodiment of the present invention, when a zoom operation is performed on the map display interface, the operation instruction is a zoom instruction, and the step of calculating the number information of the target tile data to be displayed on the map display interface and the preloaded tile data of the preload interface according to the operation instruction includes:
[0017] Calculating the size data of the map display interface according to the map level of the map display interface, and calculating the numbering information of all target tile data to be displayed in the map display interface according to the zoom instruction;
[0018] Calculating the size data of the preloaded interfaces of the previous map level and the next map level relative to the map level according to the zoom instruction and the size data of the map display interface; wherein the two preloaded interfaces are respectively located inside and outside the map display interface;
[0019] According to the size data of the preloading interface, the serial number information of all the preloaded tile data in the preloading interface is calculated.
[0020] In one embodiment of the present invention, the ratio of the dimension data of each side length of the preloading interface located inside the map display interface to the dimension data of the corresponding side length of the map display interface and the ratio of the dimension data of each side length of the map display interface to the dimension data of the corresponding side length of the preloading interface located outside the map display interface are the same.
[0021] In one embodiment of the present invention, the querying and determining the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, based on the numbering information of the target tile data and the preloaded tile data that is not stored, the step of downloading and storing the corresponding target tile data and the preloaded tile data includes:
[0022] Query the serial number information of the target tile data and the preloaded tile data:
[0023] When all or part of the serial number information of the target tile data and the preloaded tile data has been stored, reading the stored target tile data and the preloaded tile data;
[0024] When all or part of the serial number information of the target tile data and the preloaded tile data is not stored, the unstored target tile data and the preloaded tile data are downloaded and stored, and the stored target tile data and the preloaded tile data are read after the storage is completed.
[0025] In one embodiment of the present invention, after the querying and determining the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, based on the numbering information of the target tile data and the preloaded tile data that is not stored, downloading and storing the corresponding target tile data and the preloaded tile data, the method further includes:
[0026] The target tile data is rendered to be displayed in the map display interface.
[0027] The present invention also provides a network map loading device, comprising:
[0028] A monitoring and judging module is used to monitor and judge the gesture behavior of the user operating the map display interface;
[0029] An instruction generation module, used to generate corresponding operation instructions based on the gesture behavior when operating the map display interface;
[0030] a number calculation module, used to calculate the number information of the target tile data to be displayed on the map display interface and the preloaded tile data on the preload interface according to the operation instruction; and
[0031] A data download module is used to query and determine the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, based on the numbering information of the target tile data and the preloaded tile data that is not stored, download and store the corresponding target tile data and the preloaded tile data.
[0032] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the network map loading method when executing the computer program.
[0033] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the network map loading method are implemented.
[0034] As described above, the present invention provides a method, device, equipment and medium for loading a network map, which pre-downloads the surrounding tile data that the user may view in advance, thereby avoiding initiating a network request when the user operates (such as sliding or zooming the map), thereby greatly reducing the display time of blank tiles. The pre-downloaded tile data is stored in a memory or storage, and when the user actually views these tiles, the data can be directly obtained from the memory or storage and rendered immediately without waiting for the network request and response time.
[0035] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0037] Figure 1 A flowchart of a method for loading a network map in one embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a preload interface during a sliding screen operation in one embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a preload interface during a zoom operation in one embodiment of the present invention;
[0040] Figure 4 It is a flow chart of a network map loading device in one embodiment of the present invention;
[0041] Figure 5 FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0042] In the figure: 10, current interface; 20, preloading interface; 100, monitoring and judging module; 200, instruction generating module; 300, number calculating module; 400, data downloading module; 1, electronic device; 12, memory; 13, processor. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] See also Figure 1 The present invention provides a method for loading a network map, which can be applied to a modern electronic map client to preload the network map. The loading method may include the following steps:
[0045] Step S10: monitoring and determining the gesture behavior of the user operating the map display interface;
[0046] Step S20: when operating the map display interface, generating corresponding operation instructions based on the gesture behavior;
[0047] Step S30, calculating the target tile data to be displayed on the map display interface and the number information of the preloaded tile data on the preload interface according to the operation instruction;
[0048] Step S40, querying and determining the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, downloading and storing the corresponding target tile data and the preloaded tile data based on the numbering information of the target tile data and the preloaded tile data that is not stored;
[0049] Step S50: Render the target tile data to display it in the map display interface.
[0050] In one embodiment, when executing step S10, specifically, when using a map application, a user often needs to perform a sliding operation or a zooming operation on a map display interface through gestures in order to view map information of different areas.
[0051] In one embodiment, when executing step S20, specifically, in the map application, a gesture listener can be set to detect the user's gesture operations on the map display interface. When the user performs a swipe operation on the map display interface, the gesture listener can capture these gesture events. Subsequently, the user's swipe operation can be recorded, including the direction of the swipe (up, down, left, right) and the distance of the swipe. Based on the recorded gesture behavior, it is determined whether the user has performed a swipe operation. For example, if the user's finger moves a certain distance (for example, 50 pixels) on the screen, it can be considered that the user has performed a swipe operation. At this time, a corresponding swipe instruction can be generated for the swipe operation.
[0052] In one embodiment, when a user pinches or spreads two fingers on a map display interface, a gesture listener can capture these gesture events. Subsequently, the user's pinching or spreading operation can be recorded, including the initial distance between the fingers and the changed distance. Based on the recorded gesture behavior, it is determined whether the user has performed a zoom operation. For example, if the distance between the user's fingers changes by more than a certain threshold (e.g., 20 pixels), it can be considered that the user has performed a zoom operation. At this point, a corresponding zoom instruction can be generated for the zoom operation.
[0053] In one embodiment, when the gesture listener does not capture any gesture event, it can be considered that the user has not operated the map display interface. At this time, the gesture listener can continue to capture gesture events to continue to monitor gesture behavior.
[0054] In one embodiment, when step S30 is executed, specifically, step S30 may include the following steps:
[0055] Step S311, calculating the size data of the map display interface according to the map level of the map display interface, and calculating the number information of all target tile data to be displayed in the map display interface according to the sliding screen instruction;
[0056] Step S312: Calculate the size data of the preload interface at the map level according to the sliding screen instruction and the size data of the map display interface; wherein the preload interface is located outside the map display interface;
[0057] Step S313: Calculate the serial number information of all preloaded tile data in the preload interface according to the size data of the preload interface.
[0058] In one embodiment, when executing step S311, specifically, when the user performs a screen sliding operation on the map display interface of the map application, it is necessary to dynamically calculate the number information of the target tile data displayed in the map display interface so as to load and display the new map information in time. In order to provide a smooth user experience, the map application needs to be able to quickly and accurately calculate the number information of the target tile data in the visible area.
[0059] In one embodiment, when a user performs a sliding operation on a map display interface, the direction and distance of the sliding operation can be captured by a gesture listener. According to the sliding direction and distance of the user, the coordinates of the new center point of the map after the sliding operation are calculated. According to the size of the current screen and the new coordinates of the center point of the map, the visible area of the map display interface is determined. According to the display level of the map, the size of each target tile data at the current level is obtained. Then, according to the size of the visible area and the size of the target tile data, the number, coordinates and numbering information of the target tile data in the visible area are calculated.
[0060] In one embodiment, when a user slides the screen in a map application, the map moves accordingly to display a new area. Maps generally support a zoom function, and different zoom levels (map levels) display maps with different details. The higher the level, the smaller the displayed area, but the richer the details; the lower the level, the larger the displayed area, but the less details.
[0061] In one embodiment, the map display interface refers to the map area currently being viewed by the user. The size data of the map display interface may include width and height, which are calculated according to the level of the map, and different map levels correspond to different size data.
[0062] In one embodiment, when executing step S312, specifically, in order to improve the user experience, the preloaded tile data of the preloaded interface that the user may see soon can be loaded in advance. The preloaded tile data of the preloaded interface will be displayed faster when the user slides, reducing blank or loading time. The preloaded interface refers to an extended area located outside the map display interface, and the preloaded tile data in this area will be loaded in advance.
[0063] See also Figure 2In one embodiment, the size data of the preloading interface 20 is calculated based on the size data of the map display interface 10. The ratio of each side length (top, bottom, left, right) of the preloading interface 20 to the corresponding side length of the map display interface 10 is the same. That is, the expansion of the preloading interface 20 is uniform, and there will not be a situation where one direction expands particularly much while the other direction expands very little. For example, assuming that the width of the map display interface 10 is W and the height is H, and the width and height of the preloading interface 20 are A and B respectively, then the ratio of A to W and the ratio of B to H are the same to ensure that the preloading interface 20 is expanded proportionally. Among them, the size of the ratio of A to W may not be restricted, for example, it can be 1.5, 2, etc.
[0064] In one embodiment, when executing step S313, specifically, for the sliding screen operation, the preloading interface is an extended area outside the current map interface (at the same level). The preloading interface may include multiple preloading tile data. According to the size of the preloading interface and the map level, the numbering information of all the required preloading tile data in the preloading interface (i.e., which tiles are required) may be calculated. After calculating the numbering information of the preloading tile data in the preloading interface, the map application will query whether these preloading tile data have been stored in the memory or storage.
[0065] In one embodiment, when executing step S30, specifically, step S30 may further include the following steps:
[0066] Step S321, calculating the size data of the map display interface according to the map level of the map display interface, and calculating the number information of all target tile data to be displayed in the map display interface according to the zoom instruction;
[0067] Step S322: Calculate the size data of the preloaded interfaces of the previous map level and the next map level relative to the map level according to the zoom instruction and the size data of the map display interface; wherein the two preloaded interfaces are located inside and outside the map display interface, respectively; the ratio of the size data of each side length of the preloaded interface located inside the map display interface to the size data of the corresponding side length of the map display interface, and the ratio of the size data of each side length of the map display interface to the size data of the corresponding side length of the preloaded interface located outside the map display interface are the same;
[0068] Step S323: Calculate the serial number information of all preloaded tile data in the preload interface according to the size data of the preload interface.
[0069] In one embodiment, when step S321 is executed, specifically, when the user performs a zoom operation on the map display interface, the initial distance and the changed distance between the two fingers of the user when the two fingers of the user perform a pinching or spreading operation on the map display interface can be captured by a gesture listener. Subsequently, a new display level can be calculated based on the change in the distance between the fingers. For example, if the distance between the fingers spread exceeds a certain threshold, the display level is increased; if the distance between the fingers pinched exceeds a certain threshold, the display level is reduced. According to the new display level, the size of each target tile data at the current level is obtained. According to the user's zooming operation and the coordinates of the center point of the map display interface, the new coordinates of the center point of the map are calculated. According to the size of the map display interface and the new coordinates of the center point of the map, the new visible area of the map display interface is determined. According to the new display level, the new tile size and the new visible area, the number, coordinates and numbering information of all target tile data in the map display interface are calculated.
[0070] In one embodiment, when executing step S322, specifically, in the zoom operation, the area displayed by the previous level (smaller level) is larger than the current level, but has fewer details; the area displayed by the next level (larger level) is smaller than the current level, but has more details. In order to optimize the smoothness of map display, when the map is zoomed, in addition to the map data of the current level, the map data of the adjacent levels will also be preloaded. The preloading interface is divided into two: a preloading interface located inside the map display interface (corresponding to the larger area of the previous map level), and a preloading interface located outside the map display interface (corresponding to the smaller area of the next map level).
[0071] See also Figure 3 In one embodiment, the ratio between the dimension data of the two preloading interfaces 20 and the dimension data of the map display interface 10 is the same. For the preloading interface 20 located inside the map display interface 10, the ratio of the dimension data of each side length of the map display interface 10 to the dimension data of the corresponding side length of the preloading interface 20 located inside the map display interface 10 is the same. For the preloading interface 20 located outside the map display interface 10, the ratio of the dimension data of each side length to the dimension data of the corresponding side length of the map display interface 10 is the same. For example, the length of a side of the preloading interface 20 located outside the map display interface 10 is Q, the length of the corresponding side of the map display interface 10 is W, and the length of the corresponding side of the preloading interface 20 located inside the map display interface 10 is E, then, Q / W=W / E.
[0072] In one embodiment, when executing step S323, specifically, for the zoom operation, the preloading interface is an extended area outside (next level) or inside (upper level) the current map interface. The preloading interface may include multiple preloaded tile data, and the numbering information of all required preloaded tile data in the preloading interface (i.e., which tiles are required) may be calculated based on the size of the preloading interface and the map level. After calculating the numbering information of the preloaded tile data in the preloading interface, the map application will query whether these preloaded tile data have been stored in the memory or storage.
[0073] In one embodiment, when step S40 is executed, specifically, step S40 may include the following steps:
[0074] Step S41: query the serial number information of the target tile data and the preloaded tile data:
[0075] Step S42: when all or part of the serial number information of the target tile data and the preloaded tile data has been stored, reading the stored target tile data and the preloaded tile data;
[0076] Step S43: when all or part of the serial number information of the target tile data and the preloaded tile data is not stored, download and store the unstored target tile data and the preloaded tile data, and read the stored target tile data and the preloaded tile data after the storage is completed.
[0077] In one embodiment, when executing step S41, specifically, for the sliding screen operation, since the target tile data and the preloaded tile data may not have been downloaded, at this time, the target tile data and the preloaded tile data can be downloaded, so that the subsequent user can directly read these data from the memory or storage when sliding the screen on the map display interface. For example, the user slides the screen to the left, and the map display interface of the map application needs to display a new area. The application checks that in the new area, some tile data has been previously downloaded and stored in the memory or storage. The application can quickly read these stored tile data from the memory or storage. The rendering engine of the application splices these tile data together and displays them on the map interface. The user can see the map of the new area almost at the moment of sliding the screen without waiting for the network to load. Therefore, it is necessary to query the numbering information of the target tile data and the preloaded tile data to determine whether it needs to be downloaded.
[0078] In one embodiment, when executing step S42, specifically, if it is found that all or part of the serial number information of the target tile data and the preloaded tile data has been stored in the memory or storage, the map application will directly read the stored target tile data and the preloaded tile data, read the stored target tile data and the preloaded tile data, and subsequently use them to render the preload interface to quickly display it to the user.
[0079] In one embodiment, when executing step S43, specifically, if it is found that all or part of the numbering information of the target tile data and the preloaded tile data is not stored in the memory or storage, the map application needs to download these unstored target tile data and preloaded tile data from the network. Specifically, the map application initiates a network request to download these unstored target tile data and preloaded tile data from the server of the map service provider. After the download is complete, the map application can write these target tile data and preloaded tile data into the memory and / or storage so that they can be reused in the future.
[0080] In one embodiment, when executing step S50, specifically, after acquiring the target tile data, the target tile data can be read from the memory or storage. The rendering engine of the map application splices the target tile data together and displays them on the map display interface.
[0081] It can be seen that in the above scheme, by pre-downloading the surrounding tile data that the user may view in advance, it is avoided to initiate a network request when the user operates (such as sliding or zooming the map), thereby greatly reducing the display time of blank tiles. The pre-downloaded tile data is stored in the memory or storage. When the user actually views these tiles, the data can be directly obtained from the memory or storage and rendered immediately without waiting for the network request and response time. This double buffering mechanism ensures the fast reading and rendering of tile data, and improves the speed and responsiveness of map display. Since the user's operation behavior has a certain predictability (usually viewing the area around the current tile), downloading the surrounding tile data in advance can effectively predict the user's next needs. Through this preloading strategy, the user can hardly feel the loading delay when performing map operations, thereby significantly improving the user experience. The pre-download mechanism reduces frequent network requests, especially when the user quickly slides or zooms the map. By reducing the number of network requests and loading tile data in advance, the impact of network instability or high latency on map browsing is reduced.
[0082] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0083] See also Figure 4 The present invention also provides a network map loading device, which corresponds to the loading method in the above embodiment. The loading device may include a monitoring judgment module 100, an instruction generation module 200, a number calculation module 300 and a data download module 400. The functions of each module are as follows:
[0084] In one embodiment, the monitoring and judging module 100 is used to monitor and judge the gesture behavior of the user in operating the map display interface.
[0085] In one embodiment, the instruction generation module 200 is used to generate corresponding operation instructions based on gesture behaviors when operating the map display interface.
[0086] In one embodiment, the number calculation module 300 is used to calculate the number information of the target tile data to be displayed on the map display interface and the preloaded tile data on the preload interface according to the operation instruction.
[0087] In one embodiment, the data download module 400 is used to query and determine the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, based on the numbering information of the target tile data and the preloaded tile data that is not stored, the corresponding target tile data and the preloaded tile data are downloaded and stored.
[0088] For the specific definition of the loading device, please refer to the definition of the loading method above, which will not be repeated here. Each module in the above loading device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the memory in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the memory can call and execute the operations corresponding to each of the above modules.
[0089] See also Figure 5 In one embodiment, the electronic device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a loading program for a network map.
[0090] In one embodiment, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 12 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 12 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 1, such as the loaded code of the network map, etc., but also can be used to temporarily store data that has been output or is to be output.
[0091] In one embodiment, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect various components of the entire electronic device 1, and executes or executes programs or modules (such as a power battery capacity correction program, etc.) stored in the memory 12, and calls data stored in the memory 12 to execute various functions of the electronic device 1 and process data.
[0092] In one embodiment, the processor 13 executes the operating system and various installed application programs of the electronic device 1. The processor 13 executes the application programs to implement the steps in the above-mentioned network map loading method.
[0093] In one embodiment, the computer program may be divided into one or more modules, one or more modules are stored in the memory 12, and executed by the processor 13 to complete the present application. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into a monitoring judgment module 100, an instruction generation module 200, a number calculation module 300, and a data download module 400.
[0094] The embodiments of the present invention disclosed above are only used to help illustrate the present invention. The embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for loading a network map, characterized in that: include: Monitor and judge the user's gesture behavior when operating the map display interface; When operating the map display interface, generating corresponding operation instructions based on the gesture behavior; Calculating the target tile data to be displayed on the map display interface and the number information of the preloaded tile data on the preload interface according to the operation instruction; Query and determine the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, download and store the corresponding target tile data and the preloaded tile data based on the numbering information of the target tile data and the preloaded tile data that is not stored.
2. The method for loading a network map according to claim 1, characterized in that: When a sliding screen operation is performed on the map display interface, the operation instruction is a sliding screen instruction, and the step of calculating the number information of the target tile data to be displayed on the map display interface and the preloaded tile data of the preload interface according to the operation instruction includes: Calculating the size data of the map display interface according to the map level of the map display interface, and calculating the numbering information of all target tile data to be displayed in the map display interface according to the sliding screen instruction; Calculating the size data of the preload interface at the map level according to the sliding screen instruction and the size data of the map display interface; wherein the preload interface is located at the periphery of the map display interface; According to the size data of the preloading interface, the serial number information of all the preloaded tile data in the preloading interface is calculated.
3. The method for loading a network map according to claim 2, characterized in that: The ratio of the dimension data of each side length of the preloading interface to the dimension data of the corresponding side length of the map display interface is the same.
4. The method for loading a network map according to claim 1, characterized in that: When the map display interface is zoomed, the operation instruction is a zoom instruction, and the step of calculating the number information of the target tile data to be displayed on the map display interface and the preloaded tile data of the preload interface according to the operation instruction comprises: Calculating the size data of the map display interface according to the map level of the map display interface, and calculating the numbering information of all target tile data to be displayed in the map display interface according to the zoom instruction; Calculating the size data of the preloaded interfaces of the previous map level and the next map level relative to the map level according to the zoom instruction and the size data of the map display interface; wherein the two preloaded interfaces are respectively located inside and outside the map display interface; According to the size data of the preloading interface, the serial number information of all the preloaded tile data in the preloading interface is calculated.
5. The method for loading a network map according to claim 4, characterized in that: The ratio of the dimension data of each side length of the preloading interface located inside the map display interface to the dimension data of the corresponding side length of the map display interface and the ratio of the dimension data of each side length of the map display interface to the dimension data of the corresponding side length of the preloading interface located outside the map display interface are the same.
6. The method for loading a network map according to claim 1, characterized in that: The querying and determining the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, the step of downloading and storing the corresponding target tile data and the preloaded tile data based on the numbering information of the target tile data and the preloaded tile data that is not stored comprises: Query the serial number information of the target tile data and the preloaded tile data: When all or part of the serial number information of the target tile data and the preloaded tile data has been stored, reading the stored target tile data and the preloaded tile data; When all or part of the serial number information of the target tile data and the preloaded tile data is not stored, the unstored target tile data and the preloaded tile data are downloaded and stored, and the stored target tile data and the preloaded tile data are read after the storage is completed.
7. The method for loading a network map according to claim 1, characterized in that: After the step of querying and determining the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, downloading and storing the corresponding target tile data and the preloaded tile data based on the numbering information of the target tile data and the preloaded tile data that is not stored, the method further includes: The target tile data is rendered to be displayed in the map display interface.
8. A network map loading device, characterized in that: include: A monitoring and judging module is used to monitor and judge the gesture behavior of the user operating the map display interface; An instruction generation module, used to generate corresponding operation instructions based on the gesture behavior when operating the map display interface; A number calculation module, used to calculate the number information of the target tile data to be displayed on the map display interface and the preloaded tile data on the preload interface according to the operation instruction; as well as A data download module is used to query and determine the numbering information of the target tile data and the preloaded tile data: when part or all of the numbering information of the target tile data and the preloaded tile data is not stored, based on the numbering information of the target tile data and the preloaded tile data that is not stored, download and store the corresponding target tile data and the preloaded tile data.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for loading a network map as claimed in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for loading a network map as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Optimization method and system for online loading of map tiles and storage medium
CN121456077A
Map tile and range data preloading method based on operation prediction
CN122470680A