Method and apparatus for adjusting map display
By analyzing the adjustment gesture data of the map display page, obtaining adjustment indicators, and scaling and rotating the map according to the indicators, the problem of cumbersome operation after two-finger interactive locking in the existing technology is solved, and the effect of simplifying the adjustment operation of the map display page is achieved.
Patent Information
- Application Number
- CN202111678189.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the existing three-dimensional map display control, other perspectives cannot be changed at the same time after the two-finger interaction is locked, resulting in cumbersome adjustment of the map display page.
By receiving adjustment instructions for the map display page, obtaining adjustment gesture data, analyzing the adjustment indicators, and scaling the map display page and rotating it from different perspectives according to the adjustment indicators.
It realizes that users can adjust multi-view angles through one operation without frequent switching operations, simplifies the adjustment of map display pages and improves user experience.
Smart Images

Figure CN114594899B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method and device for adjusting map display. Background Art
[0002] As the functions of mobile terminals become more and more abundant, daily life has become inseparable from intelligent terminal devices. Users can use mobile terminals for office work, shopping, housework, etc. Among the applications on mobile terminals, map applications are also one of the applications with relatively high demand. Map applications can provide accurate map data and plan travel routes according to user needs. Therefore, users can use map applications to search for destinations and perform route navigation, etc. When a three-dimensional map is displayed on a touch screen, users can also adjust the map display content through gestures, such as zooming in and out.
[0003] Currently, in the existing human-computer interaction implementation solutions for three-dimensional maps, usually a single finger is used to control the translation of the map display perspective, such as adjusting the horizontal / vertical movement of the map on the mobile terminal screen through a single finger, and two fingers are used to control the zooming in / out and rotation of the map display perspective, such as pinching two fingers to zoom out the map display perspective, or rotating two fingers based on the horizontal and vertical directions. However, in the existing three-dimensional map display control, when two fingers lock one interaction, other perspective transformations cannot be performed simultaneously. For example, only zooming and / or horizontal rotation, zooming and / or vertical rotation can be performed. If it is necessary to switch to other interaction methods, the two fingers need to be lifted off the screen and then re-operated, making the map display interaction operation cumbersome. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for adjusting map display, mainly aiming to solve the problem of cumbersome map display page adjustment operations caused by the need for multiple operations to switch the map display perspective in the prior art.
[0005] According to one aspect of the present invention, a method for adjusting map display is provided, including:
[0006] When receiving an adjustment instruction for the map display page, obtaining adjustment gesture data, where the adjustment instruction is sent by the user on the map display page through touching the display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position;
[0007] Analyzing the adjustment gesture data to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment;
[0008] Zooming the map display page according to the adjustment index and rotating it between a first perspective and a second perspective, where the first perspective is a perspective within the map parallel plane, and the second perspective is a perspective within the map section plane.
[0009] Further,
[0010] The obtaining of the adjustment index by parsing the adjusted gesture data includes:
[0011] Calculating a first center point and a second center point respectively according to the adjusted starting finger position and the adjusted ending finger position, where the first center point is the midpoint position of the line connecting the two finger positions at the start of adjustment, and the second center point is the midpoint position of the line connecting the two finger positions at the end of adjustment;
[0012] Calculating the relative displacement of the first center point and the second center point on the touch display screen;
[0013] Calculating an adjustment ratio according to the adjusted starting finger position and the adjusted ending finger position, where the adjustment ratio is the ratio of the distance between the two fingers at the end of adjustment to the distance between the two fingers at the start of adjustment;
[0014] Determining the relative displacement and the adjustment ratio as the adjustment index.
[0015] Further,
[0016] The rotating of the map display page at a first viewing angle and a second viewing angle according to the adjustment index includes:
[0017] Calculating a first displacement and a second displacement corresponding to the relative displacement respectively, where the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen;
[0018] Calculating a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm;
[0019] Rotating the map display page at the first viewing angle according to the first angle and at the second viewing angle according to the second angle.
[0020] Further,
[0021] The zooming of the map display page according to the adjustment index includes:
[0022] When the adjustment ratio is greater than 1, zooming in the map display page according to the adjustment ratio;
[0023] When the adjustment ratio is less than 1, zooming out the map display page according to the adjustment ratio.
[0024] Further, after obtaining the adjusted gesture data when receiving an adjustment instruction for the map display page, the method further includes:
[0025] Judge whether the adjustment gesture is a two-finger gesture according to the adjustment gesture data;
[0026] The adjustment indicators obtained by parsing the adjustment gesture data include:
[0027] If so, parse the adjustment gesture data to obtain adjustment indicators.
[0028] Further, the method further includes:
[0029] If the adjustment gesture is a single-finger gesture, calculate the drag displacement according to the adjustment start finger position and the adjustment end finger position, where the drag displacement is the displacement corresponding to the finger on the touch display screen during the adjustment;
[0030] Move the map display page within the map parallel plane according to the drag displacement.
[0031] According to another aspect of the present invention, there is provided an adjustment device for map display, including:
[0032] An acquisition module, configured to acquire adjustment gesture data when receiving an adjustment instruction for a map display page, where the adjustment instruction is sent by a user on the map display page through a touch display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position;
[0033] An analysis module, configured to analyze the adjustment gesture data to obtain adjustment indicators, where the adjustment indicators are used to identify the position change of the adjustment gesture during the current map display adjustment;
[0034] A zoom module, configured to zoom the map display page according to the adjustment indicators;
[0035] A rotation module, configured to rotate the map display page between a first viewing angle and a second viewing angle according to the adjustment indicators.
[0036] Further, the analysis module includes:
[0037] A first calculation unit, configured to calculate a first center point and a second center point respectively according to the adjustment start finger position and the adjustment end finger position, where the first center point is the midpoint position of the line connecting the two finger positions at the start of the adjustment, and the second center point is the midpoint position of the line connecting the two finger positions at the end of the adjustment;
[0038] The first calculation unit is further configured to calculate the relative displacement of the first center point and the second center point on the touch display screen;
[0039] The first calculation unit is further configured to calculate an adjustment ratio according to the adjusted starting finger position and the adjusted ending finger position, where the adjustment ratio is the ratio of the distance between the two fingers at the end of the adjustment to the distance between the two fingers at the start of the adjustment;
[0040] A determination unit, configured to determine the relative displacement and the adjustment ratio as the adjustment index.
[0041] Further, the rotation module includes:
[0042] A second calculation unit, configured to calculate a first displacement and a second displacement corresponding to the relative displacement respectively, where the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen;
[0043] The second calculation unit is further configured to calculate a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm;
[0044] A rotation unit, configured to rotate the map display page by the first angle in the first viewing angle and by the second angle in the second viewing angle.
[0045] Further, the zooming module includes:
[0046] An enlargement unit, configured to enlarge the map display page by the adjustment ratio when the adjustment ratio is greater than 1;
[0047] A reduction unit, configured to reduce the map display page by the adjustment ratio when the adjustment ratio is less than 1.
[0048] Further, the device further includes:
[0049] A judgment module, configured to judge whether the adjustment gesture is a two-finger gesture according to the adjustment gesture data.
[0050] Further,
[0051] The parsing module is specifically configured to, if the judgment module judges that the adjustment gesture is a two-finger gesture, parse the adjustment gesture data to obtain an adjustment index.
[0052] Further, the device further includes:
[0053] A calculation module, configured to, if the judgment module judges that the adjustment gesture is a single-finger gesture, calculate a drag displacement according to the adjusted starting finger position and the adjusted ending finger position, where the drag displacement is the displacement corresponding to the finger on the touch display screen during the adjustment process;
[0054] A moving module, configured to move the map display page within the map parallel plane according to the dragging displacement.
[0055] According to another aspect of the present invention, there is provided a storage medium storing at least one executable instruction, and the executable instruction causes a processor to perform operations corresponding to the above-mentioned method for adjusting map display.
[0056] According to still another aspect of the present invention, there is provided a terminal including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;
[0057] The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above-mentioned method for adjusting map display.
[0058] By means of the above technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:
[0059] The present invention provides a method and device for adjusting map display. Compared with the prior art, when receiving an adjustment instruction for the map display page, the embodiments of the present invention obtain adjustment gesture data, where the adjustment instruction is sent by a user on the map display page through touching a display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; parsing the adjustment gesture data to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment; and performing zooming on the map display page and rotating in a first view and a second view according to the adjustment index, where the first view is a view within the map parallel plane and the second view is a view within the map section plane. The present invention realizes determining an adjustment index that can identify the position change of the adjustment gesture according to the adjustment finger positions generated when the user adjusts the map display, and simultaneously performing three-view adjustments of zooming in / out, rotating within the map parallel plane, and rotating within the map section plane on the map display page according to the adjustment index, so that the user can achieve multi-view adjustment through one operation, without frequently switching operations to adjust the map display of different views, simplifies the operation of adjusting the map display page, and improves the user experience.
[0060] The above description is only an overview of the technical solutions of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features, and advantages of the present invention more obvious and understandable, the following specific embodiments of the present invention are specifically described. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0062] Figure 1 A flowchart of a method for adjusting map display provided by an embodiment of the present invention is shown;
[0063] Figure 2 A flowchart of another method for adjusting map display provided by an embodiment of the present invention is shown;
[0064] Figure 3 A block diagram of a device for adjusting map display provided by an embodiment of the present invention is shown;
[0065] Figure 4 A block diagram of another device for adjusting map display provided by an embodiment of the present invention is shown;
[0066] Figure 5 A schematic structural diagram of a terminal provided by an embodiment of the present invention is shown. Detailed embodiments
[0067] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully communicated to those skilled in the art.
[0068] In the existing three-dimensional map display control, when a two-finger interaction locks one interaction, other perspective transformations cannot be performed simultaneously. For example, only zooming and / or horizontal rotation, zooming and / or vertical rotation, etc. can be performed. If it is necessary to switch to other interaction methods, it is necessary to re-operate after the two fingers leave the screen, making the map display interaction operation cumbersome. An embodiment of the present invention provides a method for adjusting map display, such as Figure 1 shown, the method includes:
[0069] 101. When receiving an adjustment instruction for the map display page, obtain adjustment gesture data.
[0070] Among them, the adjustment instruction is sent by the user on the map display page through touching the display screen. The adjustment gesture data at least includes the starting finger position and the ending finger position of the adjustment. The touch display screen can be configured in a mobile terminal device, a venue guide device, a mobile robot, etc. The adjusted finger position can be determined by establishing a coordinate system in the plane where the touch display screen is located and according to the touch points of the fingers in this coordinate system. Specifically, it can be obtained by calling a preset interface or a preset algorithm when the finger touches the display screen. The embodiments of the present application do not make specific limitations on this.
[0071] In the embodiments of the present application, the adjustment instruction for the map display page can be sent when the user's finger briefly presses the touch display screen. For example, when the user's finger stays on the mobile phone screen for 0.2 seconds and then moves, it can be determined that the current user operation is to adjust the map display page, and then trigger sending an adjustment instruction for the map display page to the server, so that the server adjusts the map display page according to the user operation.
[0072] It should be noted that the terminal device can pre-download the corresponding map application program through the Internet and load the map data to store it locally or in the cloud, so that the map display page can be adjusted according to the user operation during use.
[0073] 102. Analyze the adjustment gesture data to obtain an adjustment index.
[0074] Among them, the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment. Specifically, the adjustment index can be the distance between the fingers, or the position change of a certain reference point, such as the midpoint of the line connecting the positions of the two fingers, or the position change of the fingers on the touch display screen, etc. The embodiments of the present application do not make specific limitations on this.
[0075] In the embodiments of the present application, by analyzing the data generated when the user adjusts the map display page, data that can identify the position change of the adjustment gesture can be obtained. For example, according to the adjustment gesture data, it is determined that the adjustment gesture is that finger 1 moves from a 1 to a 2 , and finger 2 moves from b 1 to b 2 , then these two sets of finger data can be used as the adjustment index in this step.
[0076] 103. Zoom the map display page according to the adjustment index and rotate it between the first perspective and the second perspective.
[0077] Among them, the first perspective is the perspective within the map parallel plane, and the second perspective is the perspective within the map section plane. Specifically, this step can be to determine the adjustment scaling ratio according to the adjustment index. For example, it is judged whether the two fingers are pinched or stretched according to the positions of the two fingers of the user, and the map display page is scaled accordingly according to the degree of pinching or stretching. And the rotation angles of the first perspective and the second perspective are determined according to the adjustment index. For example, the rotation angles in the two perspectives are calculated according to the displacement of a reference point during the adjustment process of the two fingers.
[0078] The present invention provides a method and device for adjusting map display, a storage medium, and a terminal. Compared with the prior art, in the embodiment of the present invention, when receiving an adjustment instruction for the map display page, adjustment gesture data is obtained. The adjustment instruction is sent by the user on the map display page by touching the display screen. The adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; the adjustment gesture data is parsed to obtain an adjustment index, and the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment; the map display page is scaled and rotated in the first perspective and the second perspective according to the adjustment index. The first perspective is the perspective within the map parallel plane, and the second perspective is the perspective within the map section plane. It is realized to determine an adjustment index that can identify the position change of the adjustment gesture according to the adjustment finger positions generated when the user adjusts the map display, and perform adjustments in three perspectives of zooming in / out, rotation within the map parallel plane, and rotation within the map section plane on the map display page according to the adjustment index, so that the user can achieve multi-perspective adjustment through one operation, without frequently switching operations to adjust the map display in different perspectives, simplifying the operation of adjusting the map display page and improving the user experience.
[0079] Further, as a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for adjusting map display is provided, such as Figure 2 shown, this method includes:
[0080] 201. When receiving an adjustment instruction for the map display page, obtain adjustment gesture data.
[0081] Among them, the adjustment instruction is sent by the user on the map display page by touching the display screen. The adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position. The concept explanation and specific implementation manner in this step can refer to the corresponding description in step 101, and will not be repeated in the embodiments of this application.
[0082] In the embodiment of the present application, after step 201, it may further include: determining whether the adjustment gesture is a two-finger gesture according to the adjustment gesture data; if the adjustment gesture is a single-finger gesture, calculating a drag displacement according to the adjustment start finger position and the adjustment end finger position, where the drag displacement is the displacement corresponding to the finger on the touch display screen during the adjustment process; moving the map display page within the map plane according to the drag displacement. If the adjustment gesture is a two-finger gesture, then step 202 is executed.
[0083] In the embodiment of the present application, by judging whether the obtained adjustment gesture data is a single-finger gesture or a two-finger gesture, and performing map pan adjustment when it is judged to be a single-finger gesture, and further analyzing the gesture data to obtain the adjustment index included in the gesture data when it is judged to be a two-finger gesture, the problem of resource waste caused by directly performing data analysis is avoided and the accuracy of the map display page adjustment is ensured.
[0084] 202. Calculate a first center point and a second center point respectively according to the adjustment start finger position and the adjustment end finger position.
[0085] Wherein, the first center point is the midpoint position of the line connecting the positions of the two fingers at the start of the adjustment, and the second center point is the midpoint position of the line connecting the positions of the two fingers at the end of the adjustment.
[0086] In the embodiment of the present application, the center point between the two fingers is used as a reference point to facilitate judging the adjustment direction and adjustment amount during the adjustment according to the change of the reference point position. Of course, other point positions can also be selected as reference points for judgment and measurement, and the embodiment of the present application does not make specific limitations on this.
[0087] Specifically, the implementation manner of this step can be to obtain the position coordinates of the two fingers of the user during the operation process, and calculate the center point coordinates between the two fingers according to the position coordinates. The coordinate values of the finger positions can be calculated in the existing technology, and the embodiment of the present application does not make specific limitations on this.
[0088] Exemplarily, during the process of the user performing the map display page adjustment, the adjustment start finger position is [(x 1 ,y 1 ),(x 2 ,y 2 )], that is, the coordinates of the two fingers at the start of the adjustment are x 1 ,y 1 and x 2 ,y 2 , and the adjustment end finger position is [(x 1 ′ ,y 1 ′ ),(x2 ′ , y 2 ′ ), then the first center point position and the second center point position can be calculated respectively as follows:
[0089] and
[0090] 203. Calculate the relative displacement between the first center point and the second center point on the touch display screen.
[0091] Since the coordinates of the two center points have been calculated in the above steps, the relative displacement can be calculated according to the coordinates of the two points in this step.
[0092] In the embodiment of the present application, during the process of adjusting the map display page, the center point of the finger is used as a reference point, so as to calculate the center point between the two fingers at the starting position of the adjustment and the center point between the two fingers at the ending position of the adjustment respectively, and then the displacement corresponding to the reference point during the adjustment of the screen display can be determined, and further, the display page can be rotated and controlled according to the displacement.
[0093] 204. Calculate the adjustment ratio according to the starting finger position of the adjustment and the ending finger position of the adjustment.
[0094] Wherein, the adjustment ratio is the ratio of the distance between the two fingers at the end of the adjustment to the distance between the two fingers at the start of the adjustment.
[0095] According to the content described in step 202 above, the obtained adjustment gesture data includes the positions of the two fingers at the starting moment and the positions of the two fingers at the ending moment during the adjustment process. Therefore, the distance between the two fingers at the starting moment and the distance between the two fingers at the ending moment can be calculated, and then the ratio of the two distances can be obtained to get the adjustment ratio described in this step.
[0096] It should be noted that in the embodiment of the present application, the execution order of step 204 and step 202 is not limited, that is, step 204 and step 202 can be executed in parallel or singly.
[0097] 205. Determine the relative displacement and the adjustment ratio as the adjustment index.
[0098] In the embodiment of the present application, by calculating the adjustment ratio and the relative displacement respectively, and determining the adjustment ratio and the relative displacement as the adjustment index, it is convenient to control the zooming of the map display page and the rotation of the map display page at different angles according to these two adjustment indexes, which can not only realize the display adjustment of the map display page at multiple angles, but also ensure the accuracy of the adjustment of the map display page.
[0099] 206. Zoom the map display page according to the adjustment index and rotate it between the first view angle and the second view angle.
[0100] Among them, the first view angle is the view angle within the plane parallel to the map, and the second view angle is the view angle within the section plane of the map.
[0101] Specifically, this step may include: respectively calculating a first displacement and a second displacement corresponding to the relative displacement; calculating a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm; rotating the map display page at the first angle in the first view angle and at the second angle in the second view angle. Among them, the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen. The preset algorithm may be one or more of a matrix, a function, or a pre-set mapping relationship between the relative displacement and the adjustment angle. The method of controlling the map display page to rotate according to the rotation angle after determining the rotation angle may be an implementation method in the prior art, and the embodiments of the present application do not make specific limitations on this.
[0102] Further, this step may also include: when the adjustment ratio is greater than 1, zoom in the map display page according to the adjustment ratio; when the adjustment ratio is less than 1, zoom out the map display page according to the adjustment ratio.
[0103] When the adjustment ratio is greater than 1, it indicates that the distance between the two fingers increases during the adjustment process, that is, the state of the user's fingers is in a stretched state. At this time, it is determined as a zoom-in view angle, so the map display page is enlarged and displayed according to the adjustment ratio; when the adjustment ratio is less than 1, it indicates that the distance between the two fingers decreases during the adjustment process, that is, the state of the user's fingers is in a pinched state. At this time, it is determined as a zoom-out view angle, so the map display page is reduced and displayed according to the adjustment ratio. In actual application, the map zoom ratio may be the same as the calculated adjustment ratio, or may be positively correlated with the adjustment ratio, that is, it may be enlarged according to the adjustment ratio of 1:1, or may be scaled according to a pre-set ratio relationship.
[0104] In the embodiment of the present application, by converting the relative displacement corresponding to a reference point, such as the center point of the line connecting the positions of two fingers in a two-finger gesture in this embodiment, during the adjustment process into an adjustment angle, and using this adjustment angle to respectively adjust the rotation of the map display page in two reference planes, and performing a zoom adjustment on the map display page according to the change in the distance between the two fingers during the adjustment process, it is realized that the user can adjust the map display page at multiple angles with one operation, so that the user does not need to perform multiple operations to switch the map page display of different perspectives, thereby simplifying the adjustment operation of the map page display and improving the user experience.
[0105] The present invention provides a method and device for adjusting map display. Compared with the prior art, in the embodiment of the present invention, when receiving an adjustment instruction for the map display page, adjustment gesture data is obtained. The adjustment instruction is sent by the user on the map display page by touching the display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; the adjustment gesture data is parsed to obtain an adjustment index, and the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment process; the map display page is zoomed and rotated in a first perspective and a second perspective according to the adjustment index. The first perspective is the perspective in the map parallel plane, and the second perspective is the perspective in the map section plane, realizing determining an adjustment index that can identify the position change of the adjustment gesture according to the adjustment finger position generated when the user adjusts the map display, and simultaneously performing three perspective adjustments of zooming in / zooming out, rotating in the map parallel plane, and rotating in the map section plane on the map display page according to the adjustment index, so that the user can achieve multi-perspective adjustment with one operation, without frequently switching operations to adjust the map display of different perspectives, simplifying the adjustment operation of the map display page, and improving the user experience.
[0106] Further, as an implementation of the method shown above Figure 1 In the embodiment of the present application, an adjustment device for map display is provided, as shown in Figure 3 shown, the device includes: an acquisition module 31, an analysis module 32, a zoom module 33, and a rotation module 34.
[0107] The acquisition module 31 is configured to obtain adjustment gesture data when receiving an adjustment instruction for the map display page. The adjustment instruction is sent by the user on the map display page by touching the display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position;
[0108] The analysis module 32 is configured to analyze the adjustment gesture data to obtain an adjustment index, and the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment process;
[0109] A zooming module 33, configured to zoom the map display page according to the adjustment metric;
[0110] A rotation module 34, configured to rotate the map display page between a first viewing angle and a second viewing angle according to the adjustment metric.
[0111] Further, as Figure 4 shown, the parsing module 32 includes:
[0112] A first calculation unit 321, configured to calculate a first center point and a second center point respectively according to the adjustment start finger position and the adjustment end finger position, where the first center point is the midpoint position of the line connecting the two finger positions at the start of adjustment, and the second center point is the midpoint position of the line connecting the two finger positions at the end of adjustment;
[0113] The first calculation unit 321 is further configured to calculate the relative displacement of the first center point and the second center point in the touch display screen;
[0114] The first calculation unit 321 is further configured to calculate an adjustment ratio according to the adjustment start finger position and the adjustment end finger position, where the adjustment ratio is the ratio of the distance between the two fingers at the end of adjustment to the distance between the two fingers at the start of adjustment;
[0115] A determination unit 322, configured to determine the relative displacement and the adjustment ratio as the adjustment metric.
[0116] Further, the rotation module 34 includes:
[0117] A second calculation unit 341, configured to calculate a first displacement and a second displacement corresponding to the relative displacement respectively, where the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen;
[0118] The second calculation unit 341 is further configured to calculate a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm;
[0119] A rotation unit 342, configured to rotate the map display page by the first angle in the first viewing angle and by the second angle in the second viewing angle.
[0120] Further, the zooming module 33 includes:
[0121] An enlargement unit 331, configured to enlarge the map display page by the adjustment ratio when the adjustment ratio is greater than 1;
[0122] A reduction unit 332, configured to reduce the map display page according to the adjustment ratio when the adjustment ratio is less than 1.
[0123] Further, the device further includes:
[0124] A determination module 35, configured to determine whether the adjustment gesture is a two-finger gesture according to the adjustment gesture data.
[0125] Further,
[0126] The parsing module 32 is specifically configured to, if the determination module determines that the adjustment gesture is a two-finger gesture, parse the adjustment gesture data to obtain an adjustment index.
[0127] Further, the device further includes:
[0128] A calculation module 36, configured to, if the determination module determines that the adjustment gesture is a single-finger gesture, calculate a drag displacement according to the adjustment start finger position and the adjustment end finger position, where the drag displacement is the displacement corresponding to the finger on the touch display screen during the adjustment process;
[0129] A moving module 37, configured to move the map display page within the map parallel plane according to the drag displacement.
[0130] The present application provides a method and a device for adjusting a map display. Compared with the prior art, in the embodiments of the present invention, when receiving an adjustment instruction for the map display page, adjustment gesture data is obtained, where the adjustment instruction is sent by a user on the map display page through a touch display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; the adjustment gesture data is parsed to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment; the map display page is scaled and rotated between a first view angle and a second view angle according to the adjustment index, where the first view angle is a view angle within the map parallel plane, and the second view angle is a view angle within the map section plane, realizing determining an adjustment index that can identify the position change of the adjustment gesture according to the adjustment finger position generated when the user adjusts the map display, and simultaneously adjusting the map display page in three view angles of zooming in / zooming out, rotating within the map parallel plane, and rotating within the map section plane according to the adjustment index, so that the user can realize multi-view adjustment through one operation, without frequently switching operations to adjust the map display of different view angles, simplifying the operation of adjusting the map display page, and improving the user experience.
[0131] According to an embodiment of the present invention, a storage medium is provided, where the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for adjusting the map display in any of the above method embodiments.
[0132] Figure 5 The structural schematic diagram of a terminal provided according to an embodiment of the present invention is shown. The specific embodiments of the present invention do not limit the specific implementation of the terminal.
[0133] As Figure 5 shown, the terminal may include: a processor 402, a communication interface 404, a memory 404, and a communication bus 408.
[0134] Among them: the processor 402, the communication interface 404, and the memory 406 complete communication with each other through the communication bus 408.
[0135] The communication interface 404 is used to communicate with network elements of other devices such as clients or other servers.
[0136] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for adjusting map display.
[0137] Specifically, the program 410 may include program code, and the program code includes computer operation instructions.
[0138] The processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the terminal may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0139] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0140] The program 410 is specifically used to enable the processor 402 to perform the following operations:
[0141] When receiving an adjustment instruction for the map display page, obtain adjustment gesture data. The adjustment instruction is sent by the user on the map display page through touching the display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position;
[0142] Analyze the adjusted gesture data to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment;
[0143] Scale the map display page according to the adjustment index and rotate it between a first perspective and a second perspective. The first perspective is the perspective within the map parallel plane, and the second perspective is the perspective within the map section plane.
[0144] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. In this way, the present invention is not limited to any specific combination of hardware and software.
[0145] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for adjusting map display, characterized in that, comprising: When receiving an adjustment instruction for the map display page, obtaining adjustment gesture data, where the adjustment instruction is sent by the user on the map display page through touching the display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; Analyzing the adjustment gesture data to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment; Among them, the analyzing the adjustment gesture data to obtain an adjustment index includes: respectively calculating a first center point and a second center point according to the adjustment start finger position and the adjustment end finger position, where the first center point is the midpoint position of the line connecting the two finger positions at the start of the adjustment, and the second center point is the midpoint position of the line connecting the two finger positions at the end of the adjustment; calculating the relative displacement of the first center point and the second center point on the touch display screen; calculating an adjustment ratio according to the adjustment start finger position and the adjustment end finger position, where the adjustment ratio is the ratio of the distance between the two fingers at the end of the adjustment to the distance between the two fingers at the start of the adjustment; determining the relative displacement and the adjustment ratio as the adjustment index; Zooming the map display page according to the adjustment index and rotating it in a first viewing angle and a second viewing angle, where the first viewing angle is the viewing angle within the map parallel plane, and the second viewing angle is the viewing angle within the map section plane; Among them, the rotating the map display page in the first viewing angle and the second viewing angle according to the adjustment index includes: respectively calculating a first displacement and a second displacement corresponding to the relative displacement, where the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen; calculating a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm; rotating the map display page by the first angle in the first viewing angle and by the second angle in the second viewing angle.
2. The method according to claim 1, characterized in that, the zooming the map display page according to the adjustment index includes: When the adjustment ratio is greater than 1, enlarging the map display page according to the adjustment ratio; When the adjustment ratio is less than 1, reducing the map display page according to the adjustment ratio.
3. The method according to claim 1, characterized in that, after the obtaining adjustment gesture data when receiving an adjustment instruction for the map display page, the method further includes: Judging whether the adjustment gesture is a two-finger gesture according to the adjustment gesture data; the analyzing the adjustment gesture data to obtain an adjustment index includes: If so, analyzing the adjustment gesture data to obtain an adjustment index.
4. The method according to claim 3, characterized in that, the method further includes: If the adjustment gesture is a single-finger gesture, calculate a drag displacement according to the adjustment start finger position and the adjustment end finger position, where the drag displacement is the displacement corresponding to the finger on the touch display screen during the adjustment process; Move the map display page within the map parallel plane according to the drag displacement.
5. An adjustment device for map display, characterized in that, it includes: An acquisition module, configured to acquire adjustment gesture data when receiving an adjustment instruction for the map display page, where the adjustment instruction is sent by the user on the map display page through the touch display screen, and the adjustment gesture data at least includes an adjustment start finger position and an adjustment end finger position; An analysis module, configured to analyze the adjustment gesture data to obtain an adjustment index, where the adjustment index is used to identify the position change of the adjustment gesture during the current map display adjustment; among them, the analysis module includes: a first calculation unit, configured to calculate a first center point and a second center point according to the adjustment start finger position and the adjustment end finger position respectively, where the first center point is the midpoint position of the line connecting the two finger positions at the start of the adjustment, and the second center point is the midpoint position of the line connecting the two finger positions at the end of the adjustment; a second calculation unit, calculating the relative displacement of the first center point and the second center point on the touch display screen; a third calculation unit, configured to calculate an adjustment ratio according to the adjustment start finger position and the adjustment end finger position, where the adjustment ratio is the ratio of the distance between the two fingers at the end of the adjustment to the distance between the two fingers at the start of the adjustment; a determination unit, configured to determine the relative displacement and the adjustment ratio as the adjustment index; A zoom module, configured to zoom the map display page according to the adjustment index; A rotation module, configured to rotate the map display page between a first viewing angle and a second viewing angle according to the adjustment index; the rotation module includes: a second calculation unit, configured to calculate a first displacement and a second displacement corresponding to the relative displacement respectively, where the first displacement is the component of the relative displacement in the horizontal direction of the touch display screen, and the second displacement is the component of the relative displacement in the vertical direction of the touch display screen; calculating a first angle and a second angle corresponding to the first displacement and the second displacement respectively according to a preset algorithm; a rotation unit, configured to rotate the map display page by the first angle in the first viewing angle and by the second angle in the second viewing angle.
6. A storage medium, in which at least one executable instruction is stored, and the executable instruction causes the processor to perform the operations corresponding to the map display adjustment method according to any one of claims 1-4.
7. A terminal, including: A processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface complete mutual communication through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations corresponding to the map display adjustment method according to any one of claims 1-4.
Citation Information
Patent Citations
Disambiguation of multitouch gesture recognition for 3D interaction
CN104471518A
Method and Apparatus for processing a gesture input on a game screen
KR1020140135276A