Method and device for displaying operation map
By obtaining and utilizing the boundary information of the job map and display area in real time and limiting the operating range, the problem of sliding out of the job map in the mowing robot application is solved, improving the user experience.
Patent Information
- Application Number
- CN202411950660.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-29
AI Technical Summary
In the mowing robot application, the job map cannot be fully displayed in the screen viewing area due to its size, which makes it easy for users to slide the job map out of the screen range when sliding or zooming, making it difficult to retrieve the required area.
By obtaining the boundary information of the job map and the boundary information of the display area in real time, limiting the operating range of the job map so that it is always displayed in the display area to avoid sliding out of the screen.
It effectively avoids the defect of sliding out of the screen range of the work map, and improves the user's experience of operating the work map on the terminal device.
Smart Images

Figure CN119903118A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of algorithms, and in particular to a method and device for displaying a work map. Background Art
[0002] A lawn mower robot is an automated device used for mowing operations. It can complete mowing tasks autonomously and reduce manual labor. In order to facilitate the autonomous operation of the lawn mower robot, researchers have developed an application for controlling the lawn mower robot to perform autonomous operations. The application displays the lawn area and mowing route, etc.
[0003] When a user operates on an application on a terminal device, the entire operation map is too large to be fully displayed in the visible area of the screen. When the user slides or zooms on the screen, the entire operation map is often moved outside the screen range or part of the operation map is moved outside the screen range, causing the user to be unable to see the data they want to see.
[0004] Currently, it is usually done manually to move a part of the work map or a certain area of the work map to the visible area of the screen. However, due to the lack of reference coordinates, this method is more laborious. Sometimes the work map of the area you want to view cannot be found, and it is difficult to move it back. Sometimes the further you move, the farther the distance. Summary of the invention
[0005] The present application provides a method and device for displaying a work map. During the movement or scaling of the work map, the boundary information of the work map is obtained in real time, and the operation range of the work map is limited according to the boundary information of the work map and the boundary information of the display area, so that the work map is always displayed in the display area, avoiding the disadvantage of sliding the work map out of the display area and making it impossible to find the work map again, thereby improving the user experience of using the work map.
[0006] In a first aspect, the present application provides a method for displaying a work map, comprising:
[0007] The terminal device detects a user operation, where the user operation includes an operation of the user moving or zooming the operation map;
[0008] In response to the user's operation, the work map is moved or scaled, and in the process of responding to the user's operation: the boundary information of the area where the work map is located and the boundary information of the display area are obtained; according to the boundary information of the area where the work map is located and the boundary information of the display area, the operation range of the work map is limited so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0009] It can be seen that the present application provides a method for displaying a work map. When a user moves or zooms the work map on a terminal device, the terminal device responds to / executes the user's move or zoom operation on the work map. In the process of responding to / executing the user's move or zoom operation on the work map, the terminal device obtains the boundary information of the work map in real time, and limits the operation range of the work map according to the boundary information of the work map and the boundary information of the display area, so that the work map is always displayed in the display area, avoiding the defect of the existing method that the work map is easily slid out of the visible area of the screen.
[0010] In a second aspect, the present application provides a display device for a work map, comprising:
[0011] A detection module, used to detect a user operation, wherein the user operation includes a movement or zooming operation performed by the user on the operation map;
[0012] A response module is used to move or scale the work map in response to the user's operation. In the process of responding to the user's operation: obtain the boundary information of the area where the work map is located and the boundary information of the display area; according to the boundary information of the area where the work map is located and the boundary information of the display area, limit the operation range of the work map so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0013] In a third aspect, the present application provides a terminal device, including a memory and a processor, the memory being used to store instructions, and the processor being used to execute the instructions stored in the memory to execute the method described in the first aspect above.
[0014] In a fourth aspect, the present application provides a computer storage medium, comprising program instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect.
[0015] In a fifth aspect, the present application provides a computer program product, comprising program instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0017] Figure 1 A flowchart of a method for displaying an operation map provided in this application;
[0018] Figure 2 A user interface diagram provided for this application;
[0019] Figure 3 A schematic diagram of a circumscribed rectangle of an operation map provided in this application;
[0020] Figure 4 A schematic diagram of the structure of a display device for an operation map provided in this application;
[0021] Figure 5 A schematic diagram of the structure of a terminal device provided for this application. DETAILED DESCRIPTION
[0022] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0023] It should be noted that the terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0024] It should be noted that when used in this specification and the appended claims, the terms "comprises" and any of their variations are intended to cover non-exclusive inclusions. For example, a system, product or device including a series of units / devices is not limited to the listed units / devices, but may optionally include units / devices not listed, or may also optionally include other units / devices inherent to these products or devices.
[0025] It will also be understood that the term “if” may be interpreted as “when” or “upon” or “in response to determining” or “in response to detecting” or “in the event of…” depending on the context.
[0026] This application provides a method for displaying a work map, see Figure 1 , Figure 1 A flowchart of a method for displaying a work map provided in this application, the method includes but is not limited to the description of the following content.
[0027] S101. The terminal device obtains boundary information of a display area of a work map.
[0028] The scope of the display area refers to the scope of the display area of the operation map on the user interface or screen of the terminal device. The operation map cannot exceed the scope of the display area. Within the display area, the operation map can be moved, scaled, and reduced at will. In order to prevent the user from sliding the operation map out of the visible area of the screen, therefore, this application limits the scope of the display area to the visible area of the screen of the terminal device.
[0029] In the present application, the operation map can be one area or multiple areas, wherein the multiple areas can be connected, disconnected, or some areas of the multiple areas are connected and some areas are not connected. In practical applications, one area can be a lawn, and the multiple areas can be multiple lawns. More specifically, for example, the operation map can be one lawn area, or multiple connected lawn areas, or multiple unconnected lawn areas, or some lawn areas are connected and some are not connected.
[0030] This application requires pre-setting the range of the display area. Before introducing how to obtain the boundary information of the display area, it is first introduced how the display area in this application is determined.
[0031] In one implementation, the scope of the display area can be determined based on user interface elements, wherein the user interface elements include multiple controls, and the multiple controls may be, for example, input controls, navigation controls, feedback controls, media controls, custom controls, and the like. The input control is used to receive user input, for example, the input control may be a text box, a drop-down menu (with a drop-down list, from which the user may select an item), a file upload button, and the like. The navigation control is used to assist the user in browsing in an application or software, and plays a role in navigation, such as a navigation bar, a sidebar, and the like. The feedback control is used to provide feedback and prompts to the user, such as a notification bar, a warning box, a prompt box, and the like. The media control is used to play or control multimedia content, such as a play / pause button, a volume control button, a speed button, a progress bar, and the like. A custom control refers to a button / control that is custom designed according to the requirements of the application. User interface elements may also be other controls, which are not limited in this application.
[0032] The user interface elements are usually located in the visible area of the screen and have fixed positions. Therefore, the scope of the display area of the operation map can be determined according to the user interface elements.
[0033] For example, see Figure 2The schematic diagram of the user interface shown has a "notification button" (which belongs to a type of feedback control) displayed in the upper left corner at the top of the user interface, and a "voice button" (where the user can input voice and can be classified as a type of input control) displayed in the upper right corner. At the bottom of the user interface, there is a row of function button controls for the user to operate on the operation map. The range boundary of the display area can be determined based on the coordinate positions of the "notification button" and "voice button" at the top of the user interface and the coordinate position where the function button controls are located at the bottom, so as to obtain the range of the display area. The range of the display area is as Figure 2 shown by the gray wireframe in
[0034] In another implementation, the range of the display area can be determined by setting fixed coordinates. For example, when the display area is a rectangular area or a square area, the range of the display area can be determined by setting the coordinates of the boundaries of the rectangular area or the square area. For example, set the lower boundary coordinate of the display area as y = y1, the upper boundary coordinate as y = y2, y1 < y2, the left boundary coordinate as x = x1, and the right boundary coordinate as x = x2, x2 > x1. Then the range of the display area is the area range framed by x = x1, x = x2, y = y1, and y = y2. If (x', y') represents any point within the display area range, then x1 <= x' <= x2, y1 <= y' <= y2.
[0035] It can be understood that the above method of determining the range of the display area based on the "notification button", "voice button" at the top of the user interface and the function button controls at the bottom is just an example. The range of the display area can also be determined according to the coordinate positions of other controls on the screen, or by other methods. This application does not make any limitations.
[0036] In one example, obtaining the boundary information of the display area includes: extracting the coordinates of all boundary points of the display area to obtain the coordinates of the inscribed rectangle of the display area (xmin2, ymax2), (xmax2, ymin2). For example, the coordinates of the inscribed rectangle of the display area in Figure 2 can be obtained.
[0037] In one example, the display area is a rectangular area or a square area, and the range of the display area is the range where the rectangular area is located, including the boundaries of the rectangular area, or the range of the display area is the range where the square area is located, including the boundaries of the square area. Obtaining the boundary information of the display area includes obtaining the upper boundary information, lower boundary information, left boundary information, and right boundary information of the display area. Specifically, it can include the upper boundary coordinate, lower boundary coordinate, left boundary coordinate, and right boundary coordinate of the display area.
[0038] S102: The terminal device detects a user operation, wherein the user operation includes one of an operation of moving and zooming the operation map.
[0039] The user operates the job map on the terminal device, and accordingly, the terminal device detects the user's operation, wherein the user's operation includes the user's operation of moving the job map or the user's operation of zooming in and out the job map.
[0040] It is understandable that the user moves or zooms the operation map, which may cause the operation map to move out of the screen. In the present application, in the initial state, the operation map is displayed in the display area.
[0041] S103. The terminal device moves or scales the work map in response to the user's operation, wherein in the process of responding to the user's operation: determining the boundary information of the area where the work map is located, and limiting the operating range of the work map based on the boundary information of the area where the work map is located and the boundary information of the display area, so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0042] In the process of moving or scaling the work map in response to the user's operation, the terminal device dynamically updates the boundary information of the area where the work map is located in real time to correspond to the moved or scaled work map. Specifically, the terminal device first obtains the screen coordinates of all boundary points of the work map before it is moved or scaled, updates the offset of the work map when the work map is moved, and updates the screen coordinates of all boundary points in the area where the work map is located based on the updated offset, or updates the zoom ratio of the work map when the work map is scaled, and updates the screen coordinates of all boundary points in the area where the work map is located based on the updated zoom ratio. Among them, the screen coordinates of the boundary points in the area where the work map is located are obtained by converting the latitude and longitude coordinates.
[0043] According to the boundary information of the area where the operation map is located and the boundary information of the display area, the operation range of the operation map is limited so that the boundary of the area where the operation map is located is always within the boundary of the display area. This can be achieved in the following manner.
[0044] In one implementation, the screen coordinates of all boundary points of the area where the work map is located are extracted to obtain the coordinates (xmin1, ymax1), (xmax1, ymin1) of the circumscribed rectangle surrounding the area where the work map is located, such as Figure 3As shown, the work map includes area 1 and area 2, and the coordinates of the circumscribed rectangle of the area where the work map is located are (xmin1, ymax1), (xmax1, ymin1); extract the coordinates of all boundary points of the display area to obtain the coordinates of the inscribed rectangle of the display area (xmin2, ymax2), (xmax2, ymin2); make the work map meet the conditions during the movement or scaling process: xmin1≤xmin2; ymax1≤ymax2; xmax1≤xmin2; ymin≤ymin2, so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0045] In another implementation, when executing / responding to the user's operation, the terminal device determines the boundary of the area where the operation map is currently located, compares the boundary of the area where the operation map is currently located with the boundary of the display area, and thus determines whether to continue to execute the user's operation. The specific execution steps may be as follows, and the coordinates in the following description all refer to screen coordinates.
[0046] 1) Determine the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate in the boundary coordinates of the current area of the work map. If the horizontal rightward direction is the positive direction of the horizontal axis and the vertical upward direction is the positive direction of the vertical axis, the maximum value of the horizontal coordinate can be understood as the right edge / right boundary of the work map, the minimum value of the horizontal coordinate can be understood as the left edge / left boundary of the work map, the maximum value of the vertical coordinate can be understood as the upper edge / upper boundary of the work map, and the minimum value of the vertical coordinate can be understood as the lower edge / lower boundary of the work map.
[0047] 2) Compare the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate in the boundary coordinates of the current area of the work map with the boundary coordinates of the display area to determine whether to execute the user's operation, where the boundary coordinates of the display area include the upper boundary coordinates, the lower boundary coordinates, the left boundary coordinates and the right boundary coordinates.
[0048] For example, if the maximum value of the horizontal coordinate in the boundary coordinates of the area where the work map is currently located is equal to the right boundary coordinates of the display area, it means that the right edge of the work map is already on the right boundary of the display area. In order to prevent the work map from moving out of the screen, the work map can no longer continue to move to the right or zoom. If the user's operation is to zoom or move the work map to the right, it is determined not to continue the user's operation. If the user's operation is to move the work map to the left, move the work map up, or move the work map down, the user's operation can continue.
[0049] For another example, if the minimum value of the horizontal coordinate in the boundary coordinates of the area where the work map is currently located is equal to the left boundary coordinates of the display area, it means that the left edge of the work map is already located on the left boundary of the display area. In order to prevent the work map from moving out of the screen, the work map can no longer be moved to the left or scaled. If the user's operation is to scale or move the work map to the left, it is determined that the user's operation will not be continued. If the user's operation is to move the work map to the right, move the work map up, or move the work map down, the user's operation can continue.
[0050] For another example, if the minimum value of the vertical coordinate in the boundary coordinates of the area where the work map is currently located is equal to the lower boundary coordinates of the display area, it means that the lower edge of the work map is already located at the lower boundary of the display area. In order to prevent the work map from moving out of the screen, the work map can no longer be moved downward or scaled. If the user's operation is to scale or move the work map downward, it is determined that the user's operation will not continue. If the user's operation is to move the work map to the right, move the work map upward, or move the work map to the left, the user's operation can continue.
[0051] For another example, if the maximum value of the vertical coordinate in the boundary coordinates of the area where the work map is currently located is equal to the upper boundary coordinates of the display area, it means that the upper edge of the work map is already located on the upper boundary of the display area. In order to prevent the work map from moving out of the screen, the work map can no longer be moved upward or scaled. If the user's operation is to scale or move the work map upward, it is determined that the user's operation will not continue. If the user's operation is to move the work map to the right, left, or downward, the user's operation can continue.
[0052] Similarly, if the maximum value of the horizontal coordinate in the boundary coordinates of the area where the work map is currently located is equal to the right boundary coordinate of the display area, and at the same time, the maximum value of the vertical coordinate is equal to the right boundary coordinate of the display area, it means that the right edge of the work map is already located on the right boundary of the display area and the upper edge of the work map is already located on the upper boundary of the display area, then the work map can no longer continue to move right or move up or zoom. If the user's operation is to zoom or move the work map up or right, it is determined not to continue the user's operation. If the user's operation is to move the work map to the left or move the work map downward, the user's operation can continue to be executed. And so on. For the sake of brevity of the specification, no examples are given here one by one.
[0053] The terminal device compares the current area of the work map with the range of the display area. It can also use other methods, such as comparing each coordinate in the boundary coordinates of the current area of the work map with the range of the display area to determine whether there are coordinates on the boundary of the display area. If so, it determines whether to continue the user's operation based on which boundary of the display area the coordinates are on and what operation the user has performed on the work map. If not, it determines to continue the user's operation.
[0054] In the case where it is determined to continue to execute the user's operation, during the process of continuing to execute the user's operation, the terminal device monitors the relationship between the boundary coordinates of the area where the operation map is located and the boundary coordinates of the display area, and determines whether to continue to execute the user's operation based on the relationship between the boundary coordinates of the area where the operation map is located and the boundary coordinates of the display area. If any one of the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate, and the minimum value of the vertical coordinate in the boundary coordinates of the area where the operation map is located is the same as one of the boundary coordinates of the display area, the user's operation is stopped, otherwise, the user's operation is continued.
[0055] It can be understood that the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate in the boundary coordinates of the area where the work map is located represent the right edge, left edge, upper edge and lower edge of the work map respectively. When any one of the maximum value of the horizontal coordinate, the minimum value of the horizontal coordinate, the maximum value of the vertical coordinate and the minimum value of the vertical coordinate is the same as one of the boundary coordinates of the upper boundary, lower boundary, left boundary and right boundary of the display area, it means that the work map has moved to a boundary of the display area. In order to prevent the work map from moving out of the screen, the user's operation is stopped at this time. Otherwise, it means that the work map has not moved to any boundary of the display area, and the user's operation can continue to be executed until it moves to a boundary of the display area.
[0056] In another implementation, the terminal device can calculate the geometric intersection area of the area where the work map is located and the display area, limit the geometric intersection area to be equal to the boundary area of the work map, and adjust the moving range or zoom ratio of the work map according to the geometric intersection area so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0057] It can be seen that the present application provides a method for displaying a work map. When a user moves or zooms the work map on a terminal device, the terminal device responds to / executes the user's move or zoom operation on the work map. In the process of responding to / executing the user's move or zoom operation on the work map, the terminal device obtains the boundary information of the work map in real time, and limits the operation range of the work map according to the boundary information of the work map and the boundary information of the display area, so that the work map is always displayed within the display area, avoiding the defect of the existing method that the work map is easily slid out of the visible area of the screen, thereby improving the user experience of using the work map.
[0058] The above is a description of a method embodiment provided by the present application. The following is an introduction to a device embodiment provided by the present application.
[0059] See also Figure 4 , Figure 4 The present invention provides a schematic diagram of a display device 400 for a work map, wherein the device 400 includes:
[0060] A detection unit 401 is used to detect a user operation, where the user operation includes a user moving or zooming the operation map;
[0061] The response unit 402 is used to move or scale the work map in response to the user's operation. In the process of responding to the user's operation: obtain the boundary information of the area where the work map is located and the boundary information of the display area; according to the boundary information of the area where the work map is located and the boundary information of the display area, limit the operation range of the work map so that the boundary of the area where the work map is located is always within the boundary of the display area.
[0062] In a possible implementation, the response unit 402 is used to: in response to the user's operation, dynamically update the boundary information of the area where the operation map is located to correspond to the zoomed or moved operation map.
[0063] In a possible implementation, the response unit 402 is used to: obtain the screen coordinates of all boundary points of the area where the work map is located; when the work map moves, update the offset of the work map, and based on the updated offset, update the screen coordinates of all boundary points of the area where the work map is located; or, when the work map is zoomed, update the zoom ratio of the work map, and based on the updated zoom ratio, update the screen coordinates of all boundary points of the area where the work map is located.
[0064] In a possible implementation, the response unit 402 is used to:
[0065] Extract the screen coordinates of all boundary points of the area where the work map is located to obtain the coordinates of the circumscribed rectangle surrounding the area where the work map is located (xmin1, ymax1), (xmax1, ymin1);
[0066] Extract the coordinates of all boundary points of the display area to obtain the coordinates of the inscribed rectangle of the display area (xmin2, ymax2), (xmax2, ymin2);
[0067] When the work map is moving or scaling, the following conditions are met: xmin1≤xmin2; ymax1≤ymax2; xmax1≤xmin2; ymin≤ymin2.
[0068] In a possible implementation, the response unit 402 is used to:
[0069] Calculate the geometric intersection area of the area where the job map is located and the display area;
[0070] The geometric intersection area is limited to the boundary area of the operation map, and the moving range or zoom ratio of the operation map is adjusted according to the geometric intersection area, so that the boundary of the area where the operation map is located is always within the boundary of the display area.
[0071] In a possible implementation, the display area is determined according to a user interface element on a user interface of the terminal device, wherein the user interface element includes a plurality of controls.
[0072] In a possible implementation, the display area is set according to fixed coordinates.
[0073] Figure 4 The various functional modules in are used to implement Figures 1 to 3 For details of the steps of the method embodiment, please refer to Figures 1 to 3 The description of the relevant contents in the method embodiment will not be repeated here for the sake of brevity of the specification.
[0074] This application also provides a terminal device, see Figure 5 , Figure 5 This is a schematic diagram of the structure of a terminal device 500 provided in this application, and the terminal device is used to implement Figures 1 to 4 In the method embodiment, the terminal device 500 includes: a processor 510, a communication interface 520 and a memory 530. The processor 510, the communication interface 520 and the memory 530 can be interconnected through an internal bus 540, or can communicate through other means such as wireless transmission.
[0075] Taking the connection through bus 540 as an example, bus 540 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Bus 540 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0076] The processor 510 may be composed of at least one general-purpose processor, such as a CPU, or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 510 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 530, which enables the terminal device 500 to provide a wide variety of services.
[0077] The memory 530 is used to store program codes and is controlled by the processor 510 to execute the above Figures 1 to 4 For the steps described in the embodiment, please refer to the relevant description of the embodiment shown above, which will not be elaborated here.
[0078] The memory 530 may include a volatile memory, such as a RAM; the memory 530 may also include a non-volatile memory, such as a ROM, a flash memory; the memory 530 may also include a combination of the above types.
[0079] The communication interface 520 can be a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (peripheral component interconnect express, PCIE) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other devices or modules.
[0080] The processor 510, communication interface 520, etc. in the terminal device 500 can implement the functions and / or various steps and methods implemented in the above-mentioned method embodiments, which will not be described in detail for the sake of brevity. The detection unit 401 and the response unit 402 in the display device 400 of the operation map can be located in the processor 510 in the terminal device 500.
[0081] Need to explain, Figure 5 This is only a possible implementation of the embodiment of the present application. In practical applications, the terminal device may also include more or fewer components, which is not limited here. For the contents not shown or described in the embodiment of the present application, please refer to the relevant description in the embodiment described in the aforementioned method, which will not be repeated here.
[0082] The present application also provides a storage medium, including program instructions, which, when executed by a terminal device, enable the terminal device to execute part or all of the steps described in the above method embodiment.
[0083] The present application also provides a computer program product, including program instructions, which, when executed by a terminal device, enable the terminal device to execute part or all of the steps described in the above method embodiment.
[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] In the above embodiments, it can be implemented in whole or in part by software, hardware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product may include code. When the computer program product is read and executed by a computer, some or all steps of the method recorded in the above method embodiment may be implemented. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium, etc.
[0086] The steps in the method of the embodiment of the present application can be adjusted in order, combined or deleted according to actual needs; the units in the device of the embodiment of the present application can be divided, combined or deleted according to actual needs.
[0087] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for displaying a work map, characterized in that: include: The terminal device detects a user operation, where the user operation includes an operation of the user moving or zooming the operation map; In response to the user's operation, the work map is moved or scaled, and in the process of responding to the user's operation: the boundary information of the area where the work map is located and the boundary information of the display area are obtained; according to the boundary information of the area where the work map is located and the boundary information of the display area, the operation range of the work map is limited so that the boundary of the area where the work map is located is always within the boundary of the display area.
2. The method according to claim 1, characterized in that The method further comprises: In response to the user's operation, the boundary information of the area where the operation map is located is dynamically updated to correspond to the zoomed or moved operation map.
3. The method according to claim 2, characterized in that The dynamically updating the boundary information of the area where the operation map is located includes: Obtaining the screen coordinates of all boundary points of the area where the operation map is located; When the work map moves, the offset of the work map is updated, and based on the updated offset, the screen coordinates of all boundary points of the area where the work map is located are updated; or, when the work map is scaled, the zoom ratio of the work map is updated, and based on the updated zoom ratio, the screen coordinates of all boundary points of the area where the work map is located are updated.
4. The method according to any one of claims 1 to 3, characterized in that: The step of limiting the operation range of the operation map according to the boundary information of the area where the operation map is located and the boundary information of the display area so that the boundary of the area where the operation map is located is always located within the boundary of the display area includes: Extract the screen coordinates of all boundary points of the area where the operation map is located to obtain the coordinates of the circumscribed rectangle surrounding the area where the operation map is located (xmin1, ymax1), (xmax1, ymin1); Extracting the coordinates of all boundary points of the display area to obtain the coordinates of the inscribed rectangle of the display area (xmin2, ymax2), (xmax2, ymin2); The operation map is made to meet the following conditions during the movement or scaling process: xmin1≤xmin2; ymax1≤ymax2; xmax1≤xmin2; ymin≤ymin2.
5. The method according to any one of claims 1 to 3, characterized in that: The step of limiting the operation range of the operation map according to the boundary information of the area where the operation map is located and the boundary information of the display area so that the boundary of the area where the operation map is located is always located within the boundary of the display area includes: Calculate the geometric intersection area of the area where the operation map is located and the display area; The geometric intersection area is defined to be equal to the boundary area of the operation map, and the moving range or zoom ratio of the operation map is adjusted according to the geometric intersection area, so that the boundary of the area where the operation map is located is always within the boundary of the display area.
6. The method according to any one of claims 1 to 5, characterized in that: The display area is determined according to a user interface element on a user interface of the terminal device, wherein the user interface element includes a plurality of controls.
7. The method according to any one of claims 1 to 5, characterized in that: The display area is set according to fixed coordinates.
8. A display device for an operation map, characterized in that: include: A detection module, used to detect a user operation, wherein the user operation includes a movement or zooming operation performed by the user on the operation map; A response module is used to move or scale the work map in response to the user's operation. In the process of responding to the user's operation: obtain the boundary information of the area where the work map is located and the boundary information of the display area; according to the boundary information of the area where the work map is located and the boundary information of the display area, limit the operation range of the work map so that the boundary of the area where the work map is located is always within the boundary of the display area.
9. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The method comprises program instructions, and when the program instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Map boundary coordinate self-adaptive loading method for scaling based on CSS transformation
CN120873311A
A method for adaptive loading of map boundary coordinates based on CSS transformations.
CN120873311B
System and method for autonomously switching operators of intelligent multi-network integrated card
CN121037929A