CN116932120A - Method and device for zooming visual page of map base map and electronic equipment - Google Patents

Method and device for zooming visual page of map base map and electronic equipment Download PDF

Info

Publication number
CN116932120A
CN116932120A CN202311190680.3A CN202311190680A CN116932120A CN 116932120 A CN116932120 A CN 116932120A CN 202311190680 A CN202311190680 A CN 202311190680A CN 116932120 A CN116932120 A CN 116932120A
Authority
CN
China
Prior art keywords
container
map
visual page
scaling
screen display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311190680.3A
Other languages
Chinese (zh)
Other versions
CN116932120B (en
Inventor
余海强
孔忠勇
汤子楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunli Intelligent Technology Co ltd
Original Assignee
Yunli Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yunli Intelligent Technology Co ltd filed Critical Yunli Intelligent Technology Co ltd
Priority to CN202311190680.3A priority Critical patent/CN116932120B/en
Publication of CN116932120A publication Critical patent/CN116932120A/en
Application granted granted Critical
Publication of CN116932120B publication Critical patent/CN116932120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides a method and a device for scaling a visual page of a map base map and electronic equipment, and belongs to the technical field of large-screen display. The method comprises the following steps: carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map; determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio; after the visual page is zoomed, determining a container needing to be adjusted in layout in a top container, a bottom container, a left container and a right container based on the resolution of the target large-screen display, and performing layout adjustment; and according to the vector scaling attribute of the map base map, carrying out full-screen display on the map base map based on the resolution of the target large-screen display. The method does not need repeated development, can display the configured visual page in full screen, and the elements of the visual page are not deformed.

Description

Method and device for zooming visual page of map base map and electronic equipment
Technical Field
The invention relates to the technical field of large-screen display, in particular to a method and a device for scaling a visual page of a map base map and electronic equipment.
Background
In recent years, data visualization becomes a hotword, and the data visualization mainly aims at clearly and effectively conveying and communicating information by means of a graphical means. In the big data age, the visual large screen can help users quickly understand data and know the current business situation so as to make proper decisions.
The resolution of the large screen display is various, for example, the resolution of the large screen display may be 1920×1080, 3840×1080, 5760×2160, or the like. Based on this, when the configured visual page is put on a different large screen display, there is often a case where the resolution difference is too large and the aspect ratio is not equal to the aspect ratio of the visual page.
At this time, if full-screen pavement is performed according to the resolution of the large-screen display, the deformation of elements in the visualized page is caused; if the visualized page is scaled in equal proportion according to a certain proportion, the situation that the large-screen display is left white can occur, namely the visualized page is not fully distributed on the whole screen; if the visual pages adapting to the resolution of the large-screen display are respectively developed for different large-screen displays, the workload of developing the visual pages is greatly increased.
Disclosure of Invention
The invention provides a method, a device and electronic equipment for zooming a visual page of a map base map, which are used for solving the problems of large workload caused by zooming deformation, zooming whiteness and repeated development of the visual page aiming at different resolutions in the prior art, realizing full-screen display of the configured visual page of the map base map on a target large-screen display without repeated development, and preventing elements of the visual page from deforming after full-screen display.
The invention provides a visual page zooming method of a map base map, which comprises the following steps:
carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio;
after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment;
And scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
According to the method for zooming the visual page of the map base map, which is provided by the invention, the visual page of the map base map is divided into a top container, a bottom container, a left container, a right container and the map base map by carrying out layout division, and the method comprises the following steps:
and carrying out layout division on the visual page, integrally dividing a title part, close to the top, in the visual page into the top container, dividing a component part, close to the bottom, in the visual page into the bottom container, dividing a component part, close to the left, in the visual page into the left container, dividing a component part, close to the right, in the visual page into the right container, and dividing a map background in the visual page into a map base map.
According to the method for scaling the visual page of the map base map, which is provided by the invention, the scaling ratio is determined based on the resolution of the target large-screen display and the resolution of the visual page, and the method comprises the following steps:
calculating a first ratio of the length of the resolution of the target large screen display to the length of the resolution of the visual page;
Calculating a second ratio of the width of the resolution of the target large screen display to the width of the resolution of the visual page;
and selecting the scaling ratio with the smallest value from the first ratio and the second ratio.
According to the method for scaling the visual page of the map base map provided by the invention, the scaling of the visual page based on the scaling scale comprises the following steps:
and scaling the visualized page in an equal proportion based on the scaling scale.
According to the method for zooming the visual page of the map base map provided by the invention, the method for determining the container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large-screen display and performing layout adjustment comprises the following steps:
determining the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, based on the resolution of the target large screen display;
and determining a container needing to be adjusted in layout and performing layout adjustment based on positions of the top container, the bottom container, the left container and the right container in the screen of the target large-screen display.
According to the method for zooming the visual page of the map base map provided by the invention, based on the positions of the top container, the bottom container, the left container and the right container in the screen of the target large-screen display, the container needing to be adjusted in layout is determined and layout adjustment is performed, and the method comprises the following steps:
determining containers of the top container, the bottom container, the left container and the right container which are more than a first preset distance from the corresponding screen edge based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
performing first layout adjustment on the containers with the distance which is larger than a first preset distance from the corresponding screen edge;
determining containers of the top container, the bottom container, the left container and the right container which are more than a second preset distance from adjacent screen edges respectively based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
and carrying out second layout adjustment on the containers which are more than a second preset distance from the adjacent edges of the screen.
According to the method for scaling the visual page of the map base map provided by the invention, the map base map is scaled based on the resolution of the target large-screen display, and the method comprises the following steps:
determining the center of the map base map as the center of the screen of the target large-screen display;
fixing the center of the map base map, and determining the display size of the map base map based on the resolution of the target large-screen display;
and scaling the map base map based on the display size.
The invention also provides a visual page zooming device of the map base map, which comprises:
the layout unit is used for carrying out layout division on the visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
the zoom unit is used for determining a zoom scale based on the resolution of the target large-screen display and the resolution of the visual page and zooming the visual page based on the zoom scale;
the adjustment unit is used for determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large-screen display after the visual page is zoomed, and performing layout adjustment;
And the map unit is used for scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method for zooming the visual page of the map base map according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of visual page scaling of a map base map as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a method of visualizing page scaling of a map base as described in any of the above.
According to the map base map visual page scaling method, the map base map visual page scaling device and the electronic equipment, after the scaling proportion is determined based on the resolution of the target large screen display and the resolution of the visual page and the visual page is subjected to preliminary scaling, the map base map can be displayed in a full screen mode aiming at the target large screen display based on the vector scaling attribute of the map base map, and then layout adjustment is carried out on each divided container according to the resolution of the target large screen display, so that the visual page can be displayed in a full screen without leaving white on the premise that redevelopment is not needed, and elements in the visual page cannot be deformed.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow diagram of a method for zooming a visual page of a map base map according to an embodiment of the present application;
FIG. 2 is a simplified schematic diagram of a visualization page of a map base map provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a scaled display effect of a visual page according to an embodiment of the present application;
FIG. 4 is a second schematic diagram of a scaled display effect of a visual page according to an embodiment of the present application;
FIG. 5 is a third schematic diagram of a scaled display effect of a visual page according to an embodiment of the present application;
FIG. 6 is a second flow chart of a method for zooming a map base map according to an embodiment of the present application;
FIG. 7 is a schematic diagram showing the positions of the containers after the first layout adjustment according to the embodiment of the present application;
FIG. 8 is a second schematic diagram of the positions of the containers after the first layout adjustment according to the embodiment of the present application;
FIG. 9 is a third schematic diagram of the position of each container after the first layout adjustment according to the embodiment of the present application;
FIG. 10 is a schematic diagram showing the positions of containers after a second layout adjustment according to an embodiment of the present application;
FIG. 11 is a second schematic diagram of the position of each container after the second layout adjustment according to the embodiment of the present application;
FIG. 12 is a third schematic view of the positions of the containers after the second layout adjustment according to the embodiment of the present application;
fig. 13 is a schematic structural diagram of a device for zooming a visual page of a map base map according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In general, when the configured visual pages are put on large-screen displays with different resolutions, as the resolution of each large-screen display may be different from the resolution of the visual page and the aspect ratio may not be equal, full-screen display may cause deformation of elements in the visual page, equal-scale scaling may cause white-keeping of the large-screen display, and full-screen display and no deformation may require redevelopment of a proper visual page for the large-screen display, so that development workload is greatly increased.
In view of the above problems, the present application provides a method for zooming a map base map, and fig. 1 is one of flow diagrams of the method for zooming a map base map according to the embodiment of the present application, as shown in fig. 1, where the method for zooming a map base map comprises:
step 110: and carrying out layout division on the visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map.
Specifically, after the visual page of the map base map is configured, when the visual page needs to be put on a large-screen display with different resolutions, layout division needs to be performed on the visual page of the map base map. Typically, the visual page of the map base map is a title or name element near the top edge, and various components near the left, right and bottom edges. Thus, based on this, the visualization page may be divided into a top container, a bottom container, a left container, a right container, and a map base.
Step 120: a scaling factor is determined based on a resolution of the target large screen display and a resolution of the visual page, and the visual page is scaled based on the scaling factor.
Specifically, the target large-screen display refers to a large-screen display to be placed on a visual page, when the visual page is scaled, the scaling proportion of the visual page can be determined according to the resolution of the target large-screen display and the resolution of the visual page, and after the scaling proportion is determined, the visual page is scaled according to the scaling proportion.
Step 130: after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment.
Specifically, after scaling the visual page, since the aspect ratio of the resolution of the target large-screen display may be different from the aspect ratio of the resolution of the visual page, the visual page cannot be displayed in full screen in the target large-screen display after scaling in equal proportion. Further, some of the top, bottom, left, and right containers are not laid out at the corresponding edges of the screen near the target large screen display, so that the containers at the edges not near the corresponding edges of the screen need to be adjusted according to the resolution of the target large screen display so that the top, bottom, left, and right containers are distributed at the corresponding edges, respectively.
Step 140: and scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
Specifically, since the visualized page cannot be displayed in the target large screen display in full screen after scaling in equal proportion, at this time, the corresponding map base map cannot be displayed in full screen, but the map base map has the attribute of vector scaling, so that the map base map can be scaled according to the resolution of the target large screen display, that is, the range of the map base map is expanded or reduced, so that the map base map can be displayed in full screen on the target large screen display.
According to the map base map visual page scaling method, after the scaling proportion is determined based on the resolution of the target large screen display and the resolution of the visual page and the visual page is subjected to primary scaling, the map base map can be displayed in a full screen mode aiming at the target large screen display based on the vector scaling attribute of the map base map, and then layout adjustment is carried out on each divided container according to the resolution of the target large screen display, so that the visual page can be displayed in a full screen mode without leaving white on the premise that the visual page does not need to be redeveloped, and elements in the visual page cannot be deformed.
In one embodiment, the layout division of the visual page of the map base map divides the visual page into a top container, a bottom container, a left container, a right container and a map base map, including:
and carrying out layout division on the visual page, integrally dividing a title part, close to the top, in the visual page into the top container, dividing a component part, close to the bottom, in the visual page into the bottom container, dividing a component part, close to the left, in the visual page into the left container, dividing a component part, close to the right, in the visual page into the right container, and dividing a map background in the visual page into a map base map.
Specifically, the title part near the top in the visual page is wholly divided into a top container, the component part near the bottom in the visual page is divided into a bottom container, the component part near the left part in the visual page is divided into a left container, the component part near the right part in the visual page is divided into a right container, and the map background in the visual page is divided into a map base map.
In one embodiment, the determining the scale based on the resolution of the target large screen display and the resolution of the visualized page comprises:
Calculating a first ratio of the length of the resolution of the target large screen display to the length of the resolution of the visual page;
calculating a second ratio of the width of the resolution of the target large screen display to the width of the resolution of the visual page;
and selecting the scaling ratio with the smallest value from the first ratio and the second ratio.
In one embodiment, the scaling the visual page based on the scaling comprises:
and scaling the visualized page in an equal proportion based on the scaling scale.
Illustratively, as shown in FIG. 2, the resolution of a visual page, e.g., map base, is 1920×1080. When the resolution of the target large-screen display is 3840×1080, a first scale and a second scale are calculated, wherein the first scale h1=3840/1920=2 and the second scale h2=1080/1080=1, and the scaling ratio ratio=min (H1, H2) =1 is determined. The display effect of the visual page on the target large screen display after scaling based on the scaling is shown in fig. 3.
When the resolution of the target large-screen display is 1920×2160, a first scale and a second scale are calculated, wherein the first scale h1=1920/1920=1 and the second scale h2=2160/1080=2, and the scaling ratio ratio=min (H1, H2) =1 is determined. The display effect of the visual page on the target large screen display after scaling based on the scaling is shown in fig. 4.
When the resolution of the target large-screen display is 5760×2160, a first scale and a second scale are calculated, wherein the first scale h1=5760/1920=3 and the second scale h2=2160/1080=2, and the scaling ratio=min (H1, H2) =2 is determined. The display effect of the visual page on the target large screen display after scaling based on the scaling is shown in fig. 5.
In one embodiment, the determining a container of the top container, the bottom container, the left container, and the right container that requires an adjustment of a layout based on a resolution of the target large screen display and performing a layout adjustment includes:
determining the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, based on the resolution of the target large screen display;
and determining a container needing to be adjusted in layout and performing layout adjustment based on positions of the top container, the bottom container, the left container and the right container in the screen of the target large-screen display.
Specifically, after scaling of the visual page, positions of the top container, the bottom container, the left container and the right container in the screen of the target large screen display are respectively determined, according to the positions of the containers, the layout of the containers can be determined to be adjusted, the layout of the containers does not need to be adjusted, and the layout of the containers needing to be adjusted is adjusted.
In one embodiment, determining a container requiring layout adjustment and performing layout adjustment based on the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, includes:
determining containers of the top container, the bottom container, the left container and the right container which are more than a first preset distance from the corresponding screen edge based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
performing first layout adjustment on the containers with the distance which is larger than a first preset distance from the corresponding screen edge;
determining containers of the top container, the bottom container, the left container and the right container which are more than a second preset distance from adjacent screen edges respectively based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
and carrying out second layout adjustment on the containers which are more than a second preset distance from the adjacent edges of the screen.
Specifically, when the resolution of the target large-screen display is different from the resolution of the visual page and the aspect ratio is not in equal proportion, such as 1920×1080 for the visual page and 3840×1080, 1920×2160 or 5760×2160 for the visual page, as shown in fig. 3 to 5, after scaling the visual page, the containers are not laid out according to the resolution of the target large-screen display, and thus there is a case where the layout of the containers is not reasonable. Based on the above, the containers of the top container, the bottom container, the left container, and the right container, which are more than the first preset distance from the corresponding edge of the screen, are respectively determined. It will be appreciated that in a reasonable layout, the containers should each be located on the screen of the target large screen display near the corresponding edge, e.g., the top container should be near the top edge of the screen, the bottom container should be near the bottom edge of the screen, the left container should be near the left edge of the screen, and the right container should be near the right edge of the screen.
Fig. 6 is a second flow chart of a visual page zooming method according to the embodiment of the present application, as shown in fig. 6, after determining a container above a first preset distance from the edge corresponding to the screen from the top container, the bottom container, the left container and the right container, a first layout adjustment needs to be performed on the container, that is, the container is adjusted to be close to the corresponding edge, where the distance between the container and the corresponding edge after the first layout adjustment may be preset based on the display requirement, which is not limited specifically herein. In the first layout adjustment, the displacement calculation may be performed with the upper left corner or the upper right corner of the container as the origin to move each container to the target position. As shown in fig. 7, 8 and 9, for example, the resolution of the target large-screen display is 3840×1080, 1920×2160 or 5760×2160, respectively, the position of each container after the first layout adjustment is schematically shown.
As can be seen from fig. 7, 8 and 9, after the first layout adjustment, there are containers farther from the adjacent edges, such as the top and bottom containers in fig. 7 and 9, and the left and right containers in fig. 8. Based on the above, the containers of the top container, the bottom container, the left container, and the right container which are more than the second preset distance from the adjacent edge on the screen are respectively determined, and the second layout adjustment is performed on the containers which are more than the second preset distance from the adjacent edge.
If the value of the first scale of the target large screen display and the visualization page is greater in the length direction, then the top container and the bottom container are farther from the adjacent two screen edges in the length direction, as shown for example in fig. 7 and 9. In this case, the top container is usually a content such as a title or a name, and when the second layout adjustment is performed on the top container, the top container is expanded in the longitudinal direction, and when the title in the top container has a background, the background is also expanded in the longitudinal direction. Further, the title may be centered so that the distance between the title and two adjacent edges is the same. For the bottom container, each component is usually included in the bottom container, when the second layout adjustment is performed on the bottom container, the bottom container is expanded in the length direction, and more components can be placed in the expanded bottom container, so that the components can be added in the bottom container, the distance between the components can be preset, and after the components are added, all the components in the bottom container are regarded as a whole to perform centering treatment, so that the distance between the whole formed by all the components and two adjacent edges on a screen is the same.
If the value of the second ratio of the target large screen display and the visualization page in the width direction is greater, the left container and the right container are farther from at least one edge adjacent on the screen in the width direction, such as shown in fig. 8. At this time, for the left and right containers, each component is generally included in the left and right containers, and when the second layout adjustment is performed on the left and right containers, the left and right containers are expanded in the width direction, and after the expansion, more components can be placed in the left and right containers, so that the components can be added in the left and right containers, the distance between each component can be preset, and after the components are added, all the components in the left and right containers are regarded as a whole, and centering processing is performed so that the distance between the whole of all the component components and the adjacent two edges is the same. As shown in fig. 10, 11, and 12, exemplary, positional diagrams of the containers after the second layout adjustment are made when the resolution of the target large-screen display is 3840×1080, 1920×2160, or 5760×2160, respectively.
In the map base map visual page zooming method, after the first layout adjustment and the second layout adjustment are carried out on each container, the layout of the zoomed visual page is more similar to the layout of the visual page before zooming, the aesthetic property of the zoomed visual page is improved, and each container is not deformed on the basis of full-screen display.
In one embodiment, the scaling the map base map based on the resolution of the target large screen display includes:
determining the center of the map base map as the center of the screen of the target large-screen display;
fixing the center of the map base map, and determining the display size of the map base map based on the resolution of the target large-screen display;
and scaling the map base map based on the display size.
Specifically, the map base map in the visual page has a certain meaning in some cases, for example, when the components in the visual page display related data of a city, the map base map generally displays a map of the city, that is, the map base map characterizes a geographic area corresponding to the data in the visual page.
In this case, simply scaling the map base after scaling the visual page may cause problems of shifting or displaying the target area incompletely in the visual page. In this case, when scaling the map base, the center of the map base of the visual page is first determined as the center of the screen of the target large-screen display, the center is fixed at this time, the display size of the map base is determined according to the resolution of the target large-screen display, and the map base is scaled based on the display size.
According to the map base map zoom method, the central position of the map base map in the map base map is fixed, and the map base map is zoomed based on the central position, so that when the map base map is displayed in the target large-screen display, the problems of offset and incomplete display of a target area in the map base map can be improved.
The description of the map base map visual page scaling device provided by the invention is provided below, and the map base map visual page scaling device described below and the map base map visual page scaling method described above can be correspondingly referred to each other.
Fig. 13 is a schematic structural diagram of a map base map visual page scaling device according to an embodiment of the present invention, where, as shown in fig. 13, the map base map visual page scaling device includes: a layout unit 1310, a scaling unit 1320, an adjusting unit 1330, and a map unit 1340;
a layout unit 1310, configured to perform layout division on a visual page of a map base map, and divide the visual page into a top container, a bottom container, a left container, a right container, and a map base map;
a scaling unit 1320 for determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visualized page, and scaling the visualized page based on the scaling ratio;
An adjusting unit 1330, configured to determine, based on the resolution of the target large-screen display, a container that needs to be adjusted in layout among the top container, the bottom container, the left container, and the right container, and perform layout adjustment after scaling the visual page;
and a map unit 1340 for scaling the map base map based on the resolution of the target large screen display according to the vector scaling attribute of the map base map.
In one embodiment, the layout unit 1310 is specifically configured to:
and carrying out layout division on the visual page, integrally dividing a title part, close to the top, in the visual page into the top container, dividing a component part, close to the bottom, in the visual page into the bottom container, dividing a component part, close to the left, in the visual page into the left container, dividing a component part, close to the right, in the visual page into the right container, and dividing a map background in the visual page into a map base map.
In one embodiment, the scaling unit 1320 is specifically configured to:
calculating a first ratio of the length of the resolution of the target large screen display to the length of the resolution of the visual page;
Calculating a second ratio of the width of the resolution of the target large screen display to the width of the resolution of the visual page;
and selecting the scaling ratio with the smallest value from the first ratio and the second ratio.
In one embodiment, the scaling unit 1320 is specifically further configured to:
and scaling the visualized page in an equal proportion based on the scaling scale.
In one embodiment, the adjusting unit 1330 is specifically configured to:
determining the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, based on the resolution of the target large screen display;
and determining a container needing to be adjusted in layout and performing layout adjustment based on positions of the top container, the bottom container, the left container and the right container in the screen of the target large-screen display.
In one embodiment, the adjusting unit 1330 is specifically further configured to:
determining containers of the top container, the bottom container, the left container and the right container which are more than a first preset distance from the corresponding screen edge based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
Performing first layout adjustment on the containers with the distance which is larger than a first preset distance from the corresponding screen edge;
determining containers of the top container, the bottom container, the left container and the right container which are more than a second preset distance from adjacent screen edges respectively based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
and carrying out second layout adjustment on the containers which are more than a second preset distance from the adjacent edges of the screen.
In one embodiment, map unit 1340 is specifically configured to:
determining the center of the map base map as the center of the screen of the target large-screen display;
fixing the center of the map base map, and determining the display size of the map base map based on the resolution of the target large-screen display;
and scaling the map base map based on the display size.
According to the map base map visual page scaling device, the scaling proportion is determined based on the resolution of the target large screen display and the resolution of the visual page, and after the visual page is primarily scaled, the map base map can be displayed in a full screen mode aiming at the target large screen display based on the vector scaling attribute of the map base map, and then layout adjustment is carried out on each divided container according to the resolution of the target large screen display, so that the visual page can be displayed in a full screen mode without leaving white on the premise that the visual page does not need to be redeveloped, and elements in the visual page cannot be deformed.
Fig. 14 illustrates a physical structure diagram of an electronic device, as shown in fig. 14, which may include: processor 1410, communication interface (Communications Interface) 1420, memory 1430 and communication bus 1440, wherein processor 1410, communication interface 1420 and memory 1430 communicate with each other via communication bus 1440. The processor 1410 may invoke logic instructions in the memory 1430 to perform a method of visual page scaling of map base, the method comprising:
carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio;
after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment;
and scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
In addition, the logic instructions in the memory 1430 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program when executed by a processor being capable of performing a method of zooming a visual page of a map base provided by the methods described above, the method comprising:
Carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio;
after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment;
and scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a method of visual page scaling of map base maps provided by the methods described above, the method comprising:
carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
Determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio;
after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment;
and scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for scaling a visual page of a map base map, comprising:
carrying out layout division on a visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
determining a scaling ratio based on the resolution of the target large-screen display and the resolution of the visual page, and scaling the visual page based on the scaling ratio;
after the visual page is zoomed, determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large screen display, and performing layout adjustment;
and scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
2. The method for zooming a visual page of a map base according to claim 1, wherein the layout dividing the visual page of the map base into a top container, a bottom container, a left container, a right container and a map base comprises:
And carrying out layout division on the visual page, integrally dividing a title part, close to the top, in the visual page into the top container, dividing a component part, close to the bottom, in the visual page into the bottom container, dividing a component part, close to the left, in the visual page into the left container, dividing a component part, close to the right, in the visual page into the right container, and dividing a map background in the visual page into a map base map.
3. The method of map base map visualization page scaling of claim 1, wherein the determining a scaling based on a resolution of a target large screen display and a resolution of the visualization page comprises:
calculating a first ratio of the length of the resolution of the target large screen display to the length of the resolution of the visual page;
calculating a second ratio of the width of the resolution of the target large screen display to the width of the resolution of the visual page;
and selecting the scaling ratio with the smallest value from the first ratio and the second ratio.
4. A method of zooming a visual page of a map base according to claim 3, wherein the zooming the visual page based on the zoom scale comprises:
And scaling the visualized page in an equal proportion based on the scaling scale.
5. The method of any one of claims 1 to 4, wherein determining a container of the top container, the bottom container, the left container, and the right container that needs to be adjusted in layout based on the resolution of the target large screen display and performing layout adjustment, comprises:
determining the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, based on the resolution of the target large screen display;
and determining a container needing to be adjusted in layout and performing layout adjustment based on positions of the top container, the bottom container, the left container and the right container in the screen of the target large-screen display.
6. The method of claim 5, wherein determining a container for which a layout needs to be adjusted and performing a layout adjustment based on the positions of the top container, the bottom container, the left container, and the right container in the screen of the target large screen display, respectively, comprises:
Determining containers of the top container, the bottom container, the left container and the right container which are more than a first preset distance from the corresponding screen edge based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
performing first layout adjustment on the containers with the distance which is larger than a first preset distance from the corresponding screen edge;
determining containers of the top container, the bottom container, the left container and the right container which are more than a second preset distance from adjacent screen edges respectively based on positions of the top container, the bottom container, the left container and the right container which are respectively positioned in the screen of the target large screen display;
and carrying out second layout adjustment on the containers which are more than a second preset distance from the adjacent edges of the screen.
7. The method of any one of claims 1 to 4, wherein the scaling the map base map based on the resolution of the target large screen display comprises:
determining the center of the map base map as the center of the screen of the target large-screen display;
Fixing the center of the map base map, and determining the display size of the map base map based on the resolution of the target large-screen display;
and scaling the map base map based on the display size.
8. A visual page scaling device for map base map, comprising:
the layout unit is used for carrying out layout division on the visual page of the map base map, and dividing the visual page into a top container, a bottom container, a left container, a right container and the map base map;
the zoom unit is used for determining a zoom scale based on the resolution of the target large-screen display and the resolution of the visual page and zooming the visual page based on the zoom scale;
the adjustment unit is used for determining a container needing to be adjusted in layout in the top container, the bottom container, the left container and the right container based on the resolution of the target large-screen display after the visual page is zoomed, and performing layout adjustment;
and the map unit is used for scaling the map base map based on the resolution of the target large-screen display according to the vector scaling attribute of the map base map.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of visual page scaling of map base maps according to any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the method of visual page scaling of map base map as claimed in any one of claims 1 to 7.
CN202311190680.3A 2023-09-15 2023-09-15 Method and device for zooming visual page of map base map and electronic equipment Active CN116932120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311190680.3A CN116932120B (en) 2023-09-15 2023-09-15 Method and device for zooming visual page of map base map and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311190680.3A CN116932120B (en) 2023-09-15 2023-09-15 Method and device for zooming visual page of map base map and electronic equipment

Publications (2)

Publication Number Publication Date
CN116932120A true CN116932120A (en) 2023-10-24
CN116932120B CN116932120B (en) 2023-12-12

Family

ID=88388173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311190680.3A Active CN116932120B (en) 2023-09-15 2023-09-15 Method and device for zooming visual page of map base map and electronic equipment

Country Status (1)

Country Link
CN (1) CN116932120B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796401A (en) * 1996-08-09 1998-08-18 Winer; Peter W. System for designing dynamic layouts adaptable to various display screen sizes and resolutions
CN103885755A (en) * 2012-12-19 2014-06-25 腾讯科技(深圳)有限公司 Method and device for implementing screen matching of owner-draw controls
CN112732253A (en) * 2020-12-28 2021-04-30 中科院计算技术研究所大数据研究院 Visual large-screen dynamic container assembly of self-adaptive terminal
CN114756790A (en) * 2022-04-11 2022-07-15 深圳市网睿科技有限公司 PC webpage content adaptation method facing mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796401A (en) * 1996-08-09 1998-08-18 Winer; Peter W. System for designing dynamic layouts adaptable to various display screen sizes and resolutions
CN103885755A (en) * 2012-12-19 2014-06-25 腾讯科技(深圳)有限公司 Method and device for implementing screen matching of owner-draw controls
CN112732253A (en) * 2020-12-28 2021-04-30 中科院计算技术研究所大数据研究院 Visual large-screen dynamic container assembly of self-adaptive terminal
CN114756790A (en) * 2022-04-11 2022-07-15 深圳市网睿科技有限公司 PC webpage content adaptation method facing mobile terminal

Also Published As

Publication number Publication date
CN116932120B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN109783181B (en) Screen adaptive display method, electronic device and computer storage medium
US9715501B2 (en) Dimensional conversion in presentations
US20080198158A1 (en) 3D map display system, 3D map display method and display program
CN109992226A (en) Image display method and device and spliced display screen
CN107256259B (en) Page display method and device, electronic equipment and storage medium
EP2338152B1 (en) Method and system for rendering of labels
EP4322109A1 (en) Green screen matting method and apparatus, and electronic device
CN105447815A (en) Method and device for processing image of mobile terminal equipment
US20180276794A1 (en) Video resolution up-conversion method and device
CN113592720B (en) Image scaling processing method, device, equipment and storage medium
CN112035772A (en) Page evaluation method, device and equipment
CN113657396B (en) Training method, translation display method, device, electronic equipment and storage medium
CN105389308B (en) Webpage display processing method and device
CN116932120B (en) Method and device for zooming visual page of map base map and electronic equipment
WO2021192515A1 (en) Learning data generating method, learning data generating device, and program
CN111311720A (en) Texture image processing method and device
CN110825282B (en) Picture display method and device, electronic equipment and storage medium
CN113096217B (en) Picture generation method and device, electronic equipment and storage medium
CN116193159A (en) Image data adjustment method and device, electronic equipment and storage medium
CN111372009B (en) Image processing method and processing equipment
CN114549700A (en) Method and device for determining typesetting area based on cartoon translation
US20170161874A1 (en) Method and electronic apparatus for processing image data
CN113298823A (en) Image fusion method and device
US6697080B2 (en) Scalable smoothing of generalized polygons
CN111429549A (en) Route image generation method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant