Map rendering method and device, electronic equipment and computer storage medium

By acquiring the boundary information of map regions and using map tiles from the same source for rendering, the problems of duplicate display and display errors in multi-source electronic map rendering are solved, achieving efficient and low-cost rendering results.

CN115482321BActive Publication Date: 2026-04-21ALIBABA INNOVATION PRIVATE LIMITED
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA INNOVATION PRIVATE LIMITED
Filing Date
2021-06-15
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In the process of rendering multi-source electronic maps, there are problems such as duplicate display or display errors, which leads to increased service computing pressure and labor costs.

Method used

By obtaining the boundary information of the map area to be drawn, the map tiles covering the area are determined, and the map tiles from the same source are used for rendering, while making areas outside the boundary invisible.

Benefits of technology

It achieves efficient and low-cost electronic map rendering, avoids overlap and display errors, and reduces data processing load and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482321B_ABST
    Figure CN115482321B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a map rendering method and device, electronic equipment and computer storage medium. The map rendering method comprises: obtaining boundary information of at least two to-be-drawn map regions; determining a map tile covering the to-be-drawn map region based on the boundary information of the to-be-drawn map region; for each to-be-drawn map region, rendering using a same source map tile; and when the range of the map region rendered by the map tile is greater than the range defined by the boundary of the to-be-drawn map region, making the region outside the boundary of the to-be-drawn map region invisible. The scheme provided by the embodiments of the present application avoids the problem that the overlapping parts of the map tiles corresponding to different sources affect the display effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a map rendering method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] As users demand higher accuracy and comprehensiveness from electronic maps, the sources of electronic maps have become increasingly diverse to ensure timely fulfillment of user requirements. This can lead to situations where the same area is repeatedly covered by electronic maps from different sources, with variations in accuracy and specifications. Directly using such maps for rendering can easily result in duplicate or incorrect displays. Therefore, rendering maps based on multiple sources requires data fusion and format unification. This not only hinders the timely application of electronic maps but also increases service computing pressure and labor costs. Thus, how to achieve efficient and low-cost electronic map rendering based on multiple sources is a problem that those skilled in the art need to solve. Summary of the Invention

[0003] In view of this, embodiments of this application provide a map rendering scheme to at least partially solve the above-mentioned problems.

[0004] According to a first aspect of the embodiments of this application, a map rendering method is provided, comprising: acquiring boundary information of at least two map regions to be rendered; determining map tiles covering the map regions to be rendered based on the boundary information of the map regions to be rendered; rendering each map region to be rendered using map tiles from the same source, wherein when the range of the map region rendered by the map tiles is larger than the range defined by the boundary of the map region to be rendered, the area located outside the boundary of the map region to be rendered is made invisible.

[0005] According to a second aspect of the embodiments of this application, a map rendering apparatus is provided, comprising: a boundary information acquisition module, configured to acquire boundary information of at least two map regions to be drawn; a tile data determination module, configured to determine map tiles covering the map regions to be drawn based on the boundary information of the map regions to be drawn; and a rendering module, configured to render each map region to be drawn using map tiles from the same source, wherein when the range of the map region rendered by the map tiles is larger than the range defined by the boundary of the map region to be drawn, the area located outside the boundary of the map region to be drawn is made invisible.

[0006] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the map rendering method described in the first aspect.

[0007] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the map rendering method as described in the first aspect.

[0008] According to the map rendering scheme provided in the embodiments of this application, the boundary information of the map area to be drawn is obtained, and the map tiles covering the map area to be drawn are determined from the map tiles of the corresponding source. The map area to be drawn is rendered using map tiles of the same source, and the area outside the boundary is made invisible. In this way, there is no need to uniformly process map tiles from different sources, and it can also ensure that there is no overlap between the rendered map areas to be drawn, and ensure the display effect. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0010] Figure 1A This is a flowchart illustrating the steps of a map rendering method according to Embodiment 1 of this application;

[0011] Figure 1B for Figure 1A A schematic diagram of stitching together three map regions to be drawn in the embodiment shown;

[0012] Figure 2A This is a flowchart illustrating the steps of a map rendering method according to Embodiment 2 of this application;

[0013] Figure 2B for Figure 2A A schematic diagram of the map rendering method in the usage scenario shown in the embodiment;

[0014] Figure 3 This is a structural block diagram of a map rendering apparatus according to Embodiment 3 of this application;

[0015] Figure 4 This is a schematic diagram of the structure of an electronic device according to Embodiment 4 of this application. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0017] The specific implementation of the embodiments of this application will be further described below with reference to the accompanying drawings.

[0018] Example 1

[0019] Reference Figure 1A The diagram shows a flowchart of the map rendering method according to Embodiment 1 of this application.

[0020] In this embodiment, the method includes the following steps:

[0021] Step S102: Obtain the boundary information of at least two map regions to be drawn.

[0022] For ease of description, this embodiment uses the application of this method in the field of map display as an example to illustrate its implementation process; however, this example does not limit its application scope. This method can be applied to other suitable scenarios that require rendering multiple regions (especially regions with different data formats).

[0023] The map area to be drawn can be understood as the map area that needs to be displayed in the display window. Each map area to be drawn can correspond to a data source. In other words, the map area to be drawn can be divided according to different data sources.

[0024] In this embodiment, the data source provides information on geographic features in the map area to be drawn. To facilitate storage and quick and easy retrieval of the required geographic feature information, different data sources can employ different methods to segment the map area to be drawn, forming multiple map tiles. Figure 1B As shown in the example, the map area to be displayed in this window can be divided into three map areas to be drawn, namely areas A, B, and C, depending on the data source. Each map area to be drawn has corresponding boundary information. The boundary information can be represented by the coordinates (or latitude and longitude) of the boundary points, but it is not limited to this and can also be represented by other appropriate methods.

[0025] Region A can be divided into N map tiles, each with a width and height of 256x256 (mm or px, etc.). Region B can be divided into M map tiles, each with a width and height of 128x128 (mm or px, etc.). Each map tile can have corresponding tile information, including but not limited to: tile identifier (such as number), tile longitude and latitude, and the name of the corresponding geographic feature, etc. The data format and storage method of map tiles from different data sources can also be different.

[0026] Step S104: Based on the boundary information of the map area to be drawn, determine the map tiles that cover the map area to be drawn.

[0027] In one feasible approach, the map tiles covering the area to be mapped are determined based on the latitude and longitude of the boundary information of the area to be mapped and the latitude and longitude of the map tiles in the corresponding data source. This ensures that the map tiles covering each area to be mapped come from the same source, and that the size, data format, and other aspects of the map tiles are consistent.

[0028] It should be noted that the data source corresponding to the map area to be drawn may contain map tiles that are completely outside the boundary of the map area to be drawn. In this embodiment, these map tiles that are completely outside the boundary are not used as map tiles covering the map area to be drawn.

[0029] by Figure 1B Taking region A as an example, map tiles that are completely within the boundary of region A and map tiles that intersect with the boundary can be used as map tiles to cover the map area to be drawn. This can reduce the number of map tiles loaded in the subsequent rendering process, thereby reducing data processing costs, improving processing speed and saving energy.

[0030] Step S106: For each map area to be drawn, use map tiles from the same source for rendering. When the range of the map area rendered by the map tiles is larger than the range defined by the boundary of the map area to be drawn, make the area outside the boundary of the map area to be drawn invisible.

[0031] In one example, when displaying a map in a display window, the display content is divided into different map regions to be drawn according to the source of the map tiles (also known as the data source), and each map region to be drawn is rendered separately. Each map region to be drawn uses map tiles from the same source for rendering. In this way, no additional operation is required to unify the format of the map tiles when rendering the map regions to be drawn, thus reducing the complexity of the operation and ensuring the rendering quality.

[0032] To avoid ghosting and unclear display issues caused by overlapping adjacent parts of different map areas to be drawn, the areas outside the boundaries of each map area are configured as invisible. This ensures that even if some map tiles are located outside the boundaries, the rendered display content will not have ghosting or other problems.

[0033] The following is combined Figure 1B As shown, the implementation process of the map rendering method is explained below using a specific use case:

[0034] In this use case, taking the execution of the map rendering method by a terminal device as an example, its implementation process is explained as follows:

[0035] During map creation, the entire map can be divided into several regions based on different map tile sources, data accuracy, and map tile detail. The boundary information corresponding to each region can be recorded and stored, including but not limited to longitude and latitude.

[0036] When the display window of the terminal device needs to display at least part of the map, the source of the map tiles involved in the content to be displayed can be determined. When the content to be displayed requires map tiles from two or more sources, the content to be displayed is divided into at least two map areas to be drawn according to the different sources, and the boundary information involved in each map area to be drawn is obtained.

[0037] Based on the boundary information of the map region to be drawn, map tiles covering the map region can be determined from the map tiles from the corresponding source. For example, map tiles that are completely within the map region to be drawn and map tiles that are partially within the map region to be drawn. This can filter out map tiles that are completely outside the map region to be drawn, thereby reducing the loading of unnecessary map tiles during rendering and thus reducing load and cost.

[0038] For the area of ​​the map to be drawn (e.g., for the area of ​​the map to be drawn) Figure 1B For each region (A, B, and C) to be mapped, render the map using map tiles from the same source, as determined in the preceding steps, and make regions outside the boundaries invisible.

[0039] The area that needs to be displayed on the screen of the terminal device is the three rendered map areas to be drawn, such as... Figure 1B As shown.

[0040] It should be noted that, in addition to executing the above methods through terminal devices, they can also be executed through other appropriate devices such as servers or the cloud. This use case does not impose any restrictions on this.

[0041] In this embodiment, the boundary information of the map area to be drawn is obtained, and the map tiles covering the map area to be drawn are determined from the map tiles of the corresponding source. The map area to be drawn is rendered using map tiles of the same source, and the area outside the boundary is made invisible. In this way, there is no need to process map tiles from different sources in a unified manner, and it can also ensure that there is no overlap between the rendered map areas to be drawn, and ensure the display effect.

[0042] Example 2

[0043] Reference Figure 2A The flowchart of the map rendering method according to Embodiment 2 of this application is shown.

[0044] In this embodiment, the map rendering method includes the aforementioned steps:

[0045] Step S202: Obtain boundary information for at least two map regions to be drawn.

[0046] In one feasible approach, taking the rendering of content to be displayed in the display window as an example, the display content is divided into different map regions to be drawn based on different sources, and each map region to be drawn obtains corresponding boundary information. This boundary information can be the latitude and longitude of the boundary points, or the geocentric coordinates of the boundary points, etc. This embodiment does not limit the specific representation of this boundary information.

[0047] Step S204: Based on the boundary information of the map area to be drawn, determine the map tiles covering the map area to be drawn.

[0048] Map tiles from different sources typically have different data formats and resolutions. When the content displayed in the window requires map tiles from different sources, the tile formats need to be standardized. This method not only consumes a lot of resources and is wasteful, but the processed map tiles from different sources may also have overlapping or ghosting issues, resulting in poor display quality. In this embodiment, to solve this problem, the content displayed in the window is divided into at least two map regions to be drawn according to their source. Each map region determines the map tiles covering it based on boundary information. This eliminates the need for standardizing the formats of map tiles from different sources, thereby saving resources, reducing costs, and ensuring display quality.

[0049] In one example, step S204 can be implemented through the following sub-steps:

[0050] Sub-step S2041: Based on the information of the display window used to display the map, the map zoom level, and the information of the display anchor point, determine the candidate map tiles that can be displayed in the display window from map tile data from different sources.

[0051] The display window can be the window on the terminal device that displays the map. Information about the display window, such as its size, can be obtained through the terminal device's API interface.

[0052] Map zoom level indicates the proportion of content displayed in the display window. Different map zoom levels in the same size display window correspond to different displayed content.

[0053] The information displayed for the anchor point includes, but is not limited to, the viewer's location coordinates or the location coordinates of the selected anchor.

[0054] Based on the information of the display anchor point, the information of the display window, and the map zoom level, the display content that needs to be displayed in the display window can be determined. For map tiles from different sources involved in the display content, candidate map tiles that can be displayed in the display window are determined for each source.

[0055] For example, such as Figure 2B As shown, the content to be displayed in the display window involves map tiles from three different sources, denoted as Source 1 to Source 3. For the map tiles from Source 1, candidate map tiles that can be displayed in the display window are determined based on the tile information. It should be noted that these candidate map tiles are those within the display window and may include not only those within the boundary of the map area to be drawn corresponding to Source 1, but also those outside the boundary of that area. To reduce output transmission and storage costs, the identifiers of the candidate map tiles are obtained when determining them, instead of acquiring all the data of the candidate map tiles.

[0056] Candidate map tiles corresponding to sources 2 and 3 can be determined in a similar manner, so the determination method is similar and will not be repeated here.

[0057] Sub-step S2042: Based on the boundary information of the map area to be drawn, determine the relationship between the candidate map tiles and the map area to be drawn.

[0058] The relationship between candidate map tiles and the map area to be drawn can be categorized as intersecting, containing, and not containing. Containment means the candidate map tile is completely located within the corresponding map area to be drawn. Intersecting means the candidate map tile is at least partially located within the corresponding map area to be drawn (containing means at least partially located on the boundary). Not containing means the candidate map tile is completely outside the map area to be drawn.

[0059] For example, for the map area to be drawn corresponding to source 1 (i.e. Figure 2B The relationship between a candidate map tile and region A can be determined based on the identifier and location information of the candidate map tile, as well as the boundary information of region A.

[0060] If there are 5 candidate map tiles corresponding to source 1, then each candidate map tile is compared with the boundary indicated by the boundary information of region A to obtain the relationship between each candidate map tile and the boundary.

[0061] For example, the comparison determines that candidate tile data 1-3 are contained within the map area enclosed by the boundary, candidate tile data 4 intersects with the boundary, and candidate tile data 5 is outside the area enclosed by the boundary and does not intersect with the boundary.

[0062] Based on this, candidate tile data 1 to 4 are matching tile data, and these four candidate tile data need to be loaded. However, candidate tile data 5 is not matching tile data, so it can be skipped. This reduces the amount of data that needs to be loaded, thereby improving the data processing speed.

[0063] The matching tile data corresponding to data source 2 and data source 3 can be obtained in a similar way, so it will not be described in detail here.

[0064] This method allows for the accurate, rapid, and efficient identification of tile data from various data sources that match the target area to be drawn, and the loading of the matching tile data, which helps to improve the speed of subsequent data processing.

[0065] If the candidate map tile is entirely within region A, the relationship is inclusion; or, if the candidate map tile is partially within region A and partially outside region A, the relationship is intersection; or, if the candidate map tile is entirely outside region A, the relationship is non-inclusion.

[0066] A similar approach can be used to determine the relationship between the map regions to be drawn corresponding to sources 2 and 3 and the corresponding candidate map tiles, which will not be elaborated here.

[0067] Sub-step S2043: Based on the relationship between the candidate map tiles and the map area to be drawn, determine the map tiles that need to be delivered to the map area to be drawn.

[0068] To save costs and reduce data transmission and storage, candidate map tiles that are not included will not be displayed in subsequent rendering processes. Therefore, based on the determined relationships, some candidate map tiles can be filtered out, thereby improving efficiency and reducing costs.

[0069] In one example, sub-step S2043 can be implemented as: selecting from the candidate map tiles those that intersect with and / or are contained within the map region to be drawn as map tiles to be delivered to the map region to be drawn.

[0070] Taking Source 1 as an example, based on the relationship between the determined region A and the corresponding candidate map tiles, candidate map tiles with intersecting or containing relationships are selected as map tiles delivered to region A.

[0071] The map tiles to be delivered to the corresponding regions B and C can also be determined in a similar way for sources 2 and 3, so they will not be described in detail here.

[0072] Step S206: For each map area to be drawn, use map tiles from the same source for rendering. When the range of the map area rendered by the map tiles is larger than the range defined by the boundary of the map area to be drawn, make the area outside the boundary of the map area to be drawn invisible.

[0073] In one example, step S206 includes the following sub-steps:

[0074] Sub-step S2061: For map tiles from different sources, create corresponding rendering layers according to their source.

[0075] By creating different layers, map tiles from different sources can be rendered layer by layer, thereby improving rendering efficiency and ensuring the final rendering display effect.

[0076] by Figure 2B Taking the three different map regions to be drawn shown as an example, three layers can be created for regions A, B, and C respectively, denoted as Layer 1, Layer 2, and Layer 3. The drawing process for each map region to be drawn can be implemented through sub-step S2062.

[0077] Sub-step S2062: For each map region to be drawn, based on the boundary information of the map region to be drawn, render the map tiles of the same source to which the map region to be drawn is delivered onto the layer corresponding to the source, so that the area located outside the boundary of the map region to be drawn is not visible.

[0078] Each map tile delivered to a map region may contain tiles that intersect with that region, meaning some tiles lie outside the boundary of the map region. If left untreated, this can cause ghosting at the intersection of two map regions, affecting the display. Therefore, when drawing the delivered map tiles onto the corresponding layer for each map region, the portions of the map tiles outside the boundary are made invisible. This can be achieved through any suitable method, such as using a mask or cropping.

[0079] Taking a mask as an example, sub-step S2062 can be implemented through the following process:

[0080] Process A: For each map region to be drawn, determine the mask data of the map region based on the boundary information of the map region to be drawn.

[0081] For example, the boundary information of the map area to be drawn is written into a mask buffer to obtain mask data, which makes the part inside the boundary visible and the part outside the boundary invisible.

[0082] For example, mask data can be obtained using WebGL masking techniques based on boundary information. Of course, other appropriate methods can also be used to obtain mask data, and there are no restrictions on this.

[0083] It should be noted that since different map regions are drawn layer by layer, when obtaining the corresponding mask data for a layer, if boundary information exists in the mask buffer, the boundary information is removed, and the boundary information of the map region to be drawn is written into the mask buffer to obtain the corresponding mask data. This ensures accurate mask data is obtained, thereby guaranteeing the display effect.

[0084] Process B: Render the map tiles from the same source that are delivered for the map area to be drawn, and the map tiles at the intersection of the mask data, into the layer corresponding to the source, so that areas located outside the boundary of the map area to be drawn are not visible.

[0085] by Figure 2B Taking region A as an example, such as Figure 2B As shown, by rendering map tiles and mask data from the same source to the corresponding layer 1, the map tiles located within the area to be drawn are visible in layer 1, while the parts outside the boundary are not visible.

[0086] By drawing each layer one by one, the content of each map area to be drawn can be obtained.

[0087] In one feasible approach, the method may further include step S208, to display the rendered map area to be drawn on the terminal device. Of course, other feasible approaches may also employ other methods to display the map area to be drawn on the terminal device, and there are no limitations on this.

[0088] Step S208: Overlay the layers corresponding to the rendered map areas in the display window.

[0089] By overlaying multiple layers, different map areas to be drawn can be stitched together to form the content that needs to be displayed in the display window.

[0090] The implementation process of this method will be explained below with an example of a specific use case:

[0091] like Figure 2B As shown, in one feasible approach, the source of the map tiles corresponding to the content to be displayed in the display window is determined, and the display content is divided into at least two map areas to be drawn based on the different sources. For example, in Figure 2B In the example, the displayed content is divided into three map regions to be drawn, namely regions A, B, and C, corresponding to sources 1, 2, and 3, respectively. For each map region to be drawn, its boundary information is obtained.

[0092] Boundary information can be represented using the longitude and latitude of the boundary of the region corresponding to the source, or other appropriate methods. It should be noted that the source includes one or more map tiles, and the data processing and storage methods may differ between different sources.

[0093] Based on information such as the display window, map zoom level, and display anchor points, candidate map tiles corresponding to each map region to be drawn are determined from the map tiles contained in each source. For example, if source 1 contains M1 map tiles, M2 are selected as candidate map tiles, where M2 is less than or equal to M1. Based on the information and boundary information of the candidate map tiles, those that contain or intersect with the map region to be drawn (i.e., region A) can be selected from the M2 candidate map tiles and delivered to the map region to be drawn. These delivered map tiles are then loaded. Let the number of map tiles delivered to the map region to be drawn be M3, where M3 is less than or equal to M2.

[0094] Similarly, for sources 2 and 3, a similar approach can be used to determine the map tiles that need to be delivered to the corresponding map regions to be drawn (i.e., regions B and C).

[0095] For map tiles from different sources, create corresponding rendering layers according to their source. For example, create layer 1 for region A, layer 2 for region B, and layer 3 for region C.

[0096] For each map region to be drawn, based on the boundary information of the map region to be drawn, map tiles from the same source that were delivered to the map region to be drawn are rendered on the layer corresponding to the source, so that areas outside the boundary of the map region to be drawn are not visible.

[0097] Taking region A as an example, its boundary information is written into the mask buffer to obtain the corresponding mask data.

[0098] In the first case, there is no existing boundary information in the mask buffer. In this case, the boundary information of region A is written into the mask buffer. This mask buffer can be a buffer in WebGL. WebGL uses the boundary information in the mask buffer to obtain the mask data corresponding to region A.

[0099] In the second scenario, if other boundary information already exists in the mask buffer, the existing boundary information is removed, and the boundary information of region A is written into the mask buffer to obtain the mask data corresponding to region A. The region enclosed by the boundaries in the mask data is the visible part, and the region outside the boundaries is the invisible part.

[0100] When rendering the map tiles of region A to the corresponding layer 1, the map tiles of region A can be ANDed with the mask data, so that the parts outside the boundary are occluded by the invisible mask and omitted, thus preserving the intersecting data of the map tiles and mask data.

[0101] Because only the intersection of the map tile and mask data is rendered in each layer, the amount of data rendered is reduced. In addition, data outside the boundaries of each layer is not rendered, avoiding data overlap at the intersection of different areas, thus ensuring the final display effect.

[0102] By overlaying multiple layers, the rendered data is combined to display the complete content. Layer overlay allows the rendered areas within each layer to be stitched together to form a map. Since the rendered data in each layer does not overlap, the rendered map displays well without blurring or overlapping.

[0103] In summary, the map rendering method in this embodiment utilizes masking technology to solve many problems when rendering maps from multiple sources. This method enables the rendering of map tiles of different formats from multiple sources onto a single map in a terminal device (or other electronic device or chip) without the need for prior data fusion of different sources, thus saving the cost of data fusion calculation.

[0104] Furthermore, this solution addresses the loading and rendering issues inherent in multi-source map rendering. During rendering, WebGL masking technology is used to divide and render different sources into regions and layers. This avoids the problems of existing technologies that require reprocessing and calculating data from different sources, resulting in large data processing volumes and inability to meet the needs of weekly or daily map data updates. It also solves the problem of the high cost and extensive manual review required by existing fusion computing services.

[0105] Besides avoiding the aforementioned problems of needing data fusion and resulting in large data processing volumes, this solution also solves the issues of repeated data rendering and harsh region boundaries in existing technologies. Furthermore, this method is highly scalable; regardless of the number of data sources added, new layers can be added and rendering performed within those layers without requiring data fusion, saving significant operational costs and avoiding the load pressure on the server side when updating fused data.

[0106] In summary, the solution in this embodiment solves the problem of inconsistent map data formats leading to insufficient precision and accuracy of the drawn vector maps.

[0107] Example 3

[0108] Figure 3 This is a structural block diagram of a map rendering apparatus according to Embodiment 3 of this application, as shown in the figure, which includes:

[0109] Boundary information acquisition module 302 is used to acquire boundary information of at least two regions with map drawing areas;

[0110] The tile data determination module 304 is used to determine the map tiles covering the map area to be drawn based on the boundary information of the map area to be drawn.

[0111] The rendering module 306 is used to render each map area to be drawn using map tiles from the same source. When the range of the map area rendered by the map tiles is larger than the range defined by the boundary of the map area to be drawn, the area outside the boundary of the map area to be drawn is made invisible.

[0112] Optionally, the tile data determination module 304 is configured to determine candidate map tiles that can be displayed in the display window from map tile data from different sources based on information of the display window used to display the map, map zoom level, and display anchor point information; determine the relationship between the candidate map tiles and the map area to be drawn based on the boundary information of the map area to be drawn; and determine the map tiles that need to be delivered to the map area to be drawn based on the relationship between the candidate map tiles and the map area to be drawn.

[0113] Optionally, the tile data determination module 304 is used to select, from the candidate map tiles, map tiles whose relationship with the map area to be drawn is intersecting and / or contained within the map area to be drawn as map tiles to be delivered to the map area to be drawn when determining the map tiles to be delivered to the map area to be drawn based on the relationship between the candidate map tiles and the map area to be drawn.

[0114] Optionally, the rendering module 306 is used to create corresponding rendering layers for map tiles from different sources, and for each map area to be drawn, according to the boundary information of the map area to be drawn, render the map tiles from the same source to which the map area to be drawn is delivered onto the layer corresponding to the source, so that the area located outside the boundary of the map area to be drawn is not visible.

[0115] Optionally, the rendering module 306 is configured to, for each map region to be drawn, determine the mask data of the map region to be drawn based on the boundary information of the map region to be drawn, and render the map tiles of the same source to be drawn and the map tiles of the map region to be drawn and the mask data intersecting in the map region to be drawn onto the layer corresponding to the source, so that the area outside the boundary of the map region to be drawn is not visible.

[0116] Optionally, the rendering module 306 is configured to, when determining the mask data of each map region to be drawn based on the boundary information of the map region to be drawn, remove the boundary information in the mask buffer for each map region to be drawn, and write the boundary information of the map region to be drawn into the mask buffer to obtain the corresponding mask data.

[0117] Optionally, the device further includes an overlay module 308, used to overlay and display the layers corresponding to the rendered map areas in the display window.

[0118] The map rendering apparatus of this embodiment is used to implement the corresponding map rendering methods in the foregoing method embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. Furthermore, the functional implementation of each module in the map rendering apparatus of this embodiment can be referred to the description of the corresponding part in the foregoing method embodiments, which will also not be repeated here.

[0119] Example 4

[0120] Reference Figure 4 The diagram shows a structural schematic of an electronic device according to Embodiment 4 of this application. The specific embodiments of this application do not limit the specific implementation of the electronic device.

[0121] like Figure 4 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0122] in:

[0123] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.

[0124] Communication interface 404 is used to communicate with other electronic devices or servers.

[0125] The processor 402 is used to execute program 410, specifically to perform the relevant steps in the above-described map rendering method embodiment.

[0126] Specifically, program 410 may include program code that includes computer operation instructions.

[0127] Processor 42 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0128] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0129] Specifically, program 410 can be used to cause processor 402 to perform the operation corresponding to the aforementioned method.

[0130] The specific implementation of each step in program 410 can be found in the corresponding steps and units described in the above-described map rendering method embodiments, and will not be repeated here. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the devices and modules described above can be referred to the corresponding process descriptions in the aforementioned method embodiments, and will not be repeated here.

[0131] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0132] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the map rendering methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the map rendering methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the map rendering methods shown herein.

[0133] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0134] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A map rendering method, wherein, include: Obtain the boundary information of at least two map regions to be drawn, wherein the map regions to be drawn are divided according to different data sources; Based on the boundary information of the area to be drawn, determine the map tiles that cover the area to be drawn; For each map region to be drawn, map tiles from the same source are used for rendering. When the range of the map region rendered by the map tiles is larger than the boundary of the map region to be drawn, the area outside the boundary of the map region to be drawn is made invisible.

2. The method of claim 1, wherein, The step of determining the map tiles covering the map area to be drawn based on the boundary information of the map area to be drawn includes: Based on information from the display window used to display the map, the map zoom level, and the display anchor point, candidate map tiles that can be displayed in the display window are determined from map tile data from different sources. Based on the boundary information of the map region to be drawn, the relationship between the candidate map tiles and the map region to be drawn is determined; Based on the relationship between the candidate map tiles and the map area to be drawn, the map tiles that need to be delivered to the map area to be drawn are determined.

3. The method of claim 2, wherein, The step of determining the map tiles to be delivered to the map region to be drawn based on the relationship between the candidate map tiles and the map region to be drawn includes: From the candidate map tiles, map tiles that intersect with and / or are contained within the map region to be drawn are selected as the map tiles to be delivered to the map region to be drawn.

4. The method of claim 2, wherein, For each map region to be rendered, map tiles from the same source are used for rendering. When the area of ​​the map region rendered by the map tiles is larger than the boundary of the map region to be rendered, the area outside the boundary of the map region to be rendered is made invisible, including: For map tiles from different sources, create corresponding rendering layers according to their source; For each map region to be drawn, based on the boundary information of the map region to be drawn, map tiles from the same source that were delivered to the map region to be drawn are rendered on the layer corresponding to the source, so that areas outside the boundary of the map region to be drawn are not visible.

5. The method of claim 4, wherein, For each map region to be drawn, based on the boundary information of the map region, map tiles from the same source that were delivered to the map region to be drawn are rendered onto the layer corresponding to the source, including: For each map region to be drawn, the mask data of the map region to be drawn is determined based on the boundary information of the map region to be drawn; The map tiles from the same source that are delivered to the map area to be drawn, and the map tiles at the intersection of the mask data, are rendered to the layer corresponding to the source, so that areas located outside the boundary of the map area to be drawn are not visible.

6. The method of claim 4, wherein, For each map region to be drawn, determining the mask data of the map region based on its boundary information includes: For each map region to be drawn, if boundary information exists in the mask buffer, the boundary information is removed, and the boundary information of the map region to be drawn is written into the mask buffer to obtain the corresponding mask data.

7. The method of any one of claims 4-6, wherein, The method further includes: The layers corresponding to the map regions to be drawn, rendered one by one, are overlaid in the display window.

8. A map rendering apparatus, comprising: The boundary information acquisition module is used to acquire boundary information of at least two map drawing areas, wherein the map drawing areas are divided according to different data sources; The tile data determination module is used to determine the map tiles covering the map area to be drawn based on the boundary information of the map area to be drawn. The rendering module is used to render each map area to be drawn using map tiles from the same source. When the range of the map area rendered by the map tiles is larger than the boundary of the map area to be drawn, the area outside the boundary of the map area to be drawn is made invisible.

9. An electronic device comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the map rendering method as described in any one of claims 1-7.

10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the map rendering method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Map drawing method and related equipment thereof

    CN112700547A