[go: up one dir, main page]

CN110440825B - Distance display method and terminal - Google Patents

Distance display method and terminal Download PDF

Info

Publication number
CN110440825B
CN110440825B CN201910699549.7A CN201910699549A CN110440825B CN 110440825 B CN110440825 B CN 110440825B CN 201910699549 A CN201910699549 A CN 201910699549A CN 110440825 B CN110440825 B CN 110440825B
Authority
CN
China
Prior art keywords
map
geographic
screenshot
distance
geographic location
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.)
Active
Application number
CN201910699549.7A
Other languages
Chinese (zh)
Other versions
CN110440825A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910699549.7A priority Critical patent/CN110440825B/en
Publication of CN110440825A publication Critical patent/CN110440825A/en
Application granted granted Critical
Publication of CN110440825B publication Critical patent/CN110440825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers
    • G01C21/3667Display of a road map
    • G01C21/367Details, e.g. road map scale, orientation, zooming, illumination, level of detail, scrolling of road map or positioning of current position marker
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Telephone Function (AREA)
  • Navigation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例提供了一种距离显示方法及终端。该方法包括:接收用户对地图截图中的第一地理位置和第二地理位置的第一输入;响应于所述第一输入,根据单个密度无关像素对应的地理距离信息,确定所述第一地理位置到所述第二地理位置的直线距离;在所述地图截图中显示出所述直线距离。本发明实施例中,通过直接对地图截图上的任意两个地点的触控操作,则可以在地图截图上显示这两个地点之间的直线距离,操作简单。

Figure 201910699549

Embodiments of the present invention provide a distance display method and terminal. The method includes: receiving a first input from a user on a first geographic location and a second geographic location in a map screenshot; in response to the first input, determining the first geographic location according to geographic distance information corresponding to a single density-independent pixel The straight-line distance from the location to the second geographic location; the straight-line distance is displayed in the map screenshot. In the embodiment of the present invention, by directly touching any two locations on the map screenshot, the straight-line distance between the two locations can be displayed on the map screenshot, and the operation is simple.

Figure 201910699549

Description

Distance display method and terminal
Technical Field
The embodiment of the invention relates to the technical field of electronic maps, in particular to a distance display method and a terminal.
Background
With the development of information technology, electronic maps have become an indispensable tool in people's lives. Route planning can be performed through the electronic map, and information on the periphery of the destination can be checked. Querying the distance between two locations is also a very common function. At present, the distance between two points can be calculated by a distance measuring tool in order to know the straight-line distance between the two points through an electronic map. Or input the starting point and the end point through the input box and then click the route planning to know the distance between the two places. However, the use of the ranging tool requires entering the ranging mode, which is difficult for an unfamiliar user to enter because of the hidden entrance. On the terminal, the distance between two points is inquired by inputting a starting point and a terminal point through an input box and then clicking route planning, so that a user is required to perform complicated operation, the efficiency is not high, and the use threshold is high. In addition, the GPS is started when the map application software is started, and the GPS consumes power, so that the endurance time of the terminal is influenced.
In short, when a user views the straight-line distance between any two places in the electronic map, the problem of inconvenient operation exists.
Disclosure of Invention
The embodiment of the invention provides a distance display method and a terminal, which are used for solving the problem of inconvenient operation when a user looks up the linear distance between any two places in an electronic map in the prior art.
In order to solve the technical problems, the invention adopts the following technical scheme:
in a first aspect, a distance display method is provided, which is applied to a terminal and includes:
receiving first input of a user on a first geographic position and a second geographic position in a map screenshot; the map screenshot is obtained by screenshot of a map displayed in map application software;
in response to the first input, determining a straight-line distance from the first geographical position to the second geographical position according to geographical distance information corresponding to a single density-independent pixel; wherein the geographic distance information corresponding to the single density-independent pixel is included in the additional information of the map screenshot;
the straight-line distance is displayed in the map screenshot.
In a second aspect, a terminal is provided, including:
the first receiving module is used for receiving first input of a user on a first geographical position and a second geographical position in the map screenshot; the map screenshot is obtained by screenshot of a map displayed in map application software;
a first determining module, configured to determine, in response to the first input received by the first receiving module, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to a single density-independent pixel; wherein the geographic distance information corresponding to the single density-independent pixel is included in the additional information of the map screenshot;
and the display module is used for displaying the straight-line distance determined by the first determination module in the map screenshot.
In a third aspect, a terminal is provided, including: a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the distance display method as described above.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the distance display method as claimed above.
In the embodiment of the invention, the straight-line distance between any two places on the map screenshot can be displayed on the map screenshot by directly performing touch operation on the two places on the map screenshot, so that the operation is simple and the threshold is low.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flow chart of a distance display method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of the present invention;
FIG. 3 shows one of the schematic diagrams of an example provided by an embodiment of the present invention;
FIG. 4 is a flow chart of a second embodiment of the present invention;
FIG. 5 is a second schematic diagram of an example provided by an embodiment of the present invention;
fig. 6 shows one of block diagrams of a terminal according to an embodiment of the present invention;
fig. 7 shows a second block diagram of the terminal according to the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
According to an aspect of an embodiment of the present invention, a distance display method is provided, which is applied to a terminal. In the embodiment of the present invention, the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
As shown in fig. 1, the distance display method includes:
step 101: a first input by a user of a first geographic location and a second geographic location in a map screenshot is received.
The map screenshot is obtained by screenshot of a map displayed in map application software. The map screenshot may be a screenshot shared by other terminals, that is, before receiving a first input of a user on a first geographic position and a second geographic position in the map screenshot, the method further includes: receiving the map screenshot sent by other terminals; or the user can capture a screenshot of the map displayed in the map application software through the terminal.
The first input described herein is a trigger operation for displaying a straight-line distance between two geographic locations. The first input includes, but is not limited to: at least one of a pressing operation, a sliding operation, and a clicking operation.
Step 102: in response to the first input in step 101, a straight-line distance from the first geographic location to the second geographic location is determined according to the geographic distance information corresponding to the single density independent pixel.
The geographic distance information corresponding to a single Density independent pixel (Density independent pixel) herein refers to an actual geographic distance corresponding to a Density independent pixel, for example, the actual geographic distance corresponding to a Density independent pixel is 100 m.
The geographical distance information corresponding to the single density-independent pixel is obtained by calculation according to the scale information of the map displayed in the map application software in screenshot and the size information of the map screenshot. After the geographic distance information corresponding to the single density-independent pixel is obtained through calculation, the geographic distance information corresponding to the single density-independent pixel can be stored in additional information of the map screenshot, for example, in an Exchangeable image file format (Exif for short) of the map screenshot, the geographic distance information corresponding to the single density-independent pixel is concentrated in a certain designated field.
The density-independent pixels are independent of the resolution of the terminal screen and the screen density, the universality is good, and the calculated linear distance is more accurate.
Step 103: the straight-line distance from the first geographic location to the second geographic location is displayed in the map screenshot.
In this step, the linear distance from the first geographic position to the second geographic position determined in step 102 is displayed in the map screenshot for the user to view.
In the embodiment of the invention, a user can directly perform touch operation on any two places on the map screenshot, so that the distance between the two places can be quickly acquired on the map screenshot, and therefore, firstly, a distance measuring tool is not needed to be used for acquiring the linear distance between the two places, and the trouble of finding the entrance of the distance measuring tool is avoided; secondly, after the user does not need to manually input two places, the linear distance between the two places is obtained through route planning, and the threshold height is reduced; thirdly, after the map screenshot is obtained, the use of map application software can be reduced, and the electric energy consumed by starting a GPS function in the map application software is reduced; and fourthly, when the screenshot is shared by other users, the linear distance between any two geographic positions on the screenshot can be obtained even if no map application software is installed on the terminals of the other users, and the screenshot is convenient for the users to use.
For example, when a user views commuting information near a destination, the user wants to know information such as a subway station, a bus station, or an obvious landmark building near the destination. The user can quickly know the linear distance between two points near the destination (for example, a building at the destination and a nearby subway station) through the method provided by the embodiment of the invention so as to assist in judging the destination, and what commuting mode needs to be selected after the user leaves the subway station, and then the user can select walking, riding a bicycle, getting on the bus, and the like, thereby greatly facilitating the use of the map by the user.
To better understand the first input operation provided by the embodiments of the present invention, the embodiments of the present invention provide two embodiments, as follows:
example one
As shown in fig. 2, this embodiment includes:
step 201: and receiving the simultaneous pressing operation of the first geographical position and the second geographical position by the user.
In the first embodiment, the first input is a pressing operation performed on the first geographical location and the second geographical location together.
Step 202: in response to the pressing operation in step 201, when the pressing operation continues for a preset duration, determining a linear distance from the first geographic location to the second geographic location according to the geographic distance information corresponding to the single density-independent pixel.
In this step, the terminal starts timing after receiving a pressing operation performed by a user on both the first geographic position and the second geographic position in the map screenshot, and determines a linear distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel when the pressing operation lasts for a preset duration.
Step 203: the straight-line distance from the first geographic location to the second geographic location is displayed in the map screenshot.
For example, as shown in fig. 3, point a in the diagram corresponds to a first geographic location, and point B in the diagram corresponds to a second geographic location. When a user wants to view A, B the straight-line distance between two points, the user can press point a with a touch control body (such as a finger, a touch control pen, etc.), then press point B with a touch control body (such as a finger, a touch control pen, etc.), start timing when both points A, B are pressed, determine the straight-line distance from the first geographic position to the second geographic position when the pressing operation lasts for a preset time (such as 2 seconds), and mark and display the straight-line distance from the first geographic position to the second geographic position in the map screenshot. It will of course be appreciated that it is also possible to press A, B two points at the same time.
In the first embodiment, the distance between the two places can be obtained by clicking the two places simultaneously, and the operation is simple and convenient.
Example two
As shown in fig. 4, this embodiment includes:
step 401: and receiving a sliding operation of the user on the map screenshot.
In the second embodiment, the first input is a sliding operation performed on the first geographic position and the second geographic position. The starting point of the sliding operation is a first geographic position, and the end point of the sliding operation is a second geographic position.
Step 402: in response to the sliding operation in step 401, a straight-line distance from the first geographic position to the second geographic position is determined according to the geographic distance information corresponding to the single density-independent pixel.
In step 402, when the terminal receives the sliding operation with the starting point as the first geographic position and the ending point as the second geographic position, the terminal determines the linear distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel.
Step 403: the straight-line distance from the first geographic location to the second geographic location is displayed in the map screenshot.
For example, as shown in fig. 5, point a in the diagram corresponds to a first geographic location, and point B in the diagram corresponds to a second geographic location. When a user wants to view A, B the straight-line distance between two points, the user may touch point a with a touch object (e.g., a finger, a stylus, etc.), then control the touch object to move toward point B, lift the touch object when the touch object touches point B, determine the straight-line distance from the first geographic location to the second geographic location, and then mark and display the straight-line distance from the first geographic location to the second geographic location in the map screenshot.
Optionally, when A, B two points are not displayed on the current screen simultaneously (e.g. point a is displayed on the current screen and point B is not displayed on the current screen), for example, when the user performs A, B two-point touch more accurately, the map screenshot may be displayed in an enlarged manner, at this time, part of the map screenshot may not be displayed on the current screen, at this time, the touch object may be controlled to move towards point B, when the touch object moves to the edge of the screen, the map screenshot may move along the direction opposite to the direction of movement of the touch object, and when point B is displayed, the user controls the touch object to move to point B again, so that the viewing of the straight-line distance may be made without being limited to the range visible on the current screen, and the range of the distance measurement may be extended. Alternatively, in this case, when the straight-line distance is displayed, the map screenshot may be reduced to display A, B at the same time, and then the straight-line distance between A, B points may be marked and displayed.
Optionally, during the sliding process of the touch body, a connection line may be displayed, so that the connection line connects the first geographic position and the end position of the sliding operation.
For example, as shown in fig. 5, a connecting line 401 (a solid line or a dashed line) may be drawn with point a as a starting point, connecting point a and the end of the touch object sliding (i.e. the end position of the moving end of the sliding operation) to show the association between the two points.
In the second embodiment, two places for calculating the linear distance are selected through the starting point and the terminal of the sliding operation, the operation is simple and convenient, the linear distance can be checked without being limited in the range visible by the current screen, and the range of distance measurement is expanded.
Optionally, before the receiving a first input of a first geographical location and a second geographical location in the map screenshot by the user, the method further comprises: receiving screenshot operation of a user; responding to the screenshot operation, and carrying out screenshot on the map displayed in the map application software to obtain the map screenshot; determining geographical distance information corresponding to a single density-independent pixel in the map screenshot according to the scale information of the displayed map and the size information of the map screenshot; and adding the geographical distance information corresponding to the single density-independent pixel to the additional information of the map screenshot.
In the embodiment of the invention, when the terminal detects the screenshot operation, whether the application software running in the foreground is the map application software can be judged firstly, and the judgment can be specifically carried out through the package name of the application software or the image recognition technology. When the application software running in the foreground is map application software, screenshot is carried out on a map displayed in the map application software, and meanwhile, the scale information of the current map is obtained. And then, carrying out data conversion through the obtained scale information and the size information of the screenshot to obtain the geographical distance information corresponding to the single density irrelevant pixel, and adding the geographical distance information corresponding to the single density irrelevant pixel into the additional information of the screenshot. When the straight-line distance from the first geographical position to the second geographical position is displayed in the screenshot according to the first input, the straight-line distance from the first geographical position to the second geographical position in the screenshot can be determined and displayed according to the geographical distance information corresponding to the single density-independent pixel.
Optionally, in the embodiment of the present invention, when a map in the map application software is subjected to screenshot, a manner for user interaction may be provided to obtain the map scale information. When screenshot is carried out, if the application software running on the current foreground is judged to be map application software, the system pops up similar prompt information such as 'whether map information is detected at present and scale information needs to be acquired' for selection of a user, and after the user confirms that the scale information is acquired, a pop-up interactive frame is popped up for the user to select and store the scale information.
In the embodiment of the invention, in order to avoid the influence of different screen resolutions and screen densities, the geographical distance information corresponding to the single density independent pixel is calculated. The specific calculation method is as follows:
first, the related concepts will be explained as shown in table 1.
TABLE 1
Figure BDA0002150387190000071
Figure BDA0002150387190000081
Take scale information as an example, 1cm on the map represents a distance of 200 meters. First, the number of pixels a included in 1cm on the screen is calculated, where a is dpi/2.54(1 inch is 2.54cm), the number of dps included in 1cm is b, which is obtained from px is dp similarity, and b is a/similarity, which is a actual distance c indicated by a single dp pixel is 200/b (actual distance represented by 1 cm/number of dps included in 1cm on the screen).
Optionally, in response to the first input, determining a straight-line distance from the first geographic location to the second geographic location according to the geographic distance information corresponding to the single density-independent pixel includes:
in response to a first input, determining a density-independent number of pixels between an image corresponding to a first geographic location and an image corresponding to a second geographic location; and determining the straight-line distance from the first geographical position to the second geographical position according to the geographical distance information corresponding to the single density-independent pixel and the density-independent pixel number between the image corresponding to the first geographical position and the image corresponding to the second geographical position.
Suppose that the coordinates of the image corresponding to the first geographical position are A (x1, y1), and the coordinates of the image corresponding to the second geographical position are B (x2, y2), wherein the coordinates of the image are the coordinates of the center point of the image, and the unit of the coordinates is pixel px.
First, from the coordinates of A, B two points, the density-independent pixel (unit dp) distance d1 between A, B two points is calculated. Wherein the number of pixels between two points can be calculated A, B according to Pythagorean theorem
Figure BDA0002150387190000082
Then, the number D of pixels is converted into the number D1 of dp, that is, the density-independent pixel distance D1 between two points A, B is obtained, D1 is D/density, then, the geographic distance value c corresponding to a single dp pixel is obtained from screenshot additional information (such as information of a specified field in Exif), and finally, the straight-line distance D between two points A, B is obtained, that is, D1 is obtained.
In summary, in the embodiment of the present invention, a user can directly perform touch operations on any two locations on a map screenshot, so as to quickly obtain a distance between the two locations on the map screenshot, and thus, firstly, a distance measurement tool is not needed to be used to obtain a linear distance between the two locations, and a trouble of finding an entrance of the distance measurement tool is omitted; secondly, after the user does not need to manually input two places, the linear distance between the two places is obtained through route planning, and the threshold height is reduced; thirdly, after the map screenshot is obtained, the use of map application software can be reduced, and the electric energy consumed by starting a GPS function in the map application software is reduced; and fourthly, when the screenshot is shared by other users, the linear distance between any two geographic positions on the screenshot can be obtained even if no map application software is installed on the terminals of the other users, and the screenshot is convenient for the users to use.
According to an aspect of the embodiments of the present invention, a terminal is provided, and the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like. The terminal can realize all the details of the distance display method and can achieve the same effect.
As shown in fig. 6, the terminal includes:
the first receiving module 601 is configured to receive a first input of a first geographic location and a second geographic location in the map screenshot from a user.
A first determining module 602, configured to determine, in response to the first input received by the first receiving module 601, a straight-line distance from the first geographic location to the second geographic location according to geographic distance information corresponding to a single density-independent pixel.
Wherein the geographical distance information corresponding to the single density independent pixel is included in the additional information of the map screenshot.
A display module 603, configured to display the linear distance determined by the first determining module 602 in the map screenshot.
Optionally, the first receiving module 601 includes:
the first receiving unit is used for receiving the pressing operation of the user on the first geographical position and the second geographical position simultaneously.
The first determining module 602 includes:
a first determining unit, configured to determine, in response to the pressing operation received by the first receiving unit, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to the single density-independent pixel when the pressing operation lasts for a preset duration.
Optionally, the first receiving module 601 includes:
and the second receiving unit is used for receiving the sliding operation of the user on the map screenshot.
And the starting point of the sliding operation is the first geographic position, and the end point of the sliding operation is the second geographic position.
The first determining module 602 includes:
and the second determining unit is used for responding to the sliding operation received by the second receiving unit and determining the straight-line distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel.
Optionally, the terminal further includes:
and the second receiving module is used for receiving the screenshot operation of the user.
And the acquisition module is used for responding to the screenshot operation received by the second receiving module and carrying out screenshot on the map displayed in the map application software to obtain the map screenshot.
And the second determination module is used for determining the geographical distance information corresponding to the single density-independent pixel in the map screenshot according to the scale information of the displayed map and the size information of the map screenshot.
And the information adding module is used for adding the geographical distance information corresponding to the single density-independent pixel determined by the second determining module into the additional information of the map screenshot.
Optionally, the first determining module 602 includes:
a third determination unit, configured to determine, in response to the first input, a density-independent number of pixels between the image corresponding to the first geographic location and the image corresponding to the second geographic location.
And the fourth determining unit is used for determining the linear distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel and the density-independent pixel number between the image corresponding to the first geographic position and the image corresponding to the second geographic position.
In the embodiment of the invention, a user can directly perform touch operation on any two places on the map screenshot, so that the distance between the two places can be quickly acquired on the map screenshot, and therefore, firstly, a distance measuring tool is not needed to be used for acquiring the linear distance between the two places, and the trouble of finding the entrance of the distance measuring tool is avoided; secondly, after the user does not need to manually input two places, the linear distance between the two places is obtained through route planning, and the threshold height is reduced; thirdly, after the map screenshot is obtained, the use of map application software can be reduced, and the electric energy consumed by starting a GPS function in the map application software is reduced; and fourthly, when the screenshot is shared by other users, the linear distance between any two geographic positions on the screenshot can be obtained even if no map application software is installed on the terminals of the other users, and the screenshot is convenient for the users to use.
Fig. 7 is a schematic diagram of a hardware structure of a terminal for implementing various embodiments of the present invention.
The terminal 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, a power supply 711, and the like. Those skilled in the art will appreciate that the terminal configuration shown in fig. 7 is not intended to be limiting, and that the terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
A processor 710, configured to, when the user input unit 707 receives a first input of a first geographic position and a second geographic position in the map screenshot from the user, determine, in response to the first input, a linear distance from the first geographic position to the second geographic position according to geographic distance information corresponding to a single density-independent pixel; and displaying the straight-line distance in the map screenshot.
The map screenshot is obtained by screenshot of a map displayed in map application software; the geographic distance information corresponding to the single density independent pixel is included in the additional information of the map screenshot.
In the embodiment of the invention, a user can directly perform touch operation on any two places on the map screenshot, so that the distance between the two places can be quickly acquired on the map screenshot, and therefore, firstly, a distance measuring tool is not needed to be used for acquiring the linear distance between the two places, and the trouble of finding the entrance of the distance measuring tool is avoided; secondly, after the user does not need to manually input two places, the linear distance between the two places is obtained through route planning, and the threshold height is reduced; thirdly, after the map screenshot is obtained, the use of map application software can be reduced, and the electric energy consumed by starting a GPS function in the map application software is reduced; and fourthly, when the screenshot is shared by other users, the linear distance between any two geographic positions on the screenshot can be obtained even if no map application software is installed on the terminals of the other users, and the screenshot is convenient for the users to use.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 710; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 701 may also communicate with a network and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user via the network module 702, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output related to a specific function performed by the terminal 700 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used to receive audio or video signals. The input Unit 704 may include a Graphics Processing Unit (GPU) 7041 and a microphone 7042, and the Graphics processor 7041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 706. The image frames processed by the graphic processor 7041 may be stored in the memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 701 in case of a phone call mode.
The terminal 700 also includes at least one sensor 705, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or a backlight when the terminal 700 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 705 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 706 is used to display information input by the user or information provided to the user. The Display unit 706 may include a Display panel 7061, and the Display panel 7061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 7071 (e.g., operations by a user on or near the touch panel 7071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 7071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 710, receives a command from the processor 710, and executes the command. In addition, the touch panel 7071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, the other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation on or near the touch panel 7071, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although the touch panel 7071 and the display panel 7061 are shown in fig. 7 as two separate components to implement the input and output functions of the terminal, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 708 is an interface for connecting an external device to the terminal 700. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 700 or may be used to transmit data between the terminal 700 and the external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 709 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby integrally monitoring the terminal. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 710.
The terminal 700 may also include a power supply 711 (e.g., a battery) for providing power to the various components, and preferably, the power supply 711 may be logically coupled to the processor 710 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the terminal 700 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal, including a processor 710, a memory 709, and a computer program stored in the memory 709 and capable of running on the processor 710, where the computer program is executed by the processor 710 to implement each process of the distance display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the distance display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A distance display method is applied to a terminal and is characterized by comprising the following steps:
receiving first input of a user on a first geographic position and a second geographic position in a map screenshot; the map screenshot is obtained by screenshot of a map displayed in map application software;
in response to the first input, determining a straight-line distance from the first geographical position to the second geographical position according to geographical distance information corresponding to a single density-independent pixel; wherein the geographic distance information corresponding to the single density-independent pixel is included in the additional information of the map screenshot;
displaying the straight-line distance in the map screenshot;
prior to the receiving a first input by a user of a first geographic location and a second geographic location in a map screenshot, the method further comprises:
receiving screenshot operation of a user;
responding to the screenshot operation, and performing screenshot on the map displayed in the map application software to obtain the map screenshot;
determining geographical distance information corresponding to a single density-independent pixel in the map screenshot according to the scale information of the displayed map and the size information of the map screenshot;
and adding the geographical distance information corresponding to the single density-independent pixel to the additional information of the map screenshot.
2. The method of claim 1, wherein receiving a first user input of a first geographic location and a second geographic location of a map screenshot comprises:
receiving the pressing operation of a user on the first geographical position and the second geographical position simultaneously;
the step of determining, in response to the first input, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to a single density independent pixel includes:
and responding to the pressing operation, and determining the straight-line distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel when the pressing operation lasts for a preset time.
3. The method of claim 1, wherein receiving a first user input of a first geographic location and a second geographic location of a map screenshot comprises:
receiving sliding operation of a user on the map screenshot, wherein the starting point of the sliding operation is the first geographic position, and the end point of the sliding operation is the second geographic position;
the step of determining, in response to the first input, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to a single density independent pixel includes:
and in response to the sliding operation, determining a straight-line distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel.
4. The method of claim 1, wherein determining, in response to the first input, a linear distance from the first geographic location to the second geographic location based on geographic distance information corresponding to a single density independent pixel comprises:
determining, in response to the first input, a density-independent number of pixels between the image corresponding to the first geographic location and the image corresponding to the second geographic location;
and determining the linear distance from the first geographical position to the second geographical position according to the geographical distance information corresponding to the single density-independent pixel and the density-independent pixel number between the image corresponding to the first geographical position and the image corresponding to the second geographical position.
5. A terminal, comprising:
the first receiving module is used for receiving first input of a user on a first geographical position and a second geographical position in the map screenshot; the map screenshot is obtained by screenshot of a map displayed in map application software;
a first determining module, configured to determine, in response to the first input received by the first receiving module, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to a single density-independent pixel; wherein the geographic distance information corresponding to the single density-independent pixel is included in the additional information of the map screenshot;
the display module is used for displaying the straight-line distance determined by the first determination module in the map screenshot;
the terminal further comprises:
the second receiving module is used for receiving screenshot operation of a user;
the acquisition module is used for responding to the screenshot operation received by the second receiving module and carrying out screenshot on the map displayed in the map application software to obtain the map screenshot;
the second determination module is used for determining geographic distance information corresponding to a single density-independent pixel in the map screenshot according to the scale information of the displayed map and the size information of the map screenshot;
and the information adding module is used for adding the geographical distance information corresponding to the single density-independent pixel determined by the second determining module into the additional information of the map screenshot.
6. The terminal of claim 5, wherein the first receiving module comprises:
the first receiving unit is used for receiving the pressing operation of the user on the first geographical position and the second geographical position simultaneously;
the first determining module includes:
a first determining unit, configured to determine, in response to the pressing operation received by the first receiving unit, a linear distance from the first geographic location to the second geographic location according to geographic distance information corresponding to the single density-independent pixel when the pressing operation lasts for a preset duration.
7. The terminal of claim 5, wherein the first receiving module comprises:
a second receiving unit, configured to receive a sliding operation of a user on the map screenshot, where a starting point of the sliding operation is the first geographic location and an end point of the sliding operation is the second geographic location;
the first determining module includes:
and the second determining unit is used for responding to the sliding operation received by the second receiving unit and determining the straight-line distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel.
8. The terminal of claim 5, wherein the first determining module comprises:
a third determining unit, configured to determine, in response to the first input, a density-independent number of pixels between the image corresponding to the first geographic location and the image corresponding to the second geographic location;
and the fourth determining unit is used for determining the linear distance from the first geographic position to the second geographic position according to the geographic distance information corresponding to the single density-independent pixel and the density-independent pixel number between the image corresponding to the first geographic position and the image corresponding to the second geographic position.
9. A terminal, comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, carries out the steps of the distance display method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the distance display method according to any one of claims 1 to 4.
CN201910699549.7A 2019-07-31 2019-07-31 Distance display method and terminal Active CN110440825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910699549.7A CN110440825B (en) 2019-07-31 2019-07-31 Distance display method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910699549.7A CN110440825B (en) 2019-07-31 2019-07-31 Distance display method and terminal

Publications (2)

Publication Number Publication Date
CN110440825A CN110440825A (en) 2019-11-12
CN110440825B true CN110440825B (en) 2022-02-08

Family

ID=68432342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910699549.7A Active CN110440825B (en) 2019-07-31 2019-07-31 Distance display method and terminal

Country Status (1)

Country Link
CN (1) CN110440825B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764621B (en) * 2021-01-25 2022-07-15 维沃移动通信有限公司 Screenshot method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101750083A (en) * 2008-12-11 2010-06-23 华晶科技股份有限公司 Electronic equipment capable of self-establishing navigation chart data and method thereof
CN103047992A (en) * 2012-12-28 2013-04-17 百度在线网络技术(北京)有限公司 Mobile terminal and method for measuring distance based on map in mobile terminal
CN103542809A (en) * 2013-09-29 2014-01-29 吴更生 Portable intelligent map ranging pen

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5877762A (en) * 1995-02-27 1999-03-02 Apple Computer, Inc. System and method for capturing images of screens which display multiple windows
CN101288589A (en) * 2008-04-25 2008-10-22 浙江省淡水水产研究所 Non-invasive rapid determination method of morphological characteristics of aquatic animals
US8671365B2 (en) * 2008-11-26 2014-03-11 Nokia Corporation Method, apparatus and computer program product for providing a cursor for indicating context data in a mapping application
CN106294474B (en) * 2015-06-03 2019-07-16 阿里巴巴集团控股有限公司 Show processing method, the apparatus and system of data
JP2018105754A (en) * 2016-12-27 2018-07-05 富士通株式会社 Distance calculation program, flow rate measurement program, method and device
CN107807769A (en) * 2017-09-29 2018-03-16 珠海市魅族科技有限公司 Sectional drawing control method and device, terminal installation and computer-readable recording medium
CN109470233B (en) * 2018-09-13 2021-09-28 北京米文动力科技有限公司 Positioning method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101750083A (en) * 2008-12-11 2010-06-23 华晶科技股份有限公司 Electronic equipment capable of self-establishing navigation chart data and method thereof
CN103047992A (en) * 2012-12-28 2013-04-17 百度在线网络技术(北京)有限公司 Mobile terminal and method for measuring distance based on map in mobile terminal
CN103542809A (en) * 2013-09-29 2014-01-29 吴更生 Portable intelligent map ranging pen

Also Published As

Publication number Publication date
CN110440825A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
CN107943390B (en) Character copying method and mobile terminal
CN110109593B (en) Screen capturing method and terminal equipment
CN111142723B (en) Icon moving method and electronic device
CN109523253B (en) A payment method and device
CN110110571B (en) Code scanning method and mobile terminal
CN108536509B (en) A kind of application avatar method and mobile terminal
CN110908750B (en) Screen capturing method and electronic equipment
CN109343788B (en) A kind of operation control method of mobile terminal and mobile terminal
CN108022446A (en) A kind of parking spot acquisition methods, mobile terminal
CN108287655A (en) A kind of interface display method, interface display apparatus and mobile terminal
CN107783747B (en) Interface display processing method and mobile terminal
CN107678672A (en) A kind of display processing method and mobile terminal
CN111078819A (en) Application sharing method and electronic equipment
CN110940339A (en) Navigation method and electronic equipment
CN111061446A (en) A display method and electronic device
CN108388396A (en) A kind of interface switching method and mobile terminal
CN111523286B (en) Picture display method, picture display device, electronic equipment and computer readable storage medium
CN109579752B (en) A measuring method and terminal equipment
CN111145582A (en) An information control method and electronic device
CN110780795A (en) Screen capturing method and electronic equipment
CN108062370B (en) Application search method and mobile terminal
CN111130995B (en) Image control method, electronic device, and storage medium
CN110440825B (en) Distance display method and terminal
CN110769162B (en) Electronic equipment and focusing method
CN109714462B (en) A method for marking a telephone number and its mobile terminal

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
GR01 Patent grant
GR01 Patent grant