CN106897321B - Method and device for displaying map data - Google Patents

Method and device for displaying map data Download PDF

Info

Publication number
CN106897321B
CN106897321B CN201510966941.5A CN201510966941A CN106897321B CN 106897321 B CN106897321 B CN 106897321B CN 201510966941 A CN201510966941 A CN 201510966941A CN 106897321 B CN106897321 B CN 106897321B
Authority
CN
China
Prior art keywords
data display
area
local area
display areas
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510966941.5A
Other languages
Chinese (zh)
Other versions
CN106897321A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201510966941.5A priority Critical patent/CN106897321B/en
Publication of CN106897321A publication Critical patent/CN106897321A/en
Application granted granted Critical
Publication of CN106897321B publication Critical patent/CN106897321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Instructional Devices (AREA)

Abstract

The invention discloses a method and a device for displaying map data, relates to the field of data processing, and aims to thoroughly solve the problem of overlapping of data display areas. The method of the invention comprises the following steps: responding to an amplification operation instruction, determining a local area needing to be amplified in a map graph, wherein the map graph is composed of a plurality of region graphs, each region graph is correspondingly displayed with a data display area, and the local area at least covers the data display areas of two region graphs; searching a data display area with the highest overlapping degree in the local area to obtain a target data display area; calculating the magnification of a local area according to the area parameters of the target data display area; and amplifying and displaying the local area according to the amplification factor so that the data display areas in the local area do not overlap. The invention is mainly applied to the client side.

Description

Method and device for displaying map data
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for displaying map data.
Background
When displaying region data, the prior art provides a data display mode based on map graphics, which is convenient for a user to visually check the association relationship between the data and the region. In fig. 1, the map of china is composed of different regions such as provinces, cities, and municipalities, and each region graphically displays data about the region. Compared with the data display mode in the form of a list, the data display mode based on the map graph has the characteristics of intuition and vividness, so that the data display mode is more easily accepted by users.
In order to enable a user to obtain more useful information from a map graphic, the related art displays data in different forms of data display areas, such as circles or water drops, in the map graphic. In fig. 1, each region graph corresponds to a circular radiation area, the data of the region is displayed in the corresponding circular radiation area, and the circular radiation area corresponding to the data with a larger numerical value is larger. Through the display mode, the user can intuitively feel the data size of each region, and the subjective comparison of the data of different regions by the user is facilitated. However, this display method brings convenience to the user and has certain disadvantages: when more regional graphs exist in a smaller range, a plurality of data display areas with different sizes can be displayed in the small range in a concentrated mode, and therefore the data display areas are mutually overlapped. As can be seen from fig. 1, the overlap between the circular radiation areas can cause serious interference to the user viewing the data.
To solve this problem, the prior art provides an improvement in which data display areas overlapping each other are reduced in size in a certain ratio to reduce the degree of overlap between the data display areas. However, this approach has limited effectiveness because although the area of the data display region can theoretically be reduced to a degree sufficient to eliminate overlap between regions, the data content is scaled down equally with the data display region. In most cases, too small a data display area may make the data content therein invisible to the user. For the position of the area with small and compact graphics, such as the area of kyojin Ji, the purpose of eliminating the area overlap can not be achieved by only reducing the data display area on the premise that the data content can be seen clearly by naked eyes of the user. If the data of the city, county or even county territory are displayed in the map graph, the effect of the method is more vivid. In summary, the conventional method for reducing the data display area is not good enough in improving the area overlapping.
Disclosure of Invention
The invention provides a method and a device for displaying map data, which can thoroughly solve the problem of overlapping of data display areas.
To solve the above problems, in one aspect, the present invention provides a method of displaying map data, the method including:
responding to an amplification operation instruction, determining a local area needing to be amplified in a map graph, wherein the map graph is composed of a plurality of region graphs, each region graph is correspondingly displayed with a data display area, and the local area at least covers the data display areas of two region graphs;
searching a data display area with the highest overlapping degree in the local area to obtain a target data display area;
calculating the magnification of a local area according to the area parameters of the target data display area;
and amplifying and displaying the local area according to the amplification factor so that the data display areas in the local area do not overlap.
In another aspect, the present invention also provides an apparatus for displaying map data, the apparatus including:
the map graph comprises a plurality of regional graphs, each regional graph is correspondingly displayed with a data display area, and the local area at least covers the data display areas of the two regional graphs;
the searching unit is used for searching the data display area with the highest overlapping degree in the local area to obtain a target data display area;
the calculation unit is used for calculating the magnification of the local area according to the area parameters of the target data display area;
and the display unit is used for amplifying and displaying the local area according to the amplification factor so as to ensure that the data display areas in the local area are not overlapped.
The method and the device for displaying the map data can determine the local area needing to be amplified according to the amplification operation instruction, calculate the amplification factor based on the area parameter of the data display area with the highest overlapping degree in the local area, and amplify and display the local area according to the amplification factor. Because the magnification factor is calculated according to the area parameter of the data display area with the highest overlapping degree, no overlapping between the data display areas can be ensured after the local area is enlarged. Compared with the prior art, the data display area does not need to be reduced, so that the problem of overlapping of the data display areas can be thoroughly solved on the premise that a user clearly views data contents.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a prior art interface diagram for displaying map data;
FIG. 2 is a flow chart illustrating a method of displaying map data according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating another method for displaying map data according to an embodiment of the present invention;
FIG. 4 illustrates a schematic diagram of determining a local region in an embodiment of the present invention;
FIG. 5 shows a schematic view of an enlarged partial region in an embodiment of the invention;
fig. 6 is a block diagram illustrating a map data display apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram illustrating another apparatus for displaying map data according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for displaying map data, as shown in fig. 2, the method includes:
201. in response to the zoom-in operation instruction, a local area that needs to be zoomed in is determined in the map graphic.
The embodiment is mainly applied to a client side, and the client side can be but not limited to be installed on a mobile phone, a Personal Computer (PC), a tablet Computer and a wearable smart device. In practical application, all electronic products with data processing function and visual human-computer interaction function are suitable for the method flow provided by the embodiment of the invention.
In a visual interface for data query, a client displays a map graph for data display, wherein the map graph is composed of a plurality of region graphs, each region graph correspondingly displays a data display area, and data contents of the corresponding region graph are displayed in the data display area.
Taking a Chinese map as an example, referring to fig. 1, the Chinese map graph is composed of regional graphs corresponding to different provinces, direct prefectures, cities or autonomous regions, such as beijing, shanxi, shanghai, Qinghai, etc. Each region graph corresponds to a circular radial data display area, data content corresponding to the region graph is displayed in the data display area, the area of the data display area and the size of the data value form a positive correlation relationship, namely the area of the data display area with a large data value is large, and the area of the data display area with a small data value is small.
In this embodiment, the client receives an enlargement operation instruction triggered from outside of the device, where the operation instruction is used to enlarge and display a partial area in the map graph. In practical application, the client may receive the amplification operation instruction through an external device such as a keyboard, a mouse, a touch screen, or the like.
After receiving the amplification operation instruction, the client determines the local area needing amplification according to the amplification operation instruction. Determining the local region includes determining the location of the local region, as well as determining the size (including shape and size) of the local region. In this embodiment, the position and the size of the local area are determined by the user through the zoom-in operation instruction, but in order to simplify the complexity of the user operation, the client may also limit the shape of the local area in practical application, for example, a rectangular, square, or circular local area is generated by default, and the user only needs to determine the position and the size of the local area.
The local area is selected for the purpose of displaying a portion of the map graphic in an enlarged manner, and therefore the local area usually covers the data display area of at least two map graphics. The "covering the data display area" in the present embodiment includes the following two cases: the data display area is wholly positioned in the local area; 2. the data display area partially falls within the local area. In practical application, the client can also identify the region graphs covered by the local region, and the client equivalently determines that the data display regions corresponding to the region graphs are covered by the local region for the region graphs partially or completely falling into the local region. The present embodiment will be described with an example in which the data display area is covered by a local area.
In practical applications, a user may also select only one data display area corresponding to one regional graphic to zoom in, that is, only one data display area is covered by a local area. For this case, the client may display the content in the local area in an enlarged manner according to a preset magnification factor. The preset magnification factor may be determined according to the size of the data display area, or may be determined according to the size of the whole map graph, or may be only a fixed value written in a computer program, and the specific value of the preset magnification factor is not limited in this embodiment.
For the case that the partial area covers at least two data display areas, the client side continues to perform the following steps 202 to 204.
202. And searching the data display area with the highest overlapping degree in the local area to obtain the target data display area.
When the local area covers at least two data display areas, the client side obtains the position parameter and the size parameter of each data display area. The position parameter comprises a coordinate parameter of the data display area in the interface, such as area center point coordinates; the dimension parameters include shape information (rectangle, circle) of the region and dimension values corresponding to a particular shape, e.g., for a square shape, the side length is XXX, and for a circle shape, the radius is XX. According to the position parameter and the size parameter, the client calculates the overlapping degree between the data display areas.
The present embodiment may calculate the degree of overlap between two or more data display regions. Taking the calculation of the degree of overlap between two data display areas as an example, it is first determined qualitatively whether there is an overlap between the data display areas, and only if there is an overlap, the degree of overlap is further calculated quantitatively. Taking a circular data display area as an example, the client may define whether there is an overlap between circular areas by a size relationship between a sum of circular radii and a center distance. If the distance between the centers of the circular areas (obtainable by the position parameter) is greater than or equal to the sum of the radii of the circular areas (obtainable by the size parameter), it is determined that there is no overlap between the circular areas, otherwise there is an overlap.
And for the data display areas with the overlapping parts, the client calculates the overlapping degree which can be embodied through numerical quantification according to the position parameters and the size parameters of each data display area, then selects the data display area with the highest overlapping degree from the overlapping degree, and determines the data display area as the target data display area.
The purpose of selecting the data display area with the highest degree of overlap is to calculate the magnification factor used to magnify the partial area. The selection of the data display areas with the highest degree of overlap for the calculation of the magnification is made because this ensures that after the enlargement of the partial areas, there is no longer an overlap between the data display areas with the highest degree of overlap. Since the overlapping portions between the regions with the highest overlapping degree can be eliminated, the overlapping portions between other regions can be eliminated, so that the phenomenon of region overlapping does not exist in the local regions.
In practical applications this may also be the case: there is no overlapping relationship between the data display regions in the partial region mask. For this case, it is theoretically unnecessary to perform partial enlargement, and thus the client may not perform the subsequent steps 203 to 204. However, considering that there is a practical need for the user to enlarge the local area, in an implementation manner of the present embodiment, the client may select two data display areas with the closest distance as the target data display areas, and continue to perform steps 203 to 204. The client may determine the distance between the data display areas by several methods: 1. determining the distance of the coordinates of the center point of the data display area; 2. the distance between the edges of the data display area is determined.
203. And calculating the magnification of the local area according to the area parameters of the target data display area.
The area parameters are used for reflecting the size of the data display area, and the area parameters of the data display areas in different forms are different. For example, the region parameters of a circular data display region may include a radius and a center distance; the area parameters of the square data display area can comprise side length, diagonal length and center distance; the area parameters of the rectangular data display area may then include the length of the long, wide diagonal and the center-to-center distance.
The principle of the client for calculating the magnification is as follows: in the enlarged partial area, there is no overlapping portion between the target data display areas, that is, there is no overlapping portion between the data display areas with the highest degree of overlap. Based on this principle, the minimum value of the magnification should ensure that the edges of the original overlapping positions of the target data display areas are tangent after the local magnification, and if the magnification is smaller than the minimum value, the target data display areas still have partial overlap. In practical applications, it is considered that a certain margin of space exists between the target display regions, and therefore the calculated magnification may be appropriately made larger than the minimum value by weight adjustment or by increasing the adjustment coefficient. The present embodiment does not limit the specific value of the weight value or the adjustment coefficient.
204. And amplifying and displaying the local area according to the amplification factor so that the data display areas in the local area do not overlap.
The enlargement display of the partial area according to the enlargement factor means that the size of the partial area and the content displayed in the partial area are enlarged according to the enlargement factor. For example, for a square local area, the length of the primary side of the local area may be multiplied by the amplification factor to obtain the amplified side length; or for a circular local area, the radius of the local area may be multiplied by a magnification factor to obtain a magnified radius.
After the local area is enlarged, the client can switch the displayed map graph into the enlarged local area, so that only the enlarged local area is displayed in the visual interface; alternatively, the enlarged partial area may be displayed at a predetermined fixed position, such as the upper left corner of the interface, without affecting the user's view of the rest of the map graphic.
The method for displaying map data provided by this embodiment can determine a local area that needs to be enlarged according to an enlargement operation instruction, calculate an enlargement factor based on area parameters of two data display areas with the highest overlapping degree in the local area, and enlarge and display the local area according to the enlargement factor. Because the magnification factor is calculated according to the area parameter of the data display area with the highest overlapping degree, no overlapping between the data display areas can be ensured after the local area is enlarged. Compared with the prior art, the data display area does not need to be reduced, so that the problem of overlapping of the data display areas can be thoroughly solved on the premise that a user clearly views data contents.
Further, as a refinement and an extension of the method shown in fig. 2, an embodiment of the present invention further provides a method for displaying map data. As shown in fig. 3, the method includes:
301. in response to the zoom-in operation instruction, a local area that needs to be zoomed in is determined in the map graphic.
In this embodiment, the enlargement operation instruction may specifically be a click operation instruction. The user clicks or double clicks a certain position in the map graph through a mouse (a finger can also be used for a touch screen), and a click operation instruction is triggered. And the client responds to the instruction, acquires the coordinate of the operation focus, and then determines the area with the coordinate as the center and the first preset size as a local area. The preset size is determined by a size parameter written in the client in advance, and in practical application, the preset size can be limited to a rectangular area with a length of 4 cm and a width of 3 cm, or a square area with a side length of 4 cm, or a circular area with a radius of 2.5 cm. The shape of the local area popped up in the interface is consistent no matter where the user clicks.
The above numerical values are only for illustrative purposes and are not intended to be specific limitations of the present embodiment.
In another implementation manner of this embodiment, the zoom-in operation instruction may also be a drag operation instruction. The user drags a certain position in the map graph as a starting point in any direction through a mouse or a finger to form a rectangular, square or circular area. The client acquires the coordinates of a starting point and an end point of the dragging operation, and determines the position and the size of the local area according to the positions of the two coordinates and the preset shape of the area. Different from the above method, in this method, the size of the local area may be set by the user himself/herself, the size of the local area formed by the drag distance is larger, and the size of the local area formed by the drag operation is not limited in this embodiment.
Further, in another implementation manner of this embodiment, the zoom-in operation instruction may also be a move operation instruction. And the client monitors the position of the mouse cursor, and the area with the position of the cursor as the center and the second preset size is determined as a local area. The second preset size is similar to the first preset size, and the size of the second preset size is also predetermined on the client side, and cannot be changed through manual operation by a user. The first preset size and the second preset size may be the same or different, and this embodiment does not limit this. In practical application, when a user operates a mouse, the mouse cursor is in a continuous moving process, and the client can execute the flow shown in fig. 3 based on a new cursor position when the position of the cursor changes, so that the effect is similar to a magnifying glass function from the viewpoint of use of the user.
In an example of the embodiment, the local area determined by the client is shown as a rectangular area in fig. 4.
302. In the local area, an overlap coefficient between the data display areas is calculated.
The present embodiment is described by taking a circular data display area as an example. After determining the local area, the client calculates an overlap coefficient between the data display areas covered by the local area, wherein the size of the overlap coefficient is used for representing the degree of overlap between the two data display areas. Specifically, the client may calculate the overlap coefficient according to the following formula:
S=r1+r2-d12
wherein S is an overlap coefficient, r1And r2Radii of two data display areas, d, respectively12The center distance of the two data display areas. A larger value of S indicates a larger overlapping portion of the two data display areas, i.e., a higher degree of overlap.
In this embodiment, the client may pair all the data display areas covered by the local area to obtain
Figure BDA0000885504880000081
A pair of regions. Wherein n is the number of data display areas covered by the local area,
Figure BDA0000885504880000082
the number of all permutation combinations of a pair of data display regions arbitrarily extracted from the n data display regions is indicated. Then, the client detects whether an overlapping relationship exists between each pair of data display regions according to the implementation manner of step 202 in fig. 2, eliminates the pair of regions where the overlapping relationship does not exist, and calculates the overlapping coefficients for the remaining pair of regions respectively through the above formula.
For example, it is assumed that the partial area covers 4 data display areas A, B, C, D. The client pairs the 4 data display areas to obtain 6 area pairs: "A + B", "A + C", "A + D", "B + C", "B + D" and "C + D". And the client removes the area pairs with the radius sum smaller than or equal to the center distance of the data display area, and reserves the area pairs with the radius sum larger than the center distance. Assume that the client reserves the pair of regions "a + D", "B + C", "B + D", and "C + D". Then the client calculates the overlapping coefficient of each region pair respectively to obtain 4 overlapping coefficients corresponding to the 4 region pairs.
Further, in another implementation manner of this embodiment, the client may also directly calculate an overlap coefficient between any two data display regions without separately determining whether an overlap relationship exists between the data display regions, and identify and reject the overlap coefficient of a region pair that does not have an overlap relationship through a numerical characteristic of the overlap coefficient. Specifically, the method comprises the following steps:
the client pairwise pairs all data display areas covered by the local area to obtain
Figure BDA0000885504880000092
A pair of regions. Then the client calculates the overlapping coefficients for all the area pairs respectively through the formula, and eliminates the overlapping coefficients smaller than or equal to 0.
Illustratively, assume that the client still obtains 6 region pairs: "A + B", "A + C", "A + D", "B + C", "B + D" and "C + D". The client calculates the overlapping coefficient of each area pair respectively, and obtains 6 overlapping coefficients corresponding to the 6 area pairs: "-1.1", "0", "-2", "3", "3.4" and "5". Then the client removes the overlapping coefficients "-1.1", "0" and "-2", and retains the overlapping coefficients "3", "3.4" and "5".
303. And determining a pair of data display areas with the largest overlapping coefficient as target data display areas.
In the above example, the client selects the overlap coefficient "5" from the remaining overlap coefficients "3", "3.4", and "5", and determines a pair of data display regions corresponding to the overlap coefficient as the target data display region.
In another implementation manner of this embodiment, the client may also select the largest overlap coefficient directly from all obtained overlap coefficients without removing the overlap coefficients smaller than or equal to 0.
304. And calculating the magnification of the local area according to the area parameters of the target data display area.
The client calculates the magnification according to the following formula:
Figure BDA0000885504880000091
wherein N is the magnification factor, rt1And rt2Radii of two target data display areas, d, respectivelyt1t2Displaying for two target dataThe centre distance of the regions.
Illustratively, assuming that the radii of the two target data display areas are 3 and 4, respectively, and the center-to-center distance is 5, the magnification factor N calculated according to this formula is 1.4.
305. And moving the enlarged local area to the central position of the visual interface for displaying.
And the client amplifies the local area according to the obtained amplification factor, and then moves the amplified local area to the central position of the visual interface for display. When the local area is moved, the coordinate of the central point of the local area can be coincided with the coordinate of the central point of the visual interface, so that the local area is ensured to be positioned at the central position of the visual interface. As shown in FIG. 5, the visual interface displays the zoomed-in local area and no map graphics are displayed.
306. And responding to the recovery operation instruction, and displaying the map graph in a display mode before zooming.
Further, as an optional step of the method shown in fig. 3, after the local area is enlarged and displayed, the client may also provide an interface rollback function for the user in order to facilitate the user to view the originally displayed map graph. And when the user triggers a recovery operation instruction, the client responds to the instruction and displays the map graph displayed before local amplification.
In practical application, a user can trigger the recovery operation instruction at any position in the visual interface through operations such as clicking, double clicking, long pressing, sliding and the like. Or the client terminal can also provide a control special for triggering the backspacing function, and the user triggers the recovery operation instruction by clicking the control.
Further, in another implementation manner of this embodiment, the client may also reduce or eliminate the problem of area overlapping by reducing the number of data display areas in the map graph. The client provides a function of filtering the data display area for the user, and the user can select the region graph which does not want to display the data content or select the region graph which wants to display the data content. The client displays the corresponding data display area and the data content only on the region graph of which the user wants to display the data content in the map graph. In practical application, a user may directly click a region graph in a map graph, or may select a region where data content is displayed or not displayed in a pull-down list provided by a client, where the embodiment does not specifically limit the manner of selecting the region graph.
Further, as an implementation of the method shown in fig. 2 or fig. 3, an embodiment of the present invention further provides a device for displaying map data, where the device may be located inside a client, or may be independent of the client but establish a data interaction relationship with the client. It should be noted that the present apparatus embodiment corresponds to the foregoing method embodiment, and all of the contents of the foregoing method embodiment can be implemented. For convenience of reading, the present apparatus embodiment only performs a summary description on the contents in the foregoing method embodiments, and details in the method embodiments are not repeated. As shown in fig. 6, the apparatus includes: a determination unit 61, a search unit 62, a calculation unit 63, and a display unit 64. Wherein,
the determining unit 61 is configured to determine, in response to an enlargement operation instruction, a local area to be enlarged in a map graph, where the map graph is composed of a plurality of region graphs, each region graph is correspondingly displayed with a data display area, and the local area covers at least data display areas of two region graphs;
the searching unit 62 is configured to search the data display area with the highest overlapping degree in the local area to obtain a target data display area;
a calculating unit 63, configured to calculate a magnification of the local area according to the area parameter of the target data display area;
and a display unit 64 for displaying the partial area in an enlarged manner according to the magnification factor so that the data display areas in the partial area do not overlap with each other.
Further, as shown in fig. 7, the determining unit 61 includes:
the first determining module 611 is configured to determine, in response to the click operation instruction, a region with a first preset size and centered on the operation focus as a local region.
Further, as shown in fig. 7, the determining unit 61 includes:
a second determining module 612, configured to determine, in response to the drag operation instruction, a region formed by the drag as the local region.
Further, as shown in fig. 7, the determining unit 61 includes:
a third determining module 613, configured to determine, in response to the moving operation instruction, a region with a second preset size and centered on the position of the cursor as a local region.
Further, as shown in fig. 7, the search unit 62 includes:
the calculating module 621 is configured to calculate, when the data display area is a circular area, an overlap coefficient between the data display areas in the local area, where the size of the overlap coefficient is used to represent the degree of overlap between two data display areas;
a determining module 622, configured to determine a pair of data display areas with the largest overlapping coefficient as the target data display area.
Further, the calculating module 621 is configured to calculate the overlap coefficient according to the following formula:
S=r1+r2-d12
wherein S is an overlap coefficient, r1And r2Radii of two data display areas, d, respectively12The center distance of the two data display areas.
Further, the calculating unit 63 is configured to calculate the magnification according to the following formula:
Figure BDA0000885504880000121
wherein N is the magnification factor, rt1And rt2Radii of two target data display areas, d, respectivelyt1t2The center distance of the two target data display areas.
Further, the display unit 64 is configured to move the enlarged local area to a central position of the visual interface for displaying.
Further, the display unit 64 is configured to display the map graphic in a display manner before enlargement in response to the restoration operation instruction.
The apparatus for displaying map data according to this embodiment can determine a partial area that needs to be enlarged based on an enlargement operation instruction, calculate an enlargement factor based on an area parameter of a data display area having the highest degree of overlap among the partial areas, and enlarge and display the partial area according to the enlargement factor. Because the magnification factor is calculated according to the area parameter of the data display area with the highest overlapping degree, no overlapping between the data display areas can be ensured after the local area is enlarged. Compared with the prior art, the data display area does not need to be reduced, so that the problem of overlapping of the data display areas can be thoroughly solved on the premise that a user clearly views data contents.
The device for displaying map data comprises a processor and a memory, wherein the determining unit 61, the searching unit 62, the calculating unit 63, the displaying unit 64 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the problem of overlapping of data display areas is thoroughly solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: responding to an amplification operation instruction, determining a local area needing to be amplified in a map graph, wherein the map graph is composed of a plurality of region graphs, each region graph is correspondingly displayed with a data display area, and the local area at least covers the data display areas of two region graphs; searching a data display area with the highest overlapping degree in the local area to obtain a target data display area; calculating the magnification of a local area according to the area parameters of the target data display area; and amplifying and displaying the local area according to the amplification factor so that the data display areas in the local area do not overlap.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A method of displaying map data, the method comprising:
responding to an amplification operation instruction, determining a local area needing to be amplified in a map graph, wherein the map graph is composed of a plurality of regional graphs, each regional graph is correspondingly displayed with a data display area, and the local area at least covers the data display areas of two regional graphs;
searching a data display area with the highest overlapping degree in the local area to obtain a target data display area;
calculating the magnification of the local area according to the area parameters of the target data display area;
and amplifying and displaying the local area according to the amplification factor so that the data display areas in the local area are not overlapped.
2. The method of claim 1, wherein the determining a local area in the map graphic that needs to be magnified in response to the magnification operation instruction comprises:
and responding to a click operation instruction, and determining an area with an operation focus as a center and a first preset size as the local area.
3. The method of claim 1, wherein the determining a local area in the map graphic that needs to be magnified in response to the magnification operation instruction comprises:
and determining the area formed by dragging as the local area in response to the dragging operation instruction.
4. The method of claim 1, wherein the determining a local area in the map graphic that needs to be magnified in response to the magnification operation instruction comprises:
and responding to the movement operation instruction, and determining an area with a second preset size and the position of the cursor as the center as the local area.
5. The method according to claim 1, wherein the data display area is a circular area, and the searching for the data display area with the highest overlapping degree in the local area to obtain the target data display area comprises:
in the local area, calculating an overlapping coefficient between the data display areas, wherein the overlapping coefficient is used for representing the degree of overlapping between the two data display areas;
and determining a pair of data display areas with the largest overlapping coefficient as target data display areas.
6. The method of claim 5, wherein calculating the overlap factor between the data display regions comprises:
the overlap factor is calculated according to the following formula:
S=r1+r2-d12
wherein S is an overlap coefficient, r1And r2Radii of two data display areas, d, respectively12The center distance of the two data display areas.
7. The method of claim 1, wherein said calculating a magnification of said local region based on region parameters of said target data display region comprises:
the magnification was calculated according to the following formula:
Figure FDA0001352029310000021
wherein N is the magnification factor, rt1And rt2Radii of two target data display areas, d, respectivelyt1t2The center distance of the two target data display areas.
8. The method of claim 1, wherein said magnifying the local area by the magnification comprises:
and moving the enlarged local area to the central position of the visual interface for displaying.
9. The method according to any one of claims 1 to 8, wherein after the magnifying displaying of the partial area by the magnification, the method further comprises:
and responding to the recovery operation instruction, and displaying the map graph in a display mode before zooming.
10. An apparatus for displaying map data, the apparatus comprising:
the map graphic comprises a determining unit, a display unit and a display unit, wherein the determining unit is used for responding to an amplifying operation instruction and determining a local area needing to be amplified in a map graphic, the map graphic consists of a plurality of region graphics, a data display area is correspondingly displayed on each region graphic, and the local area at least covers the data display areas of two region graphics;
the searching unit is used for searching the data display area with the highest overlapping degree in the local area to obtain a target data display area;
the calculation unit is used for calculating the magnification of the local area according to the area parameters of the target data display area;
and the display unit is used for amplifying and displaying the local area according to the amplification factor so as to enable the data display areas in the local area not to be overlapped.
11. A storage medium, characterized in that the storage medium includes a stored program, wherein an apparatus in which the storage medium is located is controlled to execute the method of displaying map data according to any one of claims 1 to 9 when the program is executed.
12. A processor for executing a program, wherein the program executes the method for displaying map data according to any one of claims 1 to 9.
CN201510966941.5A 2015-12-21 2015-12-21 Method and device for displaying map data Active CN106897321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510966941.5A CN106897321B (en) 2015-12-21 2015-12-21 Method and device for displaying map data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510966941.5A CN106897321B (en) 2015-12-21 2015-12-21 Method and device for displaying map data

Publications (2)

Publication Number Publication Date
CN106897321A CN106897321A (en) 2017-06-27
CN106897321B true CN106897321B (en) 2020-06-05

Family

ID=59191658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510966941.5A Active CN106897321B (en) 2015-12-21 2015-12-21 Method and device for displaying map data

Country Status (1)

Country Link
CN (1) CN106897321B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107393410B (en) * 2017-06-29 2020-01-24 网易(杭州)网络有限公司 Method, medium, apparatus and computing device for presenting data on map
CN110019586A (en) * 2017-08-31 2019-07-16 北京嘀嘀无限科技发展有限公司 A kind of method, system and computer installation showing congestion in road point
CN108305211B (en) * 2017-12-29 2022-05-03 广州都市圈网络科技有限公司 Control and regulation land block information query method, electronic equipment, storage medium and system
CN110866071B (en) * 2018-08-14 2022-08-30 海能达通信股份有限公司 Map object display method, device, equipment and storage medium
CN110766996B (en) * 2019-10-14 2021-11-19 广东小天才科技有限公司 Click-to-read content positioning method and device, electronic equipment and storage medium
CN114035731A (en) * 2021-11-17 2022-02-11 四川长虹教育科技有限公司 Method for locally amplifying software interface

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5029874B2 (en) * 2006-12-28 2012-09-19 富士通株式会社 Information processing apparatus, information processing method, and information processing program
US20090263026A1 (en) * 2008-04-18 2009-10-22 Google Inc. Content item placement
US8423902B2 (en) * 2010-04-21 2013-04-16 Microsoft Corporation Representation of overlapping visual entities
KR20130080163A (en) * 2012-01-04 2013-07-12 삼성전자주식회사 Method for displaying digital map in client and apparatus thereof
CN104252529A (en) * 2014-09-04 2014-12-31 百度在线网络技术(北京)有限公司 Method and device for loading map annotations
CN105139749B (en) * 2015-08-31 2017-09-22 爱国者电子科技有限公司 A kind of optimization method that air quality information is shown on network map

Also Published As

Publication number Publication date
CN106897321A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN106897321B (en) Method and device for displaying map data
US11393017B2 (en) Two-dimensional code identification method and device, and mobile terminal
RU2540826C2 (en) Internal scroll activation and cursor adornment
US8368699B2 (en) Displaying bar charts with a fish-eye distortion effect
JP5970086B2 (en) Touch screen hover input processing
US8769403B2 (en) Selection-based resizing for advanced scrolling of display items
EP2905689B1 (en) Method and apparatus for displaying character on touchscreen
US20120174029A1 (en) Dynamically magnifying logical segments of a view
US10228835B2 (en) Method for displaying information, and terminal equipment
WO2015085919A1 (en) Clicked object magnifying method and apparatus based on floating touch
KR20140113251A (en) Automatically expanding panes
US20150186004A1 (en) Multimode gesture processing
CN105843480A (en) Desktop icon adjustment method and apparatus
CN106886511B (en) Network table processing method and device
WO2017059734A1 (en) Image zoom in/out method and electronic device
US9245362B2 (en) Displaying bar charts with a fish-eye distortion effect
US10042445B1 (en) Adaptive display of user interface elements based on proximity sensing
CN104598121A (en) Picture zooming method and device
CN111143731B (en) Display method and device for webpage interface zooming and terminal equipment
US8904313B2 (en) Gestural control for quantitative inputs
WO2017088228A1 (en) Picture zooming method and apparatus
CN111258698A (en) Object display method and device
CN105988700B (en) Terminal screen display method and device
CN115917488A (en) Display interface processing method and device and storage medium
WO2017101340A1 (en) Method and device for adjusting video window by means of multi-point touch control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant