Methods for filling child elements, methods for displaying child elements, and related devices
By judging and adjusting the size of child elements or container properties within a container, the problem of incomplete route information display in electronic maps is solved, enabling more child elements to be filled into a fixed container, thus improving the user experience.
Patent Information
- Application Number
- CN201911407832.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-31
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2039-12-31
AI Technical Summary
When electronic maps display route information in a fixed-size container, the limited number of child elements results in incomplete information display and negatively impacts user experience.
Check if there are any child elements in the container that cannot be filled. If so, reduce the size of the child elements that exceed the size threshold and add hint child elements if necessary, or adjust the non-fixed size of the container to accommodate more child elements.
Filling a fixed-size container with more child elements solves the problem of incomplete route information display on electronic maps and improves the user experience.
Smart Images

Figure CN113124886B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method, apparatus, and electronic device for filling a container with child elements. This application also relates to a method for displaying child elements and two other methods for filling a container with child elements. Background Technology
[0002] With the continuous development of the internet, more and more users are using electronic maps to plan their travel routes. Electronic maps need to display the planned routes so that users can choose the best route.
[0003] The inventors discovered that currently, electronic ground Figure 1 The common approach is to display the child elements corresponding to the route in a container of fixed size. However, since the size of the container is limited, the number of child elements that can be filled into the fixed-size container is limited, resulting in incomplete display of route information and affecting the user experience. Summary of the Invention
[0004] This application provides a method, apparatus, and electronic device for filling sub-elements into a container to solve the problem of incomplete display of route information in existing electronic maps.
[0005] This application provides a method for filling a container with child elements, including:
[0006] Obtain the child elements to be populated into the container; the child elements to be populated into the container are the route segments included in the navigation planning route;
[0007] When the container's attribute is fixed size, it is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0008] Optionally, reducing the size of sub-elements that exceed the size threshold includes:
[0009] Based on the order in which the child elements are arranged in the navigation route, the size of child elements that exceed the size threshold will be reduced in turn.
[0010] Optionally, the step of reducing the size of sub-elements exceeding the size threshold sequentially according to their arrangement order in the navigation planning route includes:
[0011] According to the order of child elements in the navigation planning route, traverse the child elements. If the size of the traversed child element is greater than the size threshold, then reduce the size of the child element to the size threshold, and determine whether there are still child elements that exceed the display area of the container. If so, continue to traverse the child elements until there are no child elements that exceed the display area of the container or the size of the child elements that are greater than the size threshold has been reduced to the size threshold.
[0012] Optionally, the method further includes:
[0013] If, after reducing the size of a child element that exceeds the size threshold, there are still child elements that cannot fill the display area of the container, a prompt child element is added to the container; the prompt child element is used to indicate the existence of child elements that have not filled the container.
[0014] Optionally, adding the prompt child element to the container includes:
[0015] Delete child elements within the display area of the container until there is space in the container to add a prompt child element;
[0016] Add the prompt child element to the container.
[0017] Optionally, adding the prompt child element to the container includes:
[0018] According to the order in which the child elements are arranged in the navigation route, the prompt child element is added as the last child element to the display area of the container.
[0019] Optionally, deleting child elements within the display area of the container includes:
[0020] According to the order in which the child elements are arranged in the navigation route, delete the child elements in the display area of the container in turn.
[0021] Optionally, the order in which the sub-elements are arranged in the navigation planning route includes:
[0022] The reverse order of child elements in the navigation route; or,
[0023] The ascending order of child elements in the navigation route planning.
[0024] Optionally, the method further includes:
[0025] The child elements to be filled into the container are filled into the container row by row, and the length of each row of child elements does not exceed the width of the container.
[0026] Optionally, the method further includes:
[0027] When the container's property is not a fixed size, the height of the container is adjusted according to the space occupied by the child elements to be filled into the container and the width of the container itself, so that the container can fill all the child elements to be filled into the container.
[0028] The child elements to be filled into the container are then filled into the container.
[0029] This application also provides a method for displaying navigation information, including: displaying the user's historical navigation planning route or displaying the user's real-time navigation planning route based on the method of filling child elements in a container as described above.
[0030] Optionally, the historical navigation planning routes include: historical navigation planning routes recently viewed by the user or historical navigation planning routes used by the user; the user's real-time navigation planning routes include real-time navigation planning routes planned based on the user's real-time input of the origin and destination or real-time navigation planning routes planned based on the origin and destination set by the user.
[0031] This application also provides a method for filling child elements in a fixed container, including:
[0032] Get the child elements to be populated into the container;
[0033] Determine if there are any child elements that cannot fill the display area of the container;
[0034] If so, add the prompt child element to the container; the prompt child element refers to the child element used to indicate the existence of a child element that has not been filled into the container.
[0035] This application also provides a method for displaying child elements, including:
[0036] Get the child elements to be displayed;
[0037] Based on the container's properties, the child elements to be displayed are shown on the display screen; the container's properties include fixed size or non-fixed size; the fixed size means that the height and width of the container are both immutable; the non-fixed size means that the height or width of the container is variable.
[0038] Optionally, the container has a non-fixed size attribute, and displaying the child elements to be displayed on the screen according to the container's attribute includes:
[0039] The sub-elements to be displayed are then displayed on the display screen.
[0040] Optionally, the container has a fixed size attribute, and displaying the child elements to be displayed on the screen according to the container's attribute includes:
[0041] At least one of the child elements to be displayed is shown on the display screen in a scaled-down form.
[0042] Optionally, the container has a fixed size attribute, and displaying the child elements to be displayed on the screen according to the container's attribute includes:
[0043] Display some of the child elements to be displayed and the prompt child element on the display screen; the prompt child element is used to indicate that there are child elements that are not displayed on the display screen.
[0044] This application also provides a device for filling a container with child elements, comprising:
[0045] The child element acquisition unit is used to acquire the child elements to be filled into the container; the child elements to be filled into the container are the route segments included in the navigation planning route;
[0046] The out-of-display-area judgment unit is used to determine whether there are child elements that cannot fill the display area of the container when the container's attribute is a fixed size.
[0047] The sub-element size reduction unit is used to reduce the size of sub-elements that exceed the size threshold when the output of the display area determination unit is yes, so that the container can accommodate at least one sub-element that cannot fill the display area of the container; the fixed size means that the height and width of the container are fixed values.
[0048] This application also provides an electronic device, including:
[0049] Processor; and
[0050] The memory is used to store a program for a method of filling sub-elements in a container. After the device is powered on and the program for the method of filling sub-elements in a container is run by the processor, the following steps are performed:
[0051] Obtain the child elements to be populated into the container; the child elements to be populated into the container are the route segments included in the navigation planning route;
[0052] When the container's attribute is fixed size, it is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0053] This application also provides a method for filling a container with child elements, including:
[0054] Get the child elements to be populated into the container;
[0055] When the container's attribute is fixed size, it is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0056] Compared with the prior art, this application has the following advantages:
[0057] This application provides a method, apparatus, and electronic device for filling a container with child elements. The method obtains the child elements to be filled into the container. When the container has a fixed size, it determines whether there are child elements that cannot be filled into the display area of the container. If so, it reduces the size of the child elements exceeding a size threshold. When a navigation route includes many route segments, this application uses the method of reducing the size of child elements exceeding a size threshold to fill a fixed container with more child elements, solving the problem of incomplete display of route information on existing electronic maps, thereby improving the user experience. Attached Figure Description
[0058] Figure 1 This is a flowchart of a method for filling a container with child elements provided in the first embodiment of this application.
[0059] Figure 2 This is a schematic diagram of the sub-elements provided in the first embodiment of this application.
[0060] Figure 3 This is a schematic diagram of reducing the size of a sub-element that exceeds a size threshold, provided in the first embodiment of this application.
[0061] Figure 4 This is a schematic diagram provided in the first embodiment of this application, showing that even after reducing the size of a sub-element that exceeds a size threshold, there are still sub-elements that cannot fill the display area of the container.
[0062] Figure 5 This is a schematic diagram of adding a prompt sub-element to a container according to the first embodiment of this application.
[0063] Figure 6 This is a schematic diagram of filling the child element to be filled into the container into the next row of the current row, as provided in the first embodiment of this application.
[0064] Figure 7 This is a scene diagram provided in the first embodiment of this application, in which child elements to be filled into a container are filled into a non-fixed size.
[0065] Figure 8This is a scene diagram provided in the first embodiment of this application, in which child elements to be filled into a container are filled to a fixed size.
[0066] Figure 9 This is a flowchart of a method for filling sub-elements in a fixed container, as provided in the second embodiment of this application.
[0067] Figure 10 This is a schematic diagram of adding a prompt child element to a container according to the second embodiment of this application.
[0068] Figure 11 This is a flowchart of a method for displaying sub-elements provided in the third embodiment of this application.
[0069] Figure 12 This is a schematic diagram of an apparatus for filling sub-elements in a container, provided in the fourth embodiment of this application.
[0070] Figure 13 This is a schematic diagram of an electronic device provided in the fifth embodiment of this application.
[0071] Figure 14 This is a schematic diagram of an apparatus for filling sub-elements in a fixed container, provided in the sixth embodiment of this application.
[0072] Figure 15 This is a schematic diagram of a device for displaying sub-elements provided in the seventh embodiment of this application. Detailed Implementation
[0073] Numerous specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0074] The first embodiment of this application provides a method for filling a container with child elements, which is described below in conjunction with... Figures 1 to 8 Please provide an explanation.
[0075] like Figure 1 As shown, in step S101, the sub-elements to be filled into the container are obtained; the sub-elements to be filled into the container are the route segments included in the navigation planning route.
[0076] The container can refer to an element that can be filled with child elements.
[0077] The child element to be filled into the container can refer to the child element displayed at its original size.
[0078] For example, such as Figure 2As shown, A, B, C, D, E, F, G, and H are sub-elements, and each sub-element represents a route segment included in the navigation planning route.
[0079] like Figure 1 As shown, in step S102, when the container's attribute is fixed size, it is determined whether there are any child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0080] For example, such as Figure 3 As shown in 3-1, there are elements C and B that cannot be filled into the container. The method of reducing the size of child elements exceeding the size threshold is used to fill all child elements that need to be filled into the container. The effect after filling is as follows. Figure 3 As shown in 3-4.
[0081] The reduction of the size of sub-elements exceeding the size threshold includes:
[0082] Based on the order in which the child elements are arranged in the navigation route, the size of child elements that exceed the size threshold will be reduced in turn.
[0083] Specifically, according to the order in which the child elements are arranged in the navigation route, including: according to the ascending order of the child elements in the navigation route; or, according to the descending order of the child elements in the navigation route.
[0084] In addition to shrinking the size of child elements that exceed the size threshold sequentially according to their arrangement in the navigation route, the size of child elements that exceed the size threshold can also be shrunk in a random order.
[0085] For example, Figure 3 In the navigation planning route, following the reverse order of the child elements' arrangement, the size of the fourth row's child element B, the third row's child element A, and the first row's child element A, which exceed the size threshold, are reduced in turn.
[0086] The step of reducing the size of sub-elements exceeding the size threshold sequentially according to their arrangement order in the navigation planning route includes:
[0087] According to the order of child elements in the navigation planning route, traverse the child elements. If the size of the traversed child element is greater than the size threshold, then reduce the size of the child element to the size threshold, and determine whether there are still child elements that exceed the display area of the container. If so, continue to traverse the child elements until there are no child elements that exceed the display area of the container or the size of the child elements that are greater than the size threshold has been reduced to the size threshold.
[0088] For example, such as Figure 3 As shown in 3-1, following the reverse order of the child elements' arrangement in the navigation planning route, the first child element B is obtained. Its size is greater than the size threshold. The size of child element B is reduced to the size threshold, and then child element B is reduced to B (limited), as shown in 3-2. In 3-2, there are still child elements that exceed the display area of the container. At this time, the size of the child element A in the third row is reduced, as shown in 3-3. Finally, the size of the child element A in the first row is reduced so that all child elements fill the container. At this time, there are no child elements that exceed the display area of the container, as shown in 3-4.
[0089] For example, such as Figure 4 As shown, following the reverse order of the child elements' arrangement in the navigation planning route, the child elements are traversed. First, the size of the fourth row child element B is reduced to the size threshold. Then, the size of the third row A is reduced to the size threshold. Finally, the size of the first row A is reduced to the size threshold. At this time, the size of all child elements larger than the size threshold is reduced to the size threshold.
[0090] As one implementation method, the first embodiment of this application may further include:
[0091] If, after reducing the size of a child element that exceeds the size threshold, there are still child elements that cannot fill the display area of the container, a prompt child element is added to the container; the prompt child element is used to indicate the existence of child elements that have not filled the container.
[0092] like Figure 4 As shown, even after shrinking the size of child elements that exceed the size threshold, there are still child elements D that cannot fill the display area of the container.
[0093] like Figure 2 As shown, "more" is a child element of the prompt.
[0094] like Figure 5 As shown, if there are still child elements D that cannot fill the display area of the container after shrinking the size of child elements that exceed the size threshold, then a prompt child element "more" is added to the container. The prompt child element "more" indicates that there are child elements that do not fill the container. As one implementation, to display the child elements that do not fill the container, a trigger operation can be received to display all child elements; or, a trigger operation can be received to display child elements replaced by "more", and the child elements replaced by "more" can be displayed.
[0095] Adding the prompt child element to the container includes:
[0096] Delete child elements within the display area of the container until there is space in the container to add a prompt child element;
[0097] Add the prompt child element to the container.
[0098] Adding the prompt child element to the container includes:
[0099] According to the order in which the child elements are arranged in the navigation route, the prompt child element is added as the last child element to the display area of the container.
[0100] like Figure 5-4 As shown, the prompt child element is added as the last child element to the display area of the container, following the ascending order of the child elements in the navigation route.
[0101] like Figure 5 As shown, since the child element D outside the container's display area cannot be added to the container, the tooltip child element "more" can be used instead of D. First, delete the child element B (limited) within the container's display area to create space for adding the tooltip child element. Then, add the tooltip child element "more" as the last child element to the container's display area.
[0102] As one implementation method, the first embodiment of this application may further include:
[0103] The child elements to be filled into the container are filled into the container row by row, and the length of each row of child elements does not exceed the width of the container.
[0104] Specifically, filling the container with the child elements to be filled row by row includes:
[0105] Fill the current row of the container with the child elements to be filled into the container;
[0106] Determine whether the child element to be filled into the container exceeds the boundary of the current row;
[0107] If so, fill the child element to be filled into the container into the next row of the current row.
[0108] like Figure 6 As shown, there are a total of twelve child elements that need to be filled into the container. If child element A is filled on the same line as child element G, it will exceed the display area of the container, so child element A is filled on the next line after the current line. If child element F is filled on the same line as child element H, it will exceed the display area of the container, so child element F is filled on the next line after the current line.
[0109] As one implementation method, the first embodiment of this application may further include:
[0110] When the container's property is not a fixed size, the height of the container is adjusted according to the space occupied by the child elements to be filled into the container and the width of the container itself, so that the container can fill all the child elements to be filled into the container.
[0111] The child elements to be filled into the container are then filled into the container.
[0112] Figure 7 and Figure 8 The results demonstrate the effects of using the method described in this application to fill non-fixed-size containers and fixed-size containers with child elements to be filled. For example... Figure 7 As shown, 7-1 (solid box) is a container with a non-fixed size. The height of the container is adjusted based on the space occupied by the child elements to be filled (7-2 dashed box) and the width of the container itself, so that the container can fill all the child elements to be filled. For example... Figure 8 As shown, 8-1 (solid box) is a container of fixed size, and 8-2 (dashed box) is a filled child element. As can be seen from the figure, child elements larger than the size threshold are compressed, which realizes the display of bus transfer routes of varying numbers and lengths within a container of fixed size.
[0113] The second embodiment of this application provides a method for filling child elements in a fixed container, which is described below in conjunction with... Figure 9 Please provide an explanation.
[0114] like Figure 9 As shown, in step S901, the child elements to be filled into the container are obtained.
[0115] like Figure 9 As shown, in step S902, it is determined whether there are any child elements that cannot fill the display area of the container. If the result of the determination is yes, step S903 is executed.
[0116] like Figure 9 As shown, in step S903, a prompt sub-element is added to the container; the prompt sub-element refers to a sub-element used to indicate the existence of a sub-element that has not been filled into the container.
[0117] like Figure 10 As shown in Figure 10-1, there are child elements A, B, and C in the display area that cannot be filled into the container. In Figure 10-2, the prompt child element "more" is added to the container. "More" is used to indicate that there are child elements that have not been filled into the container.
[0118] In one implementation, to display child elements that are not filled into the container, a trigger operation for displaying all child elements can be received, and all child elements can be displayed.
[0119] When there are child elements that cannot fill the display area of the container, a prompt child element is used to indicate that there are child elements that have not filled the container. When the user clicks on the container, they can be redirected to the specific details page, where the child elements that have not filled the container can be displayed.
[0120] The method provided in the second embodiment of this application enables the display of a variable number and length of child elements within a container of fixed size.
[0121] The third embodiment of this application provides a method for displaying child elements, which is described below in conjunction with... Figure 11 Please provide an explanation.
[0122] like Figure 11 As shown, in step S1101, the sub-elements to be displayed are obtained.
[0123] like Figure 11 As shown, in step S1102, the child element to be displayed is displayed on the display screen according to the attributes of the container; the attributes of the container include fixed size or non-fixed size; the fixed size means that the height and width of the container are both immutable; the non-fixed size means that the height or width of the container is variable.
[0124] When the container's attribute is not a fixed size, the step of displaying the child element to be shown on the display screen according to the container's attribute includes:
[0125] The sub-elements to be displayed are shown on the display screen.
[0126] like Figure 7 As shown, the child elements to be displayed will be shown on the display screen.
[0127] When the container's property is a fixed size, the step of displaying the child elements to be shown on the display screen according to the container's property includes:
[0128] At least one of the child elements to be displayed is shown on the display screen in a scaled-down form.
[0129] like Figure 8 As shown, the two child elements to be displayed are shown on the screen in a scaled-down form.
[0130] The container has a fixed size attribute. The step of displaying the child elements to be shown on the display screen according to the container's attribute includes:
[0131] Display some of the child elements to be displayed and the prompt child element on the display screen; the prompt child element is used to indicate that there are child elements that are not displayed on the display screen.
[0132] Corresponding to the method for filling a container with sub-elements provided in the first embodiment of this application, the fourth embodiment of this application also provides an apparatus for filling a container with sub-elements.
[0133] like Figure 12 As shown, the device includes:
[0134] The child element obtaining unit 1201 is used to obtain the child element to be filled into the container; the child element to be filled into the container is the route segment included in the navigation planning route;
[0135] The display area exceeding judgment unit 1202 is used to determine whether there are child elements that cannot fill the display area of the container when the container's attribute is a fixed size;
[0136] The sub-element size reduction unit 1203 is used to reduce the size of the sub-element that exceeds the size threshold when the output of the display area determination unit is yes, so that the container can accommodate at least one sub-element that cannot fill the display area of the container; the fixed size means that the height and width of the container are fixed values.
[0137] Optionally, the sub-element size reduction unit is specifically used for:
[0138] Based on the order in which the child elements are arranged in the navigation route, the size of child elements that exceed the size threshold will be reduced in turn.
[0139] Optionally, the sub-element size reduction unit is specifically used for:
[0140] According to the order of child elements in the navigation planning route, traverse the child elements. If the size of the traversed child element is greater than the size threshold, then reduce the size of the child element to the size threshold, and determine whether there are still child elements that exceed the display area of the container. If so, continue to traverse the child elements until there are no child elements that exceed the display area of the container or the size of the child elements that are greater than the size threshold has been reduced to the size threshold.
[0141] Optionally, the device further includes:
[0142] A prompt child element addition unit is used to add a prompt child element to the container if, after reducing the size of a child element that exceeds a size threshold, there are still child elements that cannot fill the display area of the container; the prompt child element is used to indicate the existence of child elements that are not filled into the container.
[0143] Optionally, the prompt sub-element adding unit is specifically used for:
[0144] Delete child elements within the display area of the container until there is space in the container to add a prompt child element;
[0145] Add the prompt child element to the container.
[0146] Optionally, the prompt sub-element adding unit is specifically used to: add the prompt sub-element as the last sub-element to the display area of the container according to the arrangement order of the sub-elements in the navigation planning route.
[0147] Optionally, the prompt sub-element adding unit is specifically used for:
[0148] According to the order in which the child elements are arranged in the navigation route, delete the child elements in the display area of the container in turn.
[0149] Optionally, the order in which the sub-elements are arranged in the navigation planning route includes:
[0150] The reverse order of child elements in the navigation route; or,
[0151] The ascending order of child elements in the navigation route planning.
[0152] Optionally, the device is also used for:
[0153] The child elements to be filled into the container are filled into the container row by row, and the length of each row of child elements does not exceed the width of the container.
[0154] Optionally, the device further includes:
[0155] The container height adjustment unit is used to adjust the height of the container according to the space occupied by the child elements to be filled into the container and the width of the container itself when the container's property is not a fixed size, so that the container can fill all the child elements to be filled into the container.
[0156] A sub-element filling unit is used to fill the container with the sub-elements to be filled into the container.
[0157] It should be noted that for a detailed description of the apparatus provided in the fourth embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0158] Corresponding to the method for filling a container with sub-elements provided in the first embodiment of this application, the fifth embodiment of this application also provides an electronic device.
[0159] like Figure 13 As shown, the electronic device includes:
[0160] Processor 1301; and
[0161] The memory 1302 is used to store a program for a method of filling sub-elements in a container. After the device is powered on and the program for the method of filling sub-elements in a container is run by the processor, the following steps are performed:
[0162] Obtain the child elements to be populated into the container; the child elements to be populated into the container are the route segments included in the navigation planning route;
[0163] When the container's attribute is fixed size, it is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0164] Optionally, reducing the size of sub-elements that exceed the size threshold includes:
[0165] Based on the order in which the child elements are arranged in the navigation route, the size of child elements that exceed the size threshold will be reduced in turn.
[0166] Optionally, the step of reducing the size of sub-elements exceeding the size threshold sequentially according to their arrangement order in the navigation planning route includes:
[0167] According to the order of child elements in the navigation planning route, traverse the child elements. If the size of the traversed child element is greater than the size threshold, then reduce the size of the child element to the size threshold, and determine whether there are still child elements that exceed the display area of the container. If so, continue to traverse the child elements until there are no child elements that exceed the display area of the container or the size of the child elements that are greater than the size threshold has been reduced to the size threshold.
[0168] Optionally, the electronic device also performs the following steps:
[0169] If, after reducing the size of a child element that exceeds the size threshold, there are still child elements that cannot fill the display area of the container, a prompt child element is added to the container; the prompt child element is used to indicate the existence of child elements that have not filled the container.
[0170] Optionally, adding the prompt child element to the container includes:
[0171] Delete child elements within the display area of the container until there is space in the container to add a prompt child element;
[0172] Add the prompt child element to the container.
[0173] Optionally, adding the prompt child element to the container includes:
[0174] According to the order in which the child elements are arranged in the navigation route, the prompt child element is added as the last child element to the display area of the container.
[0175] Optionally, deleting child elements within the display area of the container includes:
[0176] According to the order in which the child elements are arranged in the navigation route, delete the child elements in the display area of the container in turn.
[0177] Optionally, the order in which the sub-elements are arranged in the navigation planning route includes:
[0178] The reverse order of child elements in the navigation route; or,
[0179] The ascending order of child elements in the navigation route planning.
[0180] Optionally, the electronic device also performs the following steps:
[0181] The child elements to be filled into the container are filled into the container row by row, and the length of each row of child elements does not exceed the width of the container.
[0182] Optionally, the electronic device also performs the following steps:
[0183] When the container's property is a non-fixed size, the height of the container is determined based on the space occupied by the child elements to be filled into the container and the width of the container, so that the container can fill all the child elements to be filled into the container; the width of the container is a fixed value.
[0184] The child elements to be filled into the container are then filled into the container.
[0185] It should be noted that for a detailed description of the electronic device provided in the fifth embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0186] Corresponding to the method for filling sub-elements in a fixed container provided in the second embodiment of this application, the sixth embodiment of this application also provides an apparatus for filling sub-elements in a fixed container.
[0187] like Figure 14 As shown, the device includes:
[0188] The child element acquisition unit 1401 is used to obtain the child elements to be filled into the container;
[0189] The judgment unit 1402 is used to determine whether there are any child elements that cannot fill the display area of the container;
[0190] The prompt sub-element adding unit 1403 is used to add a prompt sub-element to the container when the output of the judgment unit is yes; the prompt sub-element refers to the sub-element used to indicate that there is a sub-element that has not been filled into the container.
[0191] It should be noted that for a detailed description of the apparatus provided in the sixth embodiment of this application, please refer to the relevant description of the second embodiment of this application, which will not be repeated here.
[0192] Corresponding to the method for displaying sub-elements provided in the third embodiment of this application, the seventh embodiment of this application also provides an apparatus for displaying sub-elements.
[0193] like Figure 15 As shown, the device includes:
[0194] The child element acquisition unit 1501 is used to obtain the child element to be displayed;
[0195] The child element display unit 1502 is used to display the child element to be displayed on the display screen according to the attributes of the container; the attributes of the container include fixed size or non-fixed size; the fixed size means that the height and width of the container are both immutable; the non-fixed size means that the height or width of the container is variable.
[0196] Optionally, the container's attribute is a non-fixed size, and the child element display unit is specifically used for:
[0197] The sub-elements to be displayed are then displayed on the display screen.
[0198] Optionally, the container has a fixed size attribute, and the child element display unit is specifically used for:
[0199] At least one of the child elements to be displayed is shown on the display screen in a scaled-down form.
[0200] Optionally, the container has a fixed size attribute, and the child element display unit is specifically used for:
[0201] Display some of the child elements to be displayed and the prompt child element on the display screen; the prompt child element is used to indicate that there are child elements that are not displayed on the display screen.
[0202] It should be noted that for a detailed description of the apparatus provided in the seventh embodiment of this application, please refer to the relevant description of the third embodiment of this application, which will not be repeated here.
[0203] The eighth embodiment of this application provides a method for filling a container with child elements, including:
[0204] Get the child elements to be populated into the container;
[0205] When the container's attribute is fixed size, it is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
[0206] It should be noted that for a detailed description of the method provided in the eighth embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0207] The ninth embodiment of this application provides a navigation information display method, including: displaying the user's historical navigation planning route or displaying the user's real-time navigation planning route based on the method of filling sub-elements in a container according to the first embodiment of this application.
[0208] Optionally, the historical navigation routes include: historical navigation routes recently viewed by the user or historical navigation routes used by the user; the user's real-time navigation routes include real-time navigation routes planned based on the user's real-time input of origin and destination or real-time navigation routes planned based on the user's set origin and destination (such as frequently used origin and destination (home, company, pick-up point, drop-off point, etc.) set by the user in commuting scenarios). The real-time refers to the navigation route planned based on the origin and destination according to the user's travel time. The user's travel time can be the time when the user selects and inputs the origin and destination or the departure time selected by the user. This time is generally later than the time when the user inputs the origin and destination.
[0209] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0210] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0211] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0212] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0213] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. A method for filling a container with child elements, comprising: Get the child elements to be populated into the container; The child elements to be filled into the container are the route segments included in the navigation planning route; The container has a fixed size attribute. It is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
2. The method according to claim 1, wherein reducing the size of sub-elements exceeding the size threshold comprises: Based on the order in which the child elements are arranged in the navigation route, the size of child elements that exceed the size threshold will be reduced in turn.
3. The method according to claim 2, wherein the step of sequentially reducing the size of sub-elements exceeding the size threshold according to their arrangement order in the navigation planning route includes: According to the order of child elements in the navigation planning route, traverse the child elements. If the size of the traversed child element is greater than the size threshold, then reduce the size of the child element to the size threshold, and determine whether there are still child elements that exceed the display area of the container. If so, continue to traverse the child elements until there are no child elements that exceed the display area of the container or the size of the child elements that are greater than the size threshold has been reduced to the size threshold.
4. The method according to any one of claims 1-3, wherein the method further comprises: If, after reducing the size of a child element that exceeds the size threshold, there are still child elements that cannot fill the display area of the container, a prompt child element is added to the container; the prompt child element is used to indicate the existence of child elements that have not filled the container.
5. The method according to claim 4, wherein adding the prompt child element to the container comprises: Delete child elements within the display area of the container until there is space in the container to add a prompt child element; Add the prompt child element to the container.
6. The method according to claim 5, wherein adding the prompt sub-element to the container comprises: According to the order in which the child elements are arranged in the navigation route, the prompt child element is added as the last child element to the display area of the container.
7. The method according to claim 5, wherein deleting child elements within the display area of the container comprises: According to the order in which the child elements are arranged in the navigation route, delete the child elements in the display area of the container in turn.
8. The method according to claim 2 or 7, wherein the arrangement order of the sub-elements in the navigation planning route includes: The reverse order of child elements in the navigation route; or, The ascending order of child elements in the navigation route planning.
9. The method according to claim 1, wherein the method further comprises: The child elements to be filled into the container are filled into the container row by row, and the length of each row of child elements does not exceed the width of the container.
10. An apparatus for filling a container with child elements, comprising: The child element retrieval unit is used to retrieve the child elements to be filled into the container; The child elements to be filled into the container are the route segments included in the navigation planning route; The out-of-display-area judgment unit is used to determine whether there are child elements that cannot fill the display area of the container when the container's attribute is a fixed size. The sub-element size reduction unit is used to reduce the size of sub-elements that exceed the size threshold when the output of the display area determination unit is yes, so that the container can accommodate at least one sub-element that cannot fill the display area of the container; the fixed size means that the height and width of the container are fixed values.
11. An electronic device, comprising: processor; as well as The memory is used to store a program for a method of filling sub-elements in a container. After the device is powered on and the program for the method of filling sub-elements in a container is run by the processor, the following steps are performed: Obtain the child elements to be populated into the container; the child elements to be populated into the container are the route segments included in the navigation planning route; The container has a fixed size attribute. It is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
12. A method for filling a container with child elements, comprising: Get multiple child elements to be populated into the container; The container has a fixed size attribute. It is determined whether there are child elements that cannot fill the display area of the container. If so, the size of the child elements that exceed the size threshold is reduced so that the container can accommodate at least one of the child elements that cannot fill the display area of the container. The fixed size means that the height and width of the container are fixed values.
13. A method for displaying navigation information, comprising: The method described according to any one of claims 1-9 displays the user's historical navigation planning routes or displays the user's real-time navigation planning routes.
14. The method according to claim 13, wherein the historical navigation planning route comprises: The user's recently viewed historical navigation routes or the user's historical navigation routes; The user's real-time navigation planning route includes a real-time navigation planning route based on the user's real-time input of the origin and destination, or a real-time navigation planning route based on the origin and destination set by the user.
Citation Information
Patent Citations
Method and device for dwindling character stuffing in target region
CN101158940A
Information processing device and image processing device
CN101672648A
Interaction method and interaction system device for displaying long forms on mobile terminal
CN108037974A
Multi-line omission display method and device
CN110633437A
Smart gadget resizing
US20070214431A1