CN112800163A - Map interface display method and device, computer equipment and storage medium - Google Patents

Map interface display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112800163A
CN112800163A CN202110183470.6A CN202110183470A CN112800163A CN 112800163 A CN112800163 A CN 112800163A CN 202110183470 A CN202110183470 A CN 202110183470A CN 112800163 A CN112800163 A CN 112800163A
Authority
CN
China
Prior art keywords
point
target
points
candidate
latitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110183470.6A
Other languages
Chinese (zh)
Other versions
CN112800163B (en
Inventor
张鹏霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110183470.6A priority Critical patent/CN112800163B/en
Publication of CN112800163A publication Critical patent/CN112800163A/en
Application granted granted Critical
Publication of CN112800163B publication Critical patent/CN112800163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data

Abstract

The application relates to a map interface display method, a map interface display device, computer equipment and a storage medium, and relates to the technical field of electronic map application. The method comprises the following steps: responding to an instruction for displaying a target path in a map interface, and acquiring coordinates of each candidate point; acquiring a coordinate adjustment reference value based on the coordinates of each candidate point; acquiring N target points from each candidate point; acquiring coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; displaying the electronic map including a marker line of the target path in the map interface based on coordinates of the N virtual points; according to the scheme, the accuracy of the electronic map can be guaranteed, and meanwhile, each candidate point corresponding to the target path is prevented from being shielded, so that the display effect of the electronic map on the target path is improved.

Description

Map interface display method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic map application technologies, and in particular, to a map interface display method and apparatus, a computer device, and a storage medium.
Background
With the continuous development of positioning technology, electronic maps are widely applied in various industries, wherein path display is a basic application form of electronic maps.
In the related art, when a user queries a path from a starting point to a destination, the electronic map application may plan one or more optional paths according to a road network and road conditions between the starting point and the destination, and display an electronic map including the planned one or more paths in a map interface, and the user may select one of the paths to trigger execution of subsequent tasks such as navigation.
However, in order to facilitate the user to operate the electronic map, the map interface usually includes some overlay controls, and these overlay controls may block the path in the electronic map, so that the path is displayed poorly by the electronic map.
Disclosure of Invention
The embodiment of the application provides a map interface display method, a map interface display device, computer equipment and a storage medium, which can enable a path in an electronic map to be prevented from being shielded by a superposition control in a map interface as far as possible, and improve the display effect of the electronic map on the path, and the technical scheme is as follows:
in one aspect, a method for displaying a map interface is provided, and the method includes:
displaying a map interface, wherein the map interface is used for displaying an electronic map;
responding to an instruction for displaying a target path in the map interface, and acquiring coordinates of each candidate point; each candidate point comprises a point on the target path and each mark point corresponding to the target path;
acquiring a coordinate adjustment reference value based on the coordinates of each candidate point;
acquiring N target points from each candidate point; the N target points are points close to the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2;
acquiring coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area;
displaying the electronic map including a marker line of the target path in the map interface based on coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
In yet another aspect, there is provided a map interface display apparatus, the apparatus including:
the interface display module is used for displaying a map interface, and the map interface is used for displaying an electronic map;
the candidate point coordinate acquisition module is used for responding to an instruction for displaying a target path in the map interface and acquiring the coordinates of each candidate point; each candidate point comprises a point on the target path and each mark point corresponding to the target path;
a reference value obtaining module, configured to obtain a coordinate adjustment reference value based on the coordinates of each candidate point;
a target point obtaining module, configured to obtain N target points from each candidate point; the N target points are points close to the edge of the target area where each candidate point is located; n is an integer greater than or equal to 4;
a virtual point coordinate obtaining module, configured to obtain coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area;
a map display module for displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
In a possible implementation manner, the target point obtaining module includes:
the first target point acquisition sub-module is used for acquiring a first target point which is positioned on the left of the lower part of the target area from each candidate point;
the second target point acquisition sub-module is used for acquiring a second target point which is positioned on the lower left part of the target area from each candidate point;
a third target point obtaining submodule, configured to obtain, from the candidate points, a third target point located on the lower right of the target area;
a fourth target point acquisition sub-module, configured to acquire, from the candidate points, a fourth target point that is located on the lower right of the target area;
and the fifth target point acquisition sub-module is used for acquiring a fifth target point positioned at the top of the target area from the candidate points.
In a possible implementation manner, the first target point obtaining submodule is configured to obtain a point with a minimum latitude from the candidate points, so as to obtain a minimum latitude point set; taking at least one point with the minimum latitude point set as the first target point;
the second target point acquisition submodule is used for acquiring a point with the minimum longitude in the first candidate point set to obtain a minimum longitude point set; taking at least one point with the smallest latitude in the minimum longitude point set as the second target point; the first candidate point set is a set formed by all or part of the candidate points;
the third target point acquisition submodule is configured to use at least one point with the largest latitude point in the minimum latitude point set as the third target point;
the fourth target point acquisition submodule is used for acquiring a point with the largest longitude in the second candidate point set to acquire a maximum longitude point set; taking at least one point with the smallest latitude in the maximum longitude point set as the fourth target point; the second candidate point set is a set formed by all or part of the candidate points;
the fifth target point acquisition submodule is used for acquiring at least one point with the largest latitude in the third candidate point set as the fifth target point; the third candidate point set is a set of all or some of the respective candidate points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value;
the first candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a first latitude increment in all the candidate points; the first latitude increment is a product between the latitude adjustment reference value and a first latitude increment ratio; the first latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value;
the second candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a second latitude increment in all the candidate points; the second latitude increment is a product between the latitude adjustment reference value and a second latitude increment ratio; the second latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
In a possible implementation manner, the third candidate point set is a set formed by the respective mark points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value and a longitude adjustment reference value;
the virtual point coordinate acquisition module is used for acquiring the virtual point coordinate,
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the first target point to obtain the coordinate of the first virtual point;
based on the longitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the longitude of the second target point to obtain the coordinate of a second virtual point;
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the third target point to obtain the coordinate of a third virtual point;
increasing and adjusting the longitude of the fourth target point based on the longitude adjustment reference value and the adjustment ratio to obtain the coordinate of a fourth virtual point;
and increasing and adjusting the latitude of the fifth target point based on the latitude adjustment reference value and the adjustment ratio to obtain the coordinate of the fifth virtual point.
In one possible implementation, the apparatus further includes:
and the first ratio acquisition module is used for acquiring the adjustment ratio based on the position information of the superposed icon contained in the map interface, the size of the superposed icon and the size of the map interface.
In one possible implementation, the apparatus further includes:
and the second ratio acquisition module is used for inquiring the adjustment ratio based on the equipment information of the terminal displaying the map interface.
In one possible implementation, the apparatus further includes:
and the third ratio acquisition module is used for acquiring the preset adjustment ratio.
In a possible implementation manner, the reference value obtaining module is configured to,
acquiring a latitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point;
and acquiring a longitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the longitudes of the candidate points and the minimum value of the longitudes of the candidate points.
In a possible implementation manner, the map display module is further configured to display the electronic map including the marker line of the target route in the map interface based on the coordinates of the N target points before displaying the electronic map including the marker line of the target route in the map interface based on the coordinates of the N virtual points;
the map display module is used for responding to the received appointed operation of the map interface, and displaying the electronic map containing the marking line of the target path in the map interface based on the coordinates of the N virtual points.
In still another aspect, a computer device is provided, where the computer device includes a processor and a memory, where the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the map interface display method described above.
In still another aspect, a computer-readable storage medium is provided, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor to implement the map interface presentation method.
In yet another aspect, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the map interface display method.
The technical scheme provided by the application can comprise the following beneficial effects:
determining at least 2 target points close to the edge in each candidate point through the coordinates of each candidate point corresponding to the target path, and a coordinate adjustment reference value, and determines at least 2 virtual points farther from the aggregation area of the respective candidate points on the basis of the coordinates of the at least 2 target points on the basis of the coordinate adjustment reference value, in presenting the target path, such that at least 2 virtual points are located in the visible area of the map interface, on the one hand, determining a virtual point by a coordinate adjustment reference value obtained from the coordinates of each candidate point, and the target point of each candidate point, thereby properly reducing the scale of the electronic map and ensuring the precision of the electronic map, and on the other hand, because the superposition control in the map interface is usually positioned in the edge area of the map interface, through the scheme, all candidate points corresponding to the target path can be prevented from being shielded by the superposition control as much as possible; therefore, the scheme can ensure the precision of the electronic map and simultaneously avoid each candidate point corresponding to the target path from being shielded, thereby improving the display effect of the electronic map on the target path.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a system configuration diagram of an electronic map system according to various embodiments of the present application;
FIG. 2 is a flowchart illustrating a method of presenting a map interface in accordance with an exemplary embodiment;
FIG. 3 is a schematic diagram of a virtual point determination and presentation process involved in the embodiment of FIG. 2;
FIG. 4 is a flowchart illustrating a method of presenting a map interface in accordance with an exemplary embodiment;
FIG. 5 is a schematic diagram of a candidate point distribution according to the embodiment shown in FIG. 4;
FIG. 6 is a schematic diagram of pole locations involved in the embodiment of FIG. 4;
FIG. 7 is a schematic diagram of a virtual point location involved in the embodiment shown in FIG. 4;
FIG. 8 is a block diagram illustrating the structure of a map interface presentation device, according to an exemplary embodiment;
FIG. 9 is a block diagram illustrating a configuration of a computer device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Before describing the various embodiments shown herein, several concepts related to the present application will be described:
1) electronic map application
The electronic map application is an application program providing related services based on an electronic map, and for example, the electronic map application may provide services such as location query, route query, road condition query, current location query of a target person/target object, and navigation.
2) Mark point (Marker)
In the electronic map application, the mark point may refer to a special position point set by a map service provider or a user in the electronic map.
For example, the mark points may be Points Of Interest (POIs) preset on the electronic map by a map service provider. For example, the marker point may be a platform, a store, an intersection, etc. on the electronic map.
Alternatively, the mark point may be a position point marked on the electronic map by the current user or a friend of the current user, or may be a position point on the electronic map by the current user or a friend of the current user.
3) Mark line (Polyline)
In an electronic map type application, a marked line may be a line in an electronic map that indicates a certain section of a route. For example, after the user requests to plan the route, or after the electronic map application actively plans the route for the user, a linear mark may be displayed on the electronic map along the planned route, where the linear mark may be the above-mentioned mark line.
Referring to fig. 1, a system configuration diagram of an electronic map system according to various embodiments of the present application is shown. As shown in fig. 1, the system includes a server 120, a database 140, and a number of terminals 160.
The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
In the embodiment of the present application, the server 120 provides a background service for the electronic map application.
The database 140 may be a Redis database, or may be another type of database. The database 140 is used for storing various data, such as map data, user registration information, and the like.
The terminal 160 may be a terminal device having a network connection function and installed with a terminal portion of the electronic map application corresponding to the server 120, for example, the terminal 160 may be a smart phone, a tablet computer, an electronic book reader, smart glasses, a smart watch, an MP3 player (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4), a notebook computer or a desktop computer, and the like. Alternatively, the terminal 160 may also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, or the like.
In the embodiment of the present application, the electronic map application may include any type of application program with an electronic map display function, for example, including, but not limited to, a dedicated electronic map application, and an applet running in a host program (such as a social application, a shopping application, and the like) and having an electronic map display function, a fast application having an electronic map display function, and the like.
The terminal 160 is connected to the server 120 via a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the system may further include a management device (not shown in fig. 1), which is connected to the server 120 through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Reference is now made to fig. 2, which is a flowchart illustrating a map interface presentation method that may be used with a computer device, according to an exemplary embodiment. The computer device may be a terminal installed with an electronic map application program, or may also be a server corresponding to the electronic map application program. As shown in fig. 2, the map interface display method may include the following steps:
and step 21, displaying a map interface, wherein the map interface is used for displaying the electronic map.
The map interface may be an application interface of an electronic map application.
Step 22, responding to the instruction for displaying the target path in the map interface, and acquiring the coordinates of each candidate point; the candidate points include points on the target path and mark points corresponding to the target path.
The point on the target path may be a point determined based on a marker line corresponding to the target path.
In this embodiment of the application, when a user performs a path query operation in a map interface, or after performing the path query operation (for example, the user needs to view a planned complete path in a navigation process), the electronic map application may receive an instruction to display a target path.
And step 23, acquiring a coordinate adjustment reference value based on the coordinates of each candidate point.
In an embodiment of the present application, the coordinate adjustment reference value may include at least one of a latitude adjustment reference value and a longitude adjustment reference value.
Step 24, acquiring N target points from each candidate point; the N target points are points near the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2.
In a possible implementation manner, the target area where each candidate point is located refers to an area that includes all candidate points in each candidate point.
In a possible implementation manner, the target area where each candidate point is located refers to an area including a part of candidate points in each candidate point.
For example, the target region where each candidate point is located may be a minimum region including a specified proportion (for example, 80%) of candidate points in each candidate point; alternatively, the target area where each candidate point is located may be a minimum area including a candidate point whose longitude and/or latitude satisfy a certain condition among the candidate points.
Step 25, obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; and the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area.
In this embodiment, the application program of the electronic map class may adjust the coordinates of the N target points in the direction out of the target area based on the coordinate adjustment reference value, and obtain a virtual point farther from the target area than the N target points.
Step 26, displaying the electronic map containing the mark line of the target path in the map interface based on the coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
For example, please refer to fig. 3, which illustrates a schematic diagram of a virtual point determining and displaying process according to an embodiment of the present application. As shown in fig. 3, in response to the instruction for showing the target path, the electronic map application determines candidate points 31, where the candidate points 31 are located in an area 32 (corresponding to the target area). The electronic map application determines at least 2 target points 33 near the edge of the area 32 from the candidate points 31, adjusts the coordinates of the target points 33 in the direction outside the area 32 based on the coordinate adjustment reference value 34, obtains virtual points 35 corresponding to the target points 33 one by one, and displays the electronic map in the map interface 36 based on the virtual points 35 so that the virtual points 35 are located in the visible area in the map interface 36.
As shown in fig. 3, since the electronic map application displays the electronic map based on the virtual point 35, and the virtual point 35 is obtained by adjusting the coordinates of the target point at the edge of the area where the candidate point is located outward, when each virtual point 35 is located in the visible area of the map interface 36, each candidate point 31 in the area 32 is also correspondingly gathered to the center of the map interface 36, so as to prevent the overlay control 37 at the edge of the map interface 36 from blocking each candidate point 31 in the area 32 as much as possible.
The area 32 where each candidate point shown in fig. 3 is located is a rectangular area, and optionally, the area where each candidate point 31 is located may also be an area with other shapes, such as a circular area, and the like, which is not limited in this embodiment of the application.
To sum up, in the embodiment of the present application, the electronic map application program determines, through the coordinates of each candidate point corresponding to the target path, at least 2 target points close to the edge in each candidate point, and the coordinate adjustment reference value, and determines, based on the coordinate adjustment reference value, at least 2 virtual points farther away from the aggregation area of each candidate point on the basis of the coordinates of at least 2 target points, when the target path is displayed, so that at least 2 virtual points are located in the visible area of the map interface, on one hand, the virtual points are determined through the coordinate adjustment reference value obtained from the coordinates of each candidate point, and the target point of each candidate point, so as to appropriately reduce the scale of the electronic map and ensure the accuracy of the electronic map, on the other hand, because the overlay control in the map interface is usually located in the edge area of the map interface, therefore, through the scheme, each candidate point corresponding to the target path can be prevented from being shielded by the superposition control as much as possible; therefore, the scheme can ensure the precision of the electronic map and simultaneously avoid each candidate point corresponding to the target path from being shielded, thereby improving the display effect of the electronic map on the target path.
The method and the device for displaying the path can be used in any electronic map application program which needs to display the path and contains the overlay control in the interface.
Please refer to fig. 4, which is a flowchart illustrating a map interface presentation method according to an exemplary embodiment. The map interface display method can be used for computer equipment. The computer device may be a terminal installed with an electronic map application program, or may also be a server corresponding to the electronic map application program. As shown in fig. 4, the map interface display method may include the following steps:
step 401, displaying a map interface, where the map interface is used for displaying an electronic map.
In the embodiment of the application, when the user opens the electronic map application, the electronic map application can open a map interface, and the map interface comprises an electronic map displayed according to a certain proportion.
Generally, the map interface may also include overlay controls. The overlay control may be a control for operating an electronic map-like application, such as a zoom control, a refresh control, a positioning control, a navigation trigger control, an address query control, an address input box control, and so on.
Alternatively, the overlay control may also be a control for presenting information, for example, an information box for presenting prompt information, and the like.
Step 402, responding to an instruction for displaying a target path in the map interface, and acquiring coordinates of each candidate point; the candidate points include points on the target path and mark points corresponding to the target path.
In the embodiment of the application, when the electronic map application has a display requirement (which may be triggered by a user or actively triggered by the electronic map application), the electronic map application may obtain each candidate point corresponding to the target path.
Wherein the candidate points include points on the target path. For example, the electronic map application may sample from the target path at certain intervals to obtain a point on the corresponding target path in each candidate point.
The electronic map application program may also select key points on the target path, such as POI interest points, e.g., intersection location points, signal light location points, bus stops, subway station entry points, etc., as points on the corresponding target path in each candidate point.
In a possible implementation manner, the electronic map application may select a mark point near the target path as a mark point of a corresponding target path in each candidate point. For example, the electronic map application may select a marked point with a distance to the target path smaller than a distance threshold (e.g., 200 meters) as a marked point on the corresponding target path in each candidate point.
In a possible implementation manner, among the candidate points, a location point that can be set in the electronic map by the user is further included. For example, each of the candidate points may further include a location point set or shared by the current user or a friend user of the current user in the electronic map.
Step 403, obtaining a coordinate adjustment reference value based on the coordinates of each candidate point.
In a possible implementation manner, the obtaining a coordinate adjustment reference value based on the coordinates of each candidate point includes:
acquiring a latitude adjustment reference value in the coordinate adjustment reference value based on the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point;
and acquiring a longitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the longitudes of the respective candidate points and the minimum value of the longitudes of the respective candidate points.
The electronic map application program may obtain the latitude adjustment reference value in the coordinate adjustment reference values according to the maximum value of the latitude of each candidate point and the difference between the minimum values of the latitude of each candidate point.
For example, the electronic map type application may directly use the difference between the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point as the latitude adjustment reference value in the coordinate adjustment reference values.
For another example, the electronic map application may also multiply the difference between the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point by an adjustment coefficient (e.g., 0.8 or 1.2, etc.), so as to obtain the latitude adjustment reference value in the coordinate adjustment reference values.
The electronic map application program may obtain the longitude adjustment reference value of the coordinate adjustment reference values according to the maximum value of the longitude of each candidate point and the difference value between the minimum values of the longitude of each candidate point.
For example, the electronic map type application may directly take a difference between a maximum value of the longitudes of the respective candidate points and a minimum value of the longitudes of the respective candidate points as the longitude adjustment reference value among the coordinate adjustment reference values.
For another example, the electronic map application may also multiply a difference between a maximum value of the longitude of each candidate point and a minimum value of the longitude of each candidate point by an adjustment coefficient to obtain a longitude adjustment reference value in the coordinate adjustment reference values.
Step 404, acquiring N target points from each candidate point; the N target points are points near the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2.
In a possible implementation manner, the N target points may be 2 or more than 2 points close to two edges of the target area in each candidate point.
For example, taking the target area as a rectangular area as an example, the N target points are 2 or more than 2 points respectively close to the left and right edges of the rectangular area in each candidate point, that is, some points are close to the left edge of the rectangular area, and the other points are close to the right edge of the rectangular area. Alternatively, the N target points are 2 or more points that are respectively close to the upper and lower edges of the rectangular region, among the candidate points.
In another possible implementation manner, the N target points may be 3 or more than 3 points of three edges close to the target area in each candidate point.
For example, taking the target area as a triangle area as an example, the N target points are 3 or more than 3 points that are respectively close to three sides of the triangle area among the candidate points. That is, each of the triangular regions corresponds to at least one of the N target points.
In another possible implementation manner, the N target points may be 4 or more than 4 points close to four edges of the target area in each candidate point.
For example, taking the target area as a rectangular area as an example, the N target points are 4 or more than 4 points that are respectively close to four sides of the rectangular area in each candidate point, that is, each of the N target points corresponds to at least one of the N target points.
In a possible implementation manner, the obtaining N target points from each candidate point includes:
acquiring a first target point which is positioned on the left of the lower part of the target area from each candidate point;
acquiring a second target point which is positioned on the lower left part of the target area from each candidate point;
acquiring a third target point which is positioned on the right of the lower part of the target area from each candidate point;
acquiring a fourth target point which is positioned at the lower right part of the target area from each candidate point;
and acquiring a fifth target point positioned at the top of the target area from each candidate point.
The positions of the first target point, the second target point, the third target point, the fourth target point and the fifth target point may overlap.
In this embodiment, in order to make the candidate points in each direction not be blocked by the overlay control as much as possible, in this embodiment, the electronic map application may determine at least two target points from the lower left and lower right of the aggregation area of each candidate point, and determine at least one target point from the top.
In a possible implementation manner, the obtaining a first target point located on a lower left side of the target area from the candidate points includes:
obtaining the point with the minimum latitude from each candidate point to obtain a minimum latitude point set; and taking at least one point with the minimum latitude point in the minimum latitude point set as the first target point.
In a possible implementation manner, the at least one point with the smallest latitude point in the minimum latitude point set refers to at least one point arranged in front of the points in the minimum latitude point set after the points are arranged in the order of longitude from small to large.
In the embodiment of the present application, there may be a plurality of points due to the latitudinal minimum point among the respective candidate points. For example, please refer to fig. 5, which shows a schematic diagram of candidate point distribution according to an embodiment of the present application. As shown in fig. 5, in the target area 50, the minimum latitude points include 3 candidate points 51, 52 and 53, and when determining the first target point on the left lower side of the target area, the electronic map application acquires the minimum latitude point set formed by the candidate points 51, 52 and 53, then arranges the candidate points 51, 52 and 53 in the order of longitude from small to large, and takes one or more of the previously arranged points as the first target point; for example, the electronic map application takes the candidate point 51 as the first target point.
In a possible implementation manner, acquiring a second target point located below the left portion of the target area from the candidate points includes:
acquiring a point with the minimum longitude in the first candidate point set to obtain a minimum longitude point set; taking at least one point with the minimum latitude in the minimum longitude point set as the second target point; the first candidate point set is a set of all or some of the respective candidate points.
In a possible implementation manner, the at least one point with the smallest latitude in the minimum longitude point set refers to at least one point arranged in front of the points in the minimum longitude point set after the points are arranged in the order from the smallest to the largest in latitude.
In the embodiment of the present application, there may be a plurality of points in the first candidate point set with the smallest longitude. For example, the first candidate point set is a set formed by all the points in the candidate points; as shown in fig. 5, in the target area 50, the minimum longitude points include 2 candidate points 54 and 55, and when determining a second target point below the left of the target area, the electronic map application acquires a minimum longitude point set formed by the candidate points 54 and 55, then arranges the candidate points 54 and 55 in order of ascending latitude, and selects one or more of the previously arranged candidate points as the second target point; for example, the electronic map type application takes the candidate point 55 as the second target point.
In one possible implementation, the coordinate adjustment reference value comprises a latitude adjustment reference value;
the first candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and the first latitude increment in each candidate point; the first latitude increment is a product between the latitude adjustment reference value and a first latitude increment ratio; the first latitude increment ratio is less than 1 and greater than 0; the minimum latitude is the minimum of the latitudes of the respective candidate points.
In the embodiment of the present application, in order to make the second target point located at the lower left position as much as possible, the first candidate point set may be a point set including points at the lower part of the target area. For example, referring to fig. 5, the dividing line 50a divides the target area 50 into an upper part and a lower part, wherein the area of the target area 50 below the dividing line 50a is the lower part of the target area, the latitude of the dividing line 50a is the sum of the minimum latitude and the first latitude increment, and the minimum latitude is the minimum latitude of each candidate point in the target area 50 (i.e. the latitudes of the candidate point 51, the candidate point 52 and the candidate point 53). As shown in fig. 5, in the lower portion of the target area, the minimum longitude point includes 2 candidate points 56 and 57, and in another exemplary scheme of the present application, when determining a second target point lower than the left portion of the target area, the electronic map application may also obtain a minimum longitude point set formed by the candidate points 56 and 57, and then arrange the candidate points 56 and 57 in order from small to large in latitude, and take one or more of the previously arranged points as the second target point; for example, the electronic map type application takes the candidate point 57 as the second target point.
In a possible implementation manner, the obtaining a third target point located on a lower right side of the target area from the candidate points includes:
and taking at least one point with the largest degree in the minimum latitude point set as the third target point.
In a possible implementation manner, the at least one point with the highest degree in the minimum latitude point set refers to at least one point arranged behind the points in the minimum latitude point set after the points are arranged in the order of longitude from large to small.
For example, as shown in fig. 5, when determining a third target point on the lower side of the target area, the electronic map application program obtains a minimum latitude point set formed by the candidate points 51, 52 and 53, then arranges the candidate points 51, 52 and 53 in order of longitude from large to small, and takes one or more of the previously arranged points as the third target point; for example, the electronic map application takes the candidate point 53 as the third target point.
In a possible implementation manner, the obtaining a fourth target point located below the right of the target area from the candidate points includes:
acquiring a point with the largest longitude in the second candidate point set to acquire a maximum longitude point set; taking at least one point with the minimum latitude in the maximum longitude point set as the fourth target point; the second candidate point set is a set of all or some of the respective candidate points.
In a possible implementation manner, the at least one point with the smallest latitude in the maximum longitude point set refers to at least one point arranged in front of the points in the maximum longitude point set after the points are arranged in the order from the smallest to the largest in latitude.
In the embodiment of the present application, there may be a plurality of points in the second candidate point set with the largest longitude. For example, the second candidate point set is a set formed by all the points in the candidate points; as shown in fig. 5, in the target area 50, the points with the largest longitude include 2 candidate points 58 and 59, respectively, and when determining the fourth target point below the right of the target area, the electronic map application program obtains the minimum longitude point set formed by the candidate points 58 and 59, then arranges the candidate points 58 and 59 in the order from small to large in latitude, and takes one or more of the previously arranged points as the fourth target point; for example, the electronic map application takes the candidate point 59 as the fourth target point.
In one possible implementation, the coordinate adjustment reference value comprises a latitude adjustment reference value;
the second candidate point set is a set formed by candidate points with latitude smaller than the sum of the minimum latitude and a second latitude increment in each candidate point; the second latitude increment is a product between the latitude adjustment reference value and a second latitude increment ratio; the second latitude increment ratio is less than 1 and greater than 0; the minimum latitude is the minimum of the latitudes of the respective candidate points.
In the embodiment of the present application, in order to enable the fourth target point to be located at the lower right position as much as possible, the second candidate point set may be a point set including points at the lower part of the target area. For example, taking the second latitude increment as the same as the first latitude increment, or the ratio of the second latitude increment as the ratio of the first latitude increment as the same, please refer to fig. 5, the latitude where the dividing line 50a is located is the sum of the minimum latitude and the second latitude increment. As shown in fig. 5, in the lower portion of the target area, the point with the largest longitude includes 2 candidate points 510 and 511, and in another exemplary scheme of the present application, when determining the fourth target point below the right portion of the target area, the electronic map application may also obtain the largest longitude point set formed by the candidate points 510 and 511, and then arrange the candidate points 510 and 511 in order from the smallest latitude to the largest latitude, and take the one or more previously arranged points as the second target point; for example, the electronic map application takes the candidate point 510 as the second target point.
In a possible implementation manner, the obtaining a fifth target point located at the top of the target area from the candidate points includes:
acquiring at least one point with the largest latitude in the third candidate point set as the fifth target point; the third candidate point set is a set of all or some of the respective candidate points.
When the point with the largest latitude in the third candidate point set includes two or more points, the electronic map application may determine the fifth target point according to a preset policy (for example, according to longitude from large to small or from small to large), or may randomly select at least one point in the third candidate point set as the fifth target point.
For example, the third candidate point set is a set formed by all the points in the candidate points; as shown in fig. 5, in the target area 50, the points with the largest latitude include 2 candidate points 512 and 513, and when determining the fifth target point located at the top of the target area, the electronic map application acquires at least one of the candidate points 512 and 513 as the fifth target point. For example, the electronic map application may randomly acquire one of the candidate points 512 and 513 as the fifth target point.
In one possible implementation, the third candidate point set is a set of the respective marked points.
In an exemplary aspect of the embodiment of the application, when determining the fifth target point located at the top of the target area, the electronic map application may also select at least one point with the largest latitude from a set of marked points as the fifth target point.
In the above-mentioned solution of the embodiment of the present application, at least 5 target points of a lower left corner (a first target point, a second target point), a lower right corner (a third target point, a fourth target point) and a top (a fifth target point) of a target area are determined as an example for description. In other possible schemes, the positions of the at least 5 target points may also be located at other positions, for example, the first target point and the second target point may be located at the upper left corner of the target area, the third target point and the fourth target point may be located at the upper right corner of the target area, and the fifth target point may be located at the lower part of the target area; alternatively, the first target point and the second target point may be located at the upper left corner of the target area, the third target point and the fourth target point may be located at the lower left corner of the target area, the fifth target point may be located at the right part of the target area, and so on.
In step 405, the adjustment ratio is obtained.
In one possible implementation manner, the adjustment ratio may be obtained based on position information of a superimposed icon included in the map interface, a size of the superimposed icon, and a size of the map interface.
Because there may be differences in the sizes and layouts of the overlay icons in the map interface in different terminal models and different application versions, in the embodiment of the present application, in order to avoid as much as possible that the positions of the candidate points are blocked by the overlay icons when the electronic map is displayed, and at the same time, to ensure the maximization of the display scale of the electronic map (that is, to ensure the accuracy of the electronic map), the electronic map application may determine the adjustment ratio used for subsequently adjusting the coordinates of the target point based on the positions and sizes of the overlay icons in the current map interface and the size of the map interface.
In one possible implementation, the electronic map application may determine, based on the position, size, and size of the superimposed icon in the current map interface, the proportion of the superimposed icon to the left side of the map interface (i.e., the distance between the right edge of the superimposed icon on the left side of the map interface and the left edge of the map interface, the proportion of the width of the map interface), the proportion of the superimposed icon to the right side of the map interface (i.e., the distance between the left edge of the superimposed icon on the right side of the map interface and the right edge of the map interface, the proportion of the width of the map interface), the proportion of the superimposed icon to the lower side of the map interface (i.e., the upper edge of the superimposed icon on the lower side of the map interface, the distance between the upper edge of the map interface and the lower edge of the map interface, the proportion of the height of the map interface), and the proportion of the superimposed icon to the upper side, the distance from the upper edge of the map interface to the height of the map interface), and determining the adjustment ratio according to at least one of the four obtained proportions.
For example, taking the example of determining the above adjustment ratio based on the proportion of the superimposition icon on the lower side of the map interface, assuming that the proportion of the superimposition icon on the upper side of the map interface is 1/5, the electronic map type application may set the adjustment ratio to 20%.
In one possible implementation, the adjustment ratio may be queried based on device information of a terminal that presents the map interface.
In a possible implementation of the embodiment of the application, the electronic map application may also set corresponding adjustment ratios for various terminals respectively (for example, preset by a developer), and store corresponding terminal information (for example, terminal manufacturers and models) of the various terminals, and the electronic map application may acquire the terminal information of the current terminal during the operation process, and query the pre-stored adjustment ratios according to the terminal information.
In one possible implementation, the adjustment ratio set in advance may be acquired.
In another possible implementation of the embodiment of the present application, the electronic map application may also obtain a preset and unified fixed adjustment ratio.
Step 406, obtaining coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; and the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value and a longitude adjustment reference value;
the obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points includes:
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the first target point to obtain the coordinate of the first virtual point;
based on the longitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the longitude of the second target point to obtain the coordinate of a second virtual point;
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the third target point to obtain the coordinate of a third virtual point;
increasing and adjusting the longitude of the fourth target point based on the longitude adjustment reference value and the adjustment ratio to obtain the coordinate of a fourth virtual point;
and increasing and adjusting the latitude of the fifth target point based on the latitude adjustment reference value and the adjustment ratio to obtain the coordinate of the fifth virtual point.
Based on the above solution of the present application, in an exemplary solution of the present application, the electronic map application may determine the target point and the virtual point by finding a pole and calculating a corresponding virtual point.
For example, the electronic map application traverses all markers and polygon to find the following points:
1) the bottom left most corner point (point 1 where lat is the smallest and point2 where lng is the smallest, both may be the same point);
the point1 (the first target point) with the lowest lat at the bottom left corner is the point with the lowest lat and the lowest lng; the point2 (second target point) at the bottom left corner with the smallest lng is the point with the smallest lng, and lat is the smallest point.
Optionally, the point2 with the lowest lng in the bottom left corner needs to satisfy the point with the lowest lng in the 1/5 area below the screen, i.e. all the points of lat < minLat + (0.2 latDiff);
wherein the first virtual point vpoint 1: lat- (latDiff 0.2); ng is long;
second virtual point vpoint2, lat ═ lat; ng- (lngDiff 0.2);
2) the bottom right-most corner point (point 3 where lat is the smallest and point4 where lng is the largest, both of which may be the same);
the point3 (the third target point) with the lowest lat in the bottom right corner is the point with the lowest lat and the largest lng; the point4 (fourth target point) where the lng is largest at the bottom right corner is the point where lat is smallest among the points where lng is largest.
The point4 at which the lowest right corner lng is the largest needs to satisfy the region 1/5 below the screen, namely the point at which lng is the largest among all the points of lat < minLat + (0.2 latDiff);
wherein the third virtual point vpoint 3: lat- (latDiff 0.2); ng is long;
fourth virtual point vpoint4, lat ═ lat; lng ═ lng + (lngDiff 0.2);
3) the marker point (the marker point where lat is the largest) point5 (the fifth target point) at the uppermost position;
fifth virtual point vpoint 5: lat + (latDiff 0.2); ng is long;
please refer to fig. 6, which illustrates a schematic diagram of pole positions according to an embodiment of the present application; the positions of the points 1-5 (the first target point 61, the second target point 62, the third target point 63, the fourth target point 64, and the fifth target point 65) are shown in fig. 6, wherein the positions of the first target point 61 and the third target point 63 are coincident.
Step 407, displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
In this embodiment of the present application, the electronic map application may use the coordinates of the N virtual points as an entry reference, and call a mapcontext. Taking the above fig. 6 as an example, please refer to fig. 7, which shows a schematic diagram of a virtual point location according to an embodiment of the present application. As shown in fig. 7, a map interface displayed based on the coordinates of the 5 virtual points vpoint 1-vpoint 5 (the first virtual point 71, the second virtual point 72, the third virtual point 73, the fourth virtual point 74, and the fifth virtual point 75) may be as shown in fig. 7, where the first virtual point 71 and the third virtual point 73 coincide in position.
In a possible implementation manner, before displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points, the method further includes:
displaying the electronic map containing the marking line of the target path in the map interface based on the coordinates of the N target points;
the displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points includes:
in response to receiving a designation operation for the map interface, the electronic map including the marker line of the target path is presented in the map interface based on the coordinates of the N virtual points.
In this embodiment of the application, the electronic map application may first display the target path based on the N target points, so as to ensure that the display scale of the target path is sufficiently large. The subsequent user can trigger the electronic map application program to reduce the display scale of the electronic map through a specified operation (for example, when a marked line or a marked point of a determined partial path is blocked).
To sum up, in the embodiment of the present application, the electronic map application program determines, through the coordinates of each candidate point corresponding to the target path, at least 2 target points close to the edge in each candidate point, and the coordinate adjustment reference value, and determines, based on the coordinate adjustment reference value, at least 2 virtual points farther away from the aggregation area of each candidate point on the basis of the coordinates of at least 2 target points, when the target path is displayed, so that at least 2 virtual points are located in the visible area of the map interface, on one hand, the virtual points are determined through the coordinate adjustment reference value obtained from the coordinates of each candidate point, and the target point of each candidate point, so as to appropriately reduce the scale of the electronic map and ensure the accuracy of the electronic map, on the other hand, because the overlay control in the map interface is usually located in the edge area of the map interface, therefore, through the scheme, each candidate point corresponding to the target path can be prevented from being shielded by the superposition control as much as possible; therefore, the scheme can ensure the precision of the electronic map and simultaneously avoid each candidate point corresponding to the target path from being shielded, thereby improving the display effect of the electronic map on the target path.
Fig. 8 is a block diagram illustrating a structure of a map interface presentation apparatus according to an exemplary embodiment. The map interface display device can implement all or part of the steps of the method provided by the embodiment shown in fig. 2 or fig. 4. The apparatus may include:
an interface display module 801, configured to display a map interface, where the map interface is used to display an electronic map;
a candidate point coordinate obtaining module 802, configured to obtain coordinates of each candidate point in response to an instruction for displaying a target path in the map interface; each candidate point comprises a point on the target path and each mark point corresponding to the target path;
a reference value obtaining module 803, configured to obtain a coordinate adjustment reference value based on the coordinates of each candidate point;
a target point obtaining module 804, configured to obtain N target points from the candidate points; the N target points are points close to the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2;
a virtual point coordinate obtaining module 805, configured to obtain coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area;
a map display module 806 for displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
In a possible implementation manner, the target point obtaining module 804 includes:
the first target point acquisition sub-module is used for acquiring a first target point which is positioned on the left of the lower part of the target area from each candidate point;
the second target point acquisition sub-module is used for acquiring a second target point which is positioned on the lower left part of the target area from each candidate point;
a third target point obtaining submodule, configured to obtain, from the candidate points, a third target point located on the lower right of the target area;
a fourth target point acquisition sub-module, configured to acquire, from the candidate points, a fourth target point that is located on the lower right of the target area;
and the fifth target point acquisition sub-module is used for acquiring a fifth target point positioned at the top of the target area from the candidate points.
In a possible implementation manner, the first target point obtaining submodule is configured to obtain a point with a minimum latitude from the candidate points, so as to obtain a minimum latitude point set; taking at least one point with the minimum latitude point set as the first target point;
the second target point acquisition submodule is used for acquiring a point with the minimum longitude in the first candidate point set to obtain a minimum longitude point set; taking at least one point with the smallest latitude in the minimum longitude point set as the second target point; the first candidate point set is a set formed by all or part of the candidate points;
the third target point acquisition submodule is configured to use at least one point with the largest latitude point in the minimum latitude point set as the third target point;
the fourth target point acquisition submodule is used for acquiring a point with the largest longitude in the second candidate point set to acquire a maximum longitude point set; taking at least one point with the smallest latitude in the maximum longitude point set as the fourth target point; the second candidate point set is a set formed by all or part of the candidate points;
the fifth target point acquisition submodule is used for acquiring at least one point with the largest latitude in the third candidate point set as the fifth target point; the third candidate point set is a set of all or some of the respective candidate points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value;
the first candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a first latitude increment in all the candidate points; the first latitude increment is a product between the latitude adjustment reference value and a first latitude increment ratio; the first latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value;
the second candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a second latitude increment in all the candidate points; the second latitude increment is a product between the latitude adjustment reference value and a second latitude increment ratio; the second latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
In a possible implementation manner, the third candidate point set is a set formed by the respective mark points.
In one possible implementation, the coordinate adjustment reference value includes a latitude adjustment reference value and a longitude adjustment reference value;
the virtual point coordinate obtaining module 805 is configured to,
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the first target point to obtain the coordinate of the first virtual point;
based on the longitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the longitude of the second target point to obtain the coordinate of a second virtual point;
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the third target point to obtain the coordinate of a third virtual point;
increasing and adjusting the longitude of the fourth target point based on the longitude adjustment reference value and the adjustment ratio to obtain the coordinate of a fourth virtual point;
and increasing and adjusting the latitude of the fifth target point based on the latitude adjustment reference value and the adjustment ratio to obtain the coordinate of the fifth virtual point.
In one possible implementation, the apparatus further includes:
and the first ratio acquisition module is used for acquiring the adjustment ratio based on the position information of the superposed icon contained in the map interface, the size of the superposed icon and the size of the map interface.
In one possible implementation, the apparatus further includes:
and the second ratio acquisition module is used for inquiring the adjustment ratio based on the equipment information of the terminal displaying the map interface.
In one possible implementation, the apparatus further includes:
and the third ratio acquisition module is used for acquiring the preset adjustment ratio.
In a possible implementation manner, the reference value obtaining module 803 is configured to,
acquiring a latitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point;
and acquiring a longitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the longitudes of the candidate points and the minimum value of the longitudes of the candidate points.
In a possible implementation manner, the map displaying module 806 is further configured to display the electronic map including the marker line of the target route in the map interface based on the coordinates of the N target points before displaying the electronic map including the marker line of the target route in the map interface based on the coordinates of the N virtual points;
the map display module 806, in response to receiving a specified operation on the map interface, is configured to display the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points.
To sum up, in the embodiment of the present application, the electronic map application program determines, through the coordinates of each candidate point corresponding to the target path, at least 2 target points close to the edge in each candidate point, and the coordinate adjustment reference value, and determines, based on the coordinate adjustment reference value, at least 2 virtual points farther away from the aggregation area of each candidate point on the basis of the coordinates of at least 2 target points, when the target path is displayed, so that at least 2 virtual points are located in the visible area of the map interface, on one hand, the virtual points are determined through the coordinate adjustment reference value obtained from the coordinates of each candidate point, and the target point of each candidate point, so as to appropriately reduce the scale of the electronic map and ensure the accuracy of the electronic map, on the other hand, because the overlay control in the map interface is usually located in the edge area of the map interface, therefore, through the scheme, each candidate point corresponding to the target path can be prevented from being shielded by the superposition control as much as possible; therefore, the scheme can ensure the precision of the electronic map and simultaneously avoid each candidate point corresponding to the target path from being shielded, thereby improving the display effect of the electronic map on the target path.
FIG. 9 is a schematic diagram illustrating a configuration of a computer device, according to an example embodiment. The computer device may be implemented as a server or a terminal in the above-described method embodiments. The computer device 900 includes a central processing unit 901, a system Memory 904 including a Random Access Memory (RAM) 902 and a Read-Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the central processing unit 901. The computer device 900 also includes a basic input/output system 906 for facilitating information transfer between the various elements within the computer, and a mass storage device 907 for storing an operating system 913, application programs 914, and other program modules 915.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or Compact disk Read-Only Memory (CD-ROM) drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, flash memory or other solid state storage technology, CD-ROM, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
The computer device 900 may be connected to the internet or other network device through a network interface unit 911 connected to the system bus 905.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processor 901 implements all or part of the steps of the method shown in fig. 2 or fig. 4 by executing the one or more programs.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as a memory comprising computer programs (instructions), executable by a processor of a computer device to perform the methods shown in the various embodiments of the present application, is also provided. For example, the non-transitory computer readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods shown in the various embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A map interface display method is characterized by comprising the following steps:
displaying a map interface, wherein the map interface is used for displaying an electronic map;
responding to an instruction for displaying a target path in the map interface, and acquiring coordinates of each candidate point; each candidate point comprises a point on the target path and each mark point corresponding to the target path;
acquiring a coordinate adjustment reference value based on the coordinates of each candidate point;
acquiring N target points from each candidate point; the N target points are points close to the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2;
acquiring coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area;
displaying the electronic map including a marker line of the target path in the map interface based on coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
2. The method of claim 1, wherein the obtaining N target points from the candidate points comprises:
acquiring a first target point which is positioned on the left of the lower part of the target area from each candidate point;
acquiring a second target point which is positioned on the lower left part of the target area from each candidate point;
acquiring a third target point which is positioned on the right of the lower part of the target area from each candidate point;
acquiring a fourth target point which is positioned at the lower right part of the target area from the candidate points;
and acquiring a fifth target point positioned at the top of the target area from the candidate points.
3. The method of claim 2,
the acquiring a first target point located on the left of the lower part of the target area from the candidate points includes:
obtaining a point with the minimum latitude from each candidate point to obtain a minimum latitude point set; taking at least one point with the minimum latitude point set as the first target point;
the acquiring a second target point located on the lower left of the target area from the candidate points includes:
acquiring a point with the minimum longitude in the first candidate point set to obtain a minimum longitude point set; taking at least one point with the smallest latitude in the minimum longitude point set as the second target point; the first candidate point set is a set formed by all or part of the candidate points;
the obtaining a third target point located on the right of the lower part of the target area from the candidate points includes:
taking at least one point with the largest degree in the minimum latitude point set as the third target point;
the acquiring a fourth target point located on the lower right of the target area from the candidate points includes:
acquiring a point with the largest longitude in the second candidate point set to acquire a maximum longitude point set; taking at least one point with the smallest latitude in the maximum longitude point set as the fourth target point; the second candidate point set is a set formed by all or part of the candidate points;
the acquiring a fifth target point located at the top of the target area from the candidate points includes:
acquiring at least one point with the largest latitude in the third candidate point set as the fifth target point; the third candidate point set is a set of all or some of the respective candidate points.
4. The method of claim 3, wherein the coordinate adjustment reference value comprises a latitude adjustment reference value;
the first candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a first latitude increment in all the candidate points; the first latitude increment is a product between the latitude adjustment reference value and a first latitude increment ratio; the first latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
5. The method of claim 3, wherein the coordinate adjustment reference value comprises a latitude adjustment reference value;
the second candidate point set is a set formed by candidate points of which the latitude is smaller than the sum of the minimum latitude and a second latitude increment in all the candidate points; the second latitude increment is a product between the latitude adjustment reference value and a second latitude increment ratio; the second latitude increment ratio is less than 1 and greater than 0; the minimum latitude is a minimum among the latitudes of the respective candidate points.
6. The method of claim 4, wherein the third set of candidate points is a set of the respective marker points.
7. The method according to any one of claims 3 to 6, wherein the coordinate adjustment reference values include a latitude adjustment reference value and a longitude adjustment reference value;
the obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points includes:
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the first target point to obtain the coordinate of the first virtual point;
based on the longitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the longitude of the second target point to obtain the coordinate of a second virtual point;
based on the latitude adjustment reference value and the adjustment ratio, carrying out reduction adjustment on the latitude of the third target point to obtain the coordinate of a third virtual point;
increasing and adjusting the longitude of the fourth target point based on the longitude adjustment reference value and the adjustment ratio to obtain the coordinate of a fourth virtual point;
and increasing and adjusting the latitude of the fifth target point based on the latitude adjustment reference value and the adjustment ratio to obtain the coordinate of the fifth virtual point.
8. The method of claim 7, wherein before the obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points, further comprising:
and acquiring the adjustment ratio based on the position information of the superimposed icon in the map interface, the size of the superimposed icon and the size of the map interface.
9. The method of claim 7, wherein before the obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points, further comprising:
and inquiring the adjustment ratio based on the equipment information of the terminal displaying the map interface.
10. The method of claim 7, wherein before the obtaining the coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points, further comprising:
acquiring the preset adjustment ratio.
11. The method according to claim 1, wherein the obtaining a coordinate adjustment reference value based on the coordinates of each candidate point comprises:
acquiring a latitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the latitude of each candidate point and the minimum value of the latitude of each candidate point;
and acquiring a longitude adjustment reference value in the coordinate adjustment reference values based on the maximum value of the longitudes of the candidate points and the minimum value of the longitudes of the candidate points.
12. The method of claim 1, wherein prior to presenting the electronic map containing the marker line of the target path in the map interface based on the coordinates of the N virtual points, further comprising:
displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N target points;
the displaying, in the map interface, the electronic map including a marker line of the target path based on the coordinates of the N virtual points, comprising:
in response to receiving a designation operation for the map interface, the electronic map including a marker line for the target path is shown in the map interface based on the coordinates of the N virtual points.
13. A map interface presentation device, the device comprising:
the interface display module is used for displaying a map interface, and the map interface is used for displaying an electronic map;
the candidate point coordinate acquisition module is used for responding to an instruction for displaying a target path in the map interface and acquiring the coordinates of each candidate point; each candidate point comprises a point on the target path and each mark point corresponding to the target path;
a reference value obtaining module, configured to obtain a coordinate adjustment reference value based on the coordinates of each candidate point;
a target point obtaining module, configured to obtain N target points from each candidate point; the N target points are points close to the edge of the target area where each candidate point is located; n is an integer greater than or equal to 2;
a virtual point coordinate obtaining module, configured to obtain coordinates of the N virtual points based on the coordinate adjustment reference value and the coordinates of the N target points; the N virtual points correspond to the N target points one by one; the relative direction of the virtual point and the corresponding target point is opposite to the relative direction of the corresponding target point and the target area;
a map display module for displaying the electronic map including the marker line of the target path in the map interface based on the coordinates of the N virtual points; the N virtual points are located within a viewable area of the map interface.
14. A computer device comprising a processor and a memory, wherein at least one computer program is stored in the memory, and wherein the at least one computer program is loaded and executed by the processor to implement the map interface presentation method according to any one of claims 1 to 12.
15. A computer-readable storage medium, in which at least one computer program is stored, which is loaded and executed by a processor to implement the map interface presentation method according to any one of claims 1 to 12.
CN202110183470.6A 2021-02-08 2021-02-08 Map interface display method and device, computer equipment and storage medium Active CN112800163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110183470.6A CN112800163B (en) 2021-02-08 2021-02-08 Map interface display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110183470.6A CN112800163B (en) 2021-02-08 2021-02-08 Map interface display method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112800163A true CN112800163A (en) 2021-05-14
CN112800163B CN112800163B (en) 2021-12-14

Family

ID=75815143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110183470.6A Active CN112800163B (en) 2021-02-08 2021-02-08 Map interface display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112800163B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114322985A (en) * 2021-12-24 2022-04-12 深圳依时货拉拉科技有限公司 Method, device and equipment for displaying recommended points of electronic map and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190033088A1 (en) * 2016-03-31 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Method, apparatus and storage medium for controlling navigation map
CN110362242A (en) * 2018-04-11 2019-10-22 腾讯大地通途(北京)科技有限公司 A kind of map methods of exhibiting and terminal device
CN111957041A (en) * 2020-09-07 2020-11-20 网易(杭州)网络有限公司 Map viewing method in game, terminal, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190033088A1 (en) * 2016-03-31 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Method, apparatus and storage medium for controlling navigation map
CN110362242A (en) * 2018-04-11 2019-10-22 腾讯大地通途(北京)科技有限公司 A kind of map methods of exhibiting and terminal device
CN111957041A (en) * 2020-09-07 2020-11-20 网易(杭州)网络有限公司 Map viewing method in game, terminal, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114322985A (en) * 2021-12-24 2022-04-12 深圳依时货拉拉科技有限公司 Method, device and equipment for displaying recommended points of electronic map and storage medium
CN114322985B (en) * 2021-12-24 2024-04-12 深圳依时货拉拉科技有限公司 Electronic map recommendation point display method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112800163B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
JP2016122205A (en) System and method for collecting and providing map images
WO2014078155A1 (en) Auto-scaling of an indoor map
US10393539B2 (en) API for obtaining geographic location data
CN110914870B (en) Annotation generation for image networks
CN103017767B (en) Use the method and apparatus of the position of the accuracy measurement terminal of measurement position
US9804748B2 (en) Scale sensitive treatment of features in a geographic information system
US10444954B2 (en) Distinguishable geographic area presentation
US9626796B2 (en) Method to optimize the visualization of a map&#39;s projection based on data and tasks
US9392044B2 (en) System and method for providing geospatial assets
US11402232B2 (en) Off-viewport location indications for digital mapping
CN107656961A (en) A kind of method for information display and device
US20220386071A1 (en) Road side positioning method and apparatus, device, and storage medium
US9488489B2 (en) Personalized mapping with photo tours
CN112800163B (en) Map interface display method and device, computer equipment and storage medium
JP6165422B2 (en) Information processing system, information processing device, server, terminal device, information processing method, and program
US8467990B2 (en) Method for setting the geolocation of a non-GPS enabled device
US9245360B2 (en) Computing devices and methods for deterministically placing geometric shapes within geographic maps
EP3322149B1 (en) Customized map generation with real time messages and locations from concurrent users
CN111737374B (en) Position coordinate determination method, device, electronic equipment and storage medium
JP2001257972A (en) Electronic equipment
CN111947679A (en) Method, computing device and computer-readable storage medium for assisting navigation
CN110347771B (en) Method and apparatus for presenting a map
JP6713560B1 (en) Lot number information providing system, lot number information providing method
Diakité About the Geo-referencing of BIM models
CN102317988A (en) DEVICE FOR PROVIDING INFORMATION USING STRUCTURAL FORM AND METHOD THEREFOr

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40043939

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant