CN110567466B - Map generation method and device, electronic equipment and readable storage medium - Google Patents
Map generation method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN110567466B CN110567466B CN201910769663.2A CN201910769663A CN110567466B CN 110567466 B CN110567466 B CN 110567466B CN 201910769663 A CN201910769663 A CN 201910769663A CN 110567466 B CN110567466 B CN 110567466B
- Authority
- CN
- China
- Prior art keywords
- target
- data
- map
- target tile
- offline
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000004891 communication Methods 0.000 claims description 7
- 238000009877 rendering Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/28—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
- G01C21/30—Map- or contour-matching
- G01C21/32—Structuring or formatting of map data
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Instructional Devices (AREA)
Abstract
The application provides a map generation method, a map generation device, electronic equipment and a readable storage medium, and relates to the technical field of navigation. The method comprises the steps of receiving and intercepting target tile request information sent by a map engine assembly, sending a request instruction to a server and a local memory according to the target tile request information, obtaining target tiles fed back by the server according to the target tile request information, or determining target data from data information stored in the local memory, converting the target data into the target tiles, and finally sending the target tiles to the map engine assembly so as to render and display the target tiles through the map engine assembly. The map generation method provided by the embodiment has the advantage that the map display and navigation can be realized no matter on-line or off-line.
Description
Technical Field
The present application relates to the field of navigation technologies, and in particular, to a map generation method and apparatus, an electronic device, and a readable storage medium.
Background
At present, with the gradual progress of navigation technology, more and more users rely on navigation software to navigate when going out.
The current common navigation mode is that a user sends a navigation request to a server through an intelligent terminal such as a mobile phone, and the server returns relevant data to the intelligent terminal used by the user, so as to realize navigation.
However, when the user needs to navigate, the user needs to connect to the network, and once the user is in a situation without a network environment or with a poor network environment, the user may not navigate normally, which reduces the experience of the user.
In summary, currently, navigation can be performed only in an online manner, so that the user experience is poor.
Disclosure of Invention
The application aims to provide a map generation method, a map generation device, an electronic device and a readable storage medium, so as to solve the problem that in the prior art, navigation can only be performed in an online mode, and the user experience is poor.
In order to achieve the above object, the embodiments of the present application adopt the following technical solutions:
in a first aspect, an embodiment of the present application provides a map generating method, which is applied to a terminal device, where the terminal device is in communication connection with a server, and the method includes:
receiving and intercepting target tile request information sent by a map engine component;
sending a request instruction to the server and a local memory according to the target tile request information;
acquiring a target tile fed back by the server according to the target tile request information, or determining target data from data information stored in the local memory, and converting the target data into the target tile;
sending the target tiles to the map engine component for rendering and display of the target tiles by the map engine component.
In a second aspect, an embodiment of the present application further provides a map generating apparatus, which is applied to a terminal device, where the terminal device is communicatively connected to a server, and the apparatus includes:
the information receiving unit is used for receiving and intercepting target tile request information sent by a map engine component;
the information sending unit is used for sending a request instruction to the server and the local memory according to the target tile request information;
a target tile obtaining unit, configured to obtain a target tile fed back by the server according to the target tile request information, or determine target data from data information stored in the local storage, and convert the target data into the target tile;
and the information sending unit is used for sending the target tiles to the map engine component so as to render and display the target tiles through the map engine component.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory for storing one or more programs; a processor; when executed by the processor, the one or more programs implement the methods as described above.
In a fourth aspect, the present application provides a readable storage medium, on which a software program is stored, and the software program, when executed by a processor, implements the method as described above.
Compared with the prior art, the embodiment of the application has the following beneficial effects:
the embodiment of the application provides a map generation method, a map generation device, electronic equipment and a readable storage medium, wherein a map engine component is used for receiving and intercepting target tile request information sent by the map engine component, then sending a request instruction to a server and a local memory according to the target tile request information, then obtaining a target tile fed back by the server according to the target tile request information, or determining target data from data information stored in the local memory, converting the target data into the target tile, and finally sending the target tile to the map engine component so as to render and display the target tile through the map engine component. According to the method and the device, after the target tile request information sent by the map engine assembly is received, the target tile request information can be intercepted, so that the map engine cannot be directly communicated with the server, meanwhile, the target tile request is responded in an online and offline mode, then the target tile is sent to the map engine assembly to be rendered and displayed, and the effect of realizing map display and navigation in both online and offline modes is achieved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and it will be apparent to those skilled in the art that other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart of a map generation method according to an embodiment of the present application.
Fig. 2 is a schematic diagram of interaction between a terminal device and a server according to an embodiment of the present application.
Fig. 3 is a flowchart of sub-steps of S106 in fig. 1 according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of a first offline data download according to an embodiment of the present application.
Fig. 5 is a flowchart of a second offline data download provided in the embodiment of the present application.
Fig. 6 is a block diagram illustrating a map generating apparatus according to an embodiment of the present application.
Fig. 7 is a block diagram of a target tile obtaining unit according to an embodiment of the present application.
Fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.
In the figure: 100-a terminal device; 110-vector map tile converter; 120-a map engine component; 130-local memory; 200-map generation means; 210-an information receiving unit; 220-an information sending unit; 230-target tile obtaining unit; 231-a judgment module; 232-a target tile determination module; 233-a stop module; 240-an instruction generation unit; 300-an electronic device; 301-a processor; 302-a memory; 303-bus.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer", and the like indicate orientations or positional relationships based on orientations or positional relationships shown in the drawings or orientations or positional relationships conventionally placed when products of the application are used, and are only used for convenience of description and simplification of the description, but do not indicate or imply that the devices or elements referred to must have specific orientations, be constructed in specific orientations, and be operated, and thus, should not be construed as limiting the present application.
In the description of the present application, it is also to be noted that, unless otherwise explicitly specified or limited, the terms "disposed" and "connected" are to be interpreted broadly, e.g., as being either fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 shows a flowchart of a map generation method according to an embodiment of the present invention. The map generation method can be applied to terminal equipment of a user, such as mobile phones, tablet computers or intelligent wearable equipment. By the map generation method provided by the embodiment, the map can be effectively displayed on line or off line, so that navigation is realized, and the experience of a user is improved. The online mode refers to that terminal equipment used by a user can be in communication connection with a server through a network; the offline means that communication connection cannot be achieved between the terminal device used by the user and the server, for example, the terminal device is in an environment without network signals or with poor network signals.
At present, the technology for realizing the internet map mainly comprises two aspects: loading map data, and rendering the map data by using OpenGL (Open Graphics Library). The open source map data mainly comes from OSM (open street map), which provides original map data, and is stored in XML or PBF format. Such files have a large amount of data and are not suitable for direct map rendering.
Thus, there is currently a format known as vector map tiles that is used by most map engines, including open source map engines such as Mapbox, leaf. However, the vector map tiles are obtained by segmenting and converting XML or PBF format data of OSM according to a pyramid mode, and the number of the vector map tiles of the global scope with the zoom level N is as follows: the power of 2 is multiplied by the power of 2, wherein the value of N is generally 1-16, so that the total number of the split tiles is billion and huge.
In view of this, at present, these tiles are usually stored in a server (map tile server) in a form of file, and when a user browses a map at a terminal, the map engine requests tiles included in a map area within a screen range from the map tile server in real time, and renders and displays the tiles in real time. The map is generated in an online mode through the method.
However, the map generation in the online system can only be performed in an environment with good network signals, and cannot be performed in an offline state.
The offline map means that the map can still be rendered under the condition that the terminal device 100 has no network connection (i.e. the terminal device 100 is in a no network signal environment or a poor network signal environment). Currently, a common implementation manner of an offline map is as follows:
under the condition of networking, all vector map tiles of all zoom levels contained in a map area which needs to be browsed by a user are downloaded and stored in the local terminal, so that even if the network is disconnected, the map engine can use the vector map tiles stored in the local terminal to render a map, and the purpose of offline use is achieved. However, because the number of the vector map tiles is large, each tile exists in a separate file, if the tiles are downloaded to the local of the terminal first, each tile needs to be transmitted, the downloading efficiency is low, and the local disk fragmentation is caused, so that the disk reading speed is reduced. Meanwhile, maps generally require route planning for navigation. Currently mainstream route planning algorithms cannot be run based on vector map tiles. Thus, even if vector map tiles are stored locally, route planning and navigation cannot be performed based on these tiles.
In summary, in the prior art, vector map tiles are downloaded locally in advance, so that an offline method is implemented, the number of the tiles is large, the download amount is large, and each vector map tile only contains data of a limited map area, which is not enough for route planning calculation.
In view of this, embodiments of the present invention provide a map generating method, which can effectively implement display of a map on-line or off-line, thereby implementing navigation and improving user experience.
Specifically, please continue to refer to fig. 1, the map generation method provided by the present application includes:
s102, receiving and intercepting target tile request information sent by a map engine component.
As a possible implementation manner of the present application, the map generation method provided by the present application is consistent with the current online map method based on the vector map tile technology, a vector map tile server is established first, and all provided vector map tiles are converted from PBF files of OSM.
It is emphasized that, referring to FIG. 2, in the embodiment of the present application, the translation layer is extracted and made into a separate vector map tile transformer 110. Meanwhile, an open-source mapbox map engine is adopted as the map engine component 120, and the vector map tile format used by the map engine component is mapbox vector tile (MVT for short). Wherein data interaction is enabled between vector map tile converter 110 and map engine component 120.
Moreover, in this embodiment, the map engine component 120 is configured to respond to a search request of a user, and further configured to render vector map tiles, so as to display a map and navigate for the user.
When a user needs to obtain map data of a certain place and perform navigation, for example, when the user needs to navigate a current location, or the user inputs a target location to perform navigation, for example, the user inputs guangzhou on the terminal device 100, the map engine component 120 may generate target tile request information with guangzhou as a destination, and send out the target tile request information to obtain a vector map tile located in guangzhou, so as to perform rendering and display.
Wherein vector map tile converter 110 intercepts the target tile request information sent by map engine component 120 while receiving the target tile request information sent by map engine component 120. In one aspect, vector map tile converter 110 can obtain relevant target request parameters via target tile request information. On the other hand, since it is true for map engine component 120 to send the target tile request message to the server, in order to enable vector map tile converter 110 to "take over" the relevant data sent by map engine component 120, vector map tile converter 110 intercepts the target tile request message sent by map engine component 120 to ensure that map engine component 120 does not send the message directly to the server.
For convenience of description, a "true" server and a "false" server are defined below to describe the map generation method, where the vector map tile server is a true server, and is in communication connection with the terminal device 100, and in a current scheme for generating a map on line for navigation, target tile request information generated by the map engine component 120 is directly sent to the vector map tile server, and then the vector map tile server feeds back a corresponding vector map tile according to the target tile request information, and then the map engine component 120 performs rendering display.
In the present embodiment, the vector map tile server is a "true" server, the vector map tile converter 110 is a "false" server, and communication is implemented between the "false" server and the "true" server, and the "false" server is connected to the map engine component 120, while the "false" server is connected to the local storage 130. For the map engine component 120, it cannot identify a "true" server and a "false" server, and therefore, after the map engine component 120 generates the target tile request information, it actually sends the target tile request information to the "false" server, and the "false" server responds to the target tile request information to obtain the required vector map tiles in an online or offline manner, and then renders and displays the vector map tiles through the map engine component 120.
And S104, sending a request instruction to the server and the local memory according to the target tile request information.
As an implementation of the present application, after vector map tile converter 110 receives the target tile request message, it will obtain the relevant data in an online and offline manner.
Where vector map tile converter 110 sends a request instruction to a server when requesting data in an online form, for example, vector map tile converter 110 may forward the target tile request information directly to the server. The server is a vector map tile server.
At the same time, vector map tile converter 110 sends the request instructions to local memory 130 in an offline manner. For the purpose of offline, when the user installs the map navigation APP, the offline map needs to be downloaded. In addition, in the map generation method provided in this embodiment, the downloaded offline file is not a vector map tile, but the downloaded original map data in the PBF format or the XML format has a smaller data size than the original map data in the vector map tile format, so that offline downloading is more convenient.
The downloaded original map data is stored in the local storage 130 of the terminal device 100, and when the vector map tile converter 110 receives the target tile request information, it simultaneously sends a request instruction to the local storage 130. It is to be understood that the vector map tile converter 110 of the present embodiment sends a request instruction to the local memory 130, which means that the vector map tile converter 110 calls corresponding data from the local memory 130 according to the target tile request information.
Certainly, as another implementation manner of this embodiment, there may be a precedence relationship between the ways in which the vector map tile converter 110 sends the request instruction to the server and the local storage 130 according to the target tile request information, for example, when an online manner is required to be used as a main manner of map generation, the vector map tile converter 110 may send the request instruction to the server first, and when corresponding feedback information is not received, the map is generated in an offline manner. When the offline mode is required to be used as the main mode of map generation, the vector map tile converter 110 will call the corresponding data from the local server first, and when the call cannot be realized, the online mode is used to generate the map. This embodiment is not limited in any way.
And S106, acquiring the target tile fed back by the server according to the target tile request information, or determining target data from the data information stored in the local memory, and converting the target data into the target tile.
After sending the request command in both online and offline modes, vector map tile converter 110 can obtain the corresponding data.
After the request instruction is sent in an online manner, the server may request a target tile fed back by information according to the target tile, that is, a vector map tile at a location requested by the user, and since the format of the target tile fed back by the server is the MVT, the vector map tile converter 110 does not need to process the target tile and directly sends the target tile to the map engine component 120.
When the request command is sent in an off-line manner, that is, the vector map tile converter 110 can determine the target data from the PBF file stored in the local storage 130, the determined target data is still in the PBF format and cannot be directly rendered and used by the map engine component 120. Thus, after receiving the target data, the vector map tile converter 110 converts the target data into a target tile, that is, converts the data information in the PBF format into a target tile in the MVT format, and then sends the target tile to the map engine component 120.
It should be noted that, because the PBF file contains complete road network information, the PBF file can be used for route planning, thereby meeting the requirements of offline route planning and navigation. Alternatively, route planning may be implemented using open source OSRM projects. The map generation method provided by the application can realize map generation and navigation in an online or offline mode.
And S108, sending the target tile to the map engine component so as to render and display the target tile through the map engine component.
After vector map tile converter 110 obtains the corresponding target tile, the target tile is sent to map engine component 120, and map engine component 120 renders the target tile for display after receiving the target tile. The rendering in this embodiment means that the map engine component 120 identifies the road network of the location selected by the user, so that the user can clearly see each street, each lake, and the like when viewing the map.
By the map generation method, map display and route planning and navigation can be performed on line or off line, and user experience is improved.
Further, referring to fig. 3, in the present application, S106 includes:
s1061, judging whether a target tile fed back by the server according to the target tile request information is received after a preset time; if not, S1062 is executed, and if yes, S1063 is instructed.
S1062, determining target data from the data information stored in the local memory, and converting the target data into a target tile.
S1063, the determination of the target data from the data information stored in the local storage is stopped.
In this embodiment, after the vector map tile converter 110 sends the request command in both the online and offline modes, the online mode is the main execution mode. That is, after a preset time, it is determined whether a target tile fed back by the server according to the target tile request information is received, for example, after 3S, it is determined whether feedback information sent by the server has been received.
When receiving feedback information sent by the server, i.e., a target tile fed back by the server, vector map tile converter 110 sends the target tile directly to map engine component 120, and stops determining the target data from the data information stored in local storage 130, i.e., without obtaining the target tile offline.
When the target tile fed back by the server is not received by the vector map tile converter 110 after 3S, it indicates that map generation cannot be performed in an online manner, and further, the map is generated in an offline manner. I.e., determine target data from data information stored in local memory 130 and convert the target data into target tiles and send to map engine component 120.
Since the off-line download of the entire world map is large, the off-line PBF file may refer to a map that is off-line for a part of a city or a country. In view of this, when the user needs to access the map that is not offline, the offline data needs to be downloaded first.
The map generation method provided by the application can realize the downloading of the off-line data in at least two ways.
First, after the step of S104, referring to fig. 4, the map generating method further includes:
and S105-a, when the data information stored in the local memory does not include the target data corresponding to the target tile request information, generating an offline reminding instruction.
That is, when a user needs to obtain a map of a certain area, for example, when a map of a guangzhou area needs to be obtained, the vector map tile converter 110 may call the target data from the local storage, and when the target data cannot be called, it indicates that the data information does not include the map of the guangzhou area, so that the terminal device 100 may generate an offline prompt instruction to prompt the user to perform offline downloading. That is, when a user needs to navigate in a certain region, if the offline PBF file does not contain the data of the region, the offline PBF file needs to be downloaded.
S105-b, receiving an off-line operation instruction.
And S105-c, sending an offline data request to a server according to the offline operation instruction, wherein the offline data request comprises coordinate information corresponding to the target tile request information.
And S105-d, receiving the target offline data fed back by the server according to the offline data request.
And S105-e, receiving the target offline data fed back by the server according to the offline data request.
When the user sees an offline reminding instruction, for example, the terminal device 100 displays "you cannot navigate the area offline and needs to download offline data", and when the user selects that downloading is needed, the vector map tile converter 110 receives an offline operation instruction. And further sending an offline data request to the server, wherein the offline data request comprises coordinate information corresponding to the target tile request information. That is, the vector map tile converter 110 requests the data information related to the address information specified by the user from the server.
In addition, the target offline data fed back by the server according to the offline data request is a file in a PBF format, and then the file is sent to the local memory 130 by the vector map tile converter 110 for storage, thereby realizing offline downloading of related data.
It should be noted that there is no sequence between S105-a to S105-e and S106.
As another implementation manner of the present application, referring to fig. 5, the map generation method further includes:
s109-a, receiving an offline operation instruction, wherein the offline operation instruction comprises coordinate information.
And S109-b, sending an offline data request to the server according to the offline operation instruction.
And S109-c, receiving the target offline data fed back by the server according to the offline data request.
And S109-d, sending the offline data to a local memory for storage.
It is understood that, in this implementation manner, a user may actively select a file that needs to be downloaded offline, for example, when the user needs to download an offline file in the guangzhou region, the user may first perform an offline operation, for example, click to enter an offline download interface, and then input an offline download instruction, after receiving the offline operation instruction, the vector map tile converter 110 sends an offline data request to the server, where the offline data request includes corresponding coordinate information, and then receives target offline data fed back by the server, and the format of the offline data is the PBF file format, and after receiving the target offline data, the vector map tile converter 110 sends the target offline data to the local storage 130 for storage.
Moreover, it should be noted that there is no sequence between S109-a to S109-d and S102-S108.
Referring to fig. 6, fig. 6 is a block diagram of a map generating apparatus 200 according to an embodiment of the present invention. The map generating apparatus 200 includes an information receiving unit 210, an information transmitting unit 220, a target tile obtaining unit 230, and an instruction generating unit 240, and the information receiving unit 210, the information transmitting unit 220, the target tile obtaining unit 230, and the instruction generating unit 240 are connected to each other.
An information receiving unit 210, configured to receive and intercept target tile request information sent by a map engine component 120.
An information sending unit 220, configured to send a request instruction to the server and the local storage 130 according to the target tile request information.
And a target tile obtaining unit 230, configured to obtain a target tile fed back by the server according to the target tile request information, or determine target data from data information stored in the local storage 130, and convert the target data into the target tile.
An information sending unit 220, configured to send the target tile to map engine component 120, so as to render and display the target tile through map engine component 120.
As a possible implementation manner of the present application, the target tile obtaining unit 230 includes:
the determining module 231 is configured to determine whether a target tile fed back by the server according to the target tile request information is received after a preset time.
And a target tile determining module 232, configured to determine target data from the data information stored in the local memory 130 and convert the target data into a target tile when a target tile fed back by the server according to the target tile request information is not received after a preset time.
A stopping module 233, configured to stop determining the target data from the data information stored in the local storage 130 when the target tile fed back by the server according to the target tile request information is received after a preset time.
As a possible implementation manner of the present application, please refer to fig. 7, the map generating apparatus 200 further includes:
an instruction generating unit 240, configured to generate an offline alert instruction when the target data corresponding to the target tile request information is not included in the data information stored in the local memory 130.
The information receiving unit 210 is configured to receive an offline operation instruction.
The information sending unit 220 is configured to send an offline data request to the server according to the offline operation instruction, where the offline data request includes coordinate information corresponding to the target tile request information.
The information receiving unit 210 is configured to receive target offline data fed back by the server according to the offline data request.
The information sending unit 220 is configured to receive target offline data fed back by the server according to the offline data request.
As another possible implementation manner of the present application, the map generation apparatus 200 further includes:
the information receiving unit 210 is configured to receive an offline operation instruction, where the offline operation instruction includes coordinate information.
The information sending unit 220 is configured to send an offline data request to the server according to the offline operation instruction.
The information receiving unit 210 is configured to receive target offline data fed back by the server according to the offline data request.
And an information sending unit 220, configured to send the offline data to the local storage 130 for storage.
Referring to fig. 8, fig. 8 is a block diagram illustrating an electronic device 300 according to an embodiment of the invention. The electronic device 300 includes a processor 301, a memory 302, and a bus 303, and the processor 301 and the memory 302 are connected by the bus 303.
The memory 302 is used for storing a program, such as the map generating apparatus 200 of fig. 6, and includes at least one software functional module which can be stored in the memory 302 in the form of software or firmware (firmware) or solidified in an Operating System (OS) of the electronic device 300, and the processor 301 executes the program after receiving an execution instruction to implement the map generating method disclosed in the above-mentioned embodiment of the invention.
The electronic device 300 may be a mobile phone or a special-purpose mobile phone, both of which may be used to implement the map generation method of the embodiments of the present invention. Although only one computer is shown in embodiments of the invention, for convenience, the functions described herein may be implemented in a distributed fashion across multiple similar platforms to balance processing loads.
The Memory 302 may include a high-speed Random Access Memory 302 (RAM) and may also include a non-volatile Memory 302 (e.g., at least one disk Memory 302).
The processor 301 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 301. The Processor 301 may be a general-purpose Processor 301, and includes a Central Processing Unit 301 (CPU), a Network Processor 301 (NP), and the like; but may also be a digital signal processor 301 (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the present invention further provides a readable storage medium, on which a software program is stored, and when the software program is executed by the processor 301, the map generating method disclosed in the above embodiment is implemented.
In summary, the embodiment of the present application provides a map generation method, an apparatus, an electronic device, and a readable storage medium, which are configured to receive and intercept a target tile request message sent by a map engine component, send a request instruction to a server and a local storage according to the target tile request message, and then obtain a target tile fed back by the server according to the target tile request message, or determine target data from data messages stored in the local storage, convert the target data into the target tile, and finally send the target tile to the map engine component, so as to render and display the target tile through the map engine component. According to the method and the device, after the target tile request information sent by the map engine assembly is received, the target tile request information can be intercepted, so that the map engine cannot be directly communicated with the server, meanwhile, the target tile request is responded in an online and offline mode, then the target tile is sent to the map engine assembly to be rendered and displayed, and the effect of realizing map display and navigation in both online and offline modes is achieved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and cell phone program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Claims (10)
1. A map generation method is applied to a terminal device, wherein the terminal device is in communication connection with a server, and the method comprises the following steps:
receiving and intercepting target tile request information sent by a map engine component;
sending a request instruction to the server and a local memory according to the target tile request information;
acquiring a target tile fed back by the server according to the target tile request information, or determining target data from data information stored in the local memory, and converting the target data into the target tile;
sending the target tiles to the map engine component for rendering and display of the target tiles by the map engine component.
2. The map generating method according to claim 1, wherein the step of obtaining a target tile to which the server requests information feedback from the target tile or determining target data from data information stored in the local storage, and converting the target data into the target tile, comprises:
judging whether a target tile fed back by the server according to the target tile request information is received or not after a preset time;
if not, determining target data from the data information stored in the local memory, and converting the target data into the target tile;
if yes, determining the target data from the data information stored in the local memory is stopped.
3. The map generation method of claim 1, wherein after the step of sending a request instruction to the server and local storage in accordance with the target tile request information, the method further comprises:
and when the data information stored in the local memory does not comprise target data corresponding to the target tile request information, generating an offline reminding instruction.
4. The map generation method of claim 3, wherein after the step of generating an offline reminder instruction, the method further comprises:
receiving an off-line operation instruction;
sending an offline data request to the server according to the offline operation instruction, wherein the offline data request comprises coordinate information corresponding to the target tile request information;
receiving target offline data fed back by the server according to the offline data request;
and sending the offline data to the local memory for storage.
5. The map generation method of claim 1, wherein the method further comprises:
receiving an offline operation instruction, wherein the offline operation instruction comprises coordinate information;
sending an offline data request to the server according to the offline operation instruction;
receiving target offline data fed back by the server according to the offline data request;
and sending the offline data to the local memory for storage.
6. A map generation device is applied to a terminal device, wherein the terminal device is connected with a server in a communication way, and the device comprises:
the information receiving unit is used for receiving and intercepting target tile request information sent by a map engine component;
the information sending unit is used for sending a request instruction to the server and the local memory according to the target tile request information;
a target tile obtaining unit, configured to obtain a target tile fed back by the server according to the target tile request information, or determine target data from data information stored in the local storage, and convert the target data into the target tile;
and the information sending unit is used for sending the target tiles to the map engine component so as to render and display the target tiles through the map engine component.
7. The map generating apparatus according to claim 6, wherein the target tile obtaining unit includes:
the judging module is used for judging whether a target tile fed back by the server according to the target tile request information is received or not after preset time;
a target tile determining module, configured to determine target data from data information stored in the local memory and convert the target data into a target tile when a target tile fed back by the server according to the target tile request information is not received after a preset time;
and the stopping module is used for stopping determining the target data from the data information stored in the local memory when the target tile fed back by the server according to the target tile request information is received after the preset time.
8. The map generation apparatus of claim 6, the apparatus further comprising:
and the instruction generating unit is used for generating an offline reminding instruction when the target data corresponding to the target tile request information is not included in the data information stored in the local memory.
9. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the one or more programs, when executed by the processor, implement the method of any of claims 1-5.
10. A readable storage medium, on which a software program is stored, characterized in that the software program, when executed by a processor, implements the method according to any one of claims 1-5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910769663.2A CN110567466B (en) | 2019-08-20 | 2019-08-20 | Map generation method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910769663.2A CN110567466B (en) | 2019-08-20 | 2019-08-20 | Map generation method and device, electronic equipment and readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110567466A CN110567466A (en) | 2019-12-13 |
| CN110567466B true CN110567466B (en) | 2022-11-25 |
Family
ID=68774021
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910769663.2A Active CN110567466B (en) | 2019-08-20 | 2019-08-20 | Map generation method and device, electronic equipment and readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110567466B (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114061599B (en) * | 2020-07-31 | 2024-09-17 | 华为技术有限公司 | Navigation positioning method, electronic equipment and navigation positioning system |
| CN113761097B (en) * | 2021-09-07 | 2022-09-16 | 中国人民解放军32021部队 | Map tile loading method, device, equipment and medium for browser end |
| CN114328781B (en) * | 2021-12-24 | 2022-11-29 | 北京庚图科技有限公司 | Method, device, equipment and storage medium for fast rendering of temporal thermodynamic diagram |
| CN114416796A (en) * | 2022-01-19 | 2022-04-29 | 北京世纪高通科技有限公司 | Tile generation method, device, equipment and storage medium |
| CN114708747A (en) * | 2022-03-07 | 2022-07-05 | 亿咖通(湖北)技术有限公司 | Map distribution method, device, equipment and storage medium |
| CN115102948A (en) * | 2022-06-24 | 2022-09-23 | 阿波罗智联(北京)科技有限公司 | Automatic downloading method, device and equipment of map tiles and storage medium |
| CN115792996A (en) * | 2022-12-08 | 2023-03-14 | 航天恒星空间技术应用有限公司 | Off-line map navigation method and device based on Beidou satellite navigation system |
| CN116955512A (en) * | 2023-06-21 | 2023-10-27 | 深圳市云洲创新科技有限公司 | Offline map caching method, system, media and electronic equipment for unmanned devices |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007147528A (en) * | 2005-11-30 | 2007-06-14 | Navitime Japan Co Ltd | Offline route display system, portable terminal device, and recognition code generation device |
| JP2015125359A (en) * | 2013-12-27 | 2015-07-06 | 株式会社日立製作所 | Map data distribution system |
| CN104933057A (en) * | 2014-03-18 | 2015-09-23 | 北京图盟科技有限公司 | Map service providing method and apparatus |
| CN105203121A (en) * | 2014-06-21 | 2015-12-30 | 谷歌公司 | Dynamically Integrating Offline And Online Suggestions In A Geographic Application |
| CN105222796A (en) * | 2014-06-20 | 2016-01-06 | 谷歌公司 | Integrating online navigation data with cached navigation data during active navigation |
| CN107977407A (en) * | 2017-11-20 | 2018-05-01 | 深圳市科比特航空科技有限公司 | tile map storage method, device, storage medium and computer equipment |
| CN109597861A (en) * | 2018-10-31 | 2019-04-09 | 百度在线网络技术(北京)有限公司 | Processing method, device and the readable storage medium storing program for executing of map datum |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003114133A (en) * | 2001-10-05 | 2003-04-18 | Pioneer Electronic Corp | Communication navigation method, communication navigation system, terminal device |
| CN104359486A (en) * | 2014-11-28 | 2015-02-18 | 百度在线网络技术(北京)有限公司 | Method for updating vehicular navigation map, vehicular navigation equipment and system |
-
2019
- 2019-08-20 CN CN201910769663.2A patent/CN110567466B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007147528A (en) * | 2005-11-30 | 2007-06-14 | Navitime Japan Co Ltd | Offline route display system, portable terminal device, and recognition code generation device |
| JP2015125359A (en) * | 2013-12-27 | 2015-07-06 | 株式会社日立製作所 | Map data distribution system |
| CN104933057A (en) * | 2014-03-18 | 2015-09-23 | 北京图盟科技有限公司 | Map service providing method and apparatus |
| CN105222796A (en) * | 2014-06-20 | 2016-01-06 | 谷歌公司 | Integrating online navigation data with cached navigation data during active navigation |
| CN105203121A (en) * | 2014-06-21 | 2015-12-30 | 谷歌公司 | Dynamically Integrating Offline And Online Suggestions In A Geographic Application |
| CN107977407A (en) * | 2017-11-20 | 2018-05-01 | 深圳市科比特航空科技有限公司 | tile map storage method, device, storage medium and computer equipment |
| CN109597861A (en) * | 2018-10-31 | 2019-04-09 | 百度在线网络技术(北京)有限公司 | Processing method, device and the readable storage medium storing program for executing of map datum |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110567466A (en) | 2019-12-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110567466B (en) | Map generation method and device, electronic equipment and readable storage medium | |
| US11778430B2 (en) | Layers in messaging applications | |
| EP3623942B1 (en) | Message processing method and apparatus, storage medium, and computer device | |
| US10467025B2 (en) | Managing delivery of code and dependent data using application containers | |
| US10445083B2 (en) | Application containers with dynamic sub-package loading | |
| KR102057944B1 (en) | Terminal device and sharing method thereof | |
| US10194288B2 (en) | Sticker distribution system for messaging apps | |
| CN106534277B (en) | Data sharing method and device | |
| CN112445579B (en) | Zero terminal data processing system and file copying method and device thereof | |
| CN107656768B (en) | Method and system for controlling page jump | |
| CN114387376B (en) | Rendering method and device of three-dimensional scene, electronic device, and readable storage medium | |
| CN113434241A (en) | Page skipping method and device | |
| CN107908482A (en) | A kind of information transferring method, equipment and computer-readable medium | |
| CN116801008A (en) | Media information material processing methods, devices, electronic equipment and storage media | |
| CN116991672A (en) | Data monitoring method, device, equipment and medium | |
| EP3105691B1 (en) | Automatically embedding digital maps in software applications | |
| US20240089223A1 (en) | Information display method and apparatus, and electronic device | |
| CN114911954B (en) | A rich media resource interaction method, device, equipment and storage medium | |
| US9930489B2 (en) | Distance display method based on social networking application, terminal, and server | |
| CN110083321B (en) | Content display method and device, intelligent screen projection terminal and readable storage medium | |
| JP2010288243A (en) | Content generation and distribution system for mobile information terminal | |
| CN115220633B (en) | Message sending method, device and electronic device | |
| CN118445489B (en) | Methods, devices, equipment, and media for using cloud terminal applications | |
| CN114302250A (en) | Resource processing method, device, system, equipment and storage medium | |
| CN119645684A (en) | Page data processing method, electronic device, storage medium and program product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |