CN111782307A - Map rendering method, style switching method, related device and navigation client - Google Patents

Map rendering method, style switching method, related device and navigation client Download PDF

Info

Publication number
CN111782307A
CN111782307A CN201910266568.0A CN201910266568A CN111782307A CN 111782307 A CN111782307 A CN 111782307A CN 201910266568 A CN201910266568 A CN 201910266568A CN 111782307 A CN111782307 A CN 111782307A
Authority
CN
China
Prior art keywords
style
rendering
map data
map
renderable
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.)
Pending
Application number
CN201910266568.0A
Other languages
Chinese (zh)
Inventor
李博
朱永峰
王鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910266568.0A priority Critical patent/CN111782307A/en
Publication of CN111782307A publication Critical patent/CN111782307A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The invention discloses a map rendering method, a style switching method, a related device and a navigation client. The rendering method of the map comprises the following steps: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full-volume style comprises rendering style data common to a plurality of rendering styles; refreshing renderable map data using the target rendering style; and rendering the refreshed renderable map data. The map rendering method and the style switching method provided by the invention have the advantages that the process of switching the map style is simpler and faster, the effect of switching the style by one frame is realized, the problems of white blocks and flickering in the existing style switching process are solved, and the use experience of a user is improved.

Description

Map rendering method, style switching method, related device and navigation client
Technical Field
The invention relates to the technical field of navigation electronic maps, in particular to a map rendering method, a style switching method, a related device and a navigation client.
Background
In map navigation, in order to enable a user to more intuitively and quickly acquire required information in different scenes, the highlighted contents in the different scenes are different, namely the displayed effects are different, each effect is called as a style, and scene switching is also called as style switching.
In the style switching process, there are various processing modes, for example: in the first scheme, when the style is switched, old rendering data is deleted, and then new rendering data corresponding to a new style is expanded again; in the scheme II, when the style is switched and the new rendering data corresponding to the new style is not analyzed, the screenshot of the original style is displayed firstly, and if an animation process exists in the new style, the screenshot is basically invalid; when the style is switched, the old cache is not deleted, and the old rendering data is used firstly; after a new cache object is regenerated, newly analyzed map data is placed into the new cache object, then the two objects are exchanged, and the old cache is deleted. In the above modes, when the style is switched, the data needs to be re-analyzed according to the setting of the new style to obtain the rendering data corresponding to the new style, so that the switching time is difficult to control, and in the switching process, the screen may not have rendering data to display, so that a white block can be displayed, the whole process has a flickering feeling, and the user experience is poor.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a rendering method of a map, a style switching method, a related device, and a navigation client that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a map rendering method, including:
obtaining map data corresponding to a current map display window;
performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data, wherein the full-scale style comprises rendering style data common to a plurality of rendering styles;
refreshing the renderable map data using a target rendering style;
and rendering the refreshed renderable map data.
In one embodiment, the rendering style data common to the plurality of rendering styles in the full-volume style is: common attributes and attribute values thereof in each rendering style data;
performing full-scale analysis on the map data by using a preset full-scale style, wherein the full-scale analysis comprises the following steps:
analyzing the map elements to be rendered of the map data;
and assigning values to corresponding map elements in the analyzed map data by using the common attributes and attribute values thereof in each rendering style data.
In one embodiment, the style data in the target rendering style is: attributes and attribute values thereof corresponding to the displayed style and not common to the plurality of rendering styles;
refreshing the renderable map data using a target rendering style, comprising:
and traversing the renderable map data, and assigning values to corresponding map elements in the renderable map data by using the attribute values in the target rendering style.
In one embodiment, further comprising: caching the renderable map data;
before obtaining the map data corresponding to the current map display window, the method further comprises the following steps:
judging whether renderable map data exist in the current cache;
if yes, executing a step of refreshing the renderable map data by using a target rendering style;
otherwise, turning to the step of acquiring the map data corresponding to the current map display window.
In a second aspect, an embodiment of the present invention provides a method for ground pattern switching, including:
when an instruction for triggering style switching is received, refreshing the renderable map data by using a target rendering style corresponding to a switched new style, wherein the target rendering style comprises style data which is corresponding to the switched new style and is not common to a plurality of rendering styles;
re-rendering the refreshed renderable map data;
the renderable map data is obtained in advance by: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full volume style includes rendering style data common to a plurality of rendering styles.
In one embodiment, the refreshing the renderable map data again by using the target rendering style corresponding to the switched new style includes:
and traversing the renderable map data, and using each attribute value in the target rendering style corresponding to the new style to re-assign each map element corresponding to the renderable map data.
In a third aspect, an embodiment of the present invention provides a map rendering apparatus, including:
the loading module is used for acquiring map data corresponding to the current map display window;
the full-volume analysis module is used for performing full-volume analysis on the acquired map data by using a preset full-volume style to obtain renderable map data; wherein the full-volume style comprises rendering style data common to a plurality of rendering styles;
a refresh module for refreshing the renderable map data using a target rendering style;
and the rendering module is used for rendering the refreshed renderable map data.
In one embodiment, the map rendering apparatus further includes: and the cutting module is used for cutting the map data in the range required to be displayed by the current display window and determining the map data corresponding to the current map display window.
In one embodiment, the rendering style data common to the plurality of rendering styles in the full-volume style is: common attributes and attribute values thereof in each rendering style data;
the full-quantity analysis module comprises:
the analysis submodule is used for analyzing the map elements to be rendered of the map data;
and the assignment submodule is used for assigning the corresponding map elements in the analyzed map data by using the common attributes and the attribute values thereof in each rendering style data.
In one embodiment, the style data in the target rendering style is: attributes and attribute values thereof corresponding to the displayed style and not common to the plurality of rendering styles;
and the refreshing module is used for traversing the renderable map data and assigning values to each corresponding map element in the renderable map data by using each attribute value in the target rendering style.
In one embodiment, further comprising: the device comprises a cache module and a judgment module;
the cache module is used for caching the renderable map data;
the judging module is used for judging whether the renderable map data exist in the current cache or not;
the refreshing module is further used for executing a step of refreshing the renderable map data by using a target rendering style when the judging module judges that the renderable map data exist;
the loading module is further configured to execute the step of obtaining the map data corresponding to the current map display window when the judging module judges that no renderable map data exists.
In a fourth aspect, an embodiment of the present invention provides a ground pattern switching apparatus, including:
the instruction receiving module is used for receiving an instruction for triggering the style switching;
the refreshing module is used for refreshing the renderable map data again by using a target rendering style corresponding to the switched new style when the instruction receiving module receives an instruction for triggering style switching, wherein the target rendering style comprises style data which is corresponding to the switched new style and is not common to a plurality of rendering styles;
the rendering module is used for re-rendering the renderable map data obtained after the refreshing module refreshes;
the renderable map data is obtained in advance by: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full volume style includes rendering style data common to a plurality of rendering styles.
In an embodiment, the refreshing module is configured to traverse renderable map data, and use each attribute value in the target rendering style corresponding to the new style to re-assign values to each corresponding map element in the renderable map data.
In a fifth aspect, the embodiment of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the instructions implement the map rendering method described above.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the method for switching the map style is implemented.
In a seventh aspect, an embodiment of the present invention provides a navigation client, including: the map rendering method comprises the steps of storing a map, and storing a map image, wherein the map image is a three-dimensional map image, and the map image is a three-dimensional map image.
In a final aspect, an embodiment of the present invention provides a navigation client, including: the map style switching system comprises a memory, a processor and computer instructions stored on the memory and executable on the processor, wherein the instructions can realize the map style switching method when being executed by the processor.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
according to the map rendering method and the style switching method provided by the embodiment of the invention, the map data is subjected to full-scale analysis by using a preset full-scale style for the acquired map data, so that renderable map data are obtained; the total style comprises rendering style data common to a plurality of rendering styles, the renderable map data are refreshed by using a target rendering style, and then the refreshed renderable map data are rendered integrally; on one hand, the data after being analyzed can be ensured to be used under any style due to the full analysis of the map data, and then when the style needs to be switched, the style needs to be refreshed again according to the personalized target rendering style (style data which corresponds to a new style and is common to various styles) corresponding to the new style needing to be switched, and the map data does not need to be analyzed again by using the new rendering style like the prior art, so that the switching process is simpler and faster, the method is also suitable for scenes with animation, the effect of switching the style by one frame is realized, the problems of white blocks and flickering in the existing style switching process are solved, and the use experience of a user is improved.
In the above scheme provided in the embodiment of the present invention, the full volume style is an attribute value having a commonality style extracted from various different rendering styles, when the full volume style is used to perform full volume analysis on the map data, it is equivalent to that the part having commonality in the map is assigned in advance, and when the style needing to be displayed is determined or a new style needs to be switched, the attribute value of the style of the part having non-commonality is used to assign values or re-assign values to and render corresponding elements in the renderable map data. When different styles are switched, the renderable map data obtained after the analysis is not changed, and only the value needs to be reassigned, so that the problem that the exchange time between the rendering data of a new style and the rendering data of an old style in the prior art is not accurately grasped does not exist.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flowchart illustrating a rendering method of a map according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of multithreading in accordance with an embodiment of the present invention;
FIG. 3 is a flowchart illustrating switching rendering styles by a main thread according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for switching between map styles according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a map rendering apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a full resolution module according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an apparatus for switching map styles according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Based on the problems of flickering and white blocks of switching of map display styles in the prior art, the use experience of a user is improved.
The rendering method of the map provided by the embodiment of the invention is explained in detail first.
Referring to fig. 1, a method for rendering a map according to an embodiment of the present invention includes the following steps:
s11, obtaining the map data corresponding to the current map display window;
s12, carrying out full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full-amount styles comprise rendering style data which are common to a plurality of rendering styles and are contained in a plurality of rendering styles;
s13, refreshing the renderable map data by using the target rendering style;
and S14, rendering the refreshed renderable map data.
The target rendering style comprises style data which is corresponding to the displayed style and is not common to a plurality of rendering styles; for example, a rendering style file is used, and the file includes attributes and attribute values thereof common to rendering style data.
Style switching requirements for maps include, but are not limited to, the following various switching scenarios: the user needs to switch from the main map interface to the interface for planning the road; switching between the daytime display mode and the nighttime display mode of the map, in which switching of the modes occurs, elements of the map, such as a change in the color of a line and a change in the width of a line and the like.
In step S11, before the process of obtaining the map data, the map data may be clipped according to a range that needs to be displayed in a current display window (screen or some interface) to determine the currently needed map data.
For example, map data is stored in a Tile (referred to as Tile or Tile) data manner, and it is necessary to determine, according to a screen range 1080 × 800, how many tiles 10 are covered, and what the specific Tile IDs of the 10 tiles are, so as to clip the map data for subsequent processing.
After knowing which image blocks are needed currently, before obtaining the map data, whether the renderable map data are cached currently can be checked, wherein the renderable map data are loaded and analyzed before and can be directly taken for rendering. If the renderable map data exists, the subsequent rendering process is directly performed. The rendering process will be described in detail below. But if the renderable map data does not exist, continuing to acquire the map data corresponding to the current map display window.
Checking whether the renderable map data exist in the current cache, for example, whether the renderable map data exist in the memory cache can be searched; the renderable map data is not the original image block data, but the data obtained by analyzing and processing the original image block data, and after the renderable map data is created, the renderable map data can be stored in a memory cache (a first-level cache in some systems), so that the renderable map data in the same area can be quickly obtained for direct rendering next time, and the rendering speed and efficiency are improved.
For example, when map data is loaded for the first time, there may not be any renderable map data in the memory cache, and as the map rendering process proceeds, data of map blocks are acquired and parsed to create renderable map data, which is then placed in the memory cache.
In step S11, the map data corresponding to the current map display window may be obtained through any one or more of the following ways: for example, file caching, or offline data, request for network side acquisition, and the like, which is not limited in the embodiment of the present invention.
In an embodiment, in the step S12, the full-volume style may exist in a full-volume style file in a specific implementation, and the common rendering style data in the full-volume style file may be obtained by extracting common attributes of all different map styles, for example, so that the common style data in the full-volume style is: attribute values of styles common to the rendering style data;
each rendering style refers to a rendering style that may be used by various maps that already exist.
And carrying out full analysis on the map elements to be rendered of the map data by using a preset full pattern, traversing all map block data during implementation, analyzing all elements of all the map block data, and then assigning values to corresponding elements in the analyzed data by using the attribute values of all common patterns in the full pattern. The map data are analyzed in full, and the method has the advantages that all data suitable for any type are analyzed in advance (although the map data are analyzed in full, the map data are not displayed in follow-up process) no matter what type is adopted, and preparation is made for rendering and switching of follow-up types, so that the workload of rendering and switching of rendering is reduced, and the speed and the efficiency of switching the types are improved.
After the map block data is subjected to full analysis, the state that the analyzed map block is renderable can be marked, and the data after the analysis of the map block is renderable map data.
In one embodiment, in step S13, the target rendering style is a part of the map style corresponding to the current map data, which has a non-common attribute. In particular implementations, for example, a target rendering style file may exist.
Specifically, in step S13, the renderable map data is traversed, and the attribute values in the target rendering style are used to assign values to corresponding elements in the renderable map data. For example, data of each tile in the renderable map data is traversed, and then elements such as points, lines, and faces in the tiles are assigned values using the target rendering style.
In step S14, the refreshed renderable map data includes both a part of the common rendering style and a part of the unique rendering style of a single rendering style, so that the rendering is directly completed, and the specific rendering process is not described in detail.
In specific implementation of the embodiment of the present invention, referring to the example shown in fig. 2, the embodiment of the present invention may be implemented by a plurality of threads, for example, a main thread is responsible for cutting map data, initiating a search of renderable map data in a first-level cache, and if not, starting a data loading thread, and searching a second-level cache and a file cache by the data loading thread to load the map data, and further, after the map data is successfully loaded, starting a data expansion thread (also referred to as a data parsing thread), completing the expansion (parsing) of the data by the data expansion thread, then marking the map data in a renderable state, and then completing the refreshing and rendering of a subsequent style by the main thread.
Referring to the example shown in fig. 3, the main thread initiates style switching according to an instruction, then refreshes the style using the rendering style file of the new style, and then renders the refreshed map data.
Correspondingly, based on the rendering method of the map, when the style switching is required, the switching method of the map style provided by the embodiment of the invention, as shown in fig. 4, includes the following steps:
s41, when receiving an instruction for triggering style switching, refreshing renderable map data by using a target rendering style corresponding to the switched new style, wherein the target rendering style comprises style data which is corresponding to the switched new style and is not common to a plurality of rendering styles;
and S42, re-rendering the refreshed renderable map data.
The meaning and obtaining process of the renderable map data in the step S41 can refer to the description of the flow of fig. 1, and are not described herein again.
In one embodiment, step S31 may be implemented by the following process: and traversing the renderable map data, and using each attribute value in the target rendering style corresponding to the new style to re-assign each corresponding map element in the renderable map data.
According to the map rendering method and the map style switching method, the map data can be rendered by performing full analysis on the acquired map data by using a preset full style; refreshing the renderable map data by using the target rendering style, and then rendering the refreshed renderable map data integrally; on one hand, the data after being analyzed can be ensured to be used under any style due to the full analysis of the map data, and then when the style needs to be switched, the style can be refreshed again according to the personalized rendering style (a style file mode can be adopted, the file contains style data which is corresponding to the new style and is not common to all rendering styles), and the map data does not need to be analyzed again by using the new style like the prior art, so that the switching process is simpler and faster, the method is also suitable for scenes with animation, the effect of switching the style by one frame is realized, the problems of white blocks and flickering in the existing style switching process are solved, and the use experience of a user is improved.
In the above-mentioned scheme provided in the embodiment of the present invention, the full-size style is a common attribute and an attribute value thereof extracted from various rendering styles, and when the full-size style is used to perform full-size analysis on the map data, it is equivalent to that the part with the common attribute in the map data is assigned in advance, and when a target style to be displayed is determined or a new style needs to be switched, the attribute value of the style of the part with the non-common attribute is used to assign values or re-assign values to and render corresponding map elements in the renderable map data. When different styles are switched, the renderable map data obtained after the analysis is finished is not changed, and only re-assignment is needed, so that the problems that in the prior art, when a new style is switched, the map data corresponding to the new style needs to be re-analyzed according to the setting of the new style, the rendering process is slow, the exchange time of new and old rendering data is difficult to grasp, and the like, so that a screen is blank or flickers, and the like are caused are solved.
Based on the same inventive concept, embodiments of the present invention further provide a map rendering device, a map style switching device, a related navigation client, and the like, and because the principles of the devices and the terminals for solving the problems are similar to the map rendering method and the style switching method, the implementation of the devices and the clients may refer to the implementation of the foregoing methods, and repeated details are omitted.
Referring to fig. 5, the map rendering apparatus according to an embodiment of the present invention includes:
the loading module 51 is configured to obtain map data corresponding to a current map display window;
a full-volume analysis module 52, configured to perform full-volume analysis on the obtained map data using a preset full-volume style, so as to obtain renderable map data; the full-volume style comprises rendering style data which is common in a plurality of rendering styles;
a refresh module 53, configured to refresh renderable map data using the target rendering style; the rendering style includes style data common to the styles to be displayed;
and a rendering module 54, configured to render the refreshed renderable map data.
In one embodiment, the rendering style data common to the plurality of rendering styles in the full-volume style is: common attributes and attribute values thereof in each rendering style data;
as shown in fig. 6, the total quantity analysis module 52 includes:
the analysis submodule 521 is used for analyzing the map elements to be rendered of the map data;
the assignment submodule 522 is configured to assign a value to a corresponding map element in the analyzed map data, using a common attribute and an attribute value thereof in each rendering style data.
In one embodiment, the style data in the target rendering style is: attributes and attribute values thereof corresponding to the displayed style and not common to the plurality of rendering styles;
accordingly, the refreshing module 53 is configured to traverse the renderable map data, and assign values to corresponding map elements in the renderable map data by using the attribute values in the target rendering style.
In an embodiment, the map rendering apparatus, as shown in fig. 5, further includes: a cache module 55 and a judgment module 56; wherein:
a cache module 55, configured to cache the renderable map data;
a judging module 56, configured to judge whether renderable map data exists in the current cache;
a refresh module 53, configured to, when the determination module 56 determines that renderable map data exists, perform a step of refreshing the renderable map data using a target rendering style;
the loading module 51 is further configured to, when the determining module 56 determines that no renderable map data exists, execute a step of acquiring map data corresponding to the current map display window.
The map rendering apparatus, as shown in fig. 5, further includes: and the cutting module 57 is configured to cut map data to determine map data corresponding to the current map display window in a range that needs to be displayed in the current map display window.
Referring to fig. 7, a device for ground pattern switching according to an embodiment of the present invention includes:
an instruction receiving module 71, configured to receive an instruction for triggering style switching;
a refreshing module 72, configured to refresh the renderable map data again by using a target rendering style corresponding to a switched new style when the instruction receiving module receives an instruction for triggering style switching, where the target rendering style includes style data that is not common to multiple rendering styles and corresponds to the switched new style;
a rendering module 73, configured to render the renderable map data obtained after the refreshing module refreshes;
the renderable map data is obtained in advance by: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full volume style includes rendering style data common to a plurality of rendering styles.
In one embodiment, the refreshing module 72 is configured to traverse the renderable map data, and perform re-assignment on corresponding map elements in the renderable map data using the attribute values in the target rendering style corresponding to the new style.
Embodiments of the present invention also provide a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the method for rendering the map is implemented.
The embodiment of the invention also provides another computer readable storage medium, which stores computer instructions, and the instructions are executed by a processor to realize the method for switching the map style.
An embodiment of the present invention further provides a navigation client, including: the map rendering method comprises the steps of storing a map, and storing a rendering index, wherein the map is a map of a target object, and the map is a map of the target object.
An embodiment of the present invention further provides a navigation client, including: the map switching device comprises a memory, a processor and computer instructions stored on the memory and capable of running on the processor, wherein the instructions are capable of realizing the map switching method when executed by the processor.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (15)

1. A map rendering method, comprising:
obtaining map data corresponding to a current map display window;
performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data, wherein the full-scale style comprises rendering style data common to a plurality of rendering styles;
refreshing the renderable map data using a target rendering style;
and rendering the refreshed renderable map data.
2. The method of claim 1, wherein rendering style data common to a plurality of rendering styles in the full-volume style is: common attributes and attribute values thereof in each rendering style data;
performing full-scale analysis on the map data by using a preset full-scale style, wherein the full-scale analysis comprises the following steps:
analyzing the map elements to be rendered of the map data;
and assigning values to corresponding map elements in the analyzed map data by using the common attributes and attribute values thereof in each rendering style data.
3. The method of claim 1, wherein style data in the target rendering style is: attributes and attribute values thereof corresponding to the displayed style and not common to the plurality of rendering styles;
refreshing the renderable map data using a target rendering style, comprising:
and traversing the renderable map data, and assigning values to corresponding map elements in the renderable map data by using the attribute values in the target rendering style.
4. The method of any one of claims 1-3, further comprising: caching the renderable map data;
before obtaining the map data corresponding to the current map display window, the method further comprises the following steps:
judging whether renderable map data exist in the current cache;
if yes, executing a step of refreshing the renderable map data by using a target rendering style;
otherwise, turning to the step of acquiring the map data corresponding to the current map display window.
5. A method of ground patterned switching, comprising:
when an instruction for triggering style switching is received, refreshing the renderable map data by using a target rendering style corresponding to a switched new style, wherein the target rendering style comprises style data which is corresponding to the switched new style and is not common to a plurality of rendering styles;
re-rendering the refreshed renderable map data;
the renderable map data is obtained in advance by: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full volume style includes rendering style data common to a plurality of rendering styles.
6. The method of claim 5, wherein refreshing the renderable map data again using the target rendering style corresponding to the switched new style comprises:
and traversing the renderable map data, and using each attribute value in the target rendering style corresponding to the new style to re-assign each map element corresponding to the renderable map data.
7. An apparatus for rendering a map, comprising:
the loading module is used for acquiring map data corresponding to the current map display window;
the full-volume analysis module is used for performing full-volume analysis on the acquired map data by using a preset full-volume style to obtain renderable map data; wherein the full-volume style comprises rendering style data common to a plurality of rendering styles;
a refresh module for refreshing the renderable map data using a target rendering style;
and the rendering module is used for rendering the refreshed renderable map data.
8. The apparatus of claim 7, wherein the apparatus further comprises: and the cutting module is used for cutting the map data in the range required to be displayed by the current display window and determining the map data corresponding to the current map display window.
9. The apparatus of claim 7, wherein rendering style data common to a plurality of rendering styles in the full-volume style is: common attributes and attribute values thereof in each rendering style data;
the full-quantity analysis module comprises:
the analysis submodule is used for analyzing the map elements to be rendered of the map data;
and the assignment submodule is used for assigning the corresponding map elements in the analyzed map data by using the common attributes and the attribute values thereof in each rendering style data.
10. The apparatus of claim 7, wherein style data in the target rendering style is: attributes and attribute values thereof corresponding to the displayed style and not common to the plurality of rendering styles;
and the refreshing module is used for traversing the renderable map data and assigning values to each corresponding map element in the renderable map data by using each attribute value in the target rendering style.
11. The apparatus of any one of claims 7-10, further comprising: the device comprises a cache module and a judgment module;
the cache module is used for caching the renderable map data;
the judging module is used for judging whether the renderable map data exist in the current cache or not;
the refreshing module is further used for executing a step of refreshing the renderable map data by using a target rendering style when the judging module judges that the renderable map data exist;
the loading module is further configured to execute the step of obtaining the map data corresponding to the current map display window when the judging module judges that no renderable map data exists.
12. A ground pattern switching apparatus, comprising:
the instruction receiving module is used for receiving an instruction for triggering the style switching;
the refreshing module is used for refreshing the renderable map data again by using a target rendering style corresponding to the switched new style when the instruction receiving module receives an instruction for triggering style switching, wherein the target rendering style comprises style data which is corresponding to the switched new style and is not common to a plurality of rendering styles;
the rendering module is used for re-rendering the renderable map data obtained after the refreshing module refreshes;
the renderable map data is obtained in advance by: obtaining map data corresponding to a current map display window; performing full-scale analysis on the acquired map data by using a preset full-scale style to obtain renderable map data; the full volume style includes rendering style data common to a plurality of rendering styles.
13. The apparatus of claim 12, wherein the refresh module is configured to traverse renderable map data and re-assign values to corresponding map elements in the renderable map data using the attribute values in the target rendering style corresponding to the new style.
14. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, implement a method of rendering a map as claimed in any one of claims 1 to 4, or a method of map style switching as claimed in claim 5 or 6.
15. A navigation client, comprising: memory, processor and computer instructions stored on the memory and executable on the processor, wherein the instructions, when executed by the processor, are capable of implementing a method of rendering a map as claimed in any one of claims 1 to 4 or a method of map style switching as claimed in claim 5 or 6.
CN201910266568.0A 2019-04-03 2019-04-03 Map rendering method, style switching method, related device and navigation client Pending CN111782307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910266568.0A CN111782307A (en) 2019-04-03 2019-04-03 Map rendering method, style switching method, related device and navigation client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910266568.0A CN111782307A (en) 2019-04-03 2019-04-03 Map rendering method, style switching method, related device and navigation client

Publications (1)

Publication Number Publication Date
CN111782307A true CN111782307A (en) 2020-10-16

Family

ID=72755301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910266568.0A Pending CN111782307A (en) 2019-04-03 2019-04-03 Map rendering method, style switching method, related device and navigation client

Country Status (1)

Country Link
CN (1) CN111782307A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862940A (en) * 2021-03-10 2021-05-28 广州南方卫星导航仪器有限公司 Map rendering method, map rendering device, map rendering equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130076784A1 (en) * 2011-09-26 2013-03-28 Google Inc. Rendering map images using modifications of non-raster map data
CN105393282A (en) * 2013-05-15 2016-03-09 谷歌公司 Efficient composition and rendering of graphical elements
CN107665205A (en) * 2016-07-27 2018-02-06 高德信息技术有限公司 A kind of map rendering intent and device
CN109388467A (en) * 2018-09-30 2019-02-26 百度在线网络技术(北京)有限公司 Map information display method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130076784A1 (en) * 2011-09-26 2013-03-28 Google Inc. Rendering map images using modifications of non-raster map data
CN105393282A (en) * 2013-05-15 2016-03-09 谷歌公司 Efficient composition and rendering of graphical elements
CN107665205A (en) * 2016-07-27 2018-02-06 高德信息技术有限公司 A kind of map rendering intent and device
CN109388467A (en) * 2018-09-30 2019-02-26 百度在线网络技术(北京)有限公司 Map information display method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862940A (en) * 2021-03-10 2021-05-28 广州南方卫星导航仪器有限公司 Map rendering method, map rendering device, map rendering equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110399441B (en) Mass point data aggregation rendering method, device, equipment and storage medium
CN104899060B (en) A kind of picture loading processing method and apparatus
CN106202529A (en) A kind of page rendering method and device
CN109429093B (en) Video editing method and terminal
CN111782307A (en) Map rendering method, style switching method, related device and navigation client
CN103324484A (en) Method and device for displaying view
CN112905287A (en) Window text display control method and device, vehicle and readable medium
CN111414104B (en) Electronic map local display method and device
CN112988950A (en) Front-end rendering method and system of knowledge graph, electronic device and storage medium
CN111736751A (en) Stroke redrawing method, device and readable storage medium
CN111190894A (en) Map display method and device, related storage medium and client
CN105512312A (en) Accelerating method for two-dimensional map library
CN116245943A (en) Continuous frame point cloud data labeling method and device based on web
CN112883297B (en) Network topology display method and device and electronic equipment
CN111611032B (en) User interface drawing level and excessive drawing detection method and device
CN103226456A (en) Image display method and device for tiled wall
CN111475589A (en) Image data rendering method and device
CN105139333B (en) A kind of picture loading display method and device
CN112346813B (en) Control method and device of operation list
CN118015583A (en) Lane line processing method and related device for intersection surface
CN115311404A (en) Model normal processing method and device, electronic equipment and storage medium
CN107967664B (en) Electronic map route drawing method and device
CN117274541A (en) 3D experience system based on visual field transformation
CN118031981A (en) Map visual angle switching method and device and electronic equipment
CN106598517B (en) Show the processing method and system of content

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