A map-based mapping method and apparatus

By determining target markers on the map and generating boundary segments based on the point and line information of the drawn tiles, the problem of gaps and overlaps between adjacent tiles in the web version of the map is solved, improving the efficiency and quality of map drawing.

CN114140548BActive Publication Date: 2026-03-31SHENZHEN XUMI YUNTU SPACE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

When drawing adjacent sections in the web version of a map, human error can easily lead to excessive gaps or overlaps, affecting the quality of map data. Moreover, it is difficult to completely eliminate gaps and overlaps through manual adjustments.

Method used

By determining multiple target markers in the target map and adjusting the target markers according to the point and line information of the drawn plates, the boundary line segments of the target plates are generated, ensuring that the common vertices and boundaries of the target plates and the drawn plates are the same vertex or boundary in the map.

Benefits of technology

This effectively avoids gaps and overlaps between the target area and the already drawn area, improves map drawing efficiency, and reduces the need for manual adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140548B_ABST
    Figure CN114140548B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer, and provides a mapping method and device based on a map. The method determines a plurality of target marking points according to a plurality of target positions of a cursor in a target map, and generates a plurality of target panels corresponding to the plurality of target marking points in the target map according to a plurality of boundary line segments corresponding to the plurality of target marking points. Since the method is for each target position, the target marking point corresponding to the target position can be determined according to the point-line information of the target position and the drawn panel in the target map. If the target panel is adjacent to a drawn panel in the map, the common vertex and boundary between the target panel and the drawn panel can be ensured to be the same vertex and boundary in the map, so that the common boundary between the target panel and the adjacent drawn panel in the process of drawing in the map can be ensured not to have gaps and overlaps, and the efficiency of drawing panels in the map is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a map-based cartographic method and apparatus. Background Technology

[0002] In existing technologies, because map web versions are simple, convenient, and lightweight, they only provide basic drawing functions compared to map client versions.

[0003] In the process of manual map drawing based on web-based maps, because each area is edited independently (e.g., drawing or editing a section), there is no correlation between the sections. When drawing adjacent sections, human error can easily lead to excessive gaps or overlaps between the two sections, affecting map data quality and making it impossible to guarantee that the common boundaries of adjacent sections will not have gaps or overlaps. Therefore, a new map drawing solution based on web-based maps is urgently needed. Summary of the Invention

[0004] In view of this, the present disclosure provides a map-based cartographic method, apparatus, computer device, and computer-readable storage medium to solve the problem in the prior art that when drawing two adjacent blocks, the gap between the two blocks may be too large or overlap may occur due to human error.

[0005] A first aspect of this disclosure provides a map-based cartographic method, the method comprising:

[0006] Based on the cursor's multiple target locations on the target map, multiple target markers are determined; wherein, for each target location, a target marker corresponding to the target location is determined based on the point and line information of the target location and the drawn tiles in the target map;

[0007] For every two adjacent target annotation points among the plurality of target annotation points, determine the boundary line segment corresponding to the two adjacent target annotation points;

[0008] Based on the multiple boundary line segments corresponding to the multiple target annotation points, target sections corresponding to the multiple target annotation points are generated in the target map.

[0009] A second aspect of this disclosure provides a map-based cartographic apparatus, the apparatus comprising:

[0010] The marker point determination module is used to determine multiple target marker points based on multiple target positions of the cursor in the target map; wherein, for each target position, the target marker point corresponding to the target position is determined based on the point and line information of the target position and the drawn tiles in the target map;

[0011] The line segment determination module is used to determine the boundary line segment corresponding to each pair of adjacent target annotation points among the plurality of target annotation points;

[0012] The segment generation module is used to generate target segments corresponding to the multiple target annotation points in the target map based on the multiple boundary line segments corresponding to the multiple target annotation points.

[0013] A third aspect of this disclosure provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.

[0014] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0015] The beneficial effects of this disclosed embodiment compared to the prior art are as follows: This disclosed embodiment can first determine multiple target markers based on multiple target positions of the cursor in the target map. Then, for every two adjacent target markers, the boundary line segment corresponding to the two adjacent target markers can be determined; subsequently, based on the multiple boundary line segments corresponding to the multiple target markers, the target tiles corresponding to the multiple target markers can be generated in the target map. In this embodiment, for each target location, the target marker can be determined based on the point and line information of the target location and the drawn tiles in the target map. It is understood that the target marker is obtained by adjusting the target location based on the point and line information of the drawn tiles in the target map. Therefore, the target marker is determined with reference to the point and line information of the boundaries of the drawn tiles in the target map. In this way, if a target tile is adjacent to an already drawn tile in the map, it can be ensured that the common vertices and boundaries between the target tile and the already drawn tile are the same in the map. This ensures that the common boundaries between the target tile and its adjacent already drawn tiles do not have gaps or overlaps during the drawing process in the map, thereby improving the efficiency of drawing tiles in the map. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this disclosure;

[0018] Figure 2 This is a flowchart of a map-based cartographic method provided in an embodiment of this disclosure;

[0019] Figure 3 This is a schematic diagram of an interface for determining target annotation points provided in an embodiment of this disclosure;

[0020] Figure 4 This is a schematic diagram of an interface for determining target annotation points provided in an embodiment of this disclosure;

[0021] Figure 5 This is a schematic diagram of an interface for determining boundary line segments provided in an embodiment of this disclosure;

[0022] Figure 6 This is a schematic diagram of an interface for determining boundary line segments provided in an embodiment of this disclosure;

[0023] Figure 7 This is a block diagram of a map-based cartographic apparatus provided in an embodiment of this disclosure;

[0024] Figure 8 This is a schematic diagram of a computer device provided in an embodiment of this disclosure. Detailed Implementation

[0025] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.

[0026] A map-based cartographic method and apparatus according to embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings.

[0027] In existing technologies, during manual map drawing on web-based platforms, each area is edited independently, meaning there is no correlation between them. When drawing adjacent areas, human error can easily lead to excessive gaps or overlaps, affecting map data quality and making it impossible to guarantee that the common boundaries of adjacent areas will be free of gaps and overlaps. Furthermore, the gaps and overlaps between adjacent areas are often too subtle for manual error detection. Even manual adjustments are inconvenient and time-consuming, still failing to guarantee that the common boundaries of adjacent areas will be completely free of gaps and overlaps.

[0028] To address the aforementioned problems, this disclosure provides a map-based cartographic method. In this method, for each target position of the cursor on the target map, a target marker corresponding to the target position can be determined based on the point and line information of the target position and the already drawn sections in the target map. It is understood that the target marker corresponding to the target position is obtained by adjusting the target position based on the point and line information of the already drawn sections in the target map. Therefore, the target marker corresponding to the target position is determined with reference to the point and line information of the boundaries of the already drawn sections in the target map. Thus, after generating target sections corresponding to multiple target markers in the target map based on multiple boundary line segments corresponding to multiple target markers of the target sections, if a target section drawn in the map is adjacent to an already drawn section, it can be ensured that the common vertices and boundaries between the target section and the already drawn section are the same vertices and boundaries in the map. This ensures that no gaps or overlaps occur between the common boundaries of the target section and its adjacent already drawn sections during the map drawing process, thereby improving the efficiency of drawing sections in the map.

[0029] For example, embodiments of this disclosure can be applied to, for example... Figure 1 The application scenario shown can include terminal device 1.

[0030] Terminal device 1 can be hardware or software. When terminal device 1 is hardware, it can be various electronic devices with a display screen and supporting data processing, including but not limited to smartphones, tablets, laptops, and desktop computers; when terminal device 1 is software, it can be installed in the electronic devices described above. Terminal device 1 can be implemented as multiple software programs or software modules, or as a single software program or software module, and this disclosure does not limit this. Of course, this disclosure can also be applied to servers.

[0031] Specifically, in Figure 1 In the application scenario shown, a user can move a cursor on a map using terminal device 1. Terminal device 1 can obtain the target position of the cursor and determine the target marker corresponding to the target position based on the target position and the point and line information of the drawn tiles in the target map. After determining multiple target markers based on multiple target positions of the cursor in the target map, terminal device 1 can determine the boundary line segment corresponding to each pair of adjacent target markers. Then, terminal device 1 can generate target tiles corresponding to the multiple target markers in the target map based on the multiple boundary line segments corresponding to the multiple target markers. In this way, if a target tile is adjacent to an already drawn tile in the map, it can be ensured that the common vertices and boundaries between the target tile and the already drawn tile are the same in the map. This ensures that there are no gaps or overlaps in the common boundaries between the target tile and its adjacent already drawn tiles during the drawing process in the map, thereby improving the efficiency of drawing tiles in the map.

[0032] It should be noted that the specific type, quantity, and combination of terminal devices 1 can be adjusted according to the actual needs of the application scenario, and this disclosure embodiment does not impose any restrictions on this.

[0033] It should be noted that the above application scenarios are shown only for the purpose of understanding this disclosure, and the implementation of this disclosure is not limited in any way. On the contrary, the implementation of this disclosure can be applied to any applicable scenario.

[0034] Figure 2 This is a flowchart of a map-based cartographic method provided in an embodiment of this disclosure. Figure 2 A map-based cartographic method can be derived from... Figure 1 The method is executed on the terminal device (or server). It should be noted that, in one implementation, the method can be applied to a web-based map, i.e., a web-based map; of course, it can also be applied to a map client, but this embodiment does not limit its application. For example... Figure 2 As shown, this map-based cartographic method includes:

[0035] S201: Determine multiple target markers based on the cursor's position on the target map.

[0036] In this embodiment, the target map can be understood as the map where a section needs to be drawn. When a user needs to draw a new section on the target map, the user can select a point on the boundary of the section to be drawn using a cursor. For ease of description, the position of the point on the boundary of the section to be drawn selected by the cursor can be called the target position, and the section to be drawn can be called the target section. In one implementation of this embodiment, the target position can be the position where the cursor stays on the target map for a preset duration. For example, if the cursor stays at position A on the target map for 3 seconds, then the duration of the cursor at position A can be determined to be 1 second. Since this duration is greater than the preset duration of 0.3 seconds, position A can be used as the target position. Alternatively, the target position can be the position where the cursor stays on the target map when a first preset operation is detected. The first preset operation can be a left click, right click, double click, long press, etc. It should be noted that the first preset operation can be set according to actual needs and is not limited to the methods mentioned above. For example, assuming the first preset operation is a left click, when a left click is detected, the cursor is at position B on the map, then position B can be used as the target position.

[0037] Because errors can occur when users manually select points on the boundary of a target area on the map—for example, a user might want to select location A as a point on the boundary of a target area, but actually select location B—after determining the target location, it's necessary to first determine whether the selected target location needs adjustment based on the already drawn areas on the target map. Specifically, it's necessary to determine if the target location needs to be adjusted to a point on the common boundary between the target area and an already drawn area. If no adjustment is needed, the target location can be used as its corresponding target marker. If adjustment is required, the target marker can be determined based on the target location and the point and line information of the already drawn areas on the target map. The target marker can be understood as a marker used to determine the boundary of the target area; that is, the boundary of the target area can be determined using the target marker.

[0038] It is understood that, in this embodiment, for each target location, a target marker corresponding to the target location can be determined based on the target location and the point and line information of the drawn tiles in the target map. The point and line information of the drawn tiles can include vertex information and boundary information of the drawn tiles; vertex information can include the position information of each vertex in the drawn tiles in the target map, such as the coordinates of the vertex; boundary information can include the position information of the endpoints of each boundary in the drawn tiles in the target map. For example, if a drawn tile is a rectangle and includes four boundaries, where each boundary includes two endpoints, the boundary information of the drawn tile includes the coordinates of the two endpoints corresponding to each of the four boundaries.

[0039] Since the point and line information of the drawn tiles includes the vertex and boundary information of the drawn tiles, it indicates that the point and line information of the drawn tiles can reflect the boundaries of the drawn tiles. Therefore, the target marker corresponding to the target location is obtained by adjusting the target location based on the point and line information of the drawn tiles in the target map. This means that the target marker corresponding to the target location is determined with the point and line information of the boundary of the drawn tiles in the target map as a reference. It can be understood that the target marker corresponding to the target location is a point on the common vertex or common boundary between the target tile and the drawn tiles. In this way, if the target tile is adjacent to a drawn tile in the target map, it can be guaranteed that the common vertex and boundary between the target tile and the drawn tile are the same vertex and boundary in the map. This ensures that there are no gaps or overlaps between the common boundary of the target tile and its adjacent drawn tiles during the drawing process in the map. As a result, the user does not need to manually adjust the boundary or vertex of the target tile and its adjacent drawn tiles, thus improving the efficiency of drawing tiles in the map.

[0040] S202: For every two adjacent target annotation points among the plurality of target annotation points, determine the boundary line segment corresponding to the two adjacent target annotation points.

[0041] In this embodiment, since the acquisition times of the cursor at multiple target locations on the target map are all different, the acquisition time of each of the determined multiple target markers is also different. In other words, the acquisition times of the various target markers have a specific order. In this embodiment, after acquiring a target marker, based on its acquisition time, another target point of interest whose acquisition time is earlier than and closest to that target marker's acquisition time can be determined. In this embodiment, for ease of description, this other target point of interest can be referred to as the target point of interest adjacent to the target point of interest.

[0042] Next, based on the target point of interest, adjacent target points of interest, and the point and line information of the already drawn tiles in the target map, the boundary segments corresponding to the two adjacent target markers can be determined. In other words, the boundary segments with these two adjacent target markers as the endpoints of the two line segments can be determined. It is understandable that, to ensure that the common boundaries of the target tile and its adjacent drawn tiles do not have gaps or overlaps during the map drawing process, the determination of the boundary segments corresponding to the two adjacent target markers needs to be combined with the point and line information of the already drawn tiles in the target map. For example, based on the point and line information of the already drawn tiles, the boundary segments with the two adjacent target markers as the endpoints of the two line segments can be found within the drawn tiles.

[0043] It should be noted that, for the endpoint target annotation point (i.e., the target annotation point with the latest acquisition time) among multiple target interest points, it is necessary not only to determine the boundary line segment corresponding to the endpoint target annotation point and its adjacent target annotation points, but also to determine the boundary line segment corresponding to the endpoint target annotation point and the starting target annotation point (i.e., the target annotation point with the earliest acquisition time).

[0044] S203: Based on the multiple boundary line segments corresponding to the multiple target annotation points, generate target blocks corresponding to the multiple target annotation points in the target map.

[0045] After determining multiple boundary segments corresponding to multiple target markers, these boundary segments can be connected according to the chronological order of their acquisition. This allows the generation of target sections corresponding to the target markers on the target map. For example, if four target markers are determined, and their acquisition order is: target marker A, target marker B, and target marker C, where the boundary segment corresponding to target marker A and target marker B is segment a, the boundary segment corresponding to target marker B and target marker C is segment b, and the boundary segment corresponding to target marker C and target marker A is segment c, then connecting segment a with segment b, and connecting segment b with segment c, will yield the target sections corresponding to target markers A, B, and C.

[0046] As can be seen, in this embodiment of the present disclosure, multiple target markers can be determined first based on the multiple target positions of the cursor in the target map. Then, for every two adjacent target markers, the boundary line segment corresponding to the two adjacent target markers can be determined. Next, based on the multiple boundary line segments corresponding to the multiple target markers, target blocks corresponding to the multiple target markers can be generated in the target map. In this embodiment, for each target location, the target marker can be determined based on the point and line information of the target location and the drawn tiles in the target map. It is understood that the target marker is obtained by adjusting the target location based on the point and line information of the drawn tiles in the target map. Therefore, the target marker is determined with reference to the point and line information of the boundaries of the drawn tiles in the target map. In this way, if a target tile is adjacent to an already drawn tile in the map, it can be ensured that the common vertices and boundaries between the target tile and the already drawn tile are the same in the map. This ensures that the common boundaries between the target tile and its adjacent already drawn tiles do not have gaps or overlaps during the drawing process in the map, thereby improving the efficiency of drawing tiles in the map.

[0047] Next, we will introduce a specific implementation of the step mentioned in S201, "determining the target marker corresponding to the target location based on the point and line information of the target location and the drawn tiles in the target map." Specifically, in one implementation, the step of "determining the target marker corresponding to the target location based on the point and line information of the target location and the drawn tiles in the target map" may include the following implementation:

[0048] The first implementation method is as follows: If the distance between the target location and a vertex of an already drawn plate in the target map meets a preset distance condition, then the vertex is used as the target label point corresponding to the target location.

[0049] In one implementation of this embodiment, the preset distance condition can be: the vertex or the boundary is the one with the smallest distance from the target position among all the vertices and boundaries of the drawn plates, and the distance between the vertex or the boundary and the target position is less than a preset threshold (e.g., 10m).

[0050] As an example, after determining a target position for the cursor, the distances between the target position and each vertex and boundary of each drawn tile in the target map can be determined based on the point and line information of the target position and all drawn tiles. Then, the vertex or boundary with the smallest distance to the target position is selected. If the vertex with the smallest distance to the target position is a vertex, it can then be determined whether the distance between the vertex and the target position is less than a preset threshold. If it is less, the vertex can be used as the target marker corresponding to the target position.

[0051] Next, combined Figure 3 To illustrate, assuming a preset threshold of 10m, after determining the target position of the cursor to be position a, it can be determined that among all the vertices and boundaries of the drawn panel A, the vertex at position b has the smallest distance from the target position. Next, it is determined whether the distance between the vertex at position b and the target position is less than 10m. If it is less, a dashed border point is displayed at position b to prompt the user whether to select the vertex at position b as the target annotation point, and the cursor changes to a selection icon. If the cursor clicks on the dashed border point, the vertex at position b can be used as the target annotation point corresponding to the target position.

[0052] The second implementation method is as follows: If the distance between the target location and a boundary of an already drawn plate in the target map satisfies the preset distance condition, the mapping point on the boundary corresponding to the target location is determined according to the location information of the target location and the boundary, and the mapping point is used as the target label point corresponding to the target location.

[0053] It should be noted that the position information of each boundary includes the position information of the two endpoints of the boundary (such as the coordinates of the endpoints). In this implementation, after determining a target position of the cursor, the distances between the target position and each vertex and boundary of each drawn tile in the target map can be determined based on the point and line information of the target position and all drawn tiles in the target map. Then, the vertex or boundary with the smallest distance to the target position is selected. If the boundary with the smallest distance to the target position is a boundary, it can then be determined whether the distance between the boundary and the target position is less than a preset threshold. If it is less, the mapping position of the target position on the boundary can be determined based on the position information of the two endpoints of the target position and the boundary. The point corresponding to the mapping position is then used as the mapping point corresponding to the target position. Finally, the mapping point can be used as the target annotation point corresponding to the target position.

[0054] Understandably, if the boundary line has the shortest distance to the target location, it means the cursor's target location is located in the middle of the drawn plate's boundary line, not at either end. Next, the closest point to this boundary of the drawn plate can be calculated, i.e., the mapping point (i.e., the landing point) is calculated. To ensure that the boundary lines of the target plate and the drawn plate do not overlap or have gaps, the mapping point determined on the boundary will also become a target marker point in the target plate. This target marker point can serve as a common vertex (i.e., a shared vertex) for both the target plate and the drawn plate.

[0055] Next, we will introduce how to determine the mapping position of the target location on the boundary. Assume that the boundary with the smallest distance to the target location is boundary a, and the latitude and longitude of the starting and ending points of boundary a (i.e., the coordinates of the two endpoints of boundary a) are A(x1, y1) and B(x2, y2) respectively. The latitude and longitude coordinates of the target location are P(x3, y3). Then, the mapping position of the target location on the boundary (i.e., the coordinates of the mapping point) is [x1 + (x2 - x1) * K, y1 + (y2 - y1) * K], where... K represents the proportion on which the target position is mapped to line segment AB (i.e., boundary a). For example, K = 1 / 2 means that the target position is mapped to the midpoint of line segment AB.

[0056] It should be noted that if none of the vertices or boundaries in all drawn sections of the target map meet the preset distance condition from the target location, then no adjustment to the target location is needed, and this target location can be used as the location of its corresponding target marker. Next, combined with... Figure 4 To illustrate, assuming a preset threshold of 10m, after determining the target position of the cursor to be position a, it can then be determined that among all the vertices and boundaries of the drawn panel A, boundary b has the smallest distance from the target position. Next, since the distance between boundary b and the target position is determined to be greater than 10m, it means that no adjustment to the target position is needed. A crosshair icon is displayed at position a to prompt the user whether to select the point at position a as the target annotation point, and the cursor changes to a selection icon. If the cursor clicks the crosshair icon, the point at position a can be used as the target annotation point corresponding to the target position.

[0057] Next, we will introduce the specific implementation method of S202 "determining the boundary line segment corresponding to each two adjacent target annotation points among the plurality of target annotation points". In this embodiment, the step of "determining the boundary line segment corresponding to each two adjacent target annotation points among the plurality of target annotation points" can include the following two implementation methods:

[0058] The first implementation method is as follows: For every two adjacent target annotation points among the plurality of target annotation points, if the two adjacent target annotation points are both located on the same drawn plate, the shortest boundary line segment between the two adjacent target annotation points is determined on the drawn plate; and the shortest boundary line segment is used as the boundary line segment corresponding to the two adjacent target annotation points.

[0059] In this embodiment, if two adjacent target annotation points are located on the same drawn plate, the shortest boundary line segment between the two adjacent target annotation points can be determined on the boundary of the drawn plate, and all points in the shortest boundary line segment can be used as points on the boundary line segment corresponding to the two adjacent target annotation points. Thus, the boundary line segment corresponding to the two adjacent target annotation points can be drawn based on all points in the shortest boundary line segment.

[0060] Next, combined Figure 5 For example, Figure 5 As shown, assuming two adjacent target annotation points a and b are both located on the same drawn plate A, the shortest boundary line segment between these two adjacent target annotation points a and b can be determined on the boundary of the drawn plate A as line segment s, with the two endpoints of line segment s being points a and b, respectively. Next, all points in the shortest boundary line segment s can be used as points on the boundary line segments corresponding to these two adjacent target annotation points a and b. In this way, the boundary line segments corresponding to these two adjacent target annotation points a and b can be drawn based on all points in the shortest boundary line segment s.

[0061] The second implementation method is as follows: For every two adjacent target annotation points among the plurality of target annotation points, if the two adjacent target annotation points are located on the first and second drawn blocks respectively, the first block and the second block are merged into a drawn block; the shortest boundary line segment between the two adjacent target annotation points is determined on the drawn block; and the shortest boundary line segment is used as the boundary line segment corresponding to the two adjacent target annotation points.

[0062] In this embodiment, if two adjacent target annotation points are located on two different drawn blocks (i.e., the first and second drawn blocks), and these two drawn blocks are completely independent, the first and second blocks can be merged into one drawn block. As an example, regardless of whether the first and second blocks are directly or indirectly adjacent, the first and second blocks (or the first block, the second block, and several blocks between the first and second blocks) are merged into one graphic data and stored in the front-end component, and are not displayed on the page. It should be noted that when there are several blocks between the first and second blocks, only blocks with a common boundary are merged into one drawn block, while blocks without a common boundary are not merged into one drawn block. Next, the shortest boundary line segment between the two adjacent target annotation points can be determined on the merged drawn block; and all points in the shortest boundary line segment are used as points on the boundary line segment corresponding to the two adjacent target annotation points. Thus, the boundary line segment corresponding to the two adjacent target annotation points can be drawn based on all points in the shortest boundary line segment, that is, the shortest boundary line segment is used as the boundary line segment corresponding to the two adjacent target annotation points.

[0063] Next, combined Figure 6 For example, Figure 6 As shown, assuming two adjacent target labels a and b are located on drawn plate B and drawn plate A respectively, since drawn plate B and drawn plate A are directly adjacent, they are first merged into one drawn plate. Then, the shortest boundary line segment s between the two adjacent target labels a and b is determined on this drawn plate, and the two endpoints of this line segment s are points a and b respectively. Next, all points in the shortest boundary line segment s can be used as points on the boundary line segments corresponding to the two adjacent target labels a and b. In this way, the boundary line segments corresponding to the two adjacent target labels a and b can be drawn based on all points in the shortest boundary line segment s.

[0064] Next, the specific implementation of S203, "generating target sections corresponding to the multiple target markers in the target map based on the multiple boundary line segments corresponding to the multiple target markers," will be introduced. In this embodiment, the step of "generating target sections corresponding to the multiple target markers in the target map based on the multiple boundary line segments corresponding to the multiple target markers" may include the following steps:

[0065] If the starting target marker and the ending target marker among the plurality of target markers coincide, or if a preset operation is detected for the ending target marker, then the plurality of boundary line segments corresponding to the plurality of target markers are connected sequentially to generate the target blocks corresponding to the plurality of target markers in the target map.

[0066] In this embodiment, if a newly determined target marker is detected to coincide with the starting target marker, meaning the position of the target marker is the same as the starting target marker, then the target marker can be confirmed as the endpoint target marker. Alternatively, if a preset operation (such as double-clicking or long-pressing) is performed on the newly determined target marker, then the target marker can be confirmed as the endpoint target marker. It should be noted that the preset operation can be other than the operation methods mentioned above, which will not be elaborated here. After determining the endpoint target marker, the multiple boundary line segments corresponding to the multiple target markers can be connected sequentially from the starting target marker to the endpoint target marker, thereby generating the target tiles corresponding to the multiple target markers in the target map.

[0067] To ensure that when editing an already drawn panel, such as adjusting the vertex position of an already drawn panel, the common boundary between the target panel and its adjacent already drawn panels still does not produce gaps or overlaps; in one implementation of this embodiment, after S203, the method may further include:

[0068] S204: Receive a movement command for a vertex in the target plate.

[0069] The movement command includes the target movement position corresponding to the vertex, and the vertex is a common vertex of the target plate and an already drawn plate. The target movement position corresponding to the vertex can be understood as the destination to which the vertex needs to move, that is, the position where the vertex will be after its position is adjusted.

[0070] S205: In response to the movement command, move the vertex to the target movement position; and, based on the target movement position, adjust the positions of the boundaries of the target plate and the drawn plate with the vertex as the endpoint, to obtain the adjusted target plate and the adjusted drawn plate.

[0071] In this embodiment, upon receiving a movement command for a vertex, the vertex can be moved in response to the command until it reaches the target movement position. Then, based on the target movement position, the positions of the boundaries of the target plate and the drawn plates with the vertex as the endpoint can be adjusted to obtain the adjusted target plate and the adjusted drawn plates. For example, based on the target movement position of the moved vertex, the distance change between the vertex and its adjacent target markers can be determined, and the length and direction of the boundary corresponding to the vertex can be adjusted based on this distance change to ensure that the common boundary between the target plate and its adjacent drawn plates still does not produce gaps or overlaps.

[0072] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.

[0073] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.

[0074] Figure 7 This is a schematic diagram of a map-based cartographic apparatus provided in an embodiment of this disclosure. Figure 7 As shown, the map-based cartographic device includes:

[0075] The marker point determination module 701 is used to determine multiple target marker points based on multiple target positions of the cursor in the target map; wherein, for each target position, the target marker point corresponding to the target position is determined based on the point and line information of the target position and the drawn plate in the target map;

[0076] The line segment determination module 702 is used to determine the boundary line segment corresponding to each pair of adjacent target annotation points among the plurality of target annotation points;

[0077] The segment generation module 703 is used to generate target segments corresponding to the multiple target annotation points in the target map based on the multiple boundary line segments corresponding to the multiple target annotation points.

[0078] Optionally, the target location is the location where the cursor stays on the target map for a preset duration, or the target location is the location where the cursor stays on the target map when the first preset operation is detected.

[0079] Optionally, the point and line information of the drawn plate includes vertex information and boundary information in the drawn plate; the annotation point determination module 701 is specifically used for:

[0080] If the distance between the target location and a vertex of an already drawn section in the target map meets a preset distance condition, then the vertex is taken as the target marker point corresponding to the target location;

[0081] If the distance between the target location and a boundary of a drawn section in the target map satisfies the preset distance condition, a mapping point on the boundary corresponding to the target location is determined based on the location information of the target location and the boundary, and the mapping point is used as the target label point corresponding to the target location.

[0082] Optionally, the preset distance condition is: the vertex or the boundary is the one with the smallest distance to the target position among all the vertices and boundaries of the drawn plate, and the distance between the vertex or the boundary and the target position is less than a preset threshold.

[0083] Optionally, the boundary location information includes the location information of the two endpoints of the boundary; the marker point determination module 701 is specifically used for:

[0084] Based on the position information of the target position and the two endpoints of the boundary, determine the mapping position of the target position on the boundary, and use the point corresponding to the mapping position as the mapping point corresponding to the target position;

[0085] The mapping point is used as the target label point corresponding to the target location.

[0086] Optionally, the line segment determination module 702 is specifically used for:

[0087] For each pair of adjacent target annotations among the plurality of target annotations, if the two adjacent target annotations are both located on the same drawn plate, the shortest boundary line segment between the two adjacent target annotations is determined on the drawn plate; and the shortest boundary line segment is used as the boundary line segment corresponding to the two adjacent target annotations; or...

[0088] For each pair of adjacent target annotation points among the plurality of target annotation points, if the two adjacent target annotation points are located on the first and second drawn blocks respectively, the first block and the second block are merged into a single drawn block; the shortest boundary line segment between the two adjacent target annotation points is determined on the drawn block; and the shortest boundary line segment is used as the boundary line segment corresponding to the two adjacent target annotation points.

[0089] Optionally, the plate generation module 703 is used for:

[0090] If the starting target marker and the ending target marker among the plurality of target markers coincide, or if a preset operation is detected for the ending target marker, then the plurality of boundary line segments corresponding to the plurality of target markers are connected sequentially to generate the target blocks corresponding to the plurality of target markers in the target map.

[0091] Optionally, the device further includes an adjustment module for:

[0092] Receive a movement command for a vertex in the target panel; wherein the movement command includes the target movement position corresponding to the vertex, and the vertex is a common vertex of the target panel and an already drawn panel;

[0093] In response to the movement command, the vertex is moved to the target movement position; and, based on the target movement position, the positions of the boundaries of the target plate and the drawn plate with the vertex as the endpoint are adjusted to obtain the adjusted target plate and the adjusted drawn plate.

[0094] The beneficial effects of this embodiment compared with the prior art are as follows: This embodiment provides a map-based cartographic device, the device comprising: a marker point determination module, used to determine multiple target marker points based on multiple target positions of a cursor in a target map; wherein, for each target position, a target marker point corresponding to the target position is determined based on the point and line information of the target position and the drawn blocks in the target map; a line segment determination module, used to determine the boundary line segment corresponding to each of the multiple target marker points for every two adjacent target marker points; and a block generation module, used to generate target blocks corresponding to the multiple target marker points in the target map based on the multiple boundary line segments corresponding to the multiple target marker points. In this embodiment, for each target location, the target marker can be determined based on the point and line information of the target location and the drawn tiles in the target map. It is understood that the target marker is obtained by adjusting the target location based on the point and line information of the drawn tiles in the target map. Therefore, the target marker is determined with reference to the point and line information of the boundaries of the drawn tiles in the target map. In this way, if a target tile is adjacent to an already drawn tile in the map, it can be ensured that the common vertices and boundaries between the target tile and the already drawn tile are the same in the map. This ensures that the common boundaries between the target tile and its adjacent already drawn tiles do not have gaps or overlaps during the drawing process in the map, thereby improving the efficiency of drawing tiles in the map.

[0095] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.

[0096] Figure 8 This is a schematic diagram of the computer device 8 provided in an embodiment of this disclosure. Figure 8 As shown, the computer device 8 of this embodiment includes a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, it implements the steps in the various method embodiments described above. Alternatively, when the processor 801 executes the computer program 803, it implements the functions of each module / module in the various device embodiments described above.

[0097] Exemplarily, computer program 803 may be divided into one or more modules, which are stored in memory 802 and executed by processor 801 to perform the present disclosure. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 803 in computer device 8.

[0098] Computer device 8 can be a desktop computer, laptop, handheld computer, cloud server, or other similar computer device. Computer device 8 may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will understand that... Figure 8 This is merely an example of computer device 8 and does not constitute a limitation on computer device 8. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0099] The processor 801 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0100] The memory 802 can be an internal storage module of the computer device 8, such as a hard disk or RAM of the computer device 8. The memory 802 can also be an external storage device of the computer device 8, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device 8. Furthermore, the memory 802 can include both internal and external storage modules of the computer device 8. The memory 802 is used to store computer programs and other programs and data required by the computer device. The memory 802 can also be used to temporarily store data that has been output or will be output.

[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described functional modules are used as examples. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiments can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, the specific names of the functional modules are only for easy differentiation and are not intended to limit the scope of protection of this disclosure. The specific working process of the modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0102] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0103] Those skilled in the art will recognize that the modules and algorithm 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 this disclosure.

[0104] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or modules is only a logical functional division, and in actual implementation, there may be other division methods. Multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.

[0105] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0106] Furthermore, the functional modules in the various embodiments of this disclosure can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0107] If an integrated module / module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0108] The above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.

Claims

1. A map-based mapping method characterized by, The method comprises: determining a plurality of target annotation points according to a plurality of target positions of a cursor in a target map; wherein, for each target position, a target annotation point corresponding to the target position is determined according to the target position and point-line information of a drawn block in the target map; for each two adjacent target annotation points in the plurality of target annotation points, determining a boundary line segment corresponding to the two adjacent target annotation points; generating a target block corresponding to the plurality of target annotation points in the target map according to a plurality of boundary line segments corresponding to the plurality of target annotation points; the point-line information of the drawn block comprises vertex information and boundary information in the drawn block; and the target annotation point corresponding to the target position is determined according to the point-line information of the drawn block in the target map, comprising: if the distance between the target position and a vertex of a drawn block in the target map satisfies a preset distance condition, the vertex is taken as the target annotation point corresponding to the target position; if the distance between the target position and a boundary of a drawn block in the target map satisfies the preset distance condition, a mapping point on the boundary corresponding to the target position is determined according to the position information of the target position and the boundary, and the mapping point is taken as the target annotation point corresponding to the target position; if none of the vertices or boundaries of all the drawn blocks in the target map has a distance to the target position satisfying the preset distance condition, the target position does not need to be adjusted, and the target position can be taken as the position of the corresponding target annotation point; for each two adjacent target annotation points in the plurality of target annotation points, if the two adjacent target annotation points are located on the same drawn block, a shortest boundary line segment between the two adjacent target annotation points is determined on the drawn block, and the shortest boundary line segment is taken as the boundary line segment corresponding to the two adjacent target annotation points; or for each two adjacent target annotation points in the plurality of target annotation points, if the two adjacent target annotation points are located on a first drawn block and a second drawn block respectively, the first drawn block and the second drawn block are merged into a drawn block, a shortest boundary line segment between the two adjacent target annotation points is determined on the drawn block, and the shortest boundary line segment is taken as the boundary line segment corresponding to the two adjacent target annotation points; wherein, a second target focus point with a time of acquisition earlier than and closest to the time of acquisition of a first target focus point is a target focus point adjacent to the first target focus point. The target position is a position where the cursor stays for a time satisfying a preset time length in the target map, or the target position is a position where the cursor stays when a first preset operation is detected in the target map.

2. The method of claim 1, wherein, ​ 3. The method of claim 1, wherein, The preset distance condition is that the vertex or the boundary is a vertex or a boundary of all drawn tiles with the minimum distance to the target position, and the distance between the vertex or the boundary and the target position is less than a preset threshold.

4. The method of claim 1, wherein, The position information of the boundary includes position information of two end points of the boundary; and the determining of the mapping point corresponding to the target position on the boundary according to the target position and the position information of the boundary, and the taking of the mapping point as the target marking point corresponding to the target position, comprises: determining a mapping position of the target position on the boundary according to the target position and the position information of the two end points of the boundary, and taking a point corresponding to the mapping position as the mapping point corresponding to the target position; and taking the mapping point as the target marking point corresponding to the target position.

5. The method of claim 1, wherein, The generating of the target tile corresponding to the plurality of target marking points in the target map according to the plurality of boundary line segments corresponding to the plurality of target marking points, comprises: if a start target marking point and an end target marking point in the plurality of target marking points coincide, or a preset operation for the end target marking point is detected, then the plurality of boundary line segments corresponding to the plurality of target marking points are sequentially connected to generate the target tile corresponding to the plurality of target marking points in the target map.

6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: receiving a moving instruction for a vertex in the target tile; wherein the moving instruction includes a target moving position corresponding to the vertex, and the vertex is a common vertex of the target tile and a drawn tile; in response to the moving instruction, moving the vertex to the target moving position; and adjusting positions of boundaries with the vertex as an end point in the target tile and the drawn tile according to the target moving position to obtain an adjusted target tile and an adjusted drawn tile.

7. A map-based mapping apparatus characterized by comprising: The device comprises: a marking point determination module configured to determine a plurality of target marking points according to a plurality of target positions of a cursor in a target map; wherein for each target position, a target marking point corresponding to the target position is determined according to the target position and point line information of a drawn tile in the target map; a line segment determination module configured to determine, for each two adjacent target marking points in the plurality of target marking points, a boundary line segment corresponding to the two adjacent target marking points; a tile generation module configured to generate a target tile corresponding to the plurality of target marking points in the target map according to a plurality of boundary line segments corresponding to the plurality of target marking points. The point-line information of the drawn tile includes vertex information and boundary information in the drawn tile; the target position determining module is specifically configured to: if a distance between the target position and a vertex of a drawn tile in the target map meets a preset distance condition, the vertex is taken as a target target annotation point corresponding to the target position; if a distance between the target position and a boundary of a drawn tile in the target map meets the preset distance condition, a mapping point on the boundary corresponding to the target position is determined according to position information of the target position and the boundary, and the mapping point is taken as a target target annotation point corresponding to the target position; if none of all drawn tiles of the target map has a vertex or a boundary meeting the preset distance condition with the target position, the target position does not need to be adjusted, and the target position can be taken as a position of a target target annotation point corresponding to the target position. The line segment determining module is specifically configured to: for each two adjacent target annotation points in the plurality of target annotation points, if the two adjacent target annotation points are located on a same drawn tile, a shortest boundary line segment between the two adjacent target annotation points on the drawn tile is determined; and the shortest boundary line segment is taken as a boundary line segment corresponding to the two adjacent target annotation points; or for each two adjacent target annotation points in the plurality of target annotation points, if the two adjacent target annotation points are located on a first drawn tile and a second drawn tile respectively, the first drawn tile and the second drawn tile are merged into a drawn tile; a shortest boundary line segment between the two adjacent target annotation points on the drawn tile is determined; and the shortest boundary line segment is taken as a boundary line segment corresponding to the two adjacent target annotation points; wherein a second target attention point obtained earlier than a first target attention point and closest to the first target attention point in time is a target attention point adjacent to the first target attention point.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Polygon accurate drawing method based on electronic map and application method thereof

    CN106652756A