Map processing method and device, electronic equipment, program product and storage medium

CN115422476BActive Publication Date: 2026-10-30ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210957716.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2026-10-30
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

然而,随着用户的个性化需求越来越多,例如,用户需要根据地图标记位置、自定义路线或划定区域等,地图客户端已有的功能难以满足用户的需求

Benefits of technology

[0014]本说明书实施例中,地图客户端响应于自定义地图的绘制请求,获取需绘制的地图元素的目标类型以及获取用户指定的至少一个目标位置点的信息;触发与所述目标类型对应的预设绘制流程,以在地图中基于所述至少一个目标位置点的信息绘制所述目标类型的地图元素;因此向用户提供了自定义地图的功能,该功能中用户只需要指定目标位置点的信息,即可通过多种类型的预设绘制流程在地图中绘制多种类型的地图元素,使得用户能够方便地绘制所需的自定义地图。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115422476B_ABST
    Figure CN115422476B_ABST
Patent Text Reader

Abstract

The present specification provides a map processing method, device, electronic equipment, program product and storage medium. The method is applied to a map client, and includes: in response to a drawing request of a custom map, obtaining a target type of a map element to be drawn and information of at least one target position point specified by a user; triggering a preset drawing process corresponding to the target type to draw the map element of the target type in the map based on the information of the at least one target position point. The embodiment provides a function of customizing a map for the user. In the function, the user only needs to specify the information of the target position point, and can draw various types of map elements in the map through various types of preset drawing processes, so that the user can conveniently draw a required custom map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of map technology, and in particular to map processing methods, apparatus, electronic devices, program products and storage media. Background Technology

[0002] Currently, map clients are used more and more widely, bringing many conveniences to people's lives. Most map clients' main services include map navigation, map rendering, route planning, and geographic information search. However, as users' personalized needs increase—for example, users need to mark locations on maps, customize routes, or delineate areas—the existing functions of map clients are insufficient to meet these needs. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this specification provides map processing methods, apparatus, electronic devices, program products, and storage media.

[0004] According to a first aspect of the embodiments of this specification, a map processing method is provided, the method being applied to a map client, the method comprising:

[0005] In response to a custom map drawing request, obtain the target type of the map elements to be drawn and information on at least one target location point specified by the user;

[0006] Trigger a preset drawing process corresponding to the target type to draw map elements of the target type on the map based on information from at least one target location point.

[0007] According to a second aspect of the embodiments of this specification, a map processing apparatus is provided, comprising:

[0008] The acquisition module is used to: in response to a drawing request for a custom map, acquire the target type of the map element to be drawn and acquire information about at least one target location point specified by the user;

[0009] The drawing module is used to: trigger a preset drawing process corresponding to the target type, so as to draw map elements of the target type in the map based on the information of the at least one target location point.

[0010] According to a third aspect of the embodiments of this specification, a computer device is provided, 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 embodiments described in the first aspect above.

[0011] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method embodiments described in the first aspect above.

[0012] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method embodiments described in the first aspect above.

[0013] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:

[0014] In this embodiment of the specification, the map client responds to a custom map drawing request by obtaining the target type of the map element to be drawn and information about at least one target location point specified by the user; it triggers a preset drawing process corresponding to the target type to draw the map element of the target type in the map based on the information of the at least one target location point; thus, it provides the user with a custom map function, in which the user only needs to specify the information of the target location point to draw various types of map elements in the map through various preset drawing processes, enabling the user to easily draw the custom map they need.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0017] Figure 1 This is a flowchart illustrating a map processing method according to an exemplary embodiment of this specification.

[0018] Figures 2A to 2D These are schematic diagrams illustrating a map client according to an exemplary embodiment of this specification.

[0019] Figure 3 This is a hardware structure diagram of a computer device containing a map processing apparatus, as illustrated in this specification according to an exemplary embodiment.

[0020] Figure 4 This is a block diagram illustrating a map processing apparatus according to an exemplary embodiment. Detailed Implementation

[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0022] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0023] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0024] While existing map clients offer many functions, they still struggle to meet the personalized needs of some users. For example, users may want to draw custom map elements on top of electronic maps, such as marking locations, drawing routes, or creating polygons, but existing clients only provide location marking. The inventors discovered that users have a need for customized maps in many scenarios; for instance, some users want to draw custom cycling routes on the map displayed by the map client, while others want to draw custom areas. Based on this, embodiments of this specification provide a map processing solution that offers users a convenient function for drawing map elements, satisfying their need for customized maps. The embodiments of this specification will now be described in detail.

[0025] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a map processing method according to an exemplary embodiment of this specification. The map processing method can be applied to a map client, and the method includes the following steps:

[0026] In step 102, in response to the drawing request of the custom map, the target type of the map element to be drawn and the information of at least one target location point specified by the user are obtained.

[0027] In step 104, a preset drawing process corresponding to the target type is triggered to draw map elements of the target type on the map based on the information of the at least one target location point.

[0028] The map processing method of this embodiment can be applied to a map client installed on an electronic device. When a user launches the map client, it can provide the user with a custom map drawing function. For example, regarding the custom map drawing request, the map client can display a trigger object to detect whether the user has initiated a custom map drawing request. This trigger object can be flexibly implemented according to actual needs; for example, it can be a control displayed on the map client's page. This embodiment does not limit this. For example, such as... Figure 2A The diagram shown is a schematic of a map client according to an exemplary embodiment of this specification. The diagram shows a "custom map" control that can be triggered by the user. When the client detects that the user has triggered the control, it can determine that it has obtained a drawing request for a user-defined map.

[0029] Map elements can be of various types, such as points, lines, polygons, or administrative regions, and this embodiment does not limit this. There are multiple ways to obtain the target type of the map element to be drawn. For example, the drawing request can carry the target type of the map element to be drawn. Alternatively, the client can provide an input function for map elements of the target type, which can include text editing, voice input, etc.

[0030] As an example, obtaining the target type of the map element to be drawn includes: displaying multiple drawing objects for user triggering, each drawing object corresponding to a type of map element; the type of the map element includes: point, line, polygon, or administrative region; and determining the target type of the map element to be drawn in response to the target drawing object being triggered. In this embodiment, the map client can provide a drawing object for each type of map element, which can be triggered by the user, allowing the user to easily initiate a request to draw map elements and also easily input the type of map element to be drawn. For example, as shown... Figure 2B The diagram shown is a schematic representation of a map client according to an exemplary embodiment of this specification. The diagram illustrates four types of map element drawing objects: "Mark Location," "Draw Line," "Draw Polygon," and "Draw Administrative Region." Taking the user clicking on the "Draw Polygon" drawing object as an example, the client can determine that the user has initiated a "Draw Polygon" drawing request and that the target type of the map element to be drawn is a polygon.

[0031] In this embodiment, any type of map element only requires the user to input location information; no further drawing operations are required from the user. Instead, the map is automatically drawn by the client using a preset drawing process. In practical applications, there are multiple ways to obtain information about at least one target location point specified by the user. This target location point information includes geographic location information, such as longitude and latitude. It may also include other information, such as descriptive information, which may include the name of the target location point, its color information, or style information, etc. The method for obtaining the descriptive information can be the same as or different from the method for obtaining the geographic location information.

[0032] For example, the center point of the electronic device screen is obtained, and based on the center point and the currently displayed map, information about the user-specified target location is determined. For instance, a map client runs on the electronic device. When the user launches the map client, it can display a map, for example, based on the current geographical location information collected by the electronic device. The map in the map client is displayed on the electronic device screen, and the center point of the screen can be set to the user-specified target location. This allows the user to perform a simple drag operation on the screen, and the map client can determine the user-specified target location as the location point on the map corresponding to the center point. Therefore, based on the currently displayed map, information about the user-specified target location, such as its geographical location, can be obtained. For example, such as... Figure 2C The diagram shown is a schematic of a map client according to an exemplary embodiment of this specification. After the user drags the map to select the desired target location point A, the user can drag the map to select the desired target location point B. If the user triggers the completion operation, the client of this embodiment can draw a line from the target location point A to the target location point B.

[0033] For example, in response to a location information editing request, information on one or more target location points input by the user can be obtained; the client can also provide location information editing functions, such as a text editing control that allows the user to input information on one or more target location points, including geographic location information or descriptive information, etc.

[0034] For example, in response to a location point information upload request, the system retrieves the file uploaded by the user and identifies information about one or more target location points specified by the user from the data. For instance, the user can upload data according to the data format requirements of the map client, such as an Excel file. The user can pre-input multiple target location points in the file, and the map client can automatically identify the information of multiple target location points from the file, thus facilitating user operation.

[0035] In this embodiment, at least one drawing process can be pre-configured. The input to the drawing process includes information about the target location point. The client draws the map elements of the target type required by the user on the map through the preset drawing process, without requiring the user to perform any drawing operation. In some examples, the preset drawing process may include any of the following: a first drawing process for drawing points, a second drawing process for drawing lines, or a third drawing process for drawing polygons. As an example, the above three drawing processes represent three basic drawing capabilities provided by the client, which can be pre-encapsulated. When the user uses the client, the drawing can be automatically performed by calling the process based on the target location point information specified by the user.

[0036] In practical applications, users' drawing needs on maps typically include drawing points, lines, or polygons. Based on this, the three preset drawing processes described in this embodiment can meet users' drawing needs. For example, when drawing on the displayed map, the preset drawing processes can draw the map elements required by the user in the map layer, or create a new layer above the map layer and draw the map elements required by the user in the new layer, among other methods.

[0037] For example, triggering a preset drawing process corresponding to the target type to draw map elements of the target type in the map based on information from the at least one target location point includes any of the following:

[0038] (1) If the target type of the map element to be drawn is a point, the first drawing process is triggered to draw the target location points on the map based on the information of each target location point. For example, for one or more points that the user wants to draw, the first drawing process can be triggered to draw them. In some examples, when the user specifies a target location point, the information of the currently specified target location point is used as the input parameter of the first drawing process, and the first drawing process draws a point based on the information of the input location point. In other examples, such as when the user uploads data, the client can identify the information of multiple target location points from the data, and can use the information of all points as the input of the first drawing process, call the first drawing process once, and the first drawing process draws multiple points on the map at the same time; or, as needed, the number of calls can be the same as the number of points. Of course, it is also optional that the number of calls does not correspond to the number of points. For example, the number of location points input when calling the first drawing process once can be arbitrary.

[0039] (2) If the target type of the map element to be drawn is a line, the first drawing process is triggered to draw the target location points on the map based on the information of each target location point, and the second drawing process is triggered to draw the line segment between two adjacent target location points on the map based on the information of each target location point. In this embodiment, the line type map element includes a continuous line composed of one or more different line segments.

[0040] For example, to draw a line-type map element, a user can specify target point A, and then specify another target point B (located differently from A). The line connecting A and B constitutes a line-type map element. Alternatively, a user can specify multiple different target points such as A, B, and C at once; the lines connecting these target points in the user-specified order constitute a line-type map element.

[0041] As mentioned earlier, when there are multiple target location points, the number of times the first drawing process is called can be arbitrary, and similarly, the number of times the second drawing process is called can also be arbitrary. Furthermore, in practical applications, the steps that trigger the first drawing process and the steps that trigger the second drawing process can be performed in parallel, or, if not, their order can be configured as needed. For example, alternating execution is also optional. For instance, taking three target location points A, B, and C as an example, it could be that the first drawing process is called to draw the three points, then the second drawing process is called to draw the line segment between A and B, and then the second drawing process is called to draw the line segment between B and C; or it could be that the first drawing process is called to draw A and B, then the second drawing process is called to draw the line segment between A and B, then the first drawing process is called to draw point C, and then the second drawing process is called to draw the line segment between B and C, and so on. This embodiment does not limit this.

[0042] In this embodiment, for drawing line-type map elements, the user only needs to specify the target location point. The drawing process involves triggering both a first drawing process and a second drawing process. For the user-specified target location point, as in the previous embodiment, the first drawing process is used; while the line segments between points are drawn by the second drawing process. Therefore, the user's drawing operation is very simple; they only need to specify the target location point, and the map client will automatically draw the line.

[0043] (3) If the target type of the map element to be drawn is a polygon, the first drawing process is triggered to draw the target location points on the map based on the information of each target location point, and the second drawing process is triggered to draw the line segment between two adjacent target location points on the map based on the information of each target location point, and the third drawing process is triggered to draw the polygon formed by each target location point on the map based on the information of each target location point. For example, for a map element of type polygon that a user wants to draw, the user can specify at least three target location points in different locations, and the first drawing process, the second drawing process, and the third drawing process are triggered during drawing. For the target location points specified by the user, as in the aforementioned embodiment, the first drawing process is used to draw them; the line segment between the points is drawn by the second drawing process; and the polygon formed by the points is drawn by the third drawing process.

[0044] For example, such as Figure 2D The diagram shown is a schematic representation of a map client according to an exemplary embodiment of this specification, illustrating a surface drawn after the user specifies three target location points. The steps of triggering the first drawing process, the second drawing process, and the third drawing process can be performed in parallel in practical applications, or, if not executed in parallel, their order can be configured as needed. This embodiment does not limit this.

[0045] (4) If the target type of the map element to be drawn is an administrative region, after obtaining the information of all boundary points corresponding to the administrative region based on the information of at least one target location point, the third drawing process is triggered to draw polygons formed by each boundary point on the map based on the information of all boundary points corresponding to the administrative region. In this embodiment, an administrative region is a special type of surface, provided to account for the potential need for users to draw administrative regions in practical applications. Its drawing process can refer to the drawing process of the aforementioned surface-type map elements. The information of all boundary points corresponding to the administrative region can be obtained by searching the map, or by the server obtaining the information of all boundary points after the client sends a request to the server based on the information of the target location point. During the acquisition, the administrative region to which the target location point belongs can be determined based on the geographical location information of the target location point, and the information of all boundary points constituting that administrative region can be obtained from the map data.

[0046] In some cases, the user may need to draw multiple map elements. In order to facilitate the management of the user's map elements, in this embodiment, after the target drawing object is triggered, the method further includes: creating a storage object to store information of at least one target location point specified by the user.

[0047] For example, when a user triggers a request to draw a map element, a map element consists of one or more target location points. Based on this, this embodiment stores the target location point information of each map element through a storage object. For example, one map element corresponds to one storage object. The storage object may include an array or a queue; this embodiment does not limit this. Based on this, each map element that the user wants to draw can be stored using this storage object. Optionally, this storage object can be sent to the server or stored locally on the client. When the user uses the map client again later, they can read the target location points stored in each of the one or more stored objects to display the user's custom map.

[0048] In some examples, the storage object can also ensure the accuracy of map element drawing when the user specifies a target location. As an example, storing information about at least one target location specified by the user in the storage object may include:

[0049] In response to obtaining information about the current target location point specified by the user, it is determined whether the information about the current target location point has already been stored in the storage object. Based on the determination result, it is decided whether to store the information about the current target location point in the storage object. For example, if the information about the current target location point specified by the user is the same as the information about a location point already stored in the storage object, the user can be prompted that it cannot be added. In this embodiment, the drawing of various map elements depends on the target location point specified by the user. When drawing each type of map element, the geographical location information of the various target location points constituting that map element is different. In practical applications, when a user enters target location points sequentially in the map client, due to operational errors, the same target location point may be entered when requesting the drawing of a map element. Therefore, this embodiment can prevent users from entering the same target location point through the above-mentioned determination process.

[0050] In other examples, the method of this embodiment may also include any of the following judgment steps to further improve drawing efficiency.

[0051] For example, it can be determined whether the distance between two adjacent target locations is greater than a preset threshold; for instance, it can be determined whether the distance between the two points is less than a preset threshold. This preset threshold can be flexibly configured as needed, such as any value like 5 meters. When the distance is small, the drawn line segment is small, and the display efficiency of this line segment on the client is poor. Based on this, it can be set that additions cannot be made if the distance is less than 5 meters, and can be made if the distance is greater than 5 meters. For example, when the distance is less than the preset threshold, the map client can output a prompt message, such as prompting the user that additions cannot be made. This embodiment does not limit this.

[0052] For example, if the target type of the map element to be drawn is a line, it is determined whether the storage object stores at least two target location points. In this embodiment, it is considered that two points at different locations constitute a line segment. If the user triggers the drawing of a line-type map element but only inputs one target location point, the drawing cannot be completed. This embodiment can prompt the user to input an accurate target location point through the above determination step.

[0053] For example, if the target type of the map element to be drawn is a polygon, it is determined whether the storage object contains at least three target location points. In this embodiment, it is considered that a polygon needs to be composed of at least three points at different locations. If the user triggers the drawing of a map element of the polygon type but does not input three target location points, the drawing cannot be completed. This embodiment can prompt the user to input accurate target location points through the above judgment steps.

[0054] For example, if the target type of the map element to be drawn is a polygon, the system determines whether the polygon to be drawn has self-intersections based on the information of each target location point stored in the storage object. In this embodiment, self-intersection means that the line segment between the user's currently input point and the previous point intersects with other points already stored in the storage object. This situation also indicates a user input error. This embodiment can prompt the user to input accurate target location points through the above judgment steps.

[0055] In some examples, the map client also provides an undo function when a user enters a target location, allowing the user to cancel the entered target location. For instance, the map client can display a trigger object that the user can activate. Upon activation of this trigger object, an undo request is confirmed. In response to this undo request, the information of the last target location stored in the storage object can be removed, and the point or line segment corresponding to the information of the last target location can be removed from the map.

[0056] In some examples, to improve the rendering effect and meet more user needs, the preset rendering process in this embodiment may further include: a fourth rendering process for rendering descriptive information of location points; the method further includes: obtaining the descriptive information of the target location point input by the user, triggering the fourth rendering process, and rendering the descriptive information of the target location point on the map based on the descriptive information of the target location point; the descriptive information includes: the name of the target location point, the color information or style information of the target location point. One or more of the above descriptive information can be used as input to the fourth rendering process. By calling this fourth rendering process, more information can be rendered on the map to meet more user needs.

[0057] The following example will illustrate the point.

[0058] Some existing map clients support cross-platform development for mobile devices. Map client developers provide basic drawing capabilities, such as the ability to draw points, lines, polygons, and descriptive information (DeepInfo). The map client in this embodiment can encapsulate the above-mentioned basic drawing capabilities, thereby providing a set of drawing tools in the client, allowing users to draw custom lines, polygons, or administrative regions on the map.

[0059] For example, the map client in this embodiment provides a custom map function. Exemplarily, the map client can display three drawing objects: lines, polygons, and administrative regions. The processing of each type of map element includes creation and consumption. Creation refers to the process of a user creating a line, polygon, or administrative region; consumption refers to the process of drawing a complete line, polygon, or administrative region. Optionally, the consumption process may also include other functions such as focusing or panoramic views. The focusing function can be a selection function provided by the client, allowing the user to select a target location point within the map element. In response to the selected target location point, the client can display information about that target location point, such as its geographical location or name. The panoramic view function can be achieved by the client determining the display scale based on the size of the geographical area covered by the map element and the screen size of the electronic device, ensuring that the entire map element is displayed on the screen.

[0060] In this embodiment, the preset drawing process, namely the basic drawing capability mentioned above, may include a first drawing process for drawing points, a second drawing process for drawing lines, a third drawing process for drawing polygons, a fourth drawing process for drawing descriptive information of position points, etc.

[0061] Specifically, drawing lines can be achieved through the drawing capabilities of points, lines, and descriptive information; drawing surfaces can be achieved through the drawing capabilities of points, lines, polygons, and descriptive information; and drawing administrative regions can be achieved through descriptive information and the aforementioned process of drawing surfaces.

[0062] (1) Taking drawing a line as an example, the process includes the following two steps:

[0063] ① Production process, which is the process of creating line-type map elements, allows users to perform the following operations.

[0064] Fixed-point operation: Users can drag the map, using the center point of the screen as the target location for drawing. The map client obtains the geographical location information of the screen center point in the currently displayed map and creates an array to correspond to the lines that the user needs to draw.

[0065] For example, if it is the first target location point, it is added to the array; at the same time, the first drawing process is triggered to draw the first point on the map;

[0066] If it is not the first point, then the system uses the information already stored in the array to determine whether the current point is the same as the previous point specified by the user stored in the array; if it is, the system prompts the user that it cannot be added; otherwise, the system adds the point to the array.

[0067] Undo operation: In response to a user's undo request, it can check whether the target location point is stored in the array. If not, it can prompt that the undo is invalid; if it is, it can remove the last target location point from the array, and can also remove the last point and line from the map.

[0068] Complete Operation: In response to the user triggering a complete operation, confirm that the user has completed the input of the target location point. The number of points can be determined based on the array. If there are fewer than two points, the user is prompted that completion is not possible. If there are two points, the distance between the two points is checked against a preset threshold, such as 5 meters. If less, completion is not possible; if greater than 5 meters or more than two points, completion is possible. Optionally, descriptive information such as names of one or more target location points can be retrieved. The latitude and longitude of all points in the array, along with the names and descriptive information of one or more target location points, can be used to trigger subsequent drawing processes.

[0069] ② Consumption process, i.e. drawing process, can be done by drawing lines on the displayed map.

[0070] During the drawing process, the first drawing process can draw each point, and the second drawing process can draw the line segment between two adjacent target location points. Optionally, the fourth drawing process can draw the lines, points, and bubbles as a whole based on the latitude and longitude information of all points, title, color, and collapsed state information (only displaying the bubble and the first point). In addition, it can also provide users with functions such as focusing, defocusing, click events, showing, hiding, removing the entire graphic, and panoramic view.

[0071] (2) Taking the drawing of a surface as an example, the processing includes the following two steps:

[0072] ① Production process, which is the process of creating map elements of the polygon type, allows users to perform the following operations.

[0073] Fixed-point operation: Users can drag the map, using the center point of the screen as the target location for drawing. The map client obtains the geographical location information of the screen center point within the currently displayed map and creates an array corresponding to the area the user needs to draw.

[0074] For example, if it is the first target location point, it is added to the array; at the same time, the first drawing process is triggered to draw the first point on the map;

[0075] If it's not the first point, the system uses the information stored in the array to determine if the current point is the same as the previous point specified by the user. If they are, the system prompts the user that the point cannot be added; otherwise, it adds the point to the array. Simultaneously, it checks if the shape to be drawn intersects itself, i.e., whether the line segments of the current point and the previous point intersect with other points. If not, the system adds the point to the array and redraws the entire shape; otherwise, it prompts the user that the point cannot be added.

[0076] Undo operation: In response to a user's undo request, it can check whether the target location point is stored in the array. If not, it can prompt that the undo is invalid; if it is, it can remove the last target location point from the array, and can also remove the last point and line from the map.

[0077] Complete Operation: In response to the user triggering a complete operation, confirm that the user has completed the input of the target location point. The number of points can be determined based on the array. If there are fewer than two points, the user is prompted that completion is not possible. If there are two points, the distance between the two points is checked against a preset threshold, such as 5 meters. If less, completion is not possible; if greater than 5 meters or more than two points, completion is possible. Optionally, descriptive information such as names of one or more target location points can be retrieved. The latitude and longitude of all points in the array, along with the names and descriptive information of one or more target location points, can be used to trigger subsequent drawing processes.

[0078] ② Consumption process, i.e. drawing process, can be drawn on the displayed map.

[0079] During the drawing process, the system can draw surfaces, lines, points, and bubbles as a whole based on the latitude and longitude information of all points, titles, colors, and collapsed state information (only showing bubbles and the first point). Furthermore, it can provide users with functions such as focusing, defocusing, click events, showing, hiding, removing the entire graphic, and panoramic view.

[0080] (3) Taking the drawing of administrative regions as an example, the process includes the following two steps:

[0081] When drawing administrative regions: the production and consumption processes are consistent; only the bubble titles differ.

[0082] The administrative area is drawn based on the consumption process of drawing faces. An administrative area consists of one or more faces plus a bubble. Faces are drawn by providing row point data externally, and a bubble is drawn at the center point of the administrative area. The color, collapsed state, and click events of the administrative area can be configured. Externally, it provides functions such as focus, defocus, click events, showing, hiding, removing the entire graphic, and panoramic view.

[0083] As can be seen from the above embodiments, the map client encapsulates a set of drawing tools. Users only need to specify the information of the target location point to draw various types of map elements on the map through various preset drawing processes, enabling users to easily draw the custom maps they need.

[0084] Corresponding to the embodiments of the aforementioned map processing methods, this specification also provides embodiments of map processing apparatus and electronic devices used therein.

[0085] The embodiments of the map processing device described in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by a processor that processes the file, loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 3 The diagram shown is a hardware structure diagram of a computer device containing the map processing apparatus described in this specification. (Except for...) Figure 3 In addition to the processor 310, memory 330, network interface 320, and non-volatile memory 340 shown, the computer device in which the map processing device 331 is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.

[0086] like Figure 4 As shown, Figure 4 This is a block diagram illustrating a map processing apparatus according to an exemplary embodiment of the present specification, the apparatus comprising:

[0087] The acquisition module 41 is used to: in response to a drawing request for a custom map, acquire the target type of the map element to be drawn and acquire information on at least one target location point specified by the user;

[0088] The drawing module 42 is used to: trigger a preset drawing process corresponding to the target type, so as to draw map elements of the target type in the map based on the information of the at least one target location point.

[0089] In some examples, the target type for obtaining the map elements to be drawn includes:

[0090] Display multiple drawing objects for user triggering, each drawing object corresponding to a type of map element; the types of map elements include: points, lines, polygons, or administrative regions;

[0091] In response to the target drawing object being triggered, determine the target type of the map element to be drawn.

[0092] In some examples, obtaining information about at least one target location point specified by the user includes:

[0093] Obtain the center point position of the screen of the electronic device, and determine the information of the target location point specified by the user based on the center point position of the screen and the currently displayed map;

[0094] In response to a location information editing request, obtain information about one or more target location points input by the user; or,

[0095] In response to a location information upload request, the system retrieves the file uploaded by the user and identifies information about one or more target location points specified by the user from the file.

[0096] In some examples, the preset drawing process includes any of the following: a first drawing process for drawing points, a second drawing process for drawing lines, or a third drawing process for drawing polygons;

[0097] The step of triggering a preset drawing process corresponding to the target type based on the information of the target location point includes any one of the following:

[0098] If the target type of the map element to be drawn is a point, the first drawing process is triggered to draw the target location points on the map based on the information of each target location point;

[0099] If the target type of the map element to be drawn is a line, the first drawing process is triggered to draw the target location points in the map based on the information of each target location point, and the second drawing process is triggered to draw the line segment between two adjacent target location points in the map based on the information of each target location point.

[0100] If the target type of the map element to be drawn is a polygon, the first drawing process is triggered to draw the target location points on the map based on the information of each target location point; the second drawing process is triggered to draw the line segment between two adjacent target location points on the map based on the information of each target location point; and the third drawing process is triggered to draw the polygon formed by each target location point on the map based on the information of each target location point; or,

[0101] If the target type of the map element to be drawn is an administrative region, after obtaining the information of all boundary points corresponding to the administrative region based on the information of the at least one target location point, the third drawing process is triggered to draw polygons formed by each boundary point on the map based on the information of all boundary points corresponding to the administrative region.

[0102] In some examples, the method further includes, after the response to the target drawing object being triggered:

[0103] Create a storage object to store information about at least one target location point specified by the user.

[0104] In some examples, storing information about at least one target location point specified by the user in the storage object includes:

[0105] In response to obtaining information about the current target location point specified by the user, it is determined whether the information about the current target location point has been stored in the storage object, and based on the determination result, it is determined whether to store the information about the current target location point in the storage object.

[0106] In some examples, the method further includes any of the following:

[0107] Determine whether the distance between two adjacent target locations is greater than a preset threshold;

[0108] If the target type of the map element to be drawn is a line, determine whether the storage object stores at least two target location points;

[0109] If the target type of the map element to be drawn is a polygon, determine whether the storage object stores at least three target location points; or,

[0110] If the target type of the map element to be drawn is a polygon, determine whether the polygon to be drawn has self-intersection based on the information of each target location point stored in the storage object.

[0111] In some examples, the method further includes any of the following:

[0112] In response to a revocation request, the information of the last target location point stored in the storage object is removed, and the point or line segment corresponding to the information of the last target location point is removed from the map.

[0113] In some examples, the preset drawing process further includes: a fourth drawing process for drawing descriptive information of location points; the method further includes:

[0114] The user inputs a description of the target location, triggering the fourth drawing process to draw the description of the target location on the map based on the description of the target location. The description includes: the name of the target location, and the color or style information of the target location.

[0115] The specific implementation process of the functions and roles of each module in the above-mentioned map processing device can be found in the implementation process of the corresponding steps in the above-mentioned map processing method, and will not be repeated here.

[0116] Accordingly, this specification also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned map processing method embodiments.

[0117] Accordingly, embodiments of this specification also provide 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 program to implement the steps of the map processing method embodiments.

[0118] Accordingly, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the map processing method embodiments.

[0119] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, 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 the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0120] The map processing method is applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. The hardware of the electronic device includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0121] The electronic device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.

[0122] The electronic device may also include network devices and / or user devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0123] The networks in which the electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).

[0124] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0125] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0126] The terms "specific example" or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with the embodiments or examples, which are included in at least one embodiment or example of this specification. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0127] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.

[0128] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.

[0129] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A map processing method, the method being applied to a map client, the method comprising: In response to a custom map drawing request, obtain the target type of the map elements to be drawn and information on at least one target location point specified by the user; Trigger a preset drawing process corresponding to the target type to draw map elements of the target type in the map based on the information of the at least one target location point. The target type includes points, lines, or polygons. The preset drawing process includes any one of the following: a first drawing process for drawing points, a second drawing process for drawing lines, or a third drawing process for drawing polygons. The triggering of a preset drawing process corresponding to the target type, to draw map elements of the target type on the map based on information from at least one target location point, includes any one of the following: If the target type of the map element to be drawn is a point, the first drawing process is triggered to draw each target location point in the map based on the information of each target location point; If the target type of the map element to be drawn is a line, the first drawing process is triggered to draw each target location point in the map based on the information of each target location point, and the second drawing process is triggered to draw a line segment between two adjacent target location points in the map based on the information of each target location point. If the target type of the map element to be drawn is a polygon, the first drawing process is triggered to draw each target location point on the map based on the information of each target location point; the second drawing process is triggered to draw a line segment between two adjacent target location points on the map based on the information of each target location point; and the third drawing process is triggered to draw a polygon formed by each target location point on the map based on the information of each target location point; or, If the target type of the map element to be drawn is an administrative region, after obtaining the information of all boundary points corresponding to the administrative region based on the information of the at least one target location point, the third drawing process is triggered to draw polygons formed by each boundary point on the map based on the information of all boundary points corresponding to the administrative region.

2. The method according to claim 1, wherein obtaining the target type of the map element to be drawn includes: Display multiple drawing objects for users to trigger, each drawing object corresponding to a type of map element; The types of map elements include: points, lines, polygons, or administrative regions; In response to the target drawing object being triggered, determine the target type of the map element to be drawn.

3. The method according to claim 1 or 2, wherein obtaining information about at least one target location point specified by the user includes: Obtain the center point position of the screen of the electronic device, and determine the information of the target location point specified by the user based on the center point position of the screen and the currently displayed map; In response to a location information editing request, obtain information about one or more target location points input by the user; or, In response to a location information upload request, the system retrieves the file uploaded by the user and identifies information about one or more target location points specified by the user from the file.

4. The method according to claim 2, wherein after the response to the target drawing object being triggered, the method further comprises: Create a storage object to store information about at least one target location point specified by the user.

5. The method according to claim 4, wherein storing information about at least one target location point specified by the user in the storage object comprises: In response to obtaining information about the current target location point specified by the user, it is determined whether the information about the current target location point has been stored in the storage object, and based on the determination result, it is determined whether to store the information about the current target location point in the storage object.

6. The method according to claim 5, further comprising any one of the following: Determine whether the distance between two adjacent target locations is greater than a preset threshold; If the target type of the map element to be drawn is a line, determine whether the storage object stores at least two target location points; If the target type of the map element to be drawn is a polygon, determine whether the storage object stores at least three target location points; or, If the target type of the map element to be drawn is a polygon, determine whether the polygon to be drawn has self-intersection based on the information of each target location point stored in the storage object.

7. The method according to claim 4, further comprising any one of the following: In response to a revocation request, the information of the last target location point stored in the storage object is removed, and the point or line segment corresponding to the information of the last target location point is removed from the map.

8. The method according to claim 1, wherein the preset drawing process further includes: The fourth drawing process is used to draw descriptive information about location points; The method further includes: The user inputs a description of the target location, triggering the fourth drawing process to draw the description of the target location on the map based on the description of the target location. The description includes: the name of the target location, and the color or style information of the target location.

9. A map processing apparatus, the apparatus comprising: The acquisition module is used to: in response to a drawing request for a custom map, acquire the target type of the map element to be drawn and acquire information about at least one target location point specified by the user; A drawing module is configured to: trigger a preset drawing process corresponding to the target type, so as to draw map elements of the target type in the map based on the information of the at least one target location point, wherein the target type includes points, lines or polygons, and the preset drawing process includes any one of the following: a first drawing process for drawing points, a second drawing process for drawing lines or a third drawing process for drawing polygons; The triggering of a preset drawing process corresponding to the target type, to draw map elements of the target type on the map based on information from at least one target location point, includes any one of the following: If the target type of the map element to be drawn is a point, the first drawing process is triggered to draw each target location point in the map based on the information of each target location point; If the target type of the map element to be drawn is a line, the first drawing process is triggered to draw each target location point in the map based on the information of each target location point, and the second drawing process is triggered to draw a line segment between two adjacent target location points in the map based on the information of each target location point. If the target type of the map element to be drawn is a polygon, the first drawing process is triggered to draw each target location point on the map based on the information of each target location point; the second drawing process is triggered to draw a line segment between two adjacent target location points on the map based on the information of each target location point; and the third drawing process is triggered to draw a polygon formed by each target location point on the map based on the information of each target location point; or, If the target type of the map element to be drawn is an administrative region, after obtaining the information of all boundary points corresponding to the administrative region based on the information of the at least one target location point, the third drawing process is triggered to draw polygons formed by each boundary point on the map based on the information of all boundary points corresponding to the administrative region.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for making navigation map of local region

    CN102607578A

  • Providing constraint to a position

    CN107407565A

  • Map drawing method and device

    CN110956673A