CN115727869A - Map display method, map display device, computer equipment, medium and program product - Google Patents

Map display method, map display device, computer equipment, medium and program product Download PDF

Info

Publication number
CN115727869A
CN115727869A CN202111010473.6A CN202111010473A CN115727869A CN 115727869 A CN115727869 A CN 115727869A CN 202111010473 A CN202111010473 A CN 202111010473A CN 115727869 A CN115727869 A CN 115727869A
Authority
CN
China
Prior art keywords
map
target
area
position information
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111010473.6A
Other languages
Chinese (zh)
Inventor
张深圳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co 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 Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN202111010473.6A priority Critical patent/CN115727869A/en
Publication of CN115727869A publication Critical patent/CN115727869A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The present disclosure provides a map display method, apparatus, computer device, medium and program product, the method comprising: in response to a map display operation, determining at least one map tile to be displayed within a current screen range; determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with preset number of edges; determining each target enclosing area based on first position information corresponding to the map tiles and second position information of enclosing areas corresponding to each regional graphic element; and displaying the map within the current screen range based on the target map element corresponding to the target surrounding area. According to the map data acquisition method and device, the map is generated only by acquiring the map data of the target map element in the map tile, the map generation efficiency is improved, and the map data is acquired according to the overlapping area between the map tile and the surrounding area of the map element, so that the data acquisition efficiency is improved.

Description

Map display method, map display device, computer equipment, medium and program product
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a map display method, apparatus, computer device, medium, and program product.
Background
With the development of computer technology, electronic maps are becoming the main way for people to look up map information. The user can enter the electronic map page by opening the map APP or the webpage of the terminal device. The electronic map may be switched to show maps in different geographic ranges based on the user-entered geographic location information or based on a sliding switch by the user.
Generally, before a map is displayed, a complete map is generated based on full map data, then the generated complete map is sliced to obtain a plurality of map tiles, and then the corresponding map tiles in different geographic ranges are selected to be displayed. However, this way of displaying the map often requires acquiring a large amount of map data, and the process of generating the map is time-consuming, which affects the display efficiency of the map.
Disclosure of Invention
The embodiment of the disclosure at least provides a map display method, a map display device, computer equipment, a medium and a program product.
In a first aspect, an embodiment of the present disclosure provides a map displaying method, including:
responding to a map display operation, and determining at least one map tile to be displayed in the current screen range;
determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
determining each target enclosing area based on first position information corresponding to the map tiles and second position information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile;
and displaying a map within the current screen range based on the target map element corresponding to the target surrounding area.
In a possible embodiment, determining second position information of the bounding region corresponding to each of the geography pixels includes:
acquiring third position information of each shape point of the map element; wherein the shape points are end points of each boundary line of the map elements;
determining second position information of the enclosing region based on the third position information of the respective shape points.
In a possible implementation manner, the map display within the current screen range based on the target map element corresponding to the target enclosing area includes:
regarding a target enclosing area of which the whole area is positioned in the map tile, taking all map data of a target map element corresponding to the target enclosing area as target map data;
aiming at a target enclosing area of which a partial area is positioned in the map tile, determining overlapping map data between a target map element corresponding to the target enclosing area and the map tile, and taking the overlapping map data as target map data;
and performing map display in the current screen range based on the determined target map data.
In one possible embodiment, determining, for a target bounding region of which a partial region is located within the map tile, overlapping map data between a target map element corresponding to the target bounding region and the map tile includes:
determining target shape points in the target enclosing area, which are positioned in the map tile, based on the third position information of each shape point of the target map element corresponding to the target enclosing area;
determining, based on third location information of the target shape point, overlapping map data between a target map element in the target enclosure area and the map tile.
In one possible embodiment, the determining overlapping map data between the target map element and the map tile in the target enclosing region based on the third position information of the target shape point includes:
determining intersection point position information of the boundary line of the target map element and the boundary line of the map tile based on the third position information of the target shape point and third position information of other shape points which are positioned outside the map tile and adjacent to the target shape point in the target map element;
determining overlapping map data between a target map element in the target enclosure area and the map tile based on the third location information of the target shape point and the intersection location information.
In one possible embodiment, the determining, based on the first location information corresponding to the map tile and the second location information of the bounding region corresponding to each map element, each target bounding region includes:
acquiring fourth position information of the map tile in a screen coordinate system;
determining the first position information of the map tile in a geographic coordinate system based on the fourth position information and the map display scale of the map tile in the current screen range;
and determining each target enclosing area based on the first position information and the acquired second position information of the enclosing area in the geographic coordinate system.
In a possible implementation manner, the map display within the current screen range based on the target map element corresponding to the target enclosing area includes:
determining a conversion relation between screen coordinates in a screen coordinate system and geographic coordinates in a geographic coordinate system based on the display size of the map tile in the screen and the actual size indicated by the first position information of the map tile in the geographic coordinate system;
determining screen coordinates of target map data corresponding to the target map elements in a screen coordinate system based on the conversion relation;
and displaying the map within the current screen range based on the screen coordinates of the target map data.
In a possible implementation manner, the map display within the current screen range based on the target map element corresponding to the target enclosing area includes:
determining boundary map data on connecting edges between different map tiles in the target map data corresponding to the target map elements;
aiming at each corresponding pixel point of the boundary map data in the screen, taking the average pixel value of the pixel values of a plurality of pixel points including the pixel point as the updated pixel value of the pixel point; the plurality of pixel points belong to the different map tiles;
and displaying the map within the current screen range based on the updated pixel values corresponding to the boundary map data and the map data corresponding to the target map data except the connecting edge.
In a second aspect, an embodiment of the present disclosure further provides a map displaying apparatus, including:
the map display device comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for responding to map display operation and determining at least one map tile to be displayed in a current screen range;
the second determining module is used for determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
a third determining module, configured to determine each target enclosing area based on the first location information corresponding to the map tile and the second location information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile;
and the display module is used for displaying the map within the current screen range based on the target map element corresponding to the target surrounding area.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
In a fifth aspect, embodiments of the present disclosure further provide a computer program product, which includes computer instructions that, when executed by a processor, perform the steps in the first aspect described above or any one of the possible implementation manners of the first aspect.
According to the map display method, the map display device, the computer equipment, the map display medium and the program product, a target map element corresponding to an overlapping area of a map tile and a surrounding area is determined according to first position information of the map tile to be displayed in a current screen range and second position information of a circumscribed rectangle (namely the surrounding area) added by each map element, and then map display is performed according to map data of the target map element. In the embodiment of the disclosure, on one hand, the local map to be displayed is generated by obtaining the map data of the target map elements corresponding to the map tiles, and compared with a process of generating a complete map according to the full map data and then slicing the complete map to obtain the local map to be displayed, the generation efficiency of the local map is improved; on the other hand, the method for acquiring the map data of the target map element corresponding to the map tile according to the first position information of the map tile and the second position information of the surrounding area corresponding to the map element is compared with a method for acquiring the map data of the target map element by traversing the full map data of the map element, so that the map data for rendering on the map tile can be quickly determined, the calculated amount is greatly reduced, the map data acquisition efficiency is improved, and the map display efficiency is improved by improving the local map generation efficiency and the map data acquisition efficiency.
Further, the map display method provided by the embodiment of the present disclosure recalculates the updated pixel value of the pixel point according to the pixel point corresponding to the boundary map data on the map tile connection edge, where the average pixel value of the pixel values of the plurality of pixel points including the pixel point, so that the transition of the pixel values between the pixel points on the connection edge is smoother, thereby avoiding a phenomenon of misplacement of a rendered graph on the connection edge due to a large pixel value difference.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is to be understood that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art to which the disclosure pertains without the benefit of the inventive faculty, and that additional related drawings may be derived therefrom.
FIG. 1 is a flow chart illustrating a map displaying method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a schematic diagram of the effects of map tiles provided by embodiments of the present disclosure;
FIG. 3 is a schematic diagram illustrating an effect of a bounding region corresponding to a map element provided by an embodiment of the present disclosure;
FIG. 4 illustrates an intersection schematic of a target map element and a map tile provided by an embodiment of the present disclosure;
FIG. 5 illustrates an intersection schematic of a target enclosure area and a map tile provided by an embodiment of the present disclosure;
FIG. 6 illustrates an edge joining schematic of a map tile provided by an embodiment of the present disclosure;
FIG. 7 illustrates a schematic view of a map display apparatus provided by an embodiment of the present disclosure;
fig. 8 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
According to the segmentation size corresponding to the map zoom level or the scale, a map in a certain range can be segmented into a plurality of rows and columns of square grid pictures, and the segmented square grid pictures are vividly called map tiles.
Before displaying a map in different geographic ranges by using map tiles, a complete map is generally generated based on full map data, and then the generated complete map is sliced to obtain a plurality of map tiles, so that corresponding map tiles in different geographic ranges are selectively displayed. However, this way of displaying the map often requires acquiring a large amount of map data, and the process of generating the map is time-consuming, which affects the display efficiency of the map.
Based on this, the present disclosure provides a map display method, an apparatus, a computer device, a medium, and a program product, in which a target map element corresponding to an overlapping area between a map tile and a surrounding area is determined according to first location information of the map tile to be displayed within a current screen range and second location information of a circumscribed rectangle (i.e., the surrounding area) added to each of the map elements, and then a map display is performed according to map data of the target map element. In the embodiment of the disclosure, on one hand, the local map to be displayed is generated by obtaining the map data of the target map elements corresponding to the map tiles, and compared with a process of generating a complete map according to the full map data and then slicing the complete map to obtain the local map to be displayed, the generation efficiency of the local map is improved; on the other hand, the method for acquiring the map data of the target map element corresponding to the map tile according to the first position information of the map tile and the second position information of the surrounding area corresponding to the map element can quickly determine the map data for rendering on the map tile compared with the method for acquiring the map data of the target map element by traversing the full map data of the map element, thereby greatly reducing the calculated amount, improving the acquisition efficiency of the map data, and further improving the display efficiency of the map by improving the generation efficiency of the local map and the acquisition efficiency of the map data.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In order to facilitate understanding of the present embodiment, a map display method disclosed in the embodiments of the present disclosure is first described in detail, and an execution subject of the map display method provided in the embodiments of the present disclosure is generally a computer device with certain computing power.
The map display method provided by the embodiment of the present disclosure is described below by taking an execution subject as a terminal device as an example.
The map display method provided by the embodiment of the disclosure is applied to a scene when a map is displayed on a screen of a terminal device.
Referring to fig. 1, a flowchart of a map displaying method provided in the embodiment of the present disclosure is shown, where the method includes S101 to S104, where:
s101: in response to a map presentation operation, at least one map tile to be presented within a current screen scope is determined.
The map presentation operation includes an operation of presenting a map within the target geographic area on the current screen. When a report of map display operation is received, target geographical area information selected or input in a current screen can be acquired, and at least one map tile to be displayed in the current screen range can be determined according to the target geographical area information.
For example, upon obtaining the input "AA" (city name), at least one map tile corresponding to the city "AA" may be determined.
S102: determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to various geography pixels; the bounding region is a region formed by bounding the map element with a polygonal bounding box of a preset number of sides.
In the embodiment of the present disclosure, as shown in fig. 2, the current screen range may be divided into a plurality of sub-areas (in general, the plurality of sub-areas are rectangular areas with the same size and shape), each sub-area corresponds to one map tile, and the first position information corresponding to the map tile includes vertex position information of the sub-area corresponding to the map tile.
Here, the first location information corresponding to the map tile may be location information in a geographic coordinate system, and a determination process of the first location information will be described in detail later. It should be noted that the geographic coordinate system mentioned in the embodiments of the present disclosure is a two-dimensional coordinate system established in a plane when the earth surface is regarded as the plane.
Map elements refer to the geographic contents of a map, and may include the geographic contents contained in the natural forms of the earth surface, such as natural geographic contents of landforms, water systems, vegetation, soil and the like, and the geographic contents formed by human beings reforming the nature in production activities, such as social geographic contents of residential areas, road networks, communication equipment, industrial and agricultural facilities, economic culture, administrative signs and the like.
The bounding region to which a map element corresponds may be the smallest region that encloses the map element, and in one embodiment, the bounding region may be a rectangular region formed by four bounding boxes enclosing the map element, as shown in fig. 3.
The second position information of the bounding region corresponding to the map element may include vertex position information of the bounding region, specifically, may include position information of four vertices of the bounding region, and may also include position information of diagonal vertices.
Here, the second location information of the bounding region to which the map element corresponds may be location information in a geographical coordinate system. In the geographic coordinate system, the map elements may be regarded as graphics formed by points, lines, or planes, and geographic coordinates of each point in the map elements and attribute information (such as names, numbers, colors, shapes, and the like) of the map elements are stored in the full-scale map data of the database. In the embodiment of the present disclosure, in order to facilitate processing of map data corresponding to a map element, the map element may be regarded as a polygon surrounded by boundary lines, end points of each boundary line of the map element may be regarded as shape points, and third position information of each shape point of the map element may be acquired; second position information of the enclosing region is determined based on the third position information of the respective shape points.
Wherein the third location information refers to geographic coordinates in a geographic coordinate system.
The geographic coordinate system may include a first coordinate axis and a second coordinate axis, and for each map element, two shape points having a largest distance in a direction along the first coordinate axis among the shape points may be determined according to the third position information of the respective shape points of the map element, the first shape point may be noted, and the second shape point may be noted, the two shape points having a largest distance in the direction along the second coordinate axis may be noted.
From the third position information of the first shape point and the third position information of the second shape point, a rectangular enclosure region (an enclosure frame of the rectangular enclosure region is parallel to the first coordinate axis and the second coordinate axis, respectively) enclosing the map element, and second position information of the rectangular enclosure region can be determined.
S103: determining each target enclosing area based on first position information corresponding to the map tiles and second position information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile.
As mentioned above, the first location information corresponding to the map tile is location information in a geographic coordinate system, and when this step is performed, in one embodiment, fourth location information of the map tile in a screen coordinate system may be obtained; determining first position information of the map tiles in a geographic coordinate system based on the fourth position information and the map display scale of the map tiles in the current screen range; and determining each target enclosing area based on the first position information and the acquired second position information of the enclosing area in the geographic coordinate system.
Here, the fourth position information may be determined according to size information of the screen and positions of the respective map tiles in the screen.
The map display scale of the map tiles in the current screen range can be determined according to the levels of the map tiles, namely the scale of the display size of the map tiles in the current screen range and the real size of the map tiles in the corresponding geographic coordinates, and the first position information of the map tiles in the geographic coordinate system can be determined according to the map display scale.
According to the first position information and the second position information in the geographic coordinate system, a target enclosing area of which a part of area or the whole area is located in the map tile can be determined, and the map elements enclosed in the target enclosing area are the target map elements.
S104: and performing map display in the current screen range based on the target map element corresponding to the target enclosing area.
When the entire area of the enclosing area is located within the map tile, it indicates that the target map element corresponding to the target enclosing area is located entirely within the map tile (the enclosing area corresponding to the map element encloses the geographic area of the map element), and therefore, for the target enclosing area whose entire area is located within the map tile, the entire map data of the target map element corresponding to the target enclosing area is taken as the target map data. Here, the entire map data of the target map element refers to the geographical coordinate information of all points corresponding to the target map element.
When a partial area of the bounding area is located within the map tile, it indicates that the bounding area corresponding to the map element intersects with the map tile, that is, there is an overlapping area, and therefore, for a target bounding area whose partial area is located within the map tile, overlapping map data between a target map element corresponding to the target bounding area and the map tile is determined, and the overlapping map data is taken as target map data. Here, the overlap map data refers to the geographical coordinates of each point located within the overlap area in the target map element.
Considering that, when a partial area of the bounding area is located within the map tile, the overlapping area does not necessarily contain a point in the target map element, and therefore, in one embodiment, a target shape point located in the map tile in the target bounding area may be determined based on the third position information of the respective shape point of the target map element corresponding to the target bounding area; based on the third location information of the target shape point, overlapping map data between the target map element and the map tile in the target bounding region is determined.
Here, it may be determined whether or not there is a target shape point located in the map tile based on the third position information of each shape point and the first position information corresponding to the map tile, and if there is a target shape point, it may be determined that there is an overlapping area of the target map element and the map tile and there is overlapping map data of the target map element and the map tile. According to the third position information of the target shape point, other overlapped map data falling into the map tile can be determined.
In a specific implementation process, determining intersection point position information of the boundary line of the target map element and the boundary line of the map tile based on the third position information of the target shape point and the third position information of other shape points, which are positioned outside the map tile and adjacent to the target shape point, in the target map element; based on the third location information of the target shape point and the intersection location information, overlap map data between the target map element and the map tile in the target bounding region is determined.
As shown in fig. 4, a point a is a target shape point located in the map tile on the boundary line of the target map element, and a point B is a shape point located outside the map tile and adjacent to the point a, where a connecting line located between the point a and the point B is L, and intersection position information of the boundary line of the map tile and the L is determined according to the third position information of the point a and the third position information of the point B. Here, the intersection position information of the boundary line between L and the map tile may be determined by a midpoint division method. According to the third position information of the point A and the determined position information of the intersection point, the geographic coordinates of all the points on the L between the point A and the intersection point can be determined.
When a plurality of intersection points exist between the boundary line of the target map element and the boundary line of the map tile, the position information of each intersection point can be determined according to the above process, and then the overlapped map data between the target map element and the map tile in the target surrounding area, namely the target map data, is determined.
If not, at least two conditions are included, the first condition is that, as shown in fig. 5, the target map element and the map tile are not intersected, that is, the overlapping map data of the target map element and the map tile does not exist in the overlapping area; in the second case, where the target map element intersects the map tile but the end point of the boundary line of intersection of the target map element and the map tile (i.e., the shape point) is located outside the map tile, the target map data located inside the map tile on the intersecting boundary line may be determined from the map data of the shape point located outside the map tile as described above.
After determining the target map data corresponding to the target map element, the target map data corresponding to the target map element needs to be converted into data in a screen coordinate system. Specifically, in one embodiment, the conversion relation between the screen coordinates in the screen coordinate system and the geographic coordinates in the geographic coordinate system is determined based on the display size of the map tile in the screen and the actual size indicated by the first position information of the map tile in the geographic coordinate system; determining screen coordinates of target map data corresponding to the target map elements in a screen coordinate system based on the conversion relation; and displaying the map within the current screen range based on the screen coordinates of the target map data.
As described above, based on the size information of the screen, the display size of the map tile in the screen can be determined. The method comprises the steps of determining conversion ratios of map tiles in a first coordinate axis direction and a second coordinate axis direction according to the display size of the map tiles in a screen and the actual size indicated by first position information of the map tiles in a geographic coordinate system, determining an affine transformation parameter set by using an affine transformation algorithm, and determining screen coordinates of target map data corresponding to target map elements in the screen coordinate system based on the affine transformation parameter set and the target map data corresponding to the target map elements. And finally, rendering the map tiles according to the screen coordinates and the corresponding pixel value of the target map element under each pixel, and displaying the map within the current screen range.
The determined target map data corresponding to the target map element may also be full data corresponding to the target map element, where after the target map element is determined, the full data corresponding to the target map element may be determined according to the map data stored in the database. If a partial area of the surrounding area corresponding to the target map element is located on the map tile and the partial area contains the overlapping map data between the target map element and the map tile, only the overlapping map data can be displayed in the front screen range, and the map data beyond the screen can not be rendered.
In view of the above, in the embodiment of the present disclosure, each map tile is rendered separately, and since the obtained target map data corresponding to the target map element is floating-point data and the screen coordinate obtained after conversion is an integer, after affine transformation, a graph misalignment phenomenon is likely to occur at a connection between two adjacent map tiles, and therefore, in order to solve this problem, in one implementation, boundary map data located on a connection edge between different map tiles in the target map data corresponding to the target map element may be determined; aiming at each corresponding pixel point of the boundary map data in the screen, taking the average pixel value of the pixel values of a plurality of pixel points including the pixel point as the updated pixel value of the pixel point; a plurality of pixel points belong to different map tiles; and displaying the map within the current screen range based on the updated pixel values corresponding to the boundary map data and the map data except the connecting edge corresponding to the target map data.
Here, for each pixel point corresponding to the boundary map data in the screen, a target pixel point surrounding the pixel point may be determined first, as shown in fig. 6, pixel point 1 is a pixel point on a connecting edge of map tile M and map tile N, pixel point 2 and pixel point 3 are pixel points adjacent to pixel point 1 on the connecting edge, pixel point 4, pixel point 5, and pixel point 6 are pixel points surrounding pixel point 1 in map tile M, pixel point 7, pixel point 8, and pixel point 9 are pixel points on the connecting edge of map tile N and map tile M, then pixel values of the pixel points 1 to 9 are averaged, and the obtained average pixel value is used as an updated pixel point of pixel point 1.
When the updated pixel values corresponding to the boundary map data on the connecting edge are used for rendering the pixel points at the connecting part, a smooth image can be obtained, so that the condition of dislocation of the image can be avoided.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a map display device corresponding to the map display method is also provided in the embodiments of the present disclosure, and because the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the map display method in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 7, a schematic architecture diagram of a map display apparatus provided in an embodiment of the present disclosure is shown, the apparatus including: a first determining module 701, a second determining module 702, a third determining module 703 and a displaying module 704; wherein the content of the first and second substances,
a first determining module 701, configured to determine, in response to a map display operation, at least one map tile to be displayed within a current screen range;
a second determining module 702, configured to determine first location information corresponding to the map tile and second location information of an enclosing area corresponding to each of the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
a third determining module 703, configured to determine each target enclosing area based on the first location information corresponding to the map tile and the second location information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile;
a displaying module 704, configured to perform map displaying within the current screen range based on the target map element corresponding to the target enclosing area.
In a possible implementation manner, the second determining module 702 is specifically configured to:
acquiring third position information of each shape point of the map element; wherein the shape points are end points of each boundary line of the map elements;
determining second position information of the enclosing region based on the third position information of the respective shape points.
In a possible implementation manner, the display module 704 is specifically configured to:
regarding a target enclosing area of which the whole area is positioned in the map tile, taking all map data of a target map element corresponding to the target enclosing area as target map data;
aiming at a target enclosing area of which a partial area is positioned in the map tile, determining overlapping map data between a target map element corresponding to the target enclosing area and the map tile, and taking the overlapping map data as target map data;
and performing map display within the current screen range based on the determined target map data.
In a possible implementation, the display module 704 is specifically configured to:
determining target shape points in the target enclosing area, which are positioned in the map tile, based on the third position information of each shape point of the target map element corresponding to the target enclosing area;
determining, based on third location information of the target shape point, overlapping map data between a target map element in the target enclosure area and the map tile.
In a possible implementation, the display module 704 is specifically configured to:
determining intersection point position information of the boundary line of the target map element and the boundary line of the map tile based on the third position information of the target shape point and third position information of other shape points which are positioned outside the map tile and adjacent to the target shape point in the target map element;
determining overlapping map data between a target map element in the target enclosure area and the map tile based on the third location information of the target shape point and the intersection location information.
In a possible implementation manner, the third determining module 703 is specifically configured to:
acquiring fourth position information of the map tile in a screen coordinate system;
determining the first position information of the map tile in a geographic coordinate system based on the fourth position information and the map display scale of the map tile in the current screen range;
and determining each target enclosing area based on the first position information and the acquired second position information of the enclosing area in the geographic coordinate system.
In a possible implementation, the display module 704 is specifically configured to:
determining a conversion relation between screen coordinates in a screen coordinate system and geographic coordinates in a geographic coordinate system based on the display size of the map tile in the screen and the actual size indicated by the first position information of the map tile in the geographic coordinate system;
determining screen coordinates of the target map data corresponding to the target map elements in a screen coordinate system based on the conversion relation;
and displaying the map within the current screen range based on the screen coordinates of the target map data.
In a possible implementation, the display module 704 is specifically configured to:
determining boundary map data on connecting edges between different map tiles in the target map data corresponding to the target map elements;
aiming at each corresponding pixel point of the boundary map data in the screen, taking the average pixel value of the pixel values of a plurality of pixel points including the pixel point as the updated pixel value of the pixel point; the plurality of pixel points belong to the different map tiles;
and displaying a map within the current screen range based on the updated pixel values corresponding to the boundary map data and the map data corresponding to the target map data except the connecting edge.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 8, a schematic structural diagram of a computer device 800 provided in the embodiment of the present disclosure includes a processor 801, a memory 802, and a bus 803. The memory 802 is used for storing execution instructions and includes a memory 8021 and an external memory 8022; the memory 8021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 801 and data exchanged with an external storage 8022 such as a hard disk, the processor 801 exchanges data with the external storage 8022 through the memory 8021, and when the computer apparatus 800 operates, the processor 801 communicates with the storage 802 through the bus 803, so that the processor 801 executes the following instructions:
in response to a map display operation, determining at least one map tile to be displayed within a current screen range;
determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
determining each target enclosing area based on first position information corresponding to the map tiles and second position information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target bounding area is located within the map tile;
and displaying a map within the current screen range based on the target map element corresponding to the target surrounding area.
The embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the map displaying method in the foregoing method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the map displaying method in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the system and the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and details are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes and substitutions do not depart from the spirit and scope of the embodiments disclosed herein, and they should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. A map display method, comprising:
in response to a map display operation, determining at least one map tile to be displayed within a current screen range;
determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
determining each target enclosing area based on first position information corresponding to the map tiles and second position information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile;
and displaying a map within the current screen range based on the target map element corresponding to the target surrounding area.
2. The method of claim 1, wherein determining second location information for the bounding region corresponding to each map element comprises:
acquiring third position information of each shape point of the map element; wherein the shape points are end points of each boundary line of the map elements;
determining second position information of the enclosing region based on the third position information of the respective shape points.
3. The method according to claim 1, wherein the map display within the current screen range based on the target map element corresponding to the target enclosing area comprises:
regarding a target enclosing area of which the whole area is positioned in the map tile, taking all map data of a target map element corresponding to the target enclosing area as target map data;
aiming at a target enclosing area of which a partial area is positioned in the map tile, determining overlapping map data between a target map element corresponding to the target enclosing area and the map tile, and taking the overlapping map data as target map data;
and performing map display in the current screen range based on the determined target map data.
4. The method of claim 3, wherein determining, for a target bounding region having a partial region within the map tile, overlap map data between a target map element corresponding to the target bounding region and the map tile comprises:
determining target shape points in the target enclosing area, which are positioned in the map tile, based on third position information of each shape point of a target map element corresponding to the target enclosing area;
determining, based on third location information of the target shape point, overlapping map data between a target map element in the target enclosure area and the map tile.
5. The method of claim 4, wherein determining overlap map data between the target map element and the map tile in the target enclosure area based on the third location information of the target shape point comprises:
determining intersection point position information of the boundary line of the target map element and the boundary line of the map tile based on the third position information of the target shape point and third position information of other shape points which are positioned outside the map tile and adjacent to the target shape point in the target map element;
determining overlapping map data between a target map element in the target enclosure area and the map tile based on the third location information of the target shape point and the intersection location information.
6. The method of any one of claims 1 to 5, wherein determining each target bounding region based on the first location information corresponding to the map tile and the second location information of the bounding region corresponding to each map element comprises:
acquiring fourth position information of the map tile in a screen coordinate system;
determining the first position information of the map tile in a geographic coordinate system based on the fourth position information and the map display scale of the map tile in the current screen range;
and determining each target enclosing area based on the first position information and the acquired second position information of the enclosing area in the geographic coordinate system.
7. The method according to claim 6, wherein the map display within the current screen range based on the target map element corresponding to the target enclosing area comprises:
determining a conversion relation between screen coordinates in a screen coordinate system and geographic coordinates in a geographic coordinate system based on the display size of the map tile in the screen and the actual size indicated by the first position information of the map tile in the geographic coordinate system;
determining screen coordinates of the target map data corresponding to the target map elements in a screen coordinate system based on the conversion relation;
and displaying the map within the current screen range based on the screen coordinates of the target map data.
8. The method according to claim 1, wherein the map display within the current screen range based on the target map element corresponding to the target enclosing area comprises:
determining boundary map data on connecting edges between different map tiles in the target map data corresponding to the target map elements;
aiming at each corresponding pixel point of the boundary map data in the screen, taking the average pixel value of the pixel values of a plurality of pixel points including the pixel point as the updated pixel value of the pixel point; the plurality of pixel points belong to the different map tiles;
and displaying the map within the current screen range based on the updated pixel values corresponding to the boundary map data and the map data corresponding to the target map data except the connecting edge.
9. A map display apparatus, comprising:
the map display device comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for responding to map display operation and determining at least one map tile to be displayed in a current screen range;
the second determining module is used for determining first position information corresponding to the map tiles and second position information of surrounding areas corresponding to the map pixels; the surrounding area is an area formed by surrounding the map element by adopting a polygonal surrounding frame with a preset number of edges;
a third determining module, configured to determine each target enclosing area based on the first location information corresponding to the map tile and the second location information of the enclosing area corresponding to each map element; wherein a partial area or a full area of the target enclosing area is located within the map tile;
and the display module is used for displaying the map within the current screen range based on the target map element corresponding to the target surrounding area.
10. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when a computer device is running, the machine-readable instructions when executed by the processor performing the steps of the map presentation method of any one of claims 1 to 8.
11. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the map presentation method according to any one of claims 1 to 8.
12. A computer program product comprising computer instructions, characterized in that said computer instructions, when executed by a processor, implement the steps of the map presentation method of any one of claims 1 to 8.
CN202111010473.6A 2021-08-31 2021-08-31 Map display method, map display device, computer equipment, medium and program product Pending CN115727869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111010473.6A CN115727869A (en) 2021-08-31 2021-08-31 Map display method, map display device, computer equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111010473.6A CN115727869A (en) 2021-08-31 2021-08-31 Map display method, map display device, computer equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN115727869A true CN115727869A (en) 2023-03-03

Family

ID=85291264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111010473.6A Pending CN115727869A (en) 2021-08-31 2021-08-31 Map display method, map display device, computer equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115727869A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541479A (en) * 2023-07-06 2023-08-04 深圳依时货拉拉科技有限公司 Tile data compiling method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116541479A (en) * 2023-07-06 2023-08-04 深圳依时货拉拉科技有限公司 Tile data compiling method, device, computer equipment and storage medium
CN116541479B (en) * 2023-07-06 2023-09-19 深圳依时货拉拉科技有限公司 Tile data compiling method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101116111B (en) 2d/3d line rendering using 3d rasterization algorithms
Chao et al. Parallel algorithm for viewshed analysis on a modern GPU
US8675013B1 (en) Rendering spherical space primitives in a cartesian coordinate system
CN107170040A (en) A kind of three-dimensional bridge scenario building method and apparatus
KR20150124112A (en) Method for Adaptive LOD Rendering in 3-D Terrain Visualization System
CN115727869A (en) Map display method, map display device, computer equipment, medium and program product
CN111583398A (en) Image display method and device, electronic equipment and computer readable storage medium
CN115512025A (en) Method and device for detecting model rendering performance, electronic device and storage medium
CN108375806A (en) The acquisition methods and device of weather-map
KR20170098234A (en) Texture generation system
CN106683183A (en) Online three-dimensional visualization method for construction project model
CN116977598B (en) Triangular mesh numerical simulation smoothing method
CN113902832A (en) Flood three-dimensional dynamic evolution and rendering method and device and electronic equipment
Rautenbach et al. An assessment of visual variables for the cartographic design of 3D informal settlement models
CN110136262B (en) Water body virtual visualization method and device
Kardos et al. The visualisation of uncertainty in spatially-referenced attribute data using trustworthy data structures
CN116342724A (en) Thermodynamic diagram object generation method, device and computer readable storage medium
CN113674419B (en) Three-dimensional display method and device for meteorological cloud data, electronic equipment and storage medium
CN114996374A (en) Online data visualization implementation method, system, device and medium
CN109062416B (en) Map state conversion method and device
CN113658288A (en) Method for efficiently generating and displaying polygonal data vector slice
CN102074004A (en) Method and device for determining type of barrier of spatial entity
She et al. A building label placement method for 3D visualizations based on candidate label evaluation and selection
CN111581808A (en) Pollutant information processing method and device, storage medium and terminal
US10078884B2 (en) System and method for processing geographical information with a central window and frame

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