CN105989130B - Electronic map methods of exhibiting, device and electronic equipment - Google Patents
Electronic map methods of exhibiting, device and electronic equipment Download PDFInfo
- Publication number
- CN105989130B CN105989130B CN201510084636.3A CN201510084636A CN105989130B CN 105989130 B CN105989130 B CN 105989130B CN 201510084636 A CN201510084636 A CN 201510084636A CN 105989130 B CN105989130 B CN 105989130B
- Authority
- CN
- China
- Prior art keywords
- electronic map
- tiles
- resolution level
- tile
- current
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000001747 exhibiting effect Effects 0.000 title abstract 2
- 230000001960 triggered effect Effects 0.000 claims abstract description 16
- 238000012545 processing Methods 0.000 claims description 31
- 238000009877 rendering Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 7
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012512 characterization method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 101150064138 MAP1 gene Proteins 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 101150077939 mapA gene Proteins 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004091 panning Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
The embodiment of the invention discloses a kind of electronic map methods of exhibiting, device and electronic equipments, it shows that operational order determines the target resolution level of target electronic map according to the electronic map triggered in current electronic map, and determines first image pixel coordinates of the trigger point of trigger action instruction in current electronic map;Then according to the current resolution level of current electronic map, target resolution level and the first image pixel coordinates, the second image pixel coordinates of the trigger point in target electronic map are determined;The first tile according to the second image pixel coordinates of trigger point, where determining trigger point in the corresponding tile of target resolution level;According to the first tile and electronic map display area, the tile to be loaded of overlay electronic map display area is determined from the corresponding tile of target resolution level;Tile to be loaded is downloaded, tile to be loaded is rendered to obtain target electronic map and is shown.Improve the display speed of electronic map.
Description
Technical Field
The invention relates to the technical field of electronic maps, in particular to an electronic map display method and device and electronic equipment.
Background
More and more map services are now using the tile technology, so-called tiles, i.e. small pictures of the same size, each called a tile, are cut by certain rules.
At present, for electronic maps with different scales, corresponding tiles are stored in advance, resolution levels to which the tiles corresponding to each scale belong are different, and if the scale is higher, the resolution level to which the corresponding tiles belong is higher, and the number of the corresponding tiles is also larger. The scales are arranged in the order from big to small, and the number of the corresponding tiles is pyramid. For example, the scales are z0, z1, z2 and z3 in turn arranged from low to high, each tile corresponding to z0 is averagely divided into 4 tiles to obtain a tile corresponding to z1, each tile corresponding to z1 is averagely divided into 4 tiles to obtain a tile corresponding to z2, and each tile corresponding to z2 is averagely divided into 4 tiles to obtain a tile corresponding to z 3.
When the map client receives an operation instruction (such as an instruction for enlarging a map, an instruction for reducing the map, an instruction for translating the map and the like), the map client requests the map server to download the electronic map tiles, and the downloaded map tiles are rendered and displayed by the client.
The inventor finds that the map display speed is low after the current electronic map processing method receives the operation instruction of magnifying the map in the process of realizing the invention.
Therefore, how to increase the display speed of the electronic map becomes an urgent problem to be solved.
Disclosure of Invention
The invention aims to provide an electronic map display method, an electronic map display device and electronic equipment, so as to improve the display speed of a map.
In order to achieve the purpose, the invention provides the following technical scheme:
an electronic map display method comprises the following steps:
when an electronic map display operation instruction is triggered in a current electronic map, determining a target resolution level of a target electronic map according to the operation instruction;
determining a first image pixel coordinate of a trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction;
determining second image pixel coordinates of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinates of the current electronic map;
determining a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point;
determining tiles to be loaded, which cover the electronic map display area, from tiles corresponding to a target resolution level according to the first tiles and the electronic map display area;
and downloading the tiles to be loaded, rendering the tiles to be loaded to obtain the target electronic map and displaying the target electronic map.
Preferably, in the method, according to the first tile and the electronic map display area, the tiles to be loaded that cover the electronic map display area are determined from the tiles corresponding to the target resolution level, and the method specifically includes:
selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the first tile by taking the first tile as a center;
judging whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area or not;
if yes, then: determining tiles included in the pending area as tiles to be loaded covering the electronic map display area;
if not, then: selecting tiles to be expanded from tiles adjacent to the undetermined area from tiles corresponding to the target resolution level, and judging whether a new undetermined area formed by the undetermined area and the selected tiles to be expanded covers the electronic map display area; if yes, determining the tiles contained in the new undetermined area as the tiles to be loaded covering the electronic map display area; if not, repeating the step of selecting tiles to be expanded from tiles adjacent to the undetermined area in the tiles corresponding to the target resolution level on the basis of the new undetermined area until the undetermined area covering the electronic map display area is obtained.
Preferably, in the method, the selecting, with the first tile as a center, a tile to be expanded from tiles adjacent to the first tile in the tiles corresponding to the target resolution level specifically includes: selecting all tiles adjacent to the first tile in the tiles corresponding to the target resolution level as tiles to be expanded by taking the first tile as a center;
and selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, specifically: selecting all tiles adjacent to the undetermined area from the tiles corresponding to the target resolution level as tiles to be expanded;
or,
selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the first tile by taking the first tile as a center, specifically: judging whether a blank area exists between each boundary of the first tile and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area, if so, selecting tiles adjacent to the boundary of the first tile from the tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing;
and selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, specifically: and judging whether a blank area exists between the boundary and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area or not aiming at each boundary of the undetermined area, if so, selecting tiles adjacent to the boundary of the undetermined area from tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing.
Preferably, the method for determining the second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinate of the current electronic map specifically includes:
determining the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
if the current resolution level is lower than the target resolution level, determining second image pixel coordinates according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the target resolution level and the current resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is a second image pixel coordinate;
if the current resolution level is higher than the target resolution level, determining second image pixel coordinates according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is the second image pixel coordinate.
Preferably, in the method, the determining, according to the screen coordinate of the trigger point triggering the operation instruction, a first image pixel coordinate of the trigger point in the current electronic map includes:
determining the size ratio k of an image corresponding to the electronic map display area and the current electronic map;
determining said first image pixel coordinates (X) from said trigger point screen coordinates (X, y) according to0,Y0) Comprises the following steps:
wherein m is a column index number of an upper left corner tile in an image corresponding to the current electronic map in the current resolution level, and n is a row index number of the upper left corner tile in the image corresponding to the current electronic map in the current resolution level; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
Preferably, the determining a size ratio k of the image corresponding to the electronic map display area and the current electronic map specifically includes:
respectively calculating the width ratio value and the height ratio value of the electronic map display area and the image corresponding to the current electronic map;
and determining the ratio with the smaller value of the width ratio and the height ratio as the k.
An electronic map display device, comprising:
the electronic map display control system comprises a first determining module, a second determining module and a display control module, wherein the first determining module is used for determining a target resolution level of a target electronic map according to an operation instruction when the fact that the electronic map display operation instruction is triggered in the current electronic map is detected;
the second determining module is used for determining a first image pixel coordinate of the trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction;
a third determining module, configured to determine, according to a current resolution level of a current electronic map, the target resolution level, and the first image pixel coordinate, a second image pixel coordinate of the trigger point in the target electronic map;
a fourth determining module, configured to determine, according to the second image pixel coordinate of the trigger point, a first tile where the trigger point is located from tiles corresponding to the target resolution level;
a fifth determining module, configured to determine, according to the first tile and the electronic map display area, a tile to be loaded that covers the electronic map display area from tiles corresponding to a target resolution level;
and the display module is used for downloading the tiles to be loaded, rendering the tiles to be loaded to obtain the target electronic map and displaying the target electronic map.
The apparatus, preferably, the fifth determining module includes:
a selecting unit, configured to select a tile to be expanded from tiles adjacent to the first tile in tiles corresponding to a target resolution level, with the first tile as a center;
the judging unit is used for judging whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area, if so, the first processing unit is triggered, and if not, the second processing unit is triggered;
a first processing unit, configured to determine a tile included in the pending area as a tile to be loaded that covers the electronic map display area;
the second processing unit is used for selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, and judging whether a new undetermined area formed by the undetermined area and the selected tiles to be expanded covers the electronic map display area; if yes, determining the tiles contained in the new undetermined area as the tiles to be loaded covering the electronic map display area; if not, repeating the step of selecting tiles to be expanded from tiles adjacent to the undetermined area in the tiles corresponding to the target resolution level on the basis of the new undetermined area until the undetermined area covering the electronic map display area is obtained.
Preferably, in the apparatus, the selecting unit is specifically configured to select, as the tiles to be expanded, all tiles adjacent to the first tile from among the tiles corresponding to the target resolution level, with the first tile as a center;
the second processing unit is specifically used for selecting tiles to be expanded from tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level, and selecting all tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level as tiles to be expanded;
or,
the selecting unit is specifically configured to, for each boundary of the first tile, determine whether a blank area exists between the boundary and a frame, which is closest to the boundary and parallel to the boundary, in the electronic map display area, select, if yes, a tile, which is adjacent to the boundary of the first tile, in tiles corresponding to the target resolution level as tiles to be expanded, and if not, do not perform processing;
and the second processing unit is specifically configured to, for each boundary of the undetermined area, determine whether a blank area exists between the boundary and a border, closest to the boundary and parallel to the boundary, in the electronic map display area, select, as the tile to be expanded, a tile adjacent to the boundary of the undetermined area, in the tile corresponding to the target resolution level, and if not, do not perform the processing.
The above apparatus, preferably, the third determining module includes:
a first determining unit, configured to determine the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
a second determining unit, configured to determine a second image pixel coordinate according to the following formula if the current resolution level is lower than the target resolution level:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the target resolution level and the current resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is a second image pixel coordinate;
a third determining unit, configured to determine, if the current resolution level is higher than the target resolution level, a second image pixel coordinate according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is the second image pixel coordinate.
The above apparatus, preferably, the second determining module includes:
a fourth determining unit, configured to determine a size ratio k of an image corresponding to the electronic map display area and the current electronic map;
a fifth determining unit for determining said first image pixel coordinates (X) from screen coordinates (X, y) of said trigger point according to0,Y0) Comprises the following steps:
wherein m is a column index number of an upper left corner tile in an image corresponding to the current electronic map in the current resolution level, and n is a row index number of the upper left corner tile in the image corresponding to the current electronic map in the current resolution level; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
The apparatus described above, preferably, the fourth determining unit includes:
the calculating subunit is used for respectively calculating the width ratio value and the height ratio value of the image corresponding to the electronic map display area and the current electronic map;
and the determining subunit is used for determining the ratio with the smaller value in the width ratio and the height ratio as the k.
An electronic device comprises the electronic map display device.
According to the above scheme, the electronic map display method, device and electronic equipment provided by the present application determine a target resolution level of a target electronic map according to an electronic map display operation instruction triggered in a current electronic map, determine a first image pixel coordinate of a trigger point triggering the operation instruction in the current electronic map, then determine a second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinate of the current electronic map, determine a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point, determine a to-be-loaded tile covering a display area of the electronic map from tiles corresponding to the target resolution level according to the first tile and the display area of the electronic map, and downloading the tiles to be loaded, rendering the tiles to be loaded and displaying the rendered tiles. In the embodiment of the invention, when the first tile corresponding to the trigger point at the target resolution level is determined, the tiles to be loaded covering the display area of the electronic map are determined from the tiles adjacent to the first tile according to the spatial topological relation between the first tile and the display area of the electronic map, and the tiles to be loaded covering the display area of the electronic map are determined from the tiles adjacent to the first tile according to the topological relation between the first tile and the display area of the electronic map, so that the calculation speed for determining the tiles to be loaded is increased, and the display speed of the electronic map is increased as a whole.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an implementation of an electronic map displaying method according to an embodiment of the present disclosure;
fig. 2 is an exemplary diagram of determining tiles to be loaded that cover a display area of an electronic map from tiles corresponding to a target resolution level according to a first tile and the display area of the electronic map according to an embodiment of the present application;
fig. 3 is another exemplary diagram for determining tiles to be loaded that cover a display area of an electronic map from tiles corresponding to a target resolution level according to a first tile and the display area of the electronic map according to the embodiment of the present application;
FIG. 4 is an exemplary diagram of a tile map for a current resolution level provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic map displaying apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a fifth determining module provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of a third determining module provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a second determining module according to an embodiment of the present disclosure.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be practiced otherwise than as specifically illustrated.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of an electronic map displaying method according to an embodiment of the present application, where the method includes:
step S11: when an electronic map display operation instruction is triggered in a current electronic map, determining a target resolution level of a target electronic map according to the operation instruction;
at present, an electronic map can be browsed in an electronic device (such as a desktop computer, a notebook computer, etc.) using a mouse as an input device or an electronic device (such as a mobile phone, a tablet computer, etc.) using a touch screen as an input device, so that an electronic map display operation instruction can be triggered when a user operates the electronic map through the mouse or the touch screen, such as double-click or single-click operations in the electronic map, and the operation instruction can be an electronic map zooming-in operation, an electronic map panning operation, or an electronic map zooming-out operation.
Step S12: determining a first image pixel coordinate of a trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction;
in the embodiment of the invention, the trigger point is a position point for the user to operate the current electronic map in the electronic map display area. The first image pixel coordinates of the trigger point in the current electronic map refer to the pixel coordinates of the trigger point in an image (also referred to as canvas) made up of several tiles that make up the current electronic map.
It should be noted that, in the embodiment of the present invention, when it is detected that an electronic map display operation instruction is triggered in a current electronic map, an execution sequence of the step of determining a target resolution level of the target electronic map according to the operation instruction and the step of determining a first image pixel coordinate of a trigger point in the current electronic map according to a screen coordinate of the trigger point triggering the operation instruction is not specifically limited, the step of determining the target resolution level of the target electronic map according to the operation instruction may be executed first, and then the step of determining the first image pixel coordinate of the trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction may be executed; or, firstly, determining the first image pixel coordinate of the trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction, and then determining the target resolution level of the target electronic map according to the operation instruction; or, the step of determining the target resolution level of the target electronic map according to the operation instruction and the step of determining the first image pixel coordinate of the trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction are executed simultaneously.
Step S13: determining second image pixel coordinates of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinates of the current electronic map;
according to the resolution level (namely the current resolution level) to which the tile with the first image pixel coordinates belongs, the target resolution level and the scaling ratio (namely the tile pyramid coefficient) between two adjacent resolution levels, the second image pixel coordinates corresponding to the first image pixel coordinates in the target resolution level can be determined according to the first image pixel coordinates.
And the second image pixel coordinate is the image pixel coordinate of the trigger point in the target electronic map.
Step S14: determining a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point;
after determining the second image pixel coordinates, it can be determined to which tile in the target resolution level the second image pixel coordinates belong (i.e. which tile the trigger point is in the target resolution level), and for convenience, the tile in which the trigger point is located is referred to herein as the first tile.
Step S15: determining tiles to be loaded, which cover the electronic map display area, from tiles corresponding to a target resolution level according to the first tiles and the electronic map display area;
the first tile can be used as an initial tile to be loaded, and the range of the tile to be loaded is gradually expanded until the tile to be loaded covers the display area of the electronic map.
The first tile is included in the tile to be loaded that covers the electronic map display area, that is, the tile to be loaded that covers the electronic map display area is made up of a number of tiles that include the first tile.
Step S16: and downloading the tiles to be loaded, rendering the tiles to be loaded to obtain the target electronic map and displaying the target electronic map.
Optionally, in step S15 in the above embodiment, the step of determining, according to the first tile and the electronic map display area, a tile to be loaded that covers the electronic map display area from tiles corresponding to a target resolution level may include the following steps:
step S21: selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the first tile by taking the first tile as a center;
step S22: judging whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area or not; if yes, go to step S23; otherwise, go to step S24;
step S23: determining tiles included in the pending area as tiles to be loaded covering the electronic map display area;
step S24: selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the to-be-determined area;
step S25: judging whether a new undetermined area formed by the undetermined area and the selected tile to be expanded covers the electronic map display area; if yes, go to step S26; otherwise, go to step S27;
step S26: determining tiles included in the newly pending area as tiles to be loaded covering the electronic map display area;
step S27: and repeating the step of selecting the tiles to be expanded from the tiles adjacent to the undetermined area (namely the newly determined undetermined area) in the tiles corresponding to the target resolution level on the basis of the newly undetermined area until the undetermined area covering the electronic map display area is obtained.
That is to say, if the new undetermined area does not cover the electronic map display area, selecting tiles to be expanded from tiles adjacent to the current undetermined area in tiles corresponding to the target resolution level, and judging whether the new undetermined area formed by the current undetermined area and the selected tiles to be expanded covers the electronic map display area; if yes, go to step S26; otherwise, step S27 is executed.
Optionally, in step S21, with the first tile as the center, selecting a tile to be expanded from tiles adjacent to the first tile in the tiles corresponding to the target resolution level, which may specifically be:
selecting all tiles adjacent to the first tile in the tiles corresponding to the target resolution level as tiles to be expanded by taking the first tile as a center;
and in step S24, selecting a tile to be expanded from tiles corresponding to the target resolution level and adjacent to the region to be expanded, which may specifically be: selecting all tiles adjacent to the undetermined area from the tiles corresponding to the target resolution level as tiles to be expanded;
as shown in fig. 2, for an example diagram that determines tiles to be loaded that cover a display area of an electronic map from tiles corresponding to a target resolution level according to the first tile and the display area of the electronic map provided in the embodiment of the present application, a dashed box in fig. 2 represents the display area of the electronic map.
First, 8 tiles that will be adjacent to a first tile centered on the first tile (in FIG. 2)Characterization) selecting tiles to be expanded, wherein the 8 tiles and the first tile form a first to-be-determined area by 9 tiles; judging whether the first to-be-determined area covers the electronic map display area or not;
if the first to-be-determined area covers the electronic map display area, determining tiles in the first to-be-determined area as tiles to be loaded; obviously, the first area to be determined in fig. 2 does not cover the electronic map display area.
If the first area to be determined does not cover the electronic map display area, 16 tiles adjacent to the first area to be determined (in FIG. 2, the first tile is divided into four tilesCharacterized in that) the tiles are selected as tiles to be expanded, and the 16 tiles and 9 tiles contained in the first area to be determined form a second area to be determined; and judge the secondWhether the undetermined area covers the electronic map display area or not;
if the second to-be-determined area covers the electronic map display area, determining tiles in the second to-be-determined area as tiles to be loaded; obviously, the second pending area in fig. 2 does not cover the electronic map display area.
If the second pending area does not cover the electronic map display area, 24 tiles adjacent to the second pending area (in fig. 2, so as to cover the electronic map display area)Characterization) is selected as a tile to be expanded, the 24 tiles and 25 tiles included in the second region to be determined form a third region to be determined, and whether the third region to be determined covers the electronic map display region is judged; and analogizing until the determined undetermined area covers the electronic map display area.
In the example shown in fig. 2, the third predefined area covers the electronic map display area, and therefore, 49 tiles included in the third predefined area can be determined as tiles to be loaded.
Optionally, in the step S21, with the first tile as the center, selecting a tile to be expanded from tiles adjacent to the first tile in the tiles corresponding to the target resolution level, which may specifically be: judging whether a blank area exists between each boundary of the first tile and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area, if so, selecting tiles adjacent to the boundary of the first tile from the tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing;
and in step S24, selecting a tile to be expanded from tiles corresponding to the target resolution level and adjacent to the region to be expanded, specifically: and judging whether a blank area exists between the boundary and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area or not aiming at each boundary of the undetermined area, if so, selecting tiles adjacent to the boundary of the undetermined area from tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing.
As shown in fig. 3, another exemplary diagram of tiles to be loaded that cover a display area of an electronic map is determined from tiles corresponding to a target resolution level according to the first tile and the display area of the electronic map provided in the embodiment of the present application. The dashed boxes in fig. 3 represent electronic map display areas.
Firstly, since there is a blank area between each boundary of the first tile and the border of the electronic map display area that is closest to the boundary and parallel to the boundary, all tiles adjacent to the respective boundaries of the first tile are selected as tiles to be expanded, which is used in fig. 3Characterizing; judging whether a fourth undetermined area formed by the tiles to be expanded and the first tiles covers the electronic map display area or not;
obviously, the fourth undetermined area does not cover the electronic map display area, and because the fourth undetermined area does not cover the electronic map display area and a blank area exists between each boundary of the fourth undetermined area and a border, which is closest to the boundary and parallel to the boundary, in the electronic map display area, all tiles adjacent to each boundary of the fourth undetermined area are selected as tiles to be expanded, which is used in fig. 3Characterizing; judging whether a fifth undetermined area formed by the newly determined tile to be expanded and the fourth undetermined area covers the electronic map display area or not;
obviously, the fifth pending area does not cover the electronic map display area, and both the upper boundary and the lower boundary of the fifth pending area are closest to and parallel to the boundary in the electronic map display areaBlank areas do not exist between borders of the borders, and blank areas exist between the left border and the right border of the fifth undetermined area and the border which is closest to the borders in the electronic map display area and is parallel to the borders, so that all tiles adjacent to the left border and the right border of the fifth undetermined area are selected as tiles to be expanded, and the tiles are used in the step 3Characterizing; judging whether a sixth undetermined area formed by the newly determined tile to be expanded and the fifth undetermined area covers the electronic map display area;
obviously, the sixth pending area covers the electronic map display area. And ending the process of determining the tiles to be loaded covering the electronic map display area from the tiles corresponding to the target resolution level according to the first tiles and the electronic map display area. That is, the 35 tiles included in the sixth predefined area are to-be-loaded tiles.
Optionally, in the above embodiment, in step S13, determining the second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level of the current electronic map, the target resolution level, and the first image pixel coordinate may specifically include:
determining the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
if the current resolution level is lower than the target resolution level, determining second image pixel coordinates according to the following formula (1):
formula (1)
Wherein K is the ratio of the size of the pixel of the low resolution level to the pixel of the high resolution level in two adjacent resolution levels, i.e. tiling goldA pyramid coefficient (for example, a more common tile pyramid coefficient is 4, that is, the ratio of the size of the pixel at the low resolution level to the size of the pixel at the high resolution level is 4. it should be noted that the present scheme is not only applicable to a tile map with a tile pyramid coefficient of 4, but also applicable to a tile map with other tile pyramid coefficients, such as a tile map with a tile pyramid coefficient of 3); Δ P is the difference between the target resolution level and the current resolution level, (X)1,Y1) First image pixel coordinate as trigger point, (X)2,Y2) A second image pixel coordinate that is a trigger point;
if the current resolution level is higher than the target resolution level, determining second image pixel coordinates according to the following formula (2):
formula (2)
Where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) First image pixel coordinate as trigger point, (X)2,Y2) Is the second image pixel coordinate of the trigger point.
When a user operates the map, the target resolution level may be the resolution level to which the tile in the current electronic map belongs, such as when the map is translated; the target resolution level may also be different from the resolution level to which the tiles in the current electronic map belong, such as when zooming in on the map or zooming out on the map.
Optionally, in the above embodiment, in step S12, determining, according to the screen coordinate of the trigger point triggering the operation instruction, a first image pixel coordinate of the trigger point in the current electronic map, which may specifically be:
determining the size ratio k of an image corresponding to the electronic map display area and the current electronic map;
determining said first image pixel coordinates (X, y) from said trigger point screen coordinates (X, y) according to equation (3) below0,Y0) Comprises the following steps:
formula (3)
Wherein m is a column index number of an upper left corner tile in an image corresponding to the current electronic map in the current resolution level, and n is a row index number of the upper left corner tile in the image corresponding to the current electronic map in the current resolution level; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
Specifically, as shown in fig. 4, fig. 4 is an exemplary diagram of a tile map of a current resolution level provided by an embodiment of the present invention, and in fig. 4, each tile has a size of M × N. Assume that the image corresponding to the current electronic map is a shaded portion in fig. 4, where the shaded portion is the image corresponding to the current electronic map (the image corresponding to the current electronic map is an image formed by a plurality of tiles that form the current electronic map), and an index of an upper-left tile of the shaded portion is (m, n).
Optionally, determining the size ratio k of the image corresponding to the electronic map display area and the current electronic map may be implemented by the following method:
respectively calculating the width ratio value and the height ratio value of the electronic map display area and the image corresponding to the current electronic map; namely:
calculating the ratio k of the width of the display area of the electronic map to the width of the image corresponding to the current electronic map1;
Computational electronic map displayThe ratio k of the height of the area to the height of the image corresponding to the current electronic map2;
Will have a wide ratio k1And a high ratio k2The ratio of which the value is smaller is determined as k, that is,
will k1And k2The smaller value of the two is determined as the size ratio k of the map display area to the image corresponding to the current electronic map, namely k is min (k)1,k2)。
The electronic map display method provided by the embodiment of the present invention determines a target resolution level of a target electronic map according to an electronic map display operation instruction triggered in a current electronic map, determines a first image pixel coordinate of a trigger point triggering the operation instruction in the current electronic map, then determines a second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinate of the current electronic map, determines a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point, determines a to-be-loaded tile covering a display area of the electronic map from tiles corresponding to the target resolution level according to the first tile and the display area of the electronic map, and downloading the tiles to be loaded, rendering the tiles to be loaded to obtain a target electronic map, and displaying the target electronic map.
As can be seen, in the embodiment of the present invention, on one hand, when the first tile corresponding to the trigger point at the target resolution level is determined, the to-be-loaded tile covering the electronic display area is determined from the tiles adjacent to the first tile according to the spatial topological relation between the first tile and the electronic map display area, and since the to-be-loaded tile covering the electronic map display area is determined from the tiles adjacent to the first tile according to the topological relation between the first tile and the electronic map display area, the calculation is simple and fast, and the calculation amount is small, so that the calculation speed for determining the to-be-loaded tile is increased, and the display speed of the electronic map is increased as a whole. On the other hand, once the tiles to be loaded are determined to cover the display area of the electronic map, the tiles to be loaded are not determined any more, so that the quantity of the tiles to be loaded is reduced as much as possible on the basis that the tiles to be loaded cover the display area of the electronic map, the quantity of the tiles to be loaded is reduced, and the display speed of the electronic map is further improved.
Example two
Corresponding to the method in the first embodiment, a second embodiment of the present application further provides an electronic map display apparatus, as shown in fig. 5, including:
a first determination module 51, a second determination module 52, a third determination module 53, a fourth determination module 54, a fifth determination module 55 and a presentation module 56; wherein,
the first determining module 51 is configured to determine, when it is detected that an electronic map display operation instruction is triggered in a current electronic map, a target resolution level of a target electronic map according to the operation instruction;
the second determining module 52 is configured to determine, according to the screen coordinate of the trigger point triggering the operation instruction, a first image pixel coordinate of the trigger point in the current electronic map;
a third determining module 53, configured to determine, according to the current resolution level of the current electronic map, the target resolution level, and the first image pixel coordinate, a second image pixel coordinate of the trigger point in the target electronic map;
a fourth determining module 54, configured to determine, according to the second image pixel coordinate of the trigger point, a first tile where the trigger point is located from tiles corresponding to the target resolution level;
a fifth determining module 55, configured to determine, according to the first tile and the electronic map display area, a tile to be loaded that covers the electronic map display area from tiles corresponding to a target resolution level;
and the display module 56 is configured to download the tile to be loaded, render the tile to be loaded, and display the target electronic map.
Optionally, a schematic structural diagram of the fifth determining module 55 is shown in fig. 6, and may include:
a selecting unit 61, configured to select, with the first tile as a center, a tile to be expanded from tiles adjacent to the first tile in the tiles corresponding to the target resolution level;
a determining unit 62, configured to determine whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area, if so, trigger a first processing unit 63, and otherwise trigger a second processing unit 64;
a first processing unit 63, configured to determine a tile included in the pending area as a tile to be loaded that covers the electronic map display area;
a second processing unit 64, configured to select a tile to be expanded from tiles corresponding to the target resolution level and adjacent to the to-be-expanded region, and determine whether a new to-be-expanded region formed by the to-be-expanded region and the selected tile to be expanded covers the electronic map display region; if yes, determining the tiles contained in the new undetermined area as the tiles to be loaded covering the electronic map display area; if not, repeating the step of selecting tiles to be expanded from tiles adjacent to the undetermined area in the tiles corresponding to the target resolution level on the basis of the new undetermined area until the undetermined area covering the electronic map display area is obtained.
Optionally, the selecting unit 61 is specifically configured to select, with the first tile as a center, all tiles adjacent to the first tile in the tiles corresponding to the target resolution level as tiles to be expanded;
the second processing unit 64, configured to select tiles to be expanded from tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level, is specifically configured to select all tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level as tiles to be expanded;
optionally, the selecting unit 61 is specifically configured to, for each boundary of the first tile, determine whether a blank area exists between the boundary and a border, which is closest to the boundary and parallel to the boundary, in the electronic map display area, if yes, select a tile, which is adjacent to the boundary of the first tile, in the tiles corresponding to the target resolution level as a tile to be expanded, and if not, do not perform the processing;
and the second processing unit 64, configured to select a tile to be expanded from tiles adjacent to the to-be-expanded area among the tiles corresponding to the target resolution level, is specifically configured to, for each boundary of the to-be-expanded area, determine whether a blank area exists between the boundary and a border, which is closest to the boundary and is parallel to the boundary, in the electronic map display area, if so, select a tile adjacent to the boundary of the to-be-expanded area among the tiles corresponding to the target resolution level, and if not, not perform processing.
Optionally, a schematic structural diagram of the third determining module 53 is shown in fig. 7, and may include:
a first determining unit 71, configured to determine the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
a second determining unit 72, configured to determine second image pixel coordinates according to the following formula if the current resolution level is lower than the target resolution level:
wherein K is two adjacentA ratio of sizes of pixels of a low resolution level to pixels of a high resolution level in a resolution level, Δ P being a difference between the target resolution level and the current resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is a second image pixel coordinate;
a third determining unit 73, configured to determine, if the current resolution level is higher than the target resolution level, a second image pixel coordinate according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is the second image pixel coordinate.
Optionally, a schematic structural diagram of the second determining module 52 is shown in fig. 8, and may include:
a fourth determination unit 81 for determining a size ratio k of an image corresponding to the electronic map display area and the current electronic map;
a fifth determining unit 82 for determining said first image pixel coordinates (X) from screen coordinates (X, y) of said trigger point according to0,Y0) Comprises the following steps:
wherein m is the column index number of the top left tile in the current resolution level in the image corresponding to the current electronic map, and n is the column index number of the top left tile in the current resolution level in the image corresponding to the current electronic mapA row index number; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
Optionally, the fourth determining unit 81 may include:
the calculating subunit is used for respectively calculating the width ratio value and the height ratio value of the image corresponding to the electronic map display area and the current electronic map;
and the determining subunit is used for determining the ratio with the smaller value in the width ratio and the height ratio as the k.
An embodiment of the present invention further provides an electronic device, including the electronic map display apparatus, where a specific structure of the electronic map display apparatus is as described above, and is not described herein again.
The electronic map display apparatus provided in the embodiment of the present invention determines a target resolution level of a target electronic map according to an electronic map display operation instruction triggered in a current electronic map, determines a first image pixel coordinate of a trigger point triggering the operation instruction in the current electronic map, then determines a second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level, the target resolution level, and the first image pixel coordinate of the current electronic map, determines a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point, determines a to-be-loaded tile covering a display area of the electronic map from tiles corresponding to the target resolution level according to the first tile and the display area of the electronic map, and downloading the tiles to be loaded, rendering the tiles to be loaded to obtain a target electronic map, and displaying the target electronic map.
As can be seen, in the embodiment of the present invention, on one hand, when the first tile corresponding to the trigger point at the target resolution level is determined, the to-be-loaded tile covering the electronic display area is determined from the tiles adjacent to the first tile according to the spatial topological relation between the first tile and the electronic map display area, and since the to-be-loaded tile covering the electronic map display area is determined from the tiles adjacent to the first tile according to the topological relation between the first tile and the electronic map display area, the calculation is simple and fast, and the calculation amount is small, so that the calculation speed for determining the to-be-loaded tile is increased, and the display speed of the electronic map is increased as a whole. On the other hand, once the tiles to be loaded are determined to cover the display area of the electronic map, the tiles to be loaded are not determined any more, so that the quantity of the tiles to be loaded is reduced as much as possible on the basis that the tiles to be loaded cover the display area of the electronic map, the quantity of the tiles to be loaded is reduced, and the display speed of the electronic map is further improved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (13)
1. An electronic map display method, comprising:
when an electronic map display operation instruction is triggered in a current electronic map, determining a target resolution level of a target electronic map according to the operation instruction;
determining a first image pixel coordinate of a trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction;
determining second image pixel coordinates of the trigger point in the target electronic map according to the current resolution level, the target resolution level and the first image pixel coordinates of the current electronic map;
determining a first tile where the trigger point is located from tiles corresponding to the target resolution level according to the second image pixel coordinate of the trigger point;
determining tiles to be loaded, which cover the electronic map display area, from tiles corresponding to a target resolution level according to the first tiles and the electronic map display area;
and downloading the tiles to be loaded, rendering the tiles to be loaded to obtain the target electronic map and displaying the target electronic map.
2. The method according to claim 1, wherein determining, from the first tiles and the electronic map display area, tiles to be loaded that cover the electronic map display area from tiles corresponding to a target resolution level comprises:
selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the first tile by taking the first tile as a center;
judging whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area or not;
if yes, then: determining tiles included in the pending area as tiles to be loaded covering the electronic map display area;
if not, then: selecting tiles to be expanded from tiles adjacent to the undetermined area from tiles corresponding to the target resolution level, and judging whether a new undetermined area formed by the undetermined area and the selected tiles to be expanded covers the electronic map display area; if yes, determining the tiles contained in the new undetermined area as the tiles to be loaded covering the electronic map display area; if not, repeating the step of selecting tiles to be expanded from tiles adjacent to the undetermined area in the tiles corresponding to the target resolution level on the basis of the new undetermined area until the undetermined area covering the electronic map display area is obtained.
3. The method according to claim 2, wherein said selecting, centered on said first tile, tiles to be expanded from tiles corresponding to a target resolution level that are adjacent to said first tile is selected by: selecting all tiles adjacent to the first tile in the tiles corresponding to the target resolution level as tiles to be expanded by taking the first tile as a center;
and selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, specifically: selecting all tiles adjacent to the undetermined area from the tiles corresponding to the target resolution level as tiles to be expanded;
or,
selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the first tile by taking the first tile as a center, specifically: judging whether a blank area exists between each boundary of the first tile and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area, if so, selecting tiles adjacent to the boundary of the first tile from the tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing;
and selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, specifically: and judging whether a blank area exists between the boundary and a frame which is closest to the boundary and parallel to the boundary in the electronic map display area or not aiming at each boundary of the undetermined area, if so, selecting tiles adjacent to the boundary of the undetermined area from tiles corresponding to the target resolution level as tiles to be expanded, and if not, not processing.
4. The method according to any one of claims 1 to 3, wherein determining the second image pixel coordinate of the trigger point in the target electronic map according to the current resolution level of the current electronic map, the target resolution level and the first image pixel coordinate comprises:
determining the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
if the current resolution level is lower than the target resolution level, determining second image pixel coordinates according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the target resolution level and the current resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is a second image pixel coordinate;
if the current resolution level is higher than the target resolution level, determining second image pixel coordinates according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is the second image pixel coordinate.
5. The method according to any one of claims 1 to 3, wherein according to the screen coordinates of the trigger point triggering the operation instruction, the first image pixel coordinates of the trigger point in the current electronic map are determined, specifically:
determining the size ratio k of an image corresponding to the electronic map display area and the current electronic map;
determining said first image pixel coordinates (X) from said trigger point screen coordinates (X, y) according to0,Y0) Comprises the following steps:
wherein m is a column index number of an upper left corner tile in an image corresponding to the current electronic map in the current resolution level, and n is a row index number of the upper left corner tile in the image corresponding to the current electronic map in the current resolution level; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
6. The method according to claim 5, wherein the determining a size ratio k of the image corresponding to the electronic map display area and the current electronic map specifically comprises:
respectively calculating the width ratio value and the height ratio value of the electronic map display area and the image corresponding to the current electronic map;
and determining the ratio with the smaller value of the width ratio and the height ratio as the k.
7. An electronic map display device, comprising:
the electronic map display control system comprises a first determining module, a second determining module and a display control module, wherein the first determining module is used for determining a target resolution level of a target electronic map according to an operation instruction when the fact that the electronic map display operation instruction is triggered in the current electronic map is detected;
the second determining module is used for determining a first image pixel coordinate of the trigger point in the current electronic map according to the screen coordinate of the trigger point triggering the operation instruction;
a third determining module, configured to determine, according to a current resolution level of a current electronic map, the target resolution level, and the first image pixel coordinate, a second image pixel coordinate of the trigger point in the target electronic map;
a fourth determining module, configured to determine, according to the second image pixel coordinate of the trigger point, a first tile where the trigger point is located from tiles corresponding to the target resolution level;
a fifth determining module, configured to determine, according to the first tile and the electronic map display area, a tile to be loaded that covers the electronic map display area from tiles corresponding to a target resolution level;
and the display module is used for downloading the tiles to be loaded, rendering the tiles to be loaded to obtain the target electronic map and displaying the target electronic map.
8. The apparatus of claim 7, wherein the fifth determining module comprises:
a selecting unit, configured to select a tile to be expanded from tiles adjacent to the first tile in tiles corresponding to a target resolution level, with the first tile as a center;
the judging unit is used for judging whether an undetermined area formed by the first tile and the selected tile to be expanded covers the electronic map display area, if so, the first processing unit is triggered, and if not, the second processing unit is triggered;
a first processing unit, configured to determine a tile included in the pending area as a tile to be loaded that covers the electronic map display area;
the second processing unit is used for selecting tiles to be expanded from tiles corresponding to the target resolution level and adjacent to the undetermined area, and judging whether a new undetermined area formed by the undetermined area and the selected tiles to be expanded covers the electronic map display area; if yes, determining the tiles contained in the new undetermined area as the tiles to be loaded covering the electronic map display area; if not, repeating the step of selecting tiles to be expanded from tiles adjacent to the undetermined area in the tiles corresponding to the target resolution level on the basis of the new undetermined area until the undetermined area covering the electronic map display area is obtained.
9. The apparatus according to claim 8, wherein the selecting unit is specifically configured to select, as tiles to be expanded, all tiles adjacent to the first tile from among the tiles corresponding to the target resolution level, centering on the first tile;
the second processing unit is specifically used for selecting tiles to be expanded from tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level, and selecting all tiles adjacent to the to-be-expanded region in the tiles corresponding to the target resolution level as tiles to be expanded;
or,
the selecting unit is specifically configured to, for each boundary of the first tile, determine whether a blank area exists between the boundary and a frame, which is closest to the boundary and parallel to the boundary, in the electronic map display area, select, if yes, a tile, which is adjacent to the boundary of the first tile, in tiles corresponding to the target resolution level as tiles to be expanded, and if not, do not perform processing;
and the second processing unit is specifically configured to, for each boundary of the undetermined area, determine whether a blank area exists between the boundary and a border, closest to the boundary and parallel to the boundary, in the electronic map display area, select, as the tile to be expanded, a tile adjacent to the boundary of the undetermined area, in the tile corresponding to the target resolution level, and if not, do not perform the processing.
10. The apparatus of any of claims 7-9, wherein the third determining module comprises:
a first determining unit, configured to determine the first image pixel coordinate as the second image pixel coordinate if the current resolution level is equal to the target resolution level;
a second determining unit, configured to determine a second image pixel coordinate according to the following formula if the current resolution level is lower than the target resolution level:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the target resolution level and the current resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is a second image pixel coordinate;
a third determining unit, configured to determine, if the current resolution level is higher than the target resolution level, a second image pixel coordinate according to the following formula:
where K is the ratio of the sizes of the pixels of the low resolution level and the pixels of the high resolution level in two adjacent resolution levels, Δ P is the difference between the current resolution level and the target resolution level, (X)1,Y1) Is the first image pixel coordinate, (X)2,Y2) Is the second image pixel coordinate.
11. The apparatus of any of claims 7-9, wherein the second determining module comprises:
a fourth determining unit, configured to determine a size ratio k of an image corresponding to the electronic map display area and the current electronic map;
a fifth determination unit for determining according toThe screen coordinates (X, y) of said trigger point determining said first image pixel coordinates (X)0,Y0) Comprises the following steps:
wherein m is a column index number of an upper left corner tile in an image corresponding to the current electronic map in the current resolution level, and n is a row index number of the upper left corner tile in the image corresponding to the current electronic map in the current resolution level; m is the pixel column number contained in one tile of the current resolution level, and N is the pixel row number contained in one tile of the current resolution level; (x)1,y1) The central coordinates of the electronic map display area are obtained; (x)2,y2) And the central coordinates of the image corresponding to the current electronic map are obtained.
12. The apparatus according to claim 11, wherein the fourth determining unit comprises:
the calculating subunit is used for respectively calculating the width ratio value and the height ratio value of the image corresponding to the electronic map display area and the current electronic map;
and the determining subunit is used for determining the ratio with the smaller value in the width ratio and the height ratio as the k.
13. An electronic device, comprising the electronic map presentation apparatus according to any one of claims 7 to 12.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510084636.3A CN105989130B (en) | 2015-02-16 | 2015-02-16 | Electronic map methods of exhibiting, device and electronic equipment |
PCT/CN2016/073490 WO2016131390A1 (en) | 2015-02-16 | 2016-02-04 | Electronic map display method, apparatus and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510084636.3A CN105989130B (en) | 2015-02-16 | 2015-02-16 | Electronic map methods of exhibiting, device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105989130A CN105989130A (en) | 2016-10-05 |
CN105989130B true CN105989130B (en) | 2019-06-14 |
Family
ID=56688923
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510084636.3A Active CN105989130B (en) | 2015-02-16 | 2015-02-16 | Electronic map methods of exhibiting, device and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105989130B (en) |
WO (1) | WO2016131390A1 (en) |
Families Citing this family (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106780319A (en) * | 2016-11-11 | 2017-05-31 | 航天恒星科技有限公司 | The processing method and processing device of super large image |
CN107016924B (en) * | 2016-12-20 | 2020-04-07 | 阿里巴巴集团控股有限公司 | Tile map generation method, updating method and updating device in virtual map |
CN110309243A (en) * | 2018-03-22 | 2019-10-08 | 杭州海康威视系统技术有限公司 | Obtain method, apparatus, equipment and the storage medium of outdoor scene electronic map |
CN111190894A (en) * | 2018-11-15 | 2020-05-22 | 阿里巴巴集团控股有限公司 | Map display method and device, related storage medium and client |
CN110059143B (en) * | 2019-03-04 | 2022-11-22 | 中国电子科技集团公司第二十七研究所 | Map drawing method based on remote sensing image tile data |
CN112214562B (en) * | 2019-07-12 | 2024-02-27 | 杭州海康威视系统技术有限公司 | Data processing method, device, electronic equipment and machine-readable storage medium |
CN110851752B (en) * | 2019-09-25 | 2023-12-08 | 视联动力信息技术股份有限公司 | Image transmission method and device |
CN113127584B (en) * | 2019-12-31 | 2024-06-07 | 深圳云天励飞技术有限公司 | Map labeling method and device, electronic equipment and storage medium |
CN111121794B (en) * | 2019-12-31 | 2022-01-04 | 广州文远知行科技有限公司 | Map rendering method and device, terminal equipment and storage medium |
CN111881230A (en) * | 2020-06-17 | 2020-11-03 | 汉海信息技术(上海)有限公司 | Rendering method and device for map area and electronic equipment |
CN111857626A (en) * | 2020-07-16 | 2020-10-30 | 北京奇虎科技有限公司 | Picture display method, device and equipment based on screen coordinates and storage medium |
CN112201142B (en) * | 2020-09-14 | 2022-11-29 | 汉海信息技术(上海)有限公司 | Method and device for configuring road coding board of electronic map, electronic equipment and medium |
CN112561800A (en) * | 2020-12-23 | 2021-03-26 | 杭州群核信息技术有限公司 | Method and device for hierarchical loading and displaying of panoramic image, computer equipment and storage medium |
CN112802143A (en) * | 2021-01-26 | 2021-05-14 | 北京世纪高通科技有限公司 | Spherical map drawing method, spherical map drawing device and storage medium |
CN112767254A (en) * | 2021-02-07 | 2021-05-07 | 杭州今奥信息科技股份有限公司 | Image compression method with high compression ratio |
CN113344943B (en) * | 2021-05-26 | 2024-05-10 | 北京国信空间信息科技有限公司 | Mosaic encoding method for tile fragments of remote sensing image |
CN113282647B (en) * | 2021-07-22 | 2021-09-28 | 武大吉奥信息技术有限公司 | Area control processing method based on tile map data |
CN114238528A (en) * | 2021-11-09 | 2022-03-25 | 深圳云天励飞技术股份有限公司 | Map loading method and device, electronic equipment and storage medium |
CN114691909B (en) * | 2022-03-31 | 2024-10-15 | 广州极飞科技股份有限公司 | Map downloading method, map downloading device, computer equipment and computer readable storage medium |
CN115063531B (en) * | 2022-05-31 | 2023-03-24 | 中建八局第二建设有限公司 | Smart park space data packet lightweight processing and rendering method |
CN115344740B (en) * | 2022-10-15 | 2023-01-10 | 深圳安德空间技术有限公司 | Full-time-space retrieval method and system based on three-dimensional ground penetrating radar data |
CN115423690B (en) * | 2022-11-04 | 2023-03-21 | 之江实验室 | High-resolution liver cancer pathological image display method and system based on image pyramid |
CN116051764B (en) * | 2022-12-30 | 2024-01-30 | 北京华云星地通科技有限公司 | Remote sensing image map drawing method and system |
CN115984119B (en) * | 2023-03-20 | 2023-06-20 | 中科星图维天信(北京)科技有限公司 | Meteorological data processing method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819530A (en) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | Method and device for displaying electronic map |
CN103700126A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Device and corresponding method for controlling electronic map zooming |
CN103699439A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Device and method for calculating tiles in electronic map visual area |
CN103700125A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Electronic map controller and electronic map control method |
CN103744855A (en) * | 2013-11-29 | 2014-04-23 | 航天恒星科技有限公司 | Tile map storage method based on aggregation files |
CN103955955A (en) * | 2014-04-30 | 2014-07-30 | 深圳华强信息产业有限公司 | Electronic map information processing method and device |
CN104142926A (en) * | 2013-05-06 | 2014-11-12 | 北京四维图新科技股份有限公司 | Method and device for processing electronic map |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6724382B2 (en) * | 2000-12-04 | 2004-04-20 | Wildtangent, Inc. | Method and apparatus for distributing and displaying maps electronically |
CN100452050C (en) * | 2006-09-28 | 2009-01-14 | 江苏天泽信息产业有限公司 | Method of generating and organizing source data of grid electron map and method of generating target data |
US20100002012A1 (en) * | 2008-07-03 | 2010-01-07 | Sony Ericsson Mobile Communications Ab | Methods, electronic devices, and computer program products for providing geographical presence using map tiles |
CN102819671B (en) * | 2012-07-25 | 2016-02-17 | 深圳市网信联动通信技术股份有限公司 | A kind of method of carrying out data analysis in conjunction with map |
-
2015
- 2015-02-16 CN CN201510084636.3A patent/CN105989130B/en active Active
-
2016
- 2016-02-04 WO PCT/CN2016/073490 patent/WO2016131390A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819530A (en) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | Method and device for displaying electronic map |
CN104142926A (en) * | 2013-05-06 | 2014-11-12 | 北京四维图新科技股份有限公司 | Method and device for processing electronic map |
CN103744855A (en) * | 2013-11-29 | 2014-04-23 | 航天恒星科技有限公司 | Tile map storage method based on aggregation files |
CN103700126A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Device and corresponding method for controlling electronic map zooming |
CN103699439A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Device and method for calculating tiles in electronic map visual area |
CN103700125A (en) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | Electronic map controller and electronic map control method |
CN103955955A (en) * | 2014-04-30 | 2014-07-30 | 深圳华强信息产业有限公司 | Electronic map information processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105989130A (en) | 2016-10-05 |
WO2016131390A1 (en) | 2016-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105989130B (en) | Electronic map methods of exhibiting, device and electronic equipment | |
KR101913480B1 (en) | Navigable layering of viewable areas for hierarchical content | |
US20180232135A1 (en) | Method for window displaying on a mobile terminal and mobile terminal | |
US8769403B2 (en) | Selection-based resizing for advanced scrolling of display items | |
RU2602343C1 (en) | Method for displaying content of interface and user equipment | |
US20140331171A1 (en) | Methods and apparatus for processing application windows | |
EP2837992A1 (en) | User interface interaction method and apparatus applied in touchscreen device, and touchscreen device | |
US9355484B2 (en) | System and method of tile management | |
CN107204044B (en) | Picture display method based on virtual reality and related equipment | |
CN106897321B (en) | Method and device for displaying map data | |
CN106886511B (en) | Network table processing method and device | |
US11651556B2 (en) | Virtual exhibition space providing method for efficient data management | |
CN103702032A (en) | Image processing method, device and terminal equipment | |
KR102317013B1 (en) | Object management and visualization using computing devices | |
US11250643B2 (en) | Method of providing virtual exhibition space using 2.5-dimensionalization | |
CN109324736A (en) | The exchange method and device of partial enlargement picture | |
CN111258698A (en) | Object display method and device | |
US20170038921A1 (en) | Image processing apparatus, image processing method, and non-transitory computer readable storage medium | |
CN109766530B (en) | Method and device for generating chart frame, storage medium and electronic equipment | |
CN109582269B (en) | Physical splicing screen display method and device and terminal equipment | |
CN106354381B (en) | Image file processing method and device | |
US20130321470A1 (en) | Apparatus and method for viewing an image that is larger than an area of a display device | |
TW201541341A (en) | Photo/video timeline display | |
JP6161290B2 (en) | Display control apparatus, display control method and program thereof | |
US10632379B2 (en) | Method and apparatus for performing interaction in chessboard interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20200508 Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Alibaba (China) Co.,Ltd. Address before: 102200, No. 8, No., Changsheng Road, Changping District science and Technology Park, Beijing, China. 1-5 Patentee before: AUTONAVI SOFTWARE Co.,Ltd. |