[go: up one dir, main page]

CN111782307B - 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
CN111782307B
CN111782307B CN201910266568.0A CN201910266568A CN111782307B CN 111782307 B CN111782307 B CN 111782307B CN 201910266568 A CN201910266568 A CN 201910266568A CN 111782307 B CN111782307 B CN 111782307B
Authority
CN
China
Prior art keywords
rendering
map data
map
style
pattern
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
Application number
CN201910266568.0A
Other languages
Chinese (zh)
Other versions
CN111782307A (en
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/CN111782307B/en
Publication of CN111782307A publication Critical patent/CN111782307A/en
Application granted granted Critical
Publication of CN111782307B publication Critical patent/CN111782307B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开了一种地图的渲染方法、样式切换方法、相关装置和导航客户端。所述地图的渲染方法包括:获取当前地图显示窗口所对应的地图数据;对获取到的地图数据,使用预设的全量样式,对所述地图数据进行全量解析,得到可渲染的地图数据;全量样式中包含多个渲染样式共通的渲染样式数据;使用目标渲染样式,对可渲染的地图数据进行刷新;对刷新后的可渲染地图数据进行渲染。本发明提供的地图渲染方法、样式切换方法,使得地图样式切换的过程更简单、更快,实现一帧切换样式的效果,解决了现有样式切换过程中出现白块、闪烁的问题,提升了用户的使用体验。

The present invention discloses a map rendering method, a style switching method, related devices and a navigation client. The map rendering method comprises: obtaining map data corresponding to the current map display window; using a preset full style to fully parse the acquired map data to obtain renderable map data; the full style includes rendering style data common to multiple rendering styles; using a target rendering style to refresh the renderable map data; and rendering the refreshed renderable map data. The map rendering method and style switching method provided by the present invention make the process of map style switching simpler and faster, achieve the effect of switching styles in one frame, solve the problems of white blocks and flickering in the existing style switching process, and improve the user experience.

Description

Map rendering method, style switching method, related device and navigation client
Technical Field
The present invention relates to the technical field of navigation electronic maps, and 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 acquire required information more intuitively and rapidly in different scenes, the content highlighted in the different scenes is different, that is, the display effect is different, each effect is called a style, and the switching of the scenes is that of the styles.
In the style switching process, there are various processing modes, for example, a scheme one, in which old rendering data is deleted and then new rendering data corresponding to a new style is redeployed, a scheme two, in which, in the style switching process, when new rendering data corresponding to the new style is not resolved, a screenshot of the original style is displayed first, if an animation process is encountered in the new style, the screenshot is basically invalid, a scheme three, in which, in the style switching process, old cache is not deleted first, old rendering data is used first, after new cache objects are regenerated, newly resolved map data is put into the new cache objects, then the two objects are exchanged, and the old cache is deleted. In the above modes, when the styles are switched, the data are required to be parsed again according to the setting of the new style, so that the rendering data corresponding to the new style are obtained, therefore, the switching time is difficult to control, in the switching process, the screen may not display the rendering data, so that white blocks 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 map rendering method, style switching method, related apparatus, and 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:
acquiring map data corresponding to a current map display window;
Carrying out full analysis on the obtained map data by using a preset full pattern to obtain renderable map data, wherein the full pattern comprises rendering pattern data common to a plurality of rendering patterns;
refreshing the renderable map data using a target rendering style;
and rendering the repairable map data.
In one embodiment, the rendering style data common to a plurality of rendering styles in the full-volume style is a common attribute and an attribute value thereof in each rendering style data;
And carrying out full-quantity analysis on the map data by using a preset full-quantity pattern, wherein the full-quantity analysis comprises the following steps:
analyzing map elements to be rendered of the map data;
and assigning corresponding map elements in the analyzed map data by using the common attributes and attribute values thereof in the rendering style data.
In one embodiment, the style data in the target rendering style is an attribute and an attribute value thereof which are common to the non-plurality of rendering styles corresponding to the displayed style;
refreshing the renderable map data using a target rendering style, comprising:
Traversing the renderable map data, and using each attribute value in the target rendering pattern to assign a value to each corresponding map element in the renderable map data.
In one embodiment, the method further comprises caching the renderable map data;
before the map data corresponding to the current map display window is obtained, 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 pattern;
Otherwise, turning to executing 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 switching a map style, including:
When an instruction for triggering pattern switching is received, refreshing the renderable map data again by using a target rendering pattern corresponding to the new pattern after switching, wherein the target rendering pattern comprises pattern data which are corresponding to the new pattern after switching and are common to a plurality of rendering patterns;
re-rendering the refreshed renderable map data;
the renderable map data is obtained in advance by acquiring map data corresponding to a current map display window, performing full-scale analysis on the acquired map data by using a preset full-scale pattern to obtain the renderable map data, wherein the full-scale pattern comprises rendering pattern data common to a plurality of rendering patterns.
In one embodiment, the refreshing the renderable map data using the target rendering style corresponding to the new style after switching includes:
Traversing the renderable map data, and carrying out assignment again on each map element corresponding to the renderable map data by using each attribute value in the target rendering pattern corresponding to the new pattern.
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-quantity analysis module is used for carrying out full-quantity analysis on the acquired map data by using a preset full-quantity pattern to acquire renderable map data, wherein the full-quantity pattern comprises rendering pattern data common to a plurality of rendering patterns;
the refreshing module is used for refreshing the renderable map data by using a target rendering pattern;
and the rendering module is used for rendering the repairable map data.
In one embodiment, the map rendering device further comprises a clipping module, which is used for clipping map data in a range which needs to be displayed in the current display window and determining map data corresponding to the current map display window.
In one embodiment, the rendering style data common to a plurality of rendering styles in the full-volume style is a common attribute and an attribute value thereof in each rendering style data;
The full resolution module comprises:
the analysis sub-module is used for analyzing map elements to be rendered of the map data;
And the assignment sub-module is used for assigning values to corresponding map elements in the analyzed map data by using the common attributes and the attribute values thereof in the rendering style data.
In one embodiment, the style data in the target rendering style is an attribute and an attribute value thereof which are common to the non-plurality of rendering styles corresponding to the displayed style;
The refreshing module is used for 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 pattern.
In one embodiment, the system further comprises a cache module and a judging module;
the caching module is used for caching the renderable map data;
The judging module is used for judging whether the current cache contains renderable map data or not;
the refreshing module is further used for executing the step of refreshing the renderable map data by using the target rendering pattern when the judging module judges that the renderable map data exist;
The loading module is further configured to execute a step of acquiring 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 map style 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 pattern corresponding to the new pattern after switching when the instruction receiving module receives an instruction for triggering pattern switching, wherein the target rendering pattern comprises pattern data which is corresponding to the new pattern after switching and is not common to a plurality of rendering patterns;
The rendering module is used for re-rendering the renderable map data obtained after the refreshing by the refreshing module;
the renderable map data is obtained in advance by acquiring map data corresponding to a current map display window, performing full-scale analysis on the acquired map data by using a preset full-scale pattern to obtain the renderable map data, wherein the full-scale pattern comprises rendering pattern data common to a plurality of rendering patterns.
In one embodiment, the refreshing module is configured to traverse the 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.
In a fifth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the map rendering method described above.
In a sixth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of map style switching described above.
In a seventh aspect, an embodiment of the present invention provides a navigation client, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, where the instructions, when executed by the processor, are capable of implementing the map rendering method described above.
In a final aspect, an embodiment of the present invention provides a navigation client, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, where the instructions, when executed by the processor, enable the method for map style switching described above.
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 pattern switching method, the map data are acquired, the map data are subjected to full-quantity analysis by using the preset full-quantity pattern, the renderable map data are obtained, the full-quantity pattern comprises rendering pattern data which are common to a plurality of rendering patterns, the renderable map data are refreshed by using the target rendering pattern, the refreshed renderable map data are rendered integrally, on one hand, the analyzed data can be used under any pattern due to the full-quantity analysis of the map data, and then when the pattern is required to be switched, the individualized target rendering pattern corresponding to the new pattern (the pattern data which are common to the non-various patterns and correspond to the new pattern) which is required to be switched can be subjected to pattern re-brushing instead of the map data which is required to be subjected to the re-analysis by using the new rendering pattern, so that the switching process is simpler and faster, the method is also suitable for scenes with animation, the effect of one frame of the renderable map data is achieved, the problem of white blocks and flickering in the existing pattern switching process is solved, and the user experience is improved.
In the above scheme provided by the embodiment of the invention, the full-scale style is the attribute value of the common style extracted from various different rendering styles, and when the full-scale style is used for carrying out full-scale analysis on the map data, the assignment is equivalent to the fact that the part with the commonality in the map is carried out 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 non-commonality part is used for carrying out assignment or reassignment and rendering on the corresponding elements in the renderable map data. When the different modes are switched, the renderable map data obtained after the analysis is completed is unchanged and only needs to be reassigned, so that the problem of inaccurate switching time between the rendering data of the new mode and the rendering data of the old mode in the prior art is solved.
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 thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a map rendering method in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of multiple threads in an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a main thread switching rendering style according to an embodiment of the present invention;
FIG. 4 is a flowchart of a map style switching method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a map rendering device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a full resolution module according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a map style switching device 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 blocking of the switching of the map display modes in the prior art, the use experience of a user is improved.
The map rendering method provided by the embodiment of the invention is described in detail.
Referring to fig. 1, the map rendering method provided by the embodiment of the invention includes the following steps:
S11, acquiring map data corresponding to a current map display window;
s12, carrying out full analysis on the acquired map data by using a preset full-quantity pattern to acquire renderable map data, wherein the full-quantity pattern comprises rendering pattern data common to a plurality of rendering patterns;
S13, refreshing the renderable map data by using the target rendering pattern;
and S14, rendering the repairable map data.
The target rendering style includes style data common to a plurality of rendering styles corresponding to the displayed style, and for example, a rendering style file is used, and the file includes a common attribute and an attribute value thereof in each rendering style data.
The style switching requirements of the map include, but are not limited to, various switching situations in which a user needs to switch from a main map interface to an interface on which a road is planned, switching between a daytime display style of the map and a night display mode of the map, during which style switching, for example, a change in color of a line surface, a change in width of a line surface, and the like occur in elements of the map.
In the above step S11, before the process of obtaining the map data, the map data may be cut according to the range that the current display window (screen or a certain interface) needs to be displayed, so as to determine the map data that is currently needed.
For example, map data is stored in a Tile (called a Tile or a Tile) data format, and it is necessary to determine that 10 tiles are covered according to a screen range 1080×800, and determine how specific Tile IDs of the 10 tiles are, so that the map data is cut out for subsequent processing.
After knowing which tiles are currently needed, before acquiring the map data, it can also be checked whether the renderable map data is currently cached, where the renderable map data is already loaded and parsed before and can be directly taken for rendering. If there is renderable map data, the subsequent rendering process is directly performed. The rendering process will be described in detail below. If there is no renderable map data, continuing to acquire map data corresponding to the current map display window.
And checking whether the renderable map data is currently cached, for example, searching whether the renderable map data exists in a memory cache, wherein the renderable map data is not original block data, but data obtained by analyzing and processing the original block data, and the renderable map data exists in the memory cache (a first-level cache in some systems) after being created, so that the renderable map data can be quickly and directly rendered when the map data of the same area is rendered next time, and the rendering speed and the rendering efficiency are increased.
For example, when map data is loaded for the first time, there may not be any renderable map data in the memory buffer, and as the map rendering process proceeds, the renderable map data is created after the map tile data is acquired and parsed, and the renderable map data is placed in the memory buffer.
In the step S11, the map data corresponding to the current map display window may be obtained through any one or more of, for example, file caching, or offline data, request for network side obtaining, etc., which is not limited in the embodiment of the present invention.
In one embodiment, in the step S12, the full-scale style may be in the form of a full-scale style file, and the common rendering style data in the full-scale 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-scale style is an attribute value of a common style in each rendering style data;
Each rendering style refers to a rendering style that may be used by various existing maps.
And carrying out full analysis on map elements to be rendered of the map data by using a preset full-scale pattern, traversing each map block data when implementing, analyzing all elements of each map block data, and then carrying out assignment on corresponding elements in the analyzed data by using attribute values of each common pattern in the full-scale pattern. The embodiment of the invention has the advantages that all data suitable for any style is analyzed in advance no matter what style is adopted later (although the map data is analyzed in full, the map data is not necessarily displayed later), and the map data is ready for rendering and switching of the subsequent style, so that the workload of rendering and switching the rendering is reduced, and the speed and efficiency of switching the style are improved.
After the map block data is subjected to full-scale analysis, the image block after analysis is marked as a state capable of being rendered, and the data after analysis is the map data capable of being rendered.
In one embodiment, in step S13, the target rendering style is a portion of the map style corresponding to the current map data that has a non-common attribute. In implementations, for example, the target rendering style file may exist.
Specifically, in step S13, the renderable map data is traversed, and each attribute value in the target rendering pattern is used to assign a value to each corresponding element in the renderable map data. For example, data for each tile in the renderable map data is traversed and then points, lines, and faces in the tile are assigned using the target rendering style.
In the step S14, the refreshed renderable map data includes not only the common style of each rendering style, but also the specific style of a single rendering style, so that the rendering is directly completed, and the specific rendering process is not repeated.
In a specific implementation, referring to the example shown in fig. 2, the embodiment of the invention may be implemented by a plurality of threads, for example, a main thread is responsible for clipping map data, initiating a search of renderable map data in a first-level cache, if not found, starting a data loading thread, searching a second-level cache and a file cache by the data loading thread to load map data, further starting a data expanding thread (also called a data analyzing thread) after the map data is successfully loaded, completing data expansion (analysis) by the data expanding thread, then marking the map data as a renderable state, and then completing 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 a style using a rendering style file of a new style, and then renders the refreshed map data.
Accordingly, based on the map rendering method, when style switching is required, the map style switching method provided by the embodiment of the invention, referring to fig. 4, includes the following steps:
S41, when an instruction for triggering pattern switching is received, refreshing the renderable map data again by using a target rendering pattern corresponding to the new pattern after switching, wherein the target rendering pattern comprises pattern data which are corresponding to the new pattern after switching and are common to a plurality of rendering patterns;
S42, re-rendering the repairable map data.
The meaning of the renderable map data in step S41 and the obtaining process can refer to the description of the flow of fig. 1, and are not described herein.
In one embodiment, step S31 may be implemented by traversing the renderable map data and reassigning each map element corresponding to the renderable map data using each attribute value in the target rendering style corresponding to the new style.
According to the map rendering method and the map style switching method, the acquired map data are subjected to full-quantity analysis by using the preset full-quantity style, the renderable map data are obtained, the target rendering style is used for refreshing the renderable map data, and then the refreshed renderable map data are integrally rendered, so that on one hand, the analyzed data can be ensured to be used under any style due to the full-quantity analysis of the map data, and then when the style is required to be switched, the personalized rendering style (which can adopt a style file mode and contains style data which are corresponding to the new style and are not common to all rendering styles) corresponding to the new style is used for re-brushing the style, and the method is not required to use the new style to re-analyze the map data like the prior art, so that the switching process is simpler and faster, is also applicable to a scene with animation, the problem of white blocks and flickering in the existing style switching process is solved, and the use experience of users is improved.
In the above scheme provided by the embodiment of the invention, the full-scale pattern is extracted from various different rendering patterns and has common attribute and attribute value thereof, when the full-scale pattern is used for carrying out full-scale analysis on the map data, the assignment is equivalent to the fact that the part with the commonality in the map data is carried out in advance, when the target pattern to be displayed is determined or a new pattern needs to be switched, the attribute value of the pattern of the non-commonality part is used again, and the assignment or reassignment and rendering can be carried out on the corresponding map elements in the renderable map data. When the new style is switched, the map data corresponding to the new style is required to be re-analyzed according to the setting of the new style, so that the problems of screen blank or flickering and the like caused by slower rendering process, difficult grasp of new and old rendering data exchange time and the like are solved.
Based on the same inventive concept, the embodiments of the present invention further provide a map rendering device, a map style switching device, and a related navigation client, and because the principles of the problems solved by these devices and terminals are similar to the foregoing map rendering method and style switching method, the implementation of the devices and clients can refer to the implementation of the foregoing method, and the repetition is omitted.
The map rendering device provided by the embodiment of the invention, referring to fig. 5, includes:
The loading module 51 is configured to obtain map data corresponding to a current map display window;
the full-quantity analysis module 52 is configured to perform full-quantity analysis on the acquired map data by using a preset full-quantity pattern, so as to obtain renderable map data, where the full-quantity pattern includes rendering pattern data that is common among a plurality of rendering patterns;
A refresh module 53 for refreshing the renderable map data using a target rendering pattern, wherein the rendering pattern includes pattern data common to non-respective patterns corresponding to the displayed pattern;
and a rendering module 54, configured to render the rendered map data.
In one embodiment, the rendering style data common to a plurality of rendering styles in the full-volume style is a common attribute and an attribute value thereof in each rendering style data;
the full-quantity analysis module 52, as shown in fig. 6, includes:
The parsing sub-module 521 is configured to parse map elements to be rendered of the map data;
And the assignment sub-module 522 is configured to assign a value to a corresponding map element in the parsed map data by using the common attribute and the attribute value thereof in each rendering style data.
In one embodiment, the style data in the target rendering style is an attribute and an attribute value thereof which are common to the non-plurality of rendering styles corresponding to the displayed style;
Accordingly, the refreshing module 53 is configured to traverse the renderable map data, and assign a value to each corresponding map element in the renderable map data by using each attribute value in the target rendering style.
In one embodiment, the map rendering apparatus, as shown in fig. 5, further includes a buffer module 55 and a judging module 56, wherein:
a caching 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;
The refreshing module 53 is further configured to perform a step of refreshing the renderable map data using a target rendering style when the judging module 56 judges that the renderable map data exists;
The loading module 51 is further configured to execute a step of acquiring map data corresponding to the current map display window when the judging module 56 judges that there is no renderable map data.
The map rendering device, referring to fig. 5, further includes a clipping module 57, configured to clip map data in a range that needs to be displayed in the current display window, and determine map data corresponding to the current map display window.
The device for switching the map style provided by the embodiment of the invention, referring to fig. 7, comprises:
an instruction receiving module 71, configured to receive an instruction for triggering pattern switching;
a refreshing module 72, configured to, when the instruction receiving module receives an instruction for triggering a style switch, refresh the renderable map data again using a target rendering style corresponding to the new style after the switch, where the target rendering style includes style data that is common to a plurality of rendering styles and corresponds to the new style after the switch;
a rendering module 73, configured to re-render the renderable map data obtained after the refreshing by the refreshing module;
the renderable map data is obtained in advance by acquiring map data corresponding to a current map display window, performing full-scale analysis on the acquired map data by using a preset full-scale pattern to obtain the renderable map data, wherein the full-scale pattern comprises rendering pattern data common to a plurality of rendering patterns.
In one embodiment, the refresh module 72 is configured to traverse the renderable map data and re-assign a value to each corresponding map element in the renderable map data using each attribute value in the target rendering style corresponding to the new style.
The embodiment of the invention also provides a computer readable storage medium, wherein computer instructions are stored on the computer readable storage medium, and the instructions realize the map rendering method when being executed by a processor.
The embodiment of the invention also provides another computer readable storage medium, wherein computer instructions are stored on the computer readable storage medium, and the instructions are executed by a processor to realize the map style switching method.
The embodiment of the invention also provides a navigation client, which comprises a memory, a processor and computer instructions stored on the memory and capable of running on the processor, and is characterized in that the instructions can realize the map rendering method when being executed by the processor.
The embodiment of the invention also provides a navigation client, which comprises a memory, a processor and computer instructions stored on the memory and capable of running on the processor, and is characterized in that the method for switching the map style can be realized when the instructions are executed by the processor.
It will be appreciated by those skilled in the art that 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, magnetic 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (15)

1. A map rendering method, comprising:
acquiring map data corresponding to a current map display window;
Carrying out full analysis on the obtained map data by using a preset full-quantity pattern to obtain renderable map data, wherein the full-quantity pattern comprises rendering pattern data common to a plurality of rendering patterns, and the rendering pattern data common to the plurality of rendering patterns in the full-quantity pattern is common attributes and attribute values thereof in the rendering pattern data;
refreshing the renderable map data using a target rendering style;
and rendering the repairable map data.
2. The method of claim 1, wherein performing full-scale parsing of the map data using a preset full-scale pattern comprises:
analyzing map elements to be rendered of the map data;
and assigning corresponding map elements in the analyzed map data by using the common attributes and attribute values thereof in the rendering style data.
3. The method of claim 1, wherein the style data in the target rendering style is an attribute common to the non-plurality of rendering styles corresponding to the displayed style and an attribute value thereof;
refreshing the renderable map data using a target rendering style, comprising:
Traversing the renderable map data, and using each attribute value in the target rendering pattern to assign a value to each corresponding map element in the renderable map data.
4. The method of any of claims 1-3, further comprising caching the renderable map data;
before the map data corresponding to the current map display window is obtained, the method further comprises the following steps:
judging whether renderable map data exist in the current cache;
if yes, executing a second step of refreshing the renderable map data by using a target rendering pattern
Otherwise, turning to executing the step of acquiring the map data corresponding to the current map display window.
5. A method for map style switching, comprising:
When an instruction for triggering pattern switching is received, refreshing renderable map data again by using a target rendering pattern corresponding to a new pattern after switching, wherein the target rendering pattern comprises pattern data which corresponds to the new pattern after switching and is common to a plurality of rendering patterns;
re-rendering the refreshed renderable map data;
the renderable map data is obtained in advance by acquiring map data corresponding to a current map display window, performing full-scale analysis on the acquired map data by using a preset full-scale pattern, and obtaining renderable map data, wherein the full-scale pattern comprises rendering pattern data common to a plurality of rendering patterns, and the rendering pattern data common to the plurality of rendering patterns in the full-scale pattern is a common attribute and an attribute value thereof in each rendering pattern data.
6. The method of claim 5, wherein the re-refreshing the renderable map data using a target rendering style corresponding to the switched new style comprises:
Traversing the renderable map data, and carrying out assignment again on each map element corresponding to the renderable map data by using each attribute value in the target rendering pattern corresponding to the new pattern.
7. A map rendering apparatus, comprising:
The loading module is used for acquiring map data corresponding to the current map display window;
The system comprises a full-volume analysis module, a full-volume analysis module and a data processing module, wherein the full-volume analysis module is used for carrying out full-volume analysis on the acquired map data by using a preset full-volume pattern to acquire renderable map data, and the full-volume pattern comprises rendering pattern data common to a plurality of rendering patterns;
The system comprises a target rendering mode, a refreshing module and a rendering module, wherein the target rendering mode is used for refreshing the renderable map data, and the rendering module is used for rendering the refreshed renderable map data.
8. The apparatus of claim 7, further comprising a cropping module configured to crop map data for a range that is to be displayed for the current display window, and determine map data corresponding to the current map display window.
9. The apparatus of claim 7, wherein the full resolution module comprises:
the analysis sub-module is used for analyzing map elements to be rendered of the map data;
And the assignment sub-module is used for assigning values to corresponding map elements in the analyzed map data by using the common attributes and the attribute values thereof in the rendering style data.
10. The apparatus of claim 7, wherein the style data in the target rendering style is an attribute common to the non-plurality of rendering styles corresponding to the displayed style and an attribute value thereof;
The refreshing module is used for 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 pattern.
11. The apparatus according to any one of claims 7 to 10, further comprising a buffering module and a judging module;
the caching module is used for caching the renderable map data;
The judging module is used for judging whether the current cache contains renderable map data or not;
The refreshing module is further configured to execute a second step of refreshing the renderable map data using a target rendering style when the judging module judges that the renderable map data exists
The loading module is further configured to execute a step of acquiring map data corresponding to the current map display window when the judging module judges that no renderable map data exists.
12. An apparatus for switching a map style, 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 pattern corresponding to the new pattern after switching when the instruction receiving module receives an instruction for triggering pattern switching, wherein the target rendering pattern comprises pattern data which is corresponding to the new pattern after switching and is not common to a plurality of rendering patterns;
The rendering module is used for re-rendering the renderable map data obtained after the refreshing by the refreshing module;
the renderable map data is obtained in advance by acquiring map data corresponding to a current map display window, performing full-scale analysis on the acquired map data by using a preset full-scale pattern, and obtaining renderable map data, wherein the full-scale pattern comprises rendering pattern data common to a plurality of rendering patterns, and the rendering pattern data common to the plurality of rendering patterns in the full-scale pattern is a common attribute and an attribute value thereof in each rendering pattern data.
13. The apparatus of claim 12, wherein the refresh module is configured to traverse the renderable map data and to re-assign values for 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 the map rendering method of any of claims 1-4, or the map style switching method of claim 5 or 6.
15. A navigation client comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, wherein the instructions when executed by the processor enable the method of rendering a map as claimed in any one of claims 1 to 4 or the method of switching map styles 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 Active CN111782307B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910266568.0A CN111782307B (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 CN111782307B (en) 2019-04-03 2019-04-03 Map rendering method, style switching method, related device and navigation client

Publications (2)

Publication Number Publication Date
CN111782307A CN111782307A (en) 2020-10-16
CN111782307B true CN111782307B (en) 2024-11-29

Family

ID=72755301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910266568.0A Active CN111782307B (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) CN111782307B (en)

Families Citing this family (1)

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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105393282A (en) * 2013-05-15 2016-03-09 谷歌公司 Efficient composition and rendering of graphical elements

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100809523B1 (en) * 2005-12-08 2008-03-07 한국전자통신연구원 System and method for constructing unified framework based on extensible styles for 3D non-photorealistic rendering
US8928691B2 (en) * 2011-09-26 2015-01-06 Google Inc. Rendering map images using modifications of non-raster map data
CN105069832B (en) * 2015-08-13 2017-12-12 中国航空工业集团公司西安飞机设计研究所 Rendering intent during a kind of operation towards variable display elements
CN107665205B (en) * 2016-07-27 2020-12-01 阿里巴巴(中国)有限公司 Map rendering method and device
CN109388467B (en) * 2018-09-30 2022-12-02 阿波罗智联(北京)科技有限公司 Map information display method, map information display device, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105393282A (en) * 2013-05-15 2016-03-09 谷歌公司 Efficient composition and rendering of graphical elements

Also Published As

Publication number Publication date
CN111782307A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN107729094B (en) User interface rendering method and device
US10192289B2 (en) System, method, and apparatus for data processing and display
US9396508B2 (en) Use of map data difference tiles to iteratively provide map data to a client device
CN110399441B (en) Mass point data aggregation rendering method, device, equipment and storage medium
CN105630478B (en) A kind of method and apparatus for realizing page switching
CN109542382B (en) Display method of handwriting input content, electronic equipment and computer storage medium
CN104807467A (en) Display method and system of navigation map
US9639971B2 (en) Image processing apparatus and method for processing transparency information of drawing commands
CN111414104B (en) Electronic map local display method and device
CN101729590A (en) Method, system and device for providing web page
US20200105050A1 (en) Display method and display device
CN105575254A (en) Electronic map road rendering method and apparatus
CN111782307B (en) Map rendering method, style switching method, related device and navigation client
CN109429093B (en) Video editing method and terminal
CN110975292A (en) Game map drawing method and system based on PSD (position sensitive Detector) file
CN102074221A (en) Method and device for displaying characters
US11769466B2 (en) Image display method and apparatus, device, and storage medium
US20150242988A1 (en) Methods of eliminating redundant rendering of frames
CN103324484A (en) Method and device for displaying view
CN111258434A (en) Method, device, equipment and storage medium for inserting pictures into chat interface
CN114820878B (en) Image editing method and device
CN106557529B (en) Display method and device for jump page in page jump
JP5817052B2 (en) Information processing apparatus, control method, program, and recording medium
WO2023060833A1 (en) Data exchange method, electronic device and storage medium
CN106548501B (en) Image drawing method and device

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