WO2015101070A1 - 一种控制电子地图的装置和方法 - Google Patents
一种控制电子地图的装置和方法 Download PDFInfo
- Publication number
- WO2015101070A1 WO2015101070A1 PCT/CN2014/087173 CN2014087173W WO2015101070A1 WO 2015101070 A1 WO2015101070 A1 WO 2015101070A1 CN 2014087173 W CN2014087173 W CN 2014087173W WO 2015101070 A1 WO2015101070 A1 WO 2015101070A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- tile
- target
- level
- display level
- map
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/37—Details of the operation on graphic patterns
- G09G5/373—Details of the operation on graphic patterns for modifying the size of the graphic pattern
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0485—Scrolling or panning
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/38—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory with means for controlling the display position
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04804—Transparency, e.g. transparent or translucent windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04806—Zoom, i.e. interaction techniques or interactors for controlling the zooming operation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/04—Changes in size, position or resolution of an image
- G09G2340/045—Zooming at least part of an image, i.e. enlarging it or shrinking it
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/121—Frame memory handling using a cache memory
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/12—Frame memory handling
- G09G2360/122—Tiling
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2370/00—Aspects of data communication
- G09G2370/02—Networking aspects
- G09G2370/022—Centralised management of display operation, e.g. in a server instead of locally
Definitions
- the present invention relates to the field of electronic map technology, and in particular to an apparatus and method for controlling electronic map zooming, a device and method for controlling electronic map zooming, a device and method for controlling electronic map shifting, and a computing electronic map visible Apparatus and method for tiles within an area, and an electronic map tile request queue processing apparatus and method.
- the electronic map client enlarges the map according to the instruction of the user's enlarged map (refer to the electronic map network client such as Baidu map, GOOGLE map, Tencent map, etc., click the zoom button or the "+" button, and the electronic map technology field can be enlarged.
- the map indicates that when the geographical range displayed in the same electronic map display range is small and the geographical details are more detailed, it is necessary to load a lower level tile different from the current display level, because the tile needs to be requested from the server and the tile is required.
- the present invention has been made in order to provide an apparatus and method for controlling electronic map enlargement that overcomes the above problems or at least partially solves the above problems, an apparatus and method for controlling electronic map reduction, and a control electronic map shifting.
- an apparatus for controlling electronic map enlargement comprising: a target tile operation unit adapted to determine an enlarged target display level when an instruction to zoom in on a map is received, to find a target Displaying multiple target tiles to be displayed in the level; wherein the current display level is higher than the target display level; the preloading tile operation unit is adapted to select a preloaded display level based on the relationship between the current display level and the target display level, and find out Preloading a preloaded tile corresponding to the target tile in the display level; loading unit, adapted to obtain the preloaded tile and the target tile in priority order, according to a level difference between the preloaded display level and the target display level The preloaded tiles are loaded and enlarged; and when the target tiles are acquired, the target tiles are loaded and displayed to replace the enlarged preloaded tiles of the corresponding locations.
- an apparatus for controlling electronic map reduction comprising: a target tile operation unit adapted to determine a reduced target display level when an instruction to zoom out a map is received, to find out
- the target display level includes a plurality of target tiles to be displayed; wherein the target display level is higher than the current display level; the first loading unit is adapted to load and reduce the current display according to the level difference between the current display level and the target display level Tile; a preloaded tile operation unit, adapted to select a preloaded display level, to find a preloaded tile to be loaded in an edge region in a preloaded display level; and a second loading unit adapted to obtain a preload tile in priority order
- the slice and the target tile are loaded and enlarged to display the preloaded tile according to the level difference between the preloaded display level and the target display level; when the target tile is acquired, the target tile is loaded and displayed to replace the corresponding position Reduced currently displayed tiles and enlarged preloaded tiles.
- an apparatus for controlling panning of an electronic map comprising: a target tile operation unit adapted to find a plurality of target tiles to be loaded and displayed when an instruction to pan the map is received a preloaded tile operation unit, configured to select a preloaded display level based on a current display level, and find a preloaded tile corresponding to the target tile in a preloaded display level; the loading unit is adapted to obtain in a priority order Preloading the tile and the target tile, loading and enlarging the preloaded tile according to the level difference between the preloaded display level and the current display level; and when the target tile is acquired, loading and displaying the target tile to Replace the pre-loaded tile with the corresponding position.
- an apparatus for calculating a tile within a viewable area of an electronic map comprising: a fixed point arithmetic unit adapted to be based on a geographic location coordinate of a center point of the map visible area and a map The current display level is converted to obtain the pixel coordinates of the center point; the tile analysis unit is adapted to obtain the pixel size of the single tile of the current display level according to the current display level of the map; the vertex analysis unit is adapted to be based on the visible area of the map.
- a pixel size and a pixel coordinate of the center point to obtain pixel coordinates of two opposite vertices of the visible area of the map; a tile operation unit adapted to pixel coordinates of the two opposite vertices according to the visible area of the map and the current display level
- the pixel size of a single tile results in a tile number within the viewable area.
- an electronic map tile request queue processing apparatus comprising: a tile selection unit adapted to determine a target level tile request to be downloaded according to the received electronic map interaction indication And a preload level tile request; the queue management unit is adapted to add the target level tile request and the preload level tile request to the electronic map tile request queue, and takes precedence over the original The original tile request in the queue is processed.
- a method for controlling an electronic map zooming comprising: determining an enlarged target display level when an instruction to zoom in on a map is received, and finding a plurality of target display levels to be displayed a target tile; selecting a preloaded display level based on a relationship between a current display level and a target display level, finding a preloaded tile corresponding to the target tile in a preloaded display level; acquiring preloaded tiles in priority order and The target tile loads and enlarges the preloaded tile according to the level difference between the preloaded display level and the target display level; when the target tile is acquired, the target tile is loaded and displayed to replace the enlarged preset of the corresponding position Load the tiles.
- a method for controlling electronic map reduction includes: when receiving an instruction to zoom out a map, determining a target display level to be reduced to find a target display level to be displayed Multiple target tiles; wherein the target display level is higher than the current display level; the current displayed tile is loaded and reduced according to the level difference between the current display level and the target display level; selecting the preloaded display level to find out Loading preloaded tiles to be loaded in the edge region of the display level; acquiring preloaded tiles and target tiles in priority order, loading and enlarging the preloaded tiles according to the level difference between the preloaded display level and the target display level; After the target tile is acquired, the target tile is loaded and displayed to replace the reduced currently displayed tile and the enlarged preloaded tile of the corresponding location.
- a method for controlling panning of an electronic map includes: when receiving an instruction to pan the map, finding a plurality of target tiles to be loaded for display; based on a current display level Selecting a preloaded display level to find a preloaded tile corresponding to the target tile in the preloaded display level; obtaining preloaded tiles and target tiles in priority order, according to a preloaded display level and a current display level The level difference loads and enlarges the pre-loaded tile; when the target tile is acquired, the target tile is loaded and displayed to replace the enlarged pre-loaded tile of the corresponding location.
- a method for calculating a tile in a visible area of an electronic map comprising: converting according to a geographic location coordinate of a center point of a visible area of the map and a current display level of the map The pixel coordinates of the center point; according to the current display level of the map, the pixel size of the single tile of the current display level is obtained; according to the pixel size of the visible area of the map and the pixel coordinates of the center point, two relative images of the visible area of the map are obtained. The pixel coordinates of the vertex; and the tile number in the visible area is obtained according to the pixel coordinates of two opposite vertices of the visible area of the map and the pixel size of a single tile of the current display level.
- an electronic map tile request queue processing method includes: determining a target level tile request to be downloaded and a preload level tile according to the received electronic map interaction indication A slice request; the target level tile request and the preload level tile request are added to the electronic map tile request queue, and processed in preference to the original tile request in the original queue.
- the apparatus for controlling electronic map zooming and the method of controlling electronic map zooming according to the present invention can quickly display blurred preloaded tiles by selecting preloaded display levels and loading and magnifying display preloaded tiles, thereby solving the existing When the technology enlarges the electronic map, because it requires more time, some tiles cannot be displayed in time, and there are more blanks in the electronic map window, which has the effect of reducing the probability of blanks in the electronic map window when the electronic map is enlarged.
- FIG. 1 shows a flow chart of a method of calculating tiles within a viewable area of an electronic map in accordance with a first embodiment of the present invention
- FIG. 2 shows a block diagram of an apparatus for computing tiles within a viewable area of an electronic map, in accordance with one embodiment of the present invention
- FIG. 3 is a flowchart showing an electronic map tile request queue processing method according to a first embodiment of the present invention
- FIG. 4 shows a block diagram of an electronic map tile request queue processing apparatus in accordance with one embodiment of the present invention
- FIG. 5 illustrates a flow chart of a method of controlling electronic map zooming in accordance with one embodiment of the present invention
- FIG. 6 shows a detailed flowchart of step S400 shown in FIG. 5;
- Figure 7 shows a block diagram of an apparatus for controlling electronic map zooming in accordance with one embodiment of the present invention
- FIG. 8 shows a flow chart of a method of controlling electronic map reduction in accordance with one embodiment of the present invention
- FIG. 9 shows a block diagram of an apparatus for controlling electronic map reduction in accordance with one embodiment of the present invention.
- FIG. 10 shows a flow chart of a method of controlling electronic map panning in accordance with one embodiment of the present invention
- FIG. 11 shows a block diagram of an apparatus for controlling panning of an electronic map, in accordance with one embodiment of the present invention.
- Figure 12 shows a schematic diagram of an electronic map client implemented in accordance with the present invention.
- Figure 13 shows a block diagram of a computing device for performing a method in accordance with the present invention
- Figure 14 shows a memory unit for holding or carrying program code implementing the method according to the invention.
- the technical idea of the present invention is mainly to determine a target display level and a preload display level when receiving an instruction to zoom in and out of a map, and when receiving an instruction to pan the map, determine a preload display level and find a target to be displayed.
- a tile and a preloaded tile corresponding to the target tile ie, corresponding to the range of maps represented).
- the number of pre-loaded tiles is less than the number of target tiles (for example, a map range represented by a pre-loaded tile is equivalent to a map represented by four or sixteen or more target tiles of a lower level) Scope), so the time required for the server to download the preloaded tiles and load the preloaded tiles is shorter than the time required to download the target tiles and load the target tiles by the server using the prior art, by loading the preloaded tiles And zooming in on the blurred pre-loaded tile, and after acquiring the target tile, loading and displaying the target tile to replace the enlarged pre-loaded tile of the corresponding position, reducing the zooming, zooming out, and panning the map when the electronic map window is blank Probability.
- the electronic map tiles that is, the pictures in the raster map
- the electronic map is enlarged, and the lower level tiles are displayed, which is better in the field.
- a high-level single tile represents a map range that is larger than a low-level single tile.
- a higher-level tile in the adjacent level is equivalent to the lower-level four tiles.
- the map range, of the two levels with a level difference of two, the higher level of one tile is equivalent to the map range represented by the lower level of sixteen tiles.
- the present application Before describing in detail the scheme of controlling the enlargement, reduction, and translation of the electronic map, the present application firstly details the scheme for calculating the tiles in the visible area of the electronic map and the electronic map tile request queue processing scheme.
- FIG. 1 shows a flow chart of a method of calculating tiles within a viewable area of an electronic map in accordance with a first embodiment of the present invention.
- the method includes steps S100 through S400 as described below:
- S100 Convert the pixel coordinates of the center point according to the geographic location coordinates of the center point of the visible area of the map and the current display level of the map.
- the geographic location coordinates of the center point of the visible area of the map are the latitude and longitude coordinates or the coordinates obtained by projecting the latitude and longitude coordinates onto the plane map by the projection algorithm, and can be converted by the geographic location coordinates and the current display level of the map. Get the pixel coordinates of the center point (for example, XY coordinates).
- the electronic map is saved by using a hierarchical tile mechanism, and the map is divided into multiple levels for storage, and the corresponding raster map is stored under each level.
- a tile which is an example of a tile under two adjacent display levels, displays four adjacent tiles at a lower display level (ie, 2 ⁇ 2 of 4 adjacent tiles in a “Tian” shape).
- the adjacent tiles correspond to a tile under a display level with a high display level. Therefore, the pixel size of a single tile at different levels is different, and according to the current display level of the map, the pixel size of a single tile of the current display level, such as the pixel width and the pixel height, can be obtained.
- the two opposite vertices of the visible area of the map include the upper left vertex and the lower right vertex of the visible area of the map, or the upper right vertex and the lower left vertex of the visible area of the map, which can be uniquely through two opposite vertex Determine the extent of the map's viewable area.
- the overlapping points in the two maps before and after the zoom indicate the same geographical position.
- the point where the geographical position represented by the map before and after the zoom is unchanged is defined as the center of the zoom focus, and the geographic coordinates according to the center of the zoom focus. (ie, latitude and longitude coordinates) and the target display level after the map is zoomed, the pixel coordinates (for example, XY coordinates) of the center of the zoom focus can be obtained.
- the zoom focus center of the embodiment can be the position of the mouse when receiving the zoom map command input by the user through the mouse wheel, or input the user through the page button (such as the "+", "-” button)
- the zoom map command can be the center of the map. Calculating the number of tiles in the visible area after map zooming based on the zoom focus center can simplify the calculation flow and reduce the amount of calculation.
- the method of the embodiment further includes the following steps, when receiving the zoom map instruction input by the user, calculating the number of the tile in the visible area after the map zooming: when receiving the instruction to zoom the map, according to The geographic location coordinates of the center of the zoom focus of the map and the target display level after the zoom of the map, the pixel coordinates of the center of the zoom focus are obtained by scaling; the pixel size of the single tile under the target display level is obtained according to the target display level; The pixel size and the pixel coordinates of the center of the zoom focus, the pixel coordinates of the two opposite vertices of the visible area after the map is zoomed; and the pixel coordinates and the target display of the two opposite vertices of the visible area after zooming according to the map
- the pixel size of a single tile under the level gets the number of tiles within the viewable area after the map is scaled.
- Step S400 in FIG. 1 specifically includes step S401 and step S402 (not shown) as follows:
- step S402. Select a horizontal index number (including a horizontal index number of a tile where two opposite vertices are located) between horizontal index numbers of tiles where two opposite vertices are located, and a tile located at two opposite vertices.
- the vertical index number between the vertical index numbers (including the vertical index number of the tile where the two opposite vertices are located), that is, the tile number in the visible area of the map.
- step S402 the number of the tiles in the square visible area is obtained.
- the method for calculating the tiles in the visible area of the electronic map according to the second embodiment of the present invention includes steps S100' to S500' (not shown), wherein steps S100' to S400' are respectively performed with the steps of the first embodiment.
- steps S100 to step S400 are the same and will not be described again.
- Step S500' is: calculating the number of the preloaded tile corresponding to the visible area in the at least one preloading level according to the geographic location coordinates of the center point of the visible area of the map and the preloading level.
- the preload level is at least one level within a set range from the current display level, for example, assuming that the current display level is the 10th level, if the set range is up to 3 levels higher than the current display level and than the current display level Low up to level 2, the preload level includes levels 9, 8, and 7 that are higher than level 10 and levels 11 and 12 that are lower than level 10.
- the step S500' specifically includes the steps S501' to S504' (not shown) as follows:
- the pixel coordinates of the center point are obtained.
- the geographic location coordinates of the central point of the visible area of the map are the latitude and longitude coordinates or the coordinates obtained by projecting the latitude and longitude coordinates onto the planar map by the projection algorithm, and can be converted by the geographic location coordinates and the preloading level.
- S502' obtains a pixel size of a single tile of a preload level according to a preload level of the map.
- the pixel size of a single tile at the preload level can be obtained, such as pixel width and pixel height.
- S503' obtains pixel coordinates of two opposite vertices of the map visible area according to the pixel size of the visible area of the map and the pixel coordinates of the center point.
- the two opposite vertices of the visible area of the map include the upper left vertex and the lower right vertex of the visible area of the map, or the upper right vertex and the lower left vertex of the visible area of the map, and the visible area of the map can be uniquely determined by two opposite vertex The scope.
- step S504' obtaining the number of the preloaded tile corresponding to the visible area in the preload level according to the pixel coordinates of the two opposite vertices of the visible area of the map and the pixel size of the single tile of the preload level.
- the specific method of implementing step S504' is similar to steps S401 and S402 as described above, and will not be described again.
- step S500' further includes an operation of obtaining the number of the tile around the preloaded tile at the preload level according to the obtained number of the preloaded tile. Specifically, the obtained horizontal index number and vertical index number are appropriately expanded.
- a method for calculating a tile in a visible area of an electronic map according to a third embodiment of the present invention includes steps S100" to S500" (not shown), wherein steps S100" to “S400” are respectively performed with steps of the first embodiment S100 to step S400 are the same and will not be described again.
- Step S500 according to the level difference between the preloading level and the current display level, the tile number in the visible area of the map under the current display level is subjected to a rounding operation or a multiplication operation, and at least one preloading level is calculated and The number of the preloaded tile corresponding to the tile in the view area.
- the preload level is at least one level within the set range of the level difference from the current display level.
- step S500 according to the level difference between the preloading level and the current display level, the tile number in the visible area of the map under the current display level is subjected to a rounding operation or a multiplication operation, including: if the preloading level is high At the current display level, the horizontal index number and the vertical index number of the tiles in the visible area of the map under the current display level are respectively divided by m and rounded.
- the specific rounding algorithm It can be selected according to the index number of the tile splitting origin. If the index number of the tile split origin is zero, it can be rounded down (similar to the floor function), otherwise it is rounded up (similar to the ceiling function).
- the step S500 of the third embodiment reduces the computational complexity while ensuring the accuracy.
- step S500" further includes: obtaining, according to the obtained number of preloaded tiles, an operation of pre-loading the number of tiles around the tile at a preload level. Specifically, the obtained horizontal index number and vertical index The number is appropriately expanded.
- step S500' of the second embodiment of the present invention and the step S500 of the third embodiment achieve the technical effect achieved by calculating the number of the preloaded tile, specifically, the electronic map client is reduced.
- the apparatus includes a fixed point operation unit 100, a tile analysis unit 200, a vertex analysis unit 400, and a tile operation unit 400.
- the fixed point computing unit 100 is adapted to convert the pixel coordinates of the center point according to the geographic location coordinates of the center point of the map visible area and the current display level of the map.
- the geographic location coordinates of the center point of the visible area of the map are the latitude and longitude coordinates or the coordinates of the latitude and longitude coordinates projected onto the plane map by the projection algorithm, and the fixed point operation unit 100 passes the geographic location coordinates and the current display level of the map.
- the pixel coordinates (for example, XY coordinates) of the center point can be converted.
- the tile analysis unit 200 is adapted to obtain a pixel size of a single tile of the current display level according to a current display level of the map.
- the pixel sizes of the individual tiles at different levels are different, and the tile analysis unit 200 can obtain the pixel size of the single tile of the current display level, such as the pixel width and the pixel height, according to the current display level of the map.
- the vertex analysis unit 300 is adapted to obtain pixel coordinates of two opposite vertices of the map visible area according to the pixel size of the visible area of the map and the pixel coordinates of the center point.
- the two opposite vertices of the map viewable area of the embodiment include: an upper left vertex and a lower right vertex of the map visible area, or an upper right vertex and a lower left vertex of the map visible area, which are unique through two opposite vertex Determine the extent of the visible area of the map.
- the tile operation unit 400 is adapted to obtain the tile number in the visible region according to the pixel coordinates of the two opposite vertices of the visible area of the map and the pixel size of the single tile of the current display level.
- the vertex analysis unit 300 of the embodiment is adapted to obtain a horizontal index number and a vertical index number of a tile where two opposite vertices are located; the tile operation unit 400 is adapted to select a tile located at two opposite vertices.
- the horizontal index number between the horizontal index numbers and the vertical index number between the longitudinal index numbers of the tiles where the two opposite vertices are located that is, the tile number in the visible area of the map.
- the apparatus of this embodiment further includes a preload tile calculation unit 500.
- the preloading tile operation unit 500 is adapted to calculate a number of the preloaded tile in the preload level, wherein the preloading level is at least one level within a set range of the level difference from the current display level.
- the first specific implementation manner is to calculate at least one preloading level and the map according to the geographic location coordinates and the preloading level of the center point of the visible area of the map. The number of the preloaded tile corresponding to the visible area.
- a second specific implementation manner of the preloading tile operation unit 500 of this embodiment is to divide the tile number in the visible area of the map under the current display level according to the level difference between the preload level and the current display level.
- An operation or multiplication operation that calculates a number of preloaded tiles corresponding to tiles in the visible area in at least one preload level.
- FIG. 3 is a flow chart showing an electronic map tile request queue processing method according to a first embodiment of the present invention. The method includes the following steps 310 and S320:
- S310 Determine, according to the received electronic map interaction indication, a target level tile request to be downloaded and a preload level tile request.
- the target display level can be determined according to the electronic map interaction indication input by the user, in other words, the target display level is the display level of the electronic map after the operation is completed.
- the map is magnified in the art to show lower level tiles, and the higher level tiles represent a larger map range than the lower level tiles. Therefore, if the electronic map interactive indication indicates that the electronic map is enlarged, the target display level is lower than the current display level; if the electronic map interactive indication indicates that the electronic map is reduced, the target display level is higher than the current display level; if the electronic map interactive indication indicates a panning electronic map
- the target display level is equal to the current display level.
- the target level tile is a tile that needs to be displayed in the map display area after responding according to the electronic map interactive indication input by the user. The method of determining the target level tile to be downloaded will not be described again.
- the method for determining a preload level tile request to be downloaded includes: selecting a preload display level based on a target display level, and finding a preload level tile corresponding to the target level tile in the preloaded display level.
- the preloaded display level is higher than the target display level.
- the method for searching for the preload level tile may be to obtain the number of the preload level tile by the division rounding operation according to the number of the target level tile according to the correspondence relationship with the target level tile.
- the map range represented by the preload level tile may be larger than the map range represented by the multiple target level tiles.
- the preload level tile request is processed by a preset thread
- the target level tile request is processed by a preset other thread
- the preload level tile request and the target level tile request are processed, It can be parallel, or it can be a priority to handle preload level tile requests.
- step S320 in this embodiment may be to manage the electronic map tile request queue by using a first in first out (FIFO) algorithm, or to set a priority level for the request or prioritize the thread for the newly added request.
- FIFO first in first out
- the target level tile request and the preload level tile request newly added to the electronic map tile request queue can be preferentially processed, and the electronic input interaction instruction can be reduced because the user inputs the electronic map interactive instruction multiple times in a short time.
- the probability that the map window has a blank can be preferentially processed, and the electronic input interaction instruction can be reduced because the user inputs the electronic map interactive instruction multiple times in a short time. The probability that the map window has a blank.
- the target level tile request and the preload level tile request are added to the electronic map tile request queue, specifically according to the preload level tile and the map zoom.
- the distance from the focus center in the order of small to large will be added to the image request queue from the server to download the preload level tile, and from the server in the order of the target level tile and the zoom focus center of the map from small to large.
- the request to download the target level tile is added to the image request queue.
- the zoom focus of this embodiment can be the position of the mouse when receiving the enlarged map command input by the user through the mouse wheel, or can receive the user through the page button (such as the "+" button of Baidu map or Tencent map).
- the enlarged map command entered can be the center of the map. Adding a request to download a preload level tile from the server into the picture request queue in a small to large order in accordance with the distance from the center of the zoom focus of the map enables the tile located near the center of the zoom focus to be preferentially requested.
- step S310 of the present invention describes the operation of determining the preload level tile request to be downloaded in step S310 of the present invention and the request to add the preload level tile request to the electronic map tile in step S310 according to the description of the electronic map loading display.
- the target level tile request and the preload level tile request are added to the electronic map tile request queue, and the target level tile and the preload level tile may be acquired from the server.
- the preloaded tiles are loaded and enlarged according to the level difference between the preloaded display level and the target display level.
- the loading speed is fast, reducing the probability of displaying blank tiles on the electronic map.
- the electronic map tile request queue processing method of the second embodiment of the present invention includes steps S310', S320', and S330'.
- Step S310' is the same as step S310 in FIG. 3
- step S330' is the same as step S320 in FIG. 1, and will not be described again.
- the second embodiment is different from the first embodiment in that step S320' is further included:
- the length of the picture request queue can be prevented from being too long, thereby solving the user's low network speed environment. Keeping moving or zooming the map may cause problems with the system being overburdened and the difficulty of getting the tiles you need due to the long length of the image request queue.
- canceling a partial request or all requests in the tile request queue includes: setting a source attribute (src) of a partial request or all requests in the tile request queue to a file already cached. In other words, aborting a request to the server by setting the src of the image request to an already cached picture.
- src source attribute
- step S320' further includes: when canceling a partial request or all requests in the tile request queue, determining whether to forcibly clear the request being executed, and if the determination is yes, forcibly clearing the request being executed, if it is determined to be No, the request being executed is interrupted and the request being executed is canceled when it is detected that the number of requests in the tile request queue reaches a maximum.
- canceling a partial request in the tile request queue includes: canceling an early partial request to join the tile request queue according to a time sequence of joining the tile request queue.
- the apparatus includes a target tile selection unit 410 and a queue management unit 420.
- the tile selection unit 410 is adapted to determine a target level tile request to be downloaded and a preload level tile request according to the received electronic map interaction indication.
- the tile selection unit 410 is adapted to select a preloaded display level based on the target display level, and find a preloading level tile corresponding to the target level tile in the preloaded display level.
- the queue management unit 20 is adapted to add the target level tile request and the preload level tile request into the electronic map tile request queue, and process the data in preference to the original tile request in the original queue.
- the queue management unit 420 of the embodiment is adapted to process the preload level tile request by using a preset thread, by using a preset The other threads process the target level tile request; the processing of the preload level tile request and the target level tile request by the queue management unit 420 may be parallel or may preferentially process the preload level tile request.
- the queue management unit 420 of this embodiment may use a first in first out (FIFO) algorithm to manage the electronic map tile request queue, or may set a priority level for the request or prioritize the thread for the newly added request.
- FIFO first in first out
- the queue management unit 420 downloads the preload level tile from the server in descending order of the distance between the preload level tile and the zoom focus center of the map.
- the request is added to the picture request queue, and the request to download the target level tile from the server is added to the picture request queue in descending order of the distance between the target level tile and the zoom focus center of the map.
- the queue management unit 420 of this embodiment is further adapted to cancel a partial request or all requests in the tile request queue before adding the target level tile request and the preload level tile request to the tile request queue.
- the queue management unit 420 of the embodiment is adapted to set a source attribute of a partial request or all requests in the tile request queue to a file already cached, thereby canceling a partial request or all requests in the tile request queue.
- the queue management unit 420 of the embodiment is adapted to determine whether to forcibly clear the request being executed when canceling a partial request or all requests in the tile request queue, and if the determination is yes, forcibly clear the request being executed, if it is determined If not, the request being executed is interrupted and the request being executed is canceled when it is detected that the number of requests in the tile request queue reaches a maximum.
- the queue management unit 420 of this embodiment is adapted to cancel the partial request for joining the tile request queue in the time sequence of joining the tile request queue.
- FIG. 5 illustrates a flow chart of a method of controlling electronic map zooming in accordance with one embodiment of the present invention.
- the method includes the following steps S510 to S540:
- the target display level is determined according to an instruction of the enlarged map input by the user.
- the target display level is the display level of the electronic map after the operation is completed.
- the map is magnified in the art, and the lower level tiles are displayed.
- the higher level tiles represent a larger map range than the lower level tiles, so the target display level is lower than the current display level.
- the method for finding the target tile may be to refer to the method shown in FIG. 1 to calculate the target tile according to the geographic location coordinates of the center point of the visible area of the map and the target display level.
- the preload display level is higher than the target display level, and further, the preload display level is independent of the current display level.
- the electronic map is saved by using a hierarchical tile mechanism, and the map is divided into multiple levels for storage, and the corresponding raster map is stored under each level.
- a tile which is an example of a tile under two adjacent display levels, displaying four adjacent tiles at a display level of a lower level (ie, 2 ⁇ 2 of four adjacent tiles in a “Tian” shape) Corresponding to a tile under a display level with a high display level; taking two layers of tiles with a level difference of two as an example, displaying sixteen adjacent tiles at a display level with a low level (ie, 4 ⁇ 4 Sixteen adjacent tiles) correspond to one tile at a display level with a high display level.
- the method for searching for a pre-loaded tile may be performed by referring to the method shown in FIG. 1 , and calculating the pre-loaded tile according to the geographic location coordinates of the center point of the visible area of the map and the preloaded display level, or may be The number of the preloaded tile is obtained by the division operation according to the number of the target tile by using the correspondence with the target tile.
- the map range represented by the pre-loaded tiles may be larger than the map range represented by the plurality of target tiles.
- the present embodiment quickly displays the blurred pre-loaded tile by selecting the preloaded display level and loading and enlarging the pre-loaded tile, thereby reducing the probability of displaying the blank tile on the electronic map.
- step S520 and step S530 by performing step S520 and step S530, it is possible to select a preloaded display level higher than the target display level and display the enlarged preloaded tile in the preloaded display level.
- the preloaded display level is not high.
- the display level may be displayed first. The preloaded display level enlarges the preloaded tiles, and then displays the zoomed preloaded tiles in the lower level preloaded display level, which also achieves the display of the map from blurred to clear.
- the preload display level can also be the current display level.
- the method further includes: setting a local cache; saving the displayed tiles in a local cache. More specifically, the present embodiment controls the frequency of requesting tiles by creating a local cache. When zooming in on the map, it is possible to preferentially display the tiles that have already been cached, reducing the probability that the user sees the blank, and using the cache can increase the loading speed. In the case where the server does not add the cache header, the repeated request tile can be avoided.
- the method of this embodiment further includes: when the displayed tile is saved in the local cache, if the capacity of the local cache is insufficient, the least recently used tile is removed from the local cache. In other words, the implementation of the cache adopts the LRU (Least Recently Used) policy, and when the tiles in the cache exceed the capacity set by the cache, the least recently used tiles are preferentially eliminated.
- LRU Least Recently Used
- the method for selecting a preloading display level in the above step S520 is to select a plurality of levels higher than the target display level, and select a preloaded display level from each level, specifically, determining that each level corresponds to the target tile.
- the tiles are in the cache or need to be downloaded by the server.
- the minimum number of tiles that need to be downloaded by the server is the preloaded display level to speed up the download of preloaded tiles from the server, further if the tiles are downloaded by the server. If the number of slices is the same, then the higher priority level is the preloaded display level to reduce the number of preloaded tiles to be processed to further speed up the processing.
- the obtaining the pre-loaded tile and the target tile in the priority order of the foregoing step S530 specifically includes: determining whether the pre-loaded tile and the target tile are in the local cache, and if the determination is yes, reading from the local cache The pre-loaded tile and the target tile are fetched, and if the determination is no, the pre-loaded tile and the target tile are downloaded from the server.
- the loading speed can be increased by preferentially obtaining the tiles in the cache.
- Downloading the pre-loaded tile and the target tile from the server includes: adding a request for downloading the pre-loaded tile from the server to the image request queue according to the distance from the center of the zoom focus of the pre-loaded tile and the map, in descending order And a request to download the target tile from the server is added to the image request queue in descending order of the distance between the target tile and the zoom focus center of the map.
- the zoom focus of this embodiment can be the position of the mouse when receiving the enlarged map command input by the user through the mouse wheel, or when receiving the enlarged map command input by the user through the page button (such as the "+" button) Can be the center of the map. Adding a request to download a preloaded tile from the server into the image request queue in a small to large order in accordance with the distance from the center of the zoom focus of the map enables the tiles located near the center of the zoom focus to be preferentially loaded.
- Step S540 loads and displays the target tile to replace the enlarged preloaded tile of the corresponding location, specifically including the following steps:
- the enlarged pre-loaded tile is removed and the target tile is displayed. Specifically, when the loading of the plurality of target tiles corresponding to one of the enlarged pre-loaded tiles is completed, the enlarged pre-loaded tiles are removed, and the target tiles that are loaded are displayed, and the electronic map is clearer.
- different rendering mechanisms are provided according to different browser versions, and the rendering tile performance is improved to ensure the loading and zooming display of the preloading tile operation in step S530 and the loading in step S540 and displaying the target tile operation.
- the fluency For example, for the browser that supports the webgl interface, provide the WebglRenderer rendering mechanism; for the browser that supports the HTML5 tag Canvas, provide the CanvasRenderer rendering mechanism; for the browser that supports CSS3, provide the CSSRenderer rendering mechanism; for the lower version of IE6, IE7, IE8, etc.
- Browser that provides a FlashRendere rendering mechanism; provides a DivRenderer rendering mechanism for all browsers.
- Figure 7 shows a block diagram of an apparatus for controlling electronic map zooming in accordance with one embodiment of the present invention.
- the apparatus includes a target tile operation unit 710, a preload tile operation unit 720, and a load unit 730.
- the target tile operation unit 710 is adapted to determine the zoomed target display level when receiving the instruction to enlarge the map, and find a plurality of target tiles to be displayed in the target display level.
- the preloading tile operation unit 720 is adapted to select a preloaded display level based on a relationship between the current display level and the target display level, and find a preloaded tile corresponding to the target tile in the preloaded display level.
- the loading unit 730 is adapted to acquire the pre-loaded tile and the target tile in priority order, load and enlarge the pre-loaded tile according to the level difference between the preloaded display level and the target display level; and when the target tile is acquired , the target tile is loaded and displayed to replace the enlarged preload tile of the corresponding location.
- the loading unit 730 is adapted to add a request for downloading the pre-loaded tile from the server to the image request queue according to the distance between the preloaded tile and the zoom focus center of the map, and according to the target tile.
- the request to download the target tile from the server is added to the image request queue in the order of the distance from the center of the zoom focus of the map.
- the loading unit 7300 is adapted to increase the transparency of the enlarged preloaded tile while loading the target tile; when the operation of loading the target tile is completed, removing the enlarged preloaded tile and displaying the target Tiles.
- the target tile operation unit 710 is adapted to convert the pixel coordinates of the enlarged center point according to the geographic location coordinates of the zoomed center point of the map visible area and the target display level of the map; according to the target display level of the map, Obtaining a pixel size of a single target tile to be displayed; obtaining pixel coordinates of two opposite vertices of the visible area of the map according to the pixel size of the visible area of the map and the pixel coordinates of the enlarged center point; The pixel coordinates of the opposite vertices and the pixel size of the single target tile to be displayed result in the target tile within the visible area.
- the apparatus of this embodiment further includes a buffer unit 740.
- the cache unit 740 is adapted to set a local cache and save the displayed tiles in a local cache.
- a local cache is created by the cache unit 740 to control the frequency of requesting the tiles.
- the cache unit 740 saves the displayed tile in the local cache, if the capacity of the local cache is insufficient, the cache unit 740 removes the least recently used tile from the local cache.
- the loading unit 730 of the embodiment is adapted to determine whether the pre-loaded tile and the target tile are in the local cache, and if the determination is yes, the pre-loaded tile and the target tile are read from the local cache, if If the determination is no, the pre-loaded tile and the target tile are downloaded from the server.
- the loading speed can be increased by preferentially obtaining the tiles in the cache.
- FIG. 8 illustrates a flow chart of a method of controlling electronic map reduction in accordance with one embodiment of the present invention.
- the method includes the following steps S810 to S840:
- the target display level is determined according to the instruction of the user to input the reduced map.
- the target display level is the display level of the electronic map after the operation is completed.
- the map is reduced, and a higher level tile is displayed.
- the higher level tile represents a larger map range than the lower level tile, so the target display level is higher than the current display level.
- the method for finding the target tile may be to calculate the target tile according to the geographic location coordinates of the center point of the visible area of the map and the target display level by referring to the method shown in FIG. 2 . Display the target tile to get a clear and reduced electronic map.
- S830 Select a preloaded display level, and find a preloaded tile to be loaded in an edge region in the preloaded display level.
- the preloading display level is higher than the target display level
- the electronic map is saved by using a hierarchical tile mechanism, and the map is divided into multiple levels for storage, and the corresponding raster map is stored under each level.
- a tile which is an example of a tile under two adjacent display levels, displays four adjacent tiles at a lower display level (ie, 2 ⁇ 2 of four adjacent tiles in a “Tian” shape).
- the adjacent tiles correspond to a tile under a display level with a high display level.
- the method for searching for a pre-loaded tile may be performed by referring to the method shown in FIG. 1 , and calculating the pre-loaded tile according to the geographic location coordinates of the reduced center point of the visible area of the map and the preloaded display level.
- the number of the preloaded tile is obtained by the division operation according to the number of the target tile by using the correspondence with the target tile.
- the map range represented by the pre-loaded tiles may be larger than the map range represented by the plurality of target tiles.
- the present embodiment quickly displays the blur definition by loading and reducing the currently displayed tiles, selecting the preload display level, and loading and magnifying the preloaded tiles. Low preloaded tiles reduce the probability that an electronic map will display blank tiles.
- step S830 and step S840 it is possible to select a preload display level higher than the target display level and display the enlarged preload tile in the preload display level.
- steps S830 and S840 it is also possible to select a plurality of preloaded display levels higher than the target display level and display the enlarged preloaded tiles in the plurality of preloaded display levels.
- the level may be displayed first.
- the high preloaded display level enlarges the preloaded tiles, and then displays the zoomed preloaded tiles in the lower level preloaded display level, which also enables the map display to be blurred to clear.
- the preload display level can also be the current display level.
- the method further includes the steps of setting a local cache and saving the displayed tiles in a local cache as described above. More specifically, the method of this embodiment further includes: when the displayed tile is saved in the local cache, if the capacity of the local cache is insufficient, the least recently used tile is removed from the local cache.
- the method for selecting the preloading display level in the above step S830 is to select a plurality of levels higher than the target display level, and select a preloaded display level from each level, specifically, determine preloaded tiles in each level.
- the server select the minimum number of tiles that need to be downloaded by the server to preload the display level to speed up the download of pre-loaded tiles from the server, further if the number of tiles to be downloaded by the server is the same
- the higher priority level is the preloaded display level to reduce the number of preloaded tiles to be processed to further speed up the processing.
- the obtaining the pre-loaded tile and the target tile in the priority order of the foregoing step S840 specifically includes: determining whether the pre-loaded tile and the target tile are in the local cache, and if the determination is yes, reading from the local cache The pre-loaded tile and the target tile are fetched, and if the determination is no, the pre-loaded tile and the target tile are downloaded from the server.
- the loading speed can be increased by preferentially obtaining the tiles in the cache.
- Step S850 of this embodiment specifically includes the following steps:
- S851 increasing the transparency of the reduced currently displayed tile and the enlarged preloaded tile while loading the target tile.
- the reduced currently displayed tile and the enlarged preloaded tile are gradually made transparent.
- the reduced currently displayed tile and the enlarged preloaded tile and the display target tile are removed. Specifically, when the loading of the plurality of target tiles corresponding to a reduced currently displayed tile or an enlarged preloaded tile is completed, the reduced currently displayed tile or the enlarged preloaded tile is removed, and the display is displayed. Load the completed target tiles to make the electronic map clearer.
- Figure 9 illustrates a block diagram of an apparatus for controlling electronic map reduction in accordance with one embodiment of the present invention.
- the apparatus includes a target tile operation unit 910, a preload tile operation unit 920, a second load unit 930, and a first load unit 940.
- the target tile operation unit 910 is adapted to determine, when receiving the instruction to zoom out the map, the reduced target display level, and find a plurality of target tiles to be displayed in the target display level; wherein the target display level is higher than the current display level high.
- the preloading tile operation unit 920 is adapted to select a preloaded display level to find a preloaded tile to be loaded in an edge region in the preloaded display level.
- the preloading tile operation unit 920 is adapted to select a preloaded display level higher than the target display level, and the map range represented by the preloaded tile includes the map range represented by the currently displayed tile.
- the map range represented by the plurality of target tiles that is, the complete map range that needs to be displayed in the display area after zooming off, the map range represented by the reduced current display tile, that is, the above-mentioned "edge region", and each preloading
- the second loading unit 930 is adapted to obtain the pre-loaded tile and the target tile according to the priority order, and load and enlarge the pre-loaded tile according to the level difference between the preloaded display level and the target display level; when the target tile is acquired After that, the target tile is loaded and displayed to replace the reduced currently displayed tile and the enlarged preloaded tile of the corresponding location.
- the second loading unit 930 increases the transparency of the reduced currently displayed tile and the enlarged preloaded tile while loading the target tile, in other words, when the second loading unit 930 loads the target tile.
- the progressively displayed tile and the enlarged preloaded tile are gradually made transparent.
- the second loading unit 930 removes the reduced currently displayed tile and the enlarged preloaded tile and the display target tile. Specifically, when a plurality of target tiles corresponding to a reduced currently displayed tile or an enlarged preloaded tile are loaded, the second loading unit 930 removes the reduced currently displayed tile or the enlarged pre- Load the tile to display several target tiles that have been loaded to make the electronic map clearer.
- the target tile operation unit 910 is adapted to convert the pixel coordinates of the reduced center point according to the geographic location coordinates of the zoomed center point of the map visible area and the target display level of the map; and according to the target display level of the map, Obtaining a pixel size of a single target tile to be displayed; obtaining pixel coordinates of two opposite vertices of the visible area of the map according to the pixel size of the visible area of the map and the pixel coordinates of the reduced center point; The pixel coordinates of the opposite vertices and the pixel size of the single target tile to be displayed result in the target tile within the visible area.
- the target tile operation unit 910 obtains a target tile in the visible region according to the pixel coordinates of two opposite vertices of the visible area of the map and the pixel size of the single target tile to be displayed, specifically By obtaining the horizontal index number and the vertical index number of the target tile where the two opposite vertices are located; and selecting the horizontal index number between the horizontal index numbers of the target tiles where the two opposite vertices are located and the vertical index number is located at two The target tiles between the longitudinal index numbers of the target tiles where the relative vertices are located, thereby obtaining the target tiles within the visible area of the map.
- the target tile operation unit 910 obtains the difference between the difference of the abscissa and the ordinate by subtracting the pixel coordinates of the origin of the map by using the pixel coordinates of the vertex for the vertex, and dividing the difference of the abscissa by a single target tile.
- the width of the slice is given the horizontal index number, and the vertical index number is obtained by dividing the difference of the ordinate by the height of the single target tile.
- the apparatus further includes: a buffer unit 950.
- the cache unit 950 is adapted to set a local cache and save the displayed tiles in a local cache.
- the cache unit 950 saves the displayed tile in the local cache, if the capacity of the local cache is insufficient, the cache unit 950 removes the least recently used tile from the local cache.
- the second loading unit 930 of the embodiment is adapted to determine whether the pre-loaded tile and the target tile are in a local cache. If the determination is yes, the pre-loaded tile and the target tile are read from the local cache. If the determination is no, the pre-loaded tile and the target tile are downloaded from the server. The loading speed can be increased by preferentially obtaining the tiles in the cache.
- Figure 10 illustrates a flow chart of a method of controlling electronic map panning in accordance with one embodiment of the present invention.
- the method includes the following steps S1010 to S1040:
- S1010 When receiving the instruction to pan the map, find a plurality of target tiles to be loaded and displayed.
- S1020 Select a preloaded display level based on the current display level, and find a preloaded tile corresponding to the target tile in the preloaded display level.
- the preload display level is higher than the current display level.
- the map range represented by the pre-loaded tiles may be larger than the map range represented by the plurality of target tiles.
- S1030 Acquire pre-loaded tiles and target tiles in priority order, and load and enlarge the pre-loaded tiles according to a level difference between the preloaded display level and the current display level.
- the present embodiment quickly displays the blurred preloaded tiles by selecting the preloaded display level and loading and enlarging the preloaded tiles, thereby reducing the probability of displaying the blank tiles on the electronic map. .
- step S1020 and step S1030 by performing step S1020 and step S1030, it is possible to select a preload display level higher than the current display level and display the enlarged preload tile in the preload display level.
- step S1020 and step S1030 By repeatedly performing step S1020 and step S1030, it is also possible to select a plurality of preloaded display levels higher than the current display level and display the enlarged preloaded tiles in the plurality of preloaded display levels.
- the display level may be displayed first. Enlarged preloaded tiles in the preloaded display level, then zoomed in to the lower preloaded display level The tiles are also displayed to achieve a clear and clear display of the map.
- the method further includes: setting a local cache; saving the displayed tiles in a local cache. More specifically, the method of this embodiment further includes: when the displayed tile is saved in the local cache, if the capacity of the local cache is insufficient, the least recently used tile is removed from the local cache.
- the method for selecting a preloading display level in the above step S1020 is to select a plurality of levels higher than the current display level, and select a preloaded display level from each level, specifically, determining that each level corresponds to the target tile.
- the tiles are in the cache or need to be downloaded by the server.
- the minimum number of tiles that need to be downloaded by the server is the preloaded display level to speed up the download of preloaded tiles from the server, further if the tiles are downloaded by the server. If the number of slices is the same, then the higher priority level is the preloaded display level to reduce the number of preloaded tiles to be processed to further speed up the processing.
- the obtaining the pre-loaded tile and the target tile in the priority order of the foregoing step S1030 specifically includes: determining whether the pre-loaded tile and the target tile are in the local cache, and if the determination is yes, reading from the local cache The pre-loaded tile and the target tile are fetched, and if the determination is no, the pre-loaded tile and the target tile are downloaded from the server.
- the loading speed can be increased by preferentially obtaining the tiles in the cache.
- Step S1040 of this embodiment specifically includes the following steps:
- S1041 Increase the transparency of the enlarged preloaded tile while loading the target tile.
- the enlarged preloaded tiles are gradually made transparent when the target tile is loaded.
- S1042 When the operation of loading the target tile is completed, the enlarged pre-loaded tile is removed and the target tile is displayed. Specifically, when the loading of the plurality of target tiles corresponding to one of the enlarged pre-loaded tiles is completed, the enlarged pre-loaded tiles are removed, and the target tiles that are loaded are displayed, and the electronic map is clearer.
- FIG. 11 shows a block diagram of an apparatus for controlling panning of an electronic map in accordance with one embodiment of the present invention.
- the apparatus includes a target tile operation unit 1110, a preload tile operation unit 1120, and a load unit 1130.
- the target tile operation unit 1110 is adapted to find a plurality of target tiles to be loaded and displayed when receiving the instruction to pan the map.
- the preloading tile operation unit 1120 is adapted to select a preloaded display level based on the current display level, and find a preloaded tile corresponding to the target tile in the preloaded display level.
- the map range represented by the pre-loaded tiles may be larger than the map range represented by the plurality of target tiles.
- a loading unit 1130 configured to acquire pre-loaded tiles and target tiles according to a priority order, load and enlarge display pre-loaded tiles according to a level difference between a preloaded display level and a current display level; and when the target tiles are acquired , the target tile is loaded and displayed to replace the enlarged preload tile of the corresponding location.
- the loading unit 1130 is adapted to increase the transparency of the enlarged pre-loaded tile while loading the target tile; when the operation of loading the target tile is completed, the enlarged pre-loaded tile and the display target are removed. Tiles.
- the apparatus further includes: a cache unit 1140.
- the cache unit 1140 is adapted to set a local cache and save the displayed tiles in a local cache.
- a local cache is created by the cache unit 1140 to control the frequency of requesting the tiles.
- the cache unit 1140 saves the displayed tile in the local cache, if the capacity of the local cache is insufficient, the cache unit 1140 removes the least recently used tile from the local cache.
- the loading unit 1130 of the embodiment is adapted to determine whether the pre-loaded tile and the target tile are in a local cache, and if the determination is yes, read the pre-loaded tile and the target tile from the local cache, if If the determination is no, the pre-loaded tile and the target tile are downloaded from the server.
- the loading speed can be increased by preferentially obtaining the tiles in the cache.
- Figure 12 shows a schematic diagram of an electronic map client implemented in accordance with the present invention.
- the electronic map client performs operations such as zooming in, zooming out, and panning according to the user's instruction, the probability that the electronic map window has a blank is small, and the electronic map exhibits a fuzzy to clear display process, so that the map level is not switched. obvious.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement a device for controlling electronic map zooming, a device for controlling electronic map zooming, according to an embodiment of the present invention, Control electronics A device for map panning, a device for computing tiles within a viewable area of an electronic map, and some or all of the functionality of some or all of the components of the electronic map tile request queue processing device.
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
- Figure 13 shows a schematic diagram of a computing device, such as a terminal device, or an application server, for performing a control electronic map implemented in accordance with the present invention.
- the computing device conventionally includes a processor 1310 and a computer program product or computer readable medium in the form of a memory 1320.
- the memory 1320 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
- Memory 1320 has a storage space 1330 for program code 1331 for performing any of the method steps described above.
- the storage space 1330 for program code may include respective program codes 1331 for implementing various steps in the above methods, respectively.
- the program code can be read from or written to one or more computer program products.
- These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
- Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
- the storage unit may have a storage segment, a storage space, and the like that are similarly arranged to the storage 1420 in the computing device of FIG.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit includes computer readable code 1431', ie, code that can be read by, for example, a processor, such as processor 1310, which, when executed by a server, causes the server to perform each of the methods described above. step.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Remote Sensing (AREA)
- Navigation (AREA)
- Controls And Circuits For Display Device (AREA)
- Instructional Devices (AREA)
Abstract
本发明公开了控制电子地图放大的装置和方法、控制电子地围缩小的装置和方法,控制电子地图平移的装置和方法、计算电子地图可视区域内的瓦片的装置和方法以及电子地图瓦片请求队列处理装置和方法,其中控制电子地图放大的方法包括:在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
Description
本发明涉及电子地图技术领域,具体涉及一种控制电子地图放大的装置和方法、一种控制电子地图缩小的装置和方法、一种控制电子地图平移的装置和方法、一种计算电子地图可视区域内的瓦片的装置和方法,以及一种电子地图瓦片请求队列处理装置和方法。
目前电子地图客户端,在根据使用者的放大地图的指令放大地图(参阅百度地图、GOOGLE地图、腾讯地图等电子地图网络客户端,点击放大按钮即“+”按钮,可知电子地图技术领域中放大地图表示在相同的电子地图显示范围内显示的地理范围小,地理细节更详细)时,需要加载与当前显示级别不同的较低级别的瓦片,由于需要向服务器请求瓦片以及对瓦片进行图像渲染等处理,所以在放大电子地图时,因为需要较多的时间所以不能及时显示一些瓦片,电子地图窗口中会存在空白;网络性能不佳时,电子地图的空白更明显。而且在电子地图级别之间的切换非常明显。在根据使用者的指令缩小地图或者平移地图时,存在同样的问题。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的控制电子地图放大的装置和方法、一种控制电子地图缩小的装置和方法、一种控制电子地图平移的装置和方法、一种计算电子地图可视区域内的瓦片的装置和方法,以及一种电子地图瓦片请求队列处理装置和方法。
依据本发明的一个方面,提供了一种控制电子地图放大的装置,该装置包括:目标瓦片运算单元,适于在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,当前显示级别比目标显示级别高;预加载瓦片运算单元,适于基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
根据本发明的另一方面,提供了一种控制电子地图缩小的装置,该装置包括:目标瓦片运算单元,适于在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高;第一加载单元,适于按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片;预加载瓦片运算单元,适于选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片;第二加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。
根据本发明的另一方面,提供了一种控制电子地图平移的装置,该装置包括:目标瓦片运算单元,适于在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片;预加载瓦片运算单元,适于基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
根据本发明的另一方面,提供了一种计算电子地图可视区域内的瓦片的装置,该装置包括:定点运算单元,适于根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标;瓦片分析单元,适于根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸;顶点分析单元,适于根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;瓦片运算单元,适于根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
根据本发明的另一方面,提供了一种电子地图瓦片请求队列处理装置,该装置包括:瓦片选择单元,适于根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求;队列管理单元,适于将所述目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原
队列中原有的瓦片请求进行处理。
根据本发明的另一方面,提供了一种控制电子地图放大的方法,该方法包括:在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
根据本发明的另一方面,提供了一种控制电子地图缩小的方法,其中,该方法包括:在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高;按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片;选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。
根据本发明的另一方面,提供了一种控制电子地图平移的方法,其中,该方法包括:在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片;基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
根据本发明的另一方面,提供了一种计算电子地图可视区域内的瓦片的方法,该方法包括:根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标;根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸;根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;以及,根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
根据本发明的另一方面,提供了一种电子地图瓦片请求队列处理方法,其中,该方法包括:根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求;将所述目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原队列中原有的瓦片请求进行处理。
根据本发明的控制电子地图放大的装置和控制电子地图放大的方法可以通过选择预加载显示级别和加载并放大显示预加载瓦片,快速地显示模糊的预加载瓦片,由此解决了现有技术在放大电子地图时,因为需要较多的时间所以不能及时显示一些瓦片,电子地图窗口中会存在较多空白的问题,达到降低放大电子地图时电子地图窗口中存在空白的概率的效果。通过将预加载瓦片加载并放大显示模糊的预加载瓦片,以及在获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片,使地图级别之间的切换不明显。同样地,在缩小或者平移电子地图时,使地图级别之间的切换不明显。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明第一实施例的计算电子地图可视区域内的瓦片的方法的流程图;
图2示出了根据本发明一个实施例的计算电子地图可视区域内的瓦片的装置的框图;
图3示出了根据本发明第一实施例的电子地图瓦片请求队列处理方法的流程图;
图4示出了根据本发明一个实施例的电子地图瓦片请求队列处理装置的框图;
图5示出了根据本发明一个实施例的控制电子地图放大的方法的流程图;
图6示出了如图5所示的步骤S400的详细的流程图;
图7示出了根据本发明一个实施例的控制电子地图放大的装置的框图;
图8示出了根据本发明一个实施例的控制电子地图缩小的方法的流程图;
图9示出了根据本发明一个实施例的控制电子地图缩小的装置的框图;
图10示出了根据本发明一个实施例的控制电子地图平移的方法的流程图;
图11示出了根据本发明一个实施例的控制电子地图平移的装置的框图;
图12示出了根据本发明而实现的电子地图客户端的示意图;
图13示出了用于执行根据本发明的方法的计算设备的框图;以及
图14示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
附图实施例
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本发明的技术构思主要在于,在接收到放大、缩小地图的指令时,确定目标显示级别和预加载显示级别,在接收到平移地图的指令时,确定预加载显示级别,查找出需显示的目标瓦片以及与目标瓦片对应(即表示的地图范围对应)的预加载瓦片。由于预加载瓦片的数目比目标瓦片的数目少(例如一张预加载瓦片所表示的地图范围相当于较低级别的四张或十六张或更多张目标瓦片所表示的地图范围),所以由服务器下载预加载瓦片和加载预加载瓦片所需要的时间比使用现有技术由服务器下载目标瓦片和加载目标瓦片所需要的时间短,通过将预加载瓦片加载并放大显示模糊的预加载瓦片,以及在获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片,降低放大、缩小、平移地图时电子地图窗口存在空白的概率。通过将预加载瓦片加载并放大显示模糊的预加载瓦片,以及在获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片,电子地图表现为由模糊到清楚的显示过程,使地图级别之间的切换不明显。
需要说明的是,电子地图瓦片,即栅格地图中的图片,这些图片按一定规则,拼接成一个完整的电子地图,将电子地图放大,会显示较低级别的瓦片,本领域中较高级别的单个瓦片所表示的地图范围比较低级别的单个瓦片所表示的地图范围大,例如,相邻级别中较高级别的一张瓦片相当于较低级别四张瓦片所表示的地图范围,级别差为二的两个级别中,较高级别的一张瓦片相当于较低级别十六张瓦片所表示的地图范围。
在详细说明控制电子地图放大、缩小、平移的方案之前,本申请首先详细地说明计算电子地图可视区域内的瓦片的方案以及电子地图瓦片请求队列处理方案。
图1示出了根据本发明第一实施例的计算电子地图可视区域内的瓦片的方法的流程图。该方法包括如下所述的步骤S100至步骤S400:
S100、根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标。本实施例中,地图可视区域的中心点的地理位置坐标为经纬度坐标或者是将经纬度坐标经投影算法投影到平面地图上而得到的坐标,通过地理位置坐标及地图的当前显示级别,能够换算得到中心点的像素坐标(例如X-Y坐标)。
S200、根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸。较佳地,本实施例中,为了更详细全面地展现地图上的信息,电子地图的保存采用分级瓦片机制,将地图分为多个层级来保存,每个层级下存放相应的栅格地图瓦片,以两相邻显示级别下的瓦片为例,显示级别低的一显示级别下的4个相邻瓦片(即2×2的呈“田”字形的4个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片;以级别差为2的两层瓦片为例,显示级别低的一显示级别下的16个相邻瓦片(即4×4=16个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片。因此,不同级别下的单个瓦片的像素尺寸不同,根据地图的当前显示级别,能够得到当前显示级别的单个瓦片的像素尺寸,例如像素宽度和像素高度。
S300、根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标。本实施例中,假设地图可视区域为方形而且像素尺寸是固定的,当然,即使可视区域的像素尺寸是可变的,本领域技术人员也可以检测得到可视区域的像素尺寸。本实施例中,地图可视区域的两个相对的顶点包括地图可视区域的左上顶点和右下顶点,或地图可视区域的右上顶点和左下顶点,通过两个相对的顶点即能够唯一地确定地图可视区域的范围。
S400、根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
根据投影原理,缩放前后的两地图中有重叠的点表示相同的地理位置,本实施例将地图缩放前后所表示的地理位置不变的点定义为缩放焦点中心,根据缩放焦点中心的地理位置坐标(即经纬度坐标)及地图缩放之后的目标显示级别,能够得到缩放焦点中心的像素坐标(例如,X-Y坐标)。本实施例的缩放焦点中心,在接收到使用者通过鼠标滚轮输入的缩放地图指令时能够是鼠标的位置,或者在接收到使用者通过页面按钮(如“+”、“-”号按钮)输入的缩放地图指令时能够是地图的中心。基于缩放焦点中心计算地图缩放之后的可视区域内的瓦片的编号,能够简化计算流程和减小计算量。
因此,本实施例的方法还包括以下步骤,以在接收到使用者输入的缩放地图指令时,计算地图缩放之后的可视区域内的瓦片的编号:在接收到缩放地图的指令时,根据地图的缩放焦点中心的地理位置坐标及地图缩放之后的目标显示级别,换算得到缩放焦点中心的像素坐标;根据目标显示级别,得到目标显示级别下的单个瓦片的像素尺寸;根据地图可视区域的像素尺寸和缩放焦点中心的像素坐标,得到地图缩放之后的可视区域的两个相对的顶点的像素坐标;以及根据地图缩放之后的可视区域的两个相对的顶点的像素坐标和目标显示级别下的单个瓦片的像素尺寸得到地图缩放之后的可视区域内的瓦片的编号。
图1中步骤S400,具体包括如下所述的步骤S401和步骤S402(图未示):
S401、得到两个相对的顶点所在的瓦片的横向索引编号和纵向索引编号。具体是对两个相对的顶点分别利用顶点的像素坐标减去地图的原点的像素坐标,得到横坐标(例如,X-Y坐标系的X坐标)的差值和纵坐标(例如,X-Y坐标系的Y坐标)的差值;进一步地利用横坐标的差值除以单个瓦片的像素宽度得到横向索引编号,利用纵坐标的差值除以单个瓦片的像素高度得到纵向索引编号。
S402、选取位于两个相对的顶点所在的瓦片的横向索引编号之间的横向索引编号(包括两个相对的顶点所在的瓦片的横向索引编号)以及位于两个相对的顶点所在的瓦片的纵向索引编号之间的纵向索引编号(包括两个相对的顶点所在的瓦片的纵向索引编号),即得到地图可视区域内的瓦片编号。通过步骤S402,得到方形可视区域内的瓦片的编号。
本发明第二实施例的计算电子地图可视区域内的瓦片的方法,包括步骤S100’至步骤S500’(图未示),其中步骤S100’至步骤S400’分别与第一实施例的步骤S100至步骤S400相同,不再赘述。
步骤S500’为:根据地图可视区域的中心点的地理位置坐标及预加载级别计算至少一个预加载级别中与可视区域对应的预加载瓦片的编号。预加载级别为与当前显示级别的级别差在设置的范围内的至少一个级别,例如,假定当前显示级别为第10级,若设置的范围为比当前显示级别高最多3级以及比当前显示级别低最多2级,则预加载级别包括比第10级高的第9级、第8级和第7级以及比第10级低的第11级和第12级。
步骤S500’具体包括如下所述的步骤S501’至步骤S504’(图未示):
S501’、根据地图可视区域的中心点的地理位置坐标及预加载级别,换算得到中心点的像素坐标。本实施例中,地图可视区域的中心点的地理位置坐标为经纬度坐标或者是将经纬度坐标经投影算法投影到平面地图上而得到的坐标,通过地理位置坐标及预加载级别,能够换算得到在预加载显示级别下的中心点的像素坐标(例如X-Y坐标)。
S502’、根据地图的预加载级别,得到预加载级别的单个瓦片的像素尺寸。根据地图的预加载级别,能够得到预加载级别的单个瓦片的像素尺寸,例如像素宽度和像素高度。
S503’、根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标。地图可视区域的两个相对的顶点包括地图可视区域的左上顶点和右下顶点,或地图可视区域的右上顶点和左下顶点,通过两个相对的顶点即能够唯一地确定地图可视区域的范围。
S504’、根据地图可视区域的两个相对的顶点的像素坐标和预加载级别的单个瓦片的像素尺寸得到预加载级别中与可视区域对应的预加载瓦片的编号。实现步骤S504’的具体方法与如上所述的步骤S401、S402类似,不再赘述。
进一步地,上述步骤S500’,还包括根据得到的预加载瓦片的编号,得到预加载级别下预加载瓦片周边的瓦片的编号的操作。具体地是将得到的横向索引编号和纵向索引编号进行适当的扩展。
本发明第三实施例的计算电子地图可视区域内的瓦片的方法,包括步骤S100”至步骤S500”(图未示),其中步骤S100”至步骤S400”分别与第一实施例的步骤S100至步骤S400相同,不再赘述。
步骤S500”为:根据预加载级别与当前显示级别之间的级别差将当前显示级别下地图可视区域内的瓦片编号进行除法取整运算或乘法运算,计算至少一个预加载级别中与可视区域内的瓦片对应的预加载瓦片的编号。预加载级别为与当前显示级别的级别差在设置的范围内的至少一个级别。
具体地,步骤S500”中的根据预加载级别与当前显示级别之间的级别差将当前显示级别下地图可视区域内的瓦片编号进行除法取整运算或乘法运算包括:若预加载级别高于当前显示级别,则将当前显示级别下地图可视区域内的瓦片的横向索引编号和纵向索引编号分别除以m并取整。本领域技术人员能够了解的是,具体的取整算法,可以根据瓦片切分原点的索引编号而选择,若瓦片切分原点的索引编号为零,则向下取整即可(类似floor函数),否则向上取整(类似ceiling函数)。其中,m=2k,k为自然数,表示预加载级别和当前显示级别之间的级别差。若预加载级别低于当前显示级别,则将当前显示级别下地图可视区域内的瓦片的横向索引编号和纵向索引编号分别乘p并根据乘法运算结果得到p个相邻的索引编号,具体方法是与上述取整算法对应的,其中,p=2q,q为自然数,表示当前显示级别和预加载级别之间的级别差。与第二实施例的步骤S500’相比,第三实施例的步骤S500”在保证准确率的同时降低运算复杂度。
进一步地,上述步骤S500”,还包括根据得到的预加载瓦片的编号,得到预加载级别下预加载瓦片周边的瓦片的编号的操作。具体地是将得到的横向索引编号和纵向索引编号进行适当的扩展。
需要说明的是,若预加载级别高于当前显示级别,则各预加载瓦片所对应的地理面积大于各目标瓦片所对应的地理面积且为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。若预加载级别低于当前显示级别,则各预加载瓦片所对应的地理面积小于各目标瓦片所对应的地理面积且为各目标瓦片所对应的地理面积的1/r,其中,r=4q,q为自然数,表示当前显示级别和预加载级别之间的级别差。
结合以下关于电子地图加载显示的记载,可知本发明第二实施例的步骤S500’和第三实施例的步骤S500”通过计算预加载瓦片的编号所实现的技术效果,具体是降低电子地图客户端缩小、放大或平移电子地图时电子显示窗口存在空白的概率的技术效果。
图2示出了根据本发明一个实施例的计算电子地图可视区域内的瓦片的装置的框图。该装置包括定点运算单元100、瓦片分析单元200、顶点分析单元400和瓦片运算单元400。
定点运算单元100,适于根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标。本实施例中,地图可视区域的中心点的地理位置坐标为经纬度坐标或者是将经纬度坐标经投影算法投影到平面地图上的坐标,定点运算单元100通过地理位置坐标及地图的当前显示级别,能够换算得到中心点的像素坐标(例如X-Y坐标)。
瓦片分析单元200,适于根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸。本实施例中,不同级别下的单个瓦片的像素尺寸不同,瓦片分析单元200根据地图的当前显示级别,能够得到当前显示级别的单个瓦片的像素尺寸,例如像素宽度和像素高度。
顶点分析单元300,适于根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标。本实施例的地图可视区域的两个相对的顶点包括:地图可视区域的左上顶点和右下顶点,或,地图可视区域的右上顶点和左下顶点,通过两个相对的顶点即能够唯一地确定地图可视区域的范围。
瓦片运算单元400,适于根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
本实施例的顶点分析单元300,适于得到两个相对的顶点所在的瓦片的横向索引编号和纵向索引编号;瓦片运算单元400,适于选取位于两个相对的顶点所在的瓦片的横向索引编号之间的横向索引编号以及位于两个相对的顶点所在的瓦片的纵向索引编号之间的纵向索引编号,即得到地图可视区域内的瓦片编号。
较佳地,本实施例的装置,还包括预加载瓦片计算单元500。
预加载瓦片运算单元500,适于计算预加载级别中的预加载瓦片的编号,其中预加载级别,为与当前显示级别的级别差在设置的范围内的至少一个级别。本实施例的预加载瓦片运算单元500存在两种具体实施方式,第一种具体实施方式是根据地图可视区域的中心点的地理位置坐标及预加载级别计算至少一个预加载级别中与地图可视区域对应的预加载瓦片的编号。
本实施例的预加载瓦片运算单元500的第二种具体实施方式是根据预加载级别与当前显示级别之间的级别差将当前显示级别下地图可视区域内的瓦片编号进行除法取整运算或乘法运算,计算至少一个预加载级别中与可视区域内的瓦片对应的预加载瓦片的编号。
图3示出了根据本发明第一实施例的电子地图瓦片请求队列处理方法的流程图。该方法包括如下步骤310和S320:
S310、根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求。
其中,本领域技术人员能够了解的是,根据使用者输入的电子地图交互指示能够确定目标显示级别,换言之,目标显示级别是操作完成之后电子地图的显示级别。本领域中将地图放大,会显示较低级别的瓦片,较高级别的瓦片所表示的地图范围比较低级别瓦片所表示的地图范围大。因此若电子地图交互指示表示放大电子地图则目标显示级别比当前的显示级别低;若电子地图交互指示表示缩小电子地图则目标显示级别比当前的显示级别高;若电子地图交互指示表示平移电子地图则目标显示级别等于当前的显示级别。目标级别瓦片为根据使用者输入的电子地图交互指示进行响应后需要在地图显示区域显示的瓦片。确定待下载的目标级别瓦片的方法不再赘述。
本实施例中,确定待下载的预加载级别瓦片请求的方法,包括:基于目标显示级别选择预加载显示级别,查找出预加载显示级别中与目标级别瓦片对应的预加载级别瓦片。预加载显示级别比目标显示级别高。预加载级别瓦片所表示的地图范围包括多个目标级别瓦片所表示的地图范围,且各预加载级别瓦片所对应的地理面积为各目标级别瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
本实施例中,查找预加载级别瓦片的方法,可以是利用与目标级别瓦片的对应关系根据目标级别瓦片的编号通过除法取整运算得到预加载级别瓦片的编号。本实施例中,由于每个预加载级别瓦片对应多个目标级别瓦片,所以预加载级别瓦片所表示的地图范围可能大于多个目标级别瓦片所表示的地图范围。
S320、将目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原队列中原有的瓦片请求进行处理。
较佳地,本实施例中通过预设的线程处理预加载级别瓦片请求,通过预设的其它线程处理目标级别瓦片请求;对预加载级别瓦片请求以及目标级别瓦片请求的处理,可以是并行的,也可以是优先处理预加载级别瓦片请求。
本实施例步骤S320的具体实现方法,可以是使用先进先出(first in first out,FIFO)算法管理电子地图瓦片请求队列,也可以是对请求设置优先级别或者对新加入的请求优先分配线程。
由于本实施例中,最新加入电子地图瓦片请求队列的目标级别瓦片请求以及预加载级别瓦片请求能够得到优先处理,可以降低因使用者短时间内多次输入电子地图交互指示而使电子地图窗口存在空白的概率。
较佳地,若电子地图交互指示是电子地图放大指示,则将目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,具体是按照预加载级别瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载级别瓦片的请求加入图片请求队列中,以及按照目标级别瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载目标级别瓦片的请求加入图片请求队列中。本实施例的缩放焦点,在接收到使用者通过鼠标滚轮输入的放大地图指令时能够是鼠标的位置,或者在接收到使用者通过页面按钮(如百度地图或腾讯地图的“+”号按钮)输入的放大地图指令时能够是地图的中心。通过按照与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载级别瓦片的请求加入图片请求队列中可以使位于缩放焦点中心附近的瓦片能够被优先请求。
进一步地,以下结合电子地图加载显示的记载,可以了解本发明步骤S310中的确定待下载的预加载级别瓦片请求的操作和步骤S320中的将预加载级别瓦片请求加入电子地图瓦片请求队列中的操作所实现的降低电子地图窗口存在空白的概率的技术效果。
本实施例中,将目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中可以从服务器获取目标级别瓦片及预加载级别瓦片。
对于获取的预加载级别瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片。通过首先显示模糊的放大预加载瓦片,加载速度快,减小了在电子地图上显示空白瓦片的概率。
本发明第二实施例的电子地图瓦片请求队列处理方法包括步骤S310’、S320’和S330’。步骤S310’与图3中的步骤S310相同,步骤S330’与图1中的步骤S320相同,不再赘述,第二实施例与第一实施例的不同在于还包括步骤S320’:
S320’、取消瓦片请求队列中的部分请求或全部请求。通过瓦片请求队列中的取消部分请求或全部请求,维护请求队列的长度。
通过取消图片请求队列中的无用的请求,即使用户在低网速环境下,不停地移动或缩放地图,仍然可以避免图片请求队列的长度过长,由此解决了用户在低网速环境下不停地移动或缩放地图可能导致的因图片请求队列过长而使系统负载过重以及难以获取所需的瓦片的问题。
本实施例中,取消瓦片请求队列中的部分请求或全部请求,具体包括:将瓦片请求队列中的部分请求或全部请求的源属性(src)设置为已经缓存好的文件。换言之,通过将瓦片(image)请求的src设置为一个已经缓存好的图片即可取消(abort)向服务器发出请求。
可选地,步骤S320’还包括:在取消瓦片请求队列中的部分请求或全部请求时,判断是否强制清除正在执行的请求,若判断为是,则强制清除正在执行的请求,若判断为否,则中断正在执行的请求并在检测到瓦片请求队列中请求的数目达到最大值时取消正在执行的请求。即在清空请求队列的时候,需要判断是否强制清除加载到一半的图片请求;若不强制清除,则将这些未完成但是被取消掉的请求中断,当检测到瓦片请求队列超过最大并发数时,才取消这些请求,避免浪费流量;当然,本领域技术人员可以了解,当检测到瓦片请求队列长度小于预定值时,恢复上述中断的请求。
可选地,取消瓦片请求队列中的部分请求,包括:按照加入瓦片请求队列的时间顺序,将加入瓦片请求队列的时间早的部分请求取消。
图4示出了根据本发明一个实施例的电子地图瓦片请求队列处理装置的框图。该装置包括目标瓦片选择单元410和队列管理单元420。
瓦片选择单元410,适于根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求。
本实施例中,瓦片选择单元410,适于基于目标显示级别选择预加载显示级别,查找出预加载显示级别中与目标级别瓦片对应的预加载级别瓦片。
队列管理单元20,适于将目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原队列中原有的瓦片请求进行处理。
较佳地,本实施例的队列管理单元420,适于通过预设的线程处理预加载级别瓦片请求,通过预设的
其它线程处理目标级别瓦片请求;队列管理单元420对预加载级别瓦片请求以及目标级别瓦片请求的处理,可以是并行的,也可以是优先处理预加载级别瓦片请求。
本实施例的队列管理单元420可以是使用先进先出(first in first out,FIFO)算法管理电子地图瓦片请求队列,也可以是对请求设置优先级别或者对新加入的请求优先分配线程。
较佳地,若电子地图交互指示是电子地图放大指示,则队列管理单元420,按照预加载级别瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载级别瓦片的请求加入图片请求队列中,以及按照目标级别瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载目标级别瓦片的请求加入图片请求队列中。
本实施例的队列管理单元420,进一步适于在将目标级别瓦片请求及预加载级别瓦片请求加入瓦片请求队列之前,取消瓦片请求队列中的部分请求或全部请求。
本实施例的队列管理单元420,适于将瓦片请求队列中的部分请求或全部请求的源属性设置为已经缓存好的文件,从而取消瓦片请求队列中的部分请求或全部请求。
本实施例的队列管理单元420,适于在取消瓦片请求队列中的部分请求或全部请求时,判断是否强制清除正在执行的请求,若判断为是,则强制清除正在执行的请求,若判断为否,则中断正在执行的请求并在检测到瓦片请求队列中请求的数目达到最大值时取消正在执行的请求。
本实施例的队列管理单元420,适于按照加入瓦片请求队列的时间顺序,将加入瓦片请求队列的时间早的部分请求取消。
图5示出了根据本发明一个实施例的控制电子地图放大的方法的流程图。该方法包括如下步骤S510至步骤S540:
S510、在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片。其中,本领域技术人员能够了解的是,目标显示级别是根据使用者输入的放大地图的指令而定的,换言之,目标显示级别是操作完成之后电子地图的显示级别。本领域中将地图放大,会显示较低级别的瓦片,较高级别的瓦片所表示的地图范围比较低级别瓦片所表示的地图范围大,因此目标显示级别比当前的显示级别低。查找目标瓦片的方法,可以是参照如图1所示的方法,根据地图可视区域的中心点的地理位置坐标及目标显示级别计算目标瓦片。
S520、基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与目标瓦片对应的预加载瓦片。
本实施例中,预加载显示级别比目标显示级别高,进一步地,预加载显示级别与当前显示级别无关。预加载瓦片所表示的地图范围包括多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
较佳地,本实施例中,为了更详细全面地展现地图上的信息,电子地图的保存采用分级瓦片机制,将地图分为多个层级来保存,每个层级下存放相应的栅格地图瓦片,以两相邻显示级别下的瓦片为例,显示级别低的一显示级别下的四个相邻瓦片(即2×2的呈“田”字形的四个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片;以级别差为二的两层瓦片为例,显示级别低的一显示级别下的十六个相邻瓦片(即4×4的十六个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片。本实施例中,查找预加载瓦片的方法,可以是参照如图1所示的方法,根据地图可视区域的中心点的地理位置坐标及预加载显示级别计算预加载瓦片,也可以是利用与目标瓦片的对应关系根据目标瓦片的编号通过除法取整运算得到预加载瓦片的编号。本实施例中,由于每个预加载瓦片对应多个目标瓦片,所以预加载瓦片所表示的地图范围可能大于多个目标瓦片所表示的地图范围。
S530、按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片。通过首先显示模糊的放大预加载瓦片,加载速度快,减小了在电子地图上显示空白瓦片的概率。
本实施例中,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。即,如果预加载显示级别和目标显示级别之间的级别差为1则将各个预加载瓦片的横向宽度和纵向高度均放大为2倍进行显示;如果预加载显示级别和目标显示级别之间的级别差为2则将各个预加载瓦片的横向宽度和纵向高度均放大为4倍进行显示。
S540、当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片。通过使用清晰的目标瓦片替换对应的模糊的放大预加载瓦片,实现清晰显示地图以及地图显示由模糊到清晰的显示效果。
综合上述步骤S510、S520、S530和S540,本实施例通过选择预加载显示级别和加载并放大显示预加载瓦片,快速地显示模糊的预加载瓦片,降低了电子地图显示空白瓦片的概率。
本实施例中通过执行步骤S520和步骤S530,能够选择一个比目标显示级别高的预加载显示级别和显示该预加载显示级别中的放大预加载瓦片,较佳地,预加载显示级别不高于当前显示级别。通过重复执行步骤S520和步骤S530,也能够选择多个比目标显示级别高的预加载显示级别以及显示多个预加载显示级别中的放大预加载瓦片,具体实施中,可以先显示级别较高的预加载显示级别中的放大预加载瓦片,再显示级别较低的预加载显示级别中的放大预加载瓦片,同样实现地图显示由模糊到清晰的显示效果。另外,本领域技术人员应了解,预加载显示级别也可以是当前显示级别。
进一步地,该方法还包括:设置本地缓存;将已显示的瓦片保存在本地缓存中。更具体地,本实施例通过创建本地缓存,控制瓦片的请求频度。放大地图时,能够优先显示已经缓存过的瓦片,减少用户看到空白的概率,并且利用缓存可以提高加载速度,在服务器端没有加缓存头的情况下,也能避免重复请求瓦片。则本实施例的该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。换言之,缓存的实现采用LRU(Least Recently Used,最近最少使用)策略,缓存中的瓦片超过缓存设定的容量时,会优先淘汰最近最少使用的瓦片。
较佳地,上述步骤S520中的选择预加载显示级别的方法,是选择比目标显示级别高的数个级别,从各级别中选择预加载显示级别,具体是判断各个级别中与目标瓦片对应的瓦片在缓存中或需要由服务器下载,选择需要由服务器下载的瓦片数目最小的级别为预加载显示级别从而加快从服务器下载预加载瓦片的速度,进一步地如果需要由服务器下载的瓦片数目相同,则优先选择等级较高的级别为预加载显示级别从而减少需处理的预加载瓦片的数目以进一步地加快处理速度。
本实施例中,上述步骤S530的按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
从服务器下载预加载瓦片和目标瓦片,具体包括:按照预加载瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载瓦片的请求加入图片请求队列中,以及按照目标瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载目标瓦片的请求加入图片请求队列中。本实施例的缩放焦点,在接收到使用者通过鼠标滚轮输入的放大地图指令时能够是鼠标的位置,或者在接收到使用者通过页面按钮(如“+”号按钮)输入的放大地图指令时能够是地图的中心。通过按照与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载瓦片的请求加入图片请求队列中可以使位于缩放焦点中心附近的瓦片能够被优先加载。
图6示出了如图5所示的步骤S540的详细的流程图。步骤S540的加载并显示目标瓦片以替换对应位置的放大的预加载瓦片,具体包括以下步骤:
S541、在加载目标瓦片的同时,增加放大的预加载瓦片的透明度。换言之,在加载目标瓦片时,将放大的预加载瓦片逐渐变得透明。
S542、当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。具体地,对应于一个放大的预加载瓦片的数个目标瓦片加载完成时,移除该放大的预加载瓦片,显示加载完成的数个目标瓦片,电子地图更清晰。
本实施例中,根据不同浏览器版本,提供不同的渲染机制,提高渲染瓦片性能,以保证步骤S530中的加载并放大显示预加载瓦片操作和步骤S540中的加载并显示目标瓦片操作的流畅性。例如,针对支持webgl接口的浏览器,提供WebglRenderer渲染机制;针对支持HTML5标签Canvas的浏览器,提供CanvasRenderer渲染机制;针对支持CSS3的浏览器,提供CSSRenderer渲染机制;针对IE6、IE7、IE8等低版本浏览器,提供FlashRendere渲染机制;针对所有浏览器,提供DivRenderer渲染机制。
图7示出了根据本发明一个实施例的控制电子地图放大的装置的框图。该装置包括目标瓦片运算单元710、预加载瓦片运算单元720和加载单元730。
目标瓦片运算单元710,适于在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片。
预加载瓦片运算单元720,适于基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与目标瓦片对应的预加载瓦片。
本实施例中,预加载瓦片运算单元720,适于选择级别比目标显示级别高的预加载显示级别,预加载瓦片所表示的地图范围包括多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
加载单元730,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片。
本实施例中,加载单元730,适于将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
本实施例中,加载单元730,适于按照预加载瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载瓦片的请求加入图片请求队列中,以及按照目标瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载目标瓦片的请求加入图片请求队列中。
本实施例中,加载单元7300,适于在加载目标瓦片的同时,增加放大的预加载瓦片的透明度;当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。
本实施例中,目标瓦片运算单元710,适于根据地图可视区域的放大中心点的地理位置坐标及地图的目标显示级别,换算得到放大中心点的像素坐标;根据地图的目标显示级别,得到需显示的单个目标瓦片的像素尺寸;根据地图可视区域的像素尺寸和放大中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个目标瓦片的像素尺寸得到可视区域内的目标瓦片。
较佳地,本实施例的该装置还包括缓存单元740。
缓存单元740,适于设置本地缓存,以及将已显示的瓦片保存在本地缓存中。通过缓存单元740创建本地缓存,控制瓦片的请求频度。放大地图时,能够优先显示已经缓存过的瓦片,减少用户看到空白的概率,并且利用缓存可以提高加载速度,在服务器端没有加缓存头的情况下,也能避免重复请求瓦片。
进一步地,在缓存单元740将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则缓存单元740从本地缓存中移除最近最少使用的瓦片。
进一步地,本实施例的加载单元730,适于判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
图8示出了根据本发明一个实施例的控制电子地图缩小的方法的流程图。该方法包括如下步骤S810至步骤S840:
S810、在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高。其中,本领域技术人员能够了解的是,目标显示级别是根据使用者输入的缩小地图的指令而定的,换言之,目标显示级别是操作完成之后电子地图的显示级别。本领域中将地图缩小,会显示较高级别的瓦片,较高级别的瓦片所表示的地图范围比较低级别瓦片所表示的地图范围大,因此目标显示级别比当前的显示级别高。查找目标瓦片的方法,可以是参照如图2所示的方法,根据地图可视区域的中心点的地理位置坐标及目标显示级别计算目标瓦片。显示目标瓦片能够得到清晰的缩小后的电子地图。
S820、按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片。
具体地,按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片,包括:将当前显示的瓦片的横向宽度和纵向高度均缩小为1/p显示,其中,p=2q,q为自然数,表示目标显示级别和当前显示级别之间的级别差。若目标显示级别和当前显示级别之间的级别差为1,则将当前显示的瓦片的横向宽度和纵向高度均缩小为1/2显示;若目标显示级别和当前显示级别之间的级别差为2,则将当前显示的瓦片的横向宽度和纵向高度均缩小为1/4显示,依此类推。
本实施例中,通过将当前显示的瓦片缩小显示,能够快速地将缩小后的地图的一部分区域快速地模糊显示,周边的地图范围通过下述的步骤S830和S840快速地以较低的清晰度进行显示。
S830、选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片。
本实施例中,预加载显示级别比目标显示级别高,预加载瓦片所表示的地图范围包括除了当前显示的瓦片所表示的地图范围之外由多个目标瓦片所表示的地图范围,即缩小后需要在显示区域显示的完整地图范围除去步骤S820中缩小的当前显示瓦片所表示的地图范围,也就是上述的“边缘区域”,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
较佳地,本实施例中,为了更详细全面地展现地图上的信息,电子地图的保存采用分级瓦片机制,将地图分为多个层级来保存,每个层级下存放相应的栅格地图瓦片,以两相邻显示级别下的瓦片为例,显示级别低的一显示级别下的4个相邻瓦片(即2×2的呈“田”字形的四个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片;以级别差为二的两层瓦片为例,显示级别低的一显示级别下的16个相邻瓦片(即4×4=16个相邻瓦片)对应于显示级别高的一显示级别下的一个瓦片。本实施例中,查找预加载瓦片的方法,可以是参照如图1所示的方法,根据地图可视区域的缩小中心点的地理位置坐标及预加载显示级别计算预加载瓦片,也可以是利用与目标瓦片的对应关系根据目标瓦片的编号通过除法取整运算得到预加载瓦片的编号。本实施例中,由于每个预加载瓦片对应多个目标瓦片,所以预加载瓦片所表示的地图范围可能大于多个目标瓦片所表示的地图范围。
S840、按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片。通过首先显示模糊的放大预加载瓦片,加载速度快,减小了在电子地图上
显示空白瓦片的概率。
本实施例中,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。即,如果预加载显示级别和目标显示级别之间的级别差为1则将各个预加载瓦片的横向宽度和纵向高度均放大为2倍进行显示;如果预加载显示级别和目标显示级别之间的级别差为2则将各个预加载瓦片的横向宽度和纵向高度均放大为4倍进行显示。
S850、当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。通过使用清晰的目标瓦片替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片,实现清晰显示地图以及地图显示由模糊到清晰的显示效果。
综合上述步骤S810、S820、S830、S840和S850,本实施例通过加载并缩小显示当前显示的瓦片、选择预加载显示级别和加载并放大显示预加载瓦片,快速地显示模糊的清晰度较低的预加载瓦片,降低了电子地图显示空白瓦片的概率。
本实施例中通过执行步骤S830和步骤S840,能够选择一个比目标显示级别高的预加载显示级别以及显示该预加载显示级别中的放大预加载瓦片。通过重复地执行步骤S830和步骤S840,也能够选择多个比目标显示级别高的预加载显示级别以及显示多个预加载显示级别中的放大预加载瓦片,具体实施中,可以先显示级别较高的预加载显示级别中的放大预加载瓦片,再显示级别较低的预加载显示级别中的放大预加载瓦片,同样实现地图显示由模糊到清晰的显示效果。另外,本领域技术人员应了解,预加载显示级别也可以是当前显示级别。
进一步地,该方法还包括如上所述的设置本地缓存以及将已显示的瓦片保存在本地缓存中的步骤。更具体地,本实施例的该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。较佳地,上述步骤S830中的选择预加载显示级别的方法,是选择比目标显示级别高的数个级别,从各级别中选择预加载显示级别,具体是判断各个级别中的预加载瓦片在缓存中或需要由服务器下载,选择需要由服务器下载的瓦片数目最小的级别为预加载显示级别从而加快从服务器下载预加载瓦片的速度,进一步地如果需要由服务器下载的瓦片数目相同,则优先选择等级较高的级别为预加载显示级别从而减少需处理的预加载瓦片的数目以进一步地加快处理速度。
本实施例中,上述步骤S840的按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
本实施例的步骤S850,具体包括以下步骤:
S851、在加载目标瓦片的同时,增加缩小的当前显示的瓦片和放大的预加载瓦片的透明度。换言之,在加载目标瓦片时,将缩小的当前显示的瓦片和放大的预加载瓦片逐渐变得透明。
S852、当加载目标瓦片的操作完成时,移除缩小的当前显示的瓦片和放大的预加载瓦片以及显示目标瓦片。具体地,对应于一个缩小的当前显示的瓦片或一个放大的预加载瓦片的数个目标瓦片加载完成时,移除该缩小的当前显示的瓦片或放大的预加载瓦片,显示加载完成的数个目标瓦片,使电子地图更清晰。
本实施例中,根据不同浏览器版本,提供不同的渲染机制,所提供的较佳的渲染机制请参阅对图4的详细描述。
图9示出了根据本发明一个实施例的控制电子地图缩小的装置的框图。该装置包括目标瓦片运算单元910、预加载瓦片运算单元920、第二加载单元930和第一加载单元940。
目标瓦片运算单元910,适于在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高。第一加载单元940,适于按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片。具体地,第一加载单元940按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片包括将当前显示的瓦片的横向宽度和纵向高度均缩小为1/p显示,其中,p=2q,q为自然数,表示目标显示级别和当前显示级别之间的级别差。
预加载瓦片运算单元920,适于选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片。本实施例中,预加载瓦片运算单元920,适于选择比目标显示级别高的预加载显示级别,预加载瓦片所表示的地图范围包括除了当前显示的瓦片所表示的地图范围之外由多个目标瓦片所表示的地图范围,即缩小后需要在显示区域显示的完整地图范围除去缩小的当前显示瓦片所表示的地图范围,也就是上述的“边缘区域”,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
第二加载单元930,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。
本实施例中,第二加载单元930,适于将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
本实施例中,第二加载单元930,在加载目标瓦片的同时,增加缩小的当前显示的瓦片和放大的预加载瓦片的透明度,换言之,第二加载单元930在加载目标瓦片时,将缩小的当前显示的瓦片和放大的预加载瓦片逐渐变得透明。进一步地,当加载目标瓦片的操作完成时,第二加载单元930移除缩小的当前显示的瓦片和放大的预加载瓦片以及显示目标瓦片。具体地,对应于一个缩小的当前显示的瓦片或一个放大的预加载瓦片的数个目标瓦片加载完成时,第二加载单元930移除该缩小的当前显示的瓦片或放大的预加载瓦片,显示加载完成的数个目标瓦片,使电子地图更清晰。
本实施例中,目标瓦片运算单元910,适于根据地图可视区域的缩小中心点的地理位置坐标及地图的目标显示级别,换算得到缩小中心点的像素坐标;根据地图的目标显示级别,得到需显示的单个目标瓦片的像素尺寸;根据地图可视区域的像素尺寸和缩小中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个目标瓦片的像素尺寸得到可视区域内的目标瓦片。
本实施例中,目标瓦片运算单元910根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个目标瓦片的像素尺寸得到可视区域内的目标瓦片的方法,具体是通过得到两个相对的顶点所在的目标瓦片的横向索引编号和纵向索引编号;以及选取横向索引编号位于两个相对的顶点所在的目标瓦片的横向索引编号之间且纵向索引编号位于两个相对的顶点所在的目标瓦片的纵向索引编号之间的目标瓦片,从而得到地图可视区域内的目标瓦片。
其中,目标瓦片运算单元910,通过对顶点分别利用顶点的像素坐标减去地图的原点的像素坐标得到横坐标的差值和纵坐标的差值,利用横坐标的差值除以单个目标瓦片的宽度得到横向索引编号,利用纵坐标的差值除以单个目标瓦片的高度得到纵向索引编号。
较佳地,该装置还包括:缓存单元950。
缓存单元950,适于设置本地缓存,以及将已显示的瓦片保存在本地缓存中。
进一步地,在缓存单元950将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则缓存单元950从本地缓存中移除最近最少使用的瓦片。
进一步地,本实施例的第二加载单元930,适于判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
图10示出了根据本发明一个实施例的控制电子地图平移的方法的流程图。该方法包括如下步骤S1010至步骤S1040:
S1010、在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片。
S1020、基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与目标瓦片对应的预加载瓦片。
本实施例中,预加载显示级别比当前显示级别高。预加载瓦片所表示的地图范围包括多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
本实施例中,由于每个预加载瓦片对应多个目标瓦片,所以预加载瓦片所表示的地图范围可能大于多个目标瓦片所表示的地图范围。
S1030、按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片。通过首先显示模糊的清晰度低的放大预加载瓦片,加载速度快,减小了在电子地图上显示空白瓦片的概率。
本实施例中,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
S1040、当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片。通过使用清晰的目标瓦片替换对应的模糊的放大预加载瓦片,实现清晰显示地图以及地图显示由模糊到清晰的显示效果。
综合上述步骤S1010、S1020、S1030和S1040,本实施例通过选择预加载显示级别和加载并放大显示预加载瓦片,快速地显示模糊的预加载瓦片,降低了电子地图显示空白瓦片的概率。
本实施例中通过执行步骤S1020和步骤S1030,能够选择一个比当前显示级别高的预加载显示级别和显示该预加载显示级别中的放大预加载瓦片。通过重复执行步骤S1020和步骤S1030,也能够选择多个比当前显示级别高的预加载显示级别以及显示多个预加载显示级别中的放大预加载瓦片,具体实施中,可以先显示级别较高的预加载显示级别中的放大预加载瓦片,再显示级别较低的预加载显示级别中的放大预加
载瓦片,同样实现地图显示由模糊到清晰的显示效果。
进一步地,该方法还包括:设置本地缓存;将已显示的瓦片保存在本地缓存中。更具体地,本实施例的该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。
较佳地,上述步骤S1020中的选择预加载显示级别的方法,是选择比当前显示级别高的数个级别,从各级别中选择预加载显示级别,具体是判断各个级别中与目标瓦片对应的瓦片在缓存中或需要由服务器下载,选择需要由服务器下载的瓦片数目最小的级别为预加载显示级别从而加快从服务器下载预加载瓦片的速度,进一步地如果需要由服务器下载的瓦片数目相同,则优先选择等级较高的级别为预加载显示级别从而减少需处理的预加载瓦片的数目以进一步地加快处理速度。
本实施例中,上述步骤S1030的按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
本实施例的步骤S1040,具体包括以下步骤:
S1041、在加载目标瓦片的同时,增加放大的预加载瓦片的透明度。换言之,在加载目标瓦片时,将放大的预加载瓦片逐渐变得透明。
S1042、当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。具体地,对应于一个放大的预加载瓦片的数个目标瓦片加载完成时,移除该放大的预加载瓦片,显示加载完成的数个目标瓦片,电子地图更清晰。
本实施例中,根据不同浏览器版本,提供不同的渲染机制,所提供的较佳的渲染机制请参阅对图4的详细描述。
图11示出了根据本发明一个实施例的控制电子地图平移的装置的框图。该装置包括目标瓦片运算单元1110、预加载瓦片运算单元1120和加载单元1130。
目标瓦片运算单元1110,适于在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片。
预加载瓦片运算单元1120,适于基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与目标瓦片对应的预加载瓦片。
本实施例中,预加载瓦片运算单元1120,适于选择级别比当前显示级别高的预加载显示级别,预加载瓦片所表示的地图范围包括多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
本实施例中,由于每个预加载瓦片对应多个目标瓦片,所以预加载瓦片所表示的地图范围可能大于多个目标瓦片所表示的地图范围。
加载单元1130,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示目标瓦片以替换对应位置的放大预加载瓦片。通过首先显示模糊的放大预加载瓦片,加载速度快,减小了在电子地图上显示空白瓦片的概率。通过使用清晰的目标瓦片替换对应的模糊的放大预加载瓦片,实现清晰显示地图以及地图显示由模糊到清晰的显示效果。
本实施例中,加载单元1130,适于将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
本实施例中,加载单元1130,适于在加载目标瓦片的同时,增加放大的预加载瓦片的透明度;当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。
较佳地,该装置还包括:缓存单元1140。
缓存单元1140,适于设置本地缓存,以及将已显示的瓦片保存在本地缓存中。通过缓存单元1140创建本地缓存,控制瓦片的请求频度。
进一步地,在缓存单元1140将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则缓存单元1140从本地缓存中移除最近最少使用的瓦片。
进一步地,本实施例的加载单元1130,适于判断预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。通过优先获取缓存中的瓦片,能够提高加载速度。
图12示出了根据本发明而实现的电子地图客户端的示意图。电子地图客户端在依据使用者的指示进行放大、缩小,以及平移等操作时,电子地图窗口存在空白的概率小,且电子地图表现由模糊到清楚的显示过程,使地图级别之间的切换不明显。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一种控制电子地图放大的装置、一种控制电子地图缩小的装置、一种控制电子
地图平移的装置、一种计算电子地图可视区域内的瓦片的装置,以及一种电子地图瓦片请求队列处理装置的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图13示出了用于执行根据本发明而实现的控制电子地图的计算设备示意图,例如终端设备,或应用服务器的框图。该计算设备传统上包括处理器1310和以存储器1320形式的计算机程序产品或者计算机可读介质。存储器1320可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1320具有用于执行上述方法中的任何方法步骤的程序代码1331的存储空间1330。例如,用于程序代码的存储空间1330可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1331。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图14所述的便携式或者固定存储单元。该存储单元可以具有与图13的计算设备中的存储器1420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1431’,即可以由例如诸如处理器1310之类的处理器读取的代码,这些代码当由服务器运行时,导致该服务器执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。
Claims (43)
- 一种控制电子地图放大的装置,该装置包括:目标瓦片运算单元,适于在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,当前显示级别比目标显示级别高;预加载瓦片运算单元,适于基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
- 一种控制电子地图缩小的装置,该装置包括:目标瓦片运算单元,适于在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高;第一加载单元,适于按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片;预加载瓦片运算单元,适于选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片;第二加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。
- 一种控制电子地图平移的装置,该装置包括:目标瓦片运算单元,适于在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片;预加载瓦片运算单元,适于基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;加载单元,适于按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片;以及当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
- 一种计算电子地图可视区域内的瓦片的装置,该装置包括:定点运算单元,适于根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标;瓦片分析单元,适于根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸;顶点分析单元,适于根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;瓦片运算单元,适于根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
- 一种电子地图瓦片请求队列处理装置,该装置包括:瓦片选择单元,适于根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求;队列管理单元,适于将所述目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原队列中原有的瓦片请求进行处理。
- 一种控制电子地图放大的方法,其中,该方法包括:在接收到放大地图的指令时,确定放大到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;基于当前显示级别与目标显示级别的关系选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
- 根据权利要求6所述的方法,其中,所述预加载显示级别比目标显示级别高,所述预加载瓦片所表示的地图范围包括所述多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为 自然数,表示预加载显示级别和目标显示级别之间的级别差。
- 根据权利要求6或7所述的方法,其中,所述按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
- 根据权利要求6-8任一项所述的方法,其中,该方法还包括:设置本地缓存;将已显示的瓦片保存在本地缓存中。
- 根据权利要求6-9任一项所述的方法,其中,该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。
- 根据权利要求6-10任一项所述的方法,其中,所述按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断所述预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。
- 根据权利要求6-11任一项所述的方法,其中,所述从服务器下载预加载瓦片和目标瓦片,具体包括:按照所述预加载瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载预加载瓦片的请求加入图片请求队列中,以及按照所述目标瓦片与地图的缩放焦点中心的距离由小到大的顺序将从服务器下载目标瓦片的请求加入图片请求队列中。
- 根据权利要求6-12任一权利要求所述的方法,其中,所述加载并显示所述目标瓦片以替换对应位置的放大的预加载瓦片,具体包括:在加载目标瓦片的同时,增加放大的预加载瓦片的透明度;当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。
- 根据权利要求6-13任一权利要求所述的方法,其中,所述查找出目标显示级别中需显示的多个目标瓦片,包括:根据地图可视区域的放大中心点的地理位置坐标及地图的目标显示级别,换算得到放大中心点的像素坐标;根据地图的目标显示级别,得到需显示的单个目标瓦片的像素尺寸;根据地图可视区域的像素尺寸和放大中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个目标瓦片的像素尺寸得到可视区域内的目标瓦片。
- 一种控制电子地图缩小的方法,其中,该方法包括:在接收到缩小地图的指令时,确定缩小到的目标显示级别,查找出目标显示级别中需显示的多个目标瓦片;其中,目标显示级别比当前显示级别高;按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片;选择预加载显示级别,查找出预加载显示级别中边缘区域需加载的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片。
- 根据权利要求15所述的方法,其中,所述预加载显示级别比目标显示级别高,所述预加载瓦片所表示的地图范围包括除了当前显示的瓦片所表示的地图范围之外由所述多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
- 根据权利要求15或16所述的方法,其中,所述按照当前显示级别和目标显示级别之间的级别差加载并缩小显示当前显示的瓦片,包括:将当前显示的瓦片的横向宽度和纵向高度均缩小为1/p显示,其中,p=2q,q为自然数,表示目标显示级别和当前显示级别之间的级别差;所述按照预加载显示级别和目标显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和目标显示级别之间的级别差。
- 根据权利要求15-17任一项所述的方法,其中,该方法还包括:设置本地缓存;将已显示的瓦片保存在本地缓存中。
- 根据权利要求15-18任一项所述的方法,其中,该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。
- 根据权利要求15-19任一项所述的方法,其中,所述按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断所述预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。
- 根据权利要求15-20任一权利要求所述的方法,其中,所述加载并显示所述目标瓦片以替换对应位置的缩小的当前显示的瓦片和放大的预加载瓦片,具体包括:在加载目标瓦片的同时,增加缩小的当前显示的瓦片和放大的预加载瓦片的透明度;当加载目标瓦片的操作完成时,移除缩小的当前显示的瓦片和放大的预加载瓦片以及显示目标瓦片。
- 根据权利要求15-21任一权利要求所述的方法,其中,所述查找出目标显示级别中需显示的多个目标瓦片,包括:根据地图可视区域的缩小中心点的地理位置坐标及地图的目标显示级别,换算得到缩小中心点的像素坐标;根据地图的目标显示级别,得到需显示的单个目标瓦片的像素尺寸;根据地图可视区域的像素尺寸和缩小中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个目标瓦片的像素尺寸得到可视区域内的目标瓦片。
- 一种控制电子地图平移的方法,其中,该方法包括:在接收到平移地图的指令时,查找出需加载显示的多个目标瓦片;基于当前显示级别选择预加载显示级别,查找出预加载显示级别中与所述目标瓦片对应的预加载瓦片;按照优先顺序获取预加载瓦片和目标瓦片,按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片;当获取到目标瓦片后,加载并显示所述目标瓦片以替换对应位置的放大预加载瓦片。
- 根据权利要求23所述的方法,其中,所述预加载显示级别比当前显示级别高,所述预加载瓦片所表示的地图范围包括所述多个目标瓦片所表示的地图范围,且各预加载瓦片所对应的地理面积为各目标瓦片所对应的地理面积的n倍,n=4k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
- 根据权利要求23或24所述的方法,其中,所述按照预加载显示级别和当前显示级别之间的级别差加载并放大显示预加载瓦片,包括:将各个预加载瓦片的横向宽度和纵向高度均放大m倍显示,其中,m=2k,k为自然数,表示预加载显示级别和当前显示级别之间的级别差。
- 根据权利要求23-25任一项所述的方法,其中,该方法还包括:设置本地缓存;将已显示的瓦片保存在本地缓存中。
- 根据权利要求23-26任一项所述的方法,其中,该方法还包括:在将已显示的瓦片保存在本地缓存中时,若本地缓存的容量不足,则从本地缓存中移除最近最少使用的瓦片。
- 根据权利要求23-27任一项所述的方法,其中,所述按照优先顺序获取预加载瓦片和目标瓦片具体包括:判断所述预加载瓦片和目标瓦片是否在本地缓存中,若判断为是,则从本地缓存中读取预加载瓦片和目标瓦片,若判断为否,则从服务器下载预加载瓦片和目标瓦片。
- 根据权利要求23-28任一权利要求所述的方法,其中,所述加载并显示所述目标瓦片以替换对应位置的放大的预加载瓦片,具体包括:在加载目标瓦片的同时,增加放大的预加载瓦片的透明度;当加载目标瓦片的操作完成时,移除放大的预加载瓦片以及显示目标瓦片。
- 一种计算电子地图可视区域内的瓦片的方法,该方法包括:根据地图可视区域的中心点的地理位置坐标及地图的当前显示级别,换算得到中心点的像素坐标;根据地图的当前显示级别,得到当前显示级别的单个瓦片的像素尺寸;根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;以及根据地图可视区域的两个相对的顶点的像素坐标和当前显示级别的单个瓦片的像素尺寸得到可视区域内的瓦片编号。
- 根据权利要求30所述的方法,其中,所述根据地图可视区域的两个相对的顶点的像素坐标和需显示的单个瓦片的像素尺寸得到地图可视区域内的瓦片编号,包括:得到两个相对的顶点所在的瓦片的横向索引编号和纵向索引编号;以及选取位于两个相对的顶点所在的瓦片的横向索引编号之间的横向索引编号以及位于两个相对的顶点所在的瓦片的纵向索引编号之间的纵向索引编号,即得到地图可视区域内的瓦片编号;其中,所述得到两个相对的顶点所在的瓦片的横向索引编号和纵向索引编号,具体包括:对所述顶点分别利用顶点的像素坐标减去地图的原点的像素坐标得到横坐标的差值和纵坐标的差值,利用横坐标的差值除以单个瓦片的像素宽度得到横向索引编号,利用纵坐标的差值除以单个瓦片的像素高度得到纵向索引编号。
- 根据权利要求30或31所述的方法,其中,该方法还包括:根据地图可视区域的中心点的地理位置坐标及预加载级别计算至少一个预加载级别中与可视区域对应的预加载瓦片的编号;或根据预加载级别与当前显示级别之间的级别差将当前显示级别下地图可视区域内的瓦片编号进行除法取整运算或乘法运算,计算至少一个预加载级别中与可视区域内的瓦片对应的预加载瓦片的编号;其中,所述预加载级别,为与当前显示级别的级别差在设置的范围内的至少一个级别。
- 根据权利要求30-32任一项所述的方法,其中,所述根据地图可视区域的中心点的地理位置坐标及预加载级别计算至少一个预加载级别中与可视区域对应的预加载瓦片的编号,具体包括:根据地图可视区域的中心点的地理位置坐标及预加载级别,换算得到中心点的像素坐标;根据地图的预加载级别,得到预加载级别的单个瓦片的像素尺寸;根据地图可视区域的像素尺寸和中心点的像素坐标,得到地图可视区域的两个相对的顶点的像素坐标;以及根据地图可视区域的两个相对的顶点的像素坐标和预加载级别的单个瓦片的像素尺寸得到预加载级别中与可视区域对应的预加载瓦片的编号。
- 根据权利要求30-33任一项所述的方法,其中,所述根据预加载级别与当前显示级别之间的级别差将当前显示级别下地图可视区域内的瓦片的编号进行除法取整运算或乘法运算,包括:若预加载级别高于当前显示级别,则将当前显示级别下地图可视区域内的瓦片的横向索引编号和纵向索引编号分别除以m并取整,其中,m=2k,k为自然数,表示预加载级别和当前显示级别之间的级别差;若预加载级别低于当前显示级别,则将当前显示级别下地图可视区域内的瓦片的横向索引编号和纵向索引编号分别乘p并根据乘法运算结果得到p个相邻的索引编号,其中,p=2q,q为自然数,表示当前显示级别和预加载级别之间的级别差。
- 根据权利要求30-34任一项所述的方法,其中,所述地图可视区域的两个相对的顶点包括:地图可视区域的左上顶点和右下顶点,或,地图可视区域的右上顶点和左下顶点。
- 根据权利要求30-35任一项所述的方法,其中,该方法还包括:在接收到缩放地图的指令时,根据地图的缩放焦点中心的地理位置坐标及地图缩放之后的目标显示级别,换算得到缩放焦点中心的像素坐标;根据目标显示级别,得到目标显示级别下的单个瓦片的像素尺寸;根据地图可视区域的像素尺寸和缩放焦点中心的像素坐标,得到地图缩放之后的可视区域的两个相对的顶点的像素坐标;以及根据地图缩放之后的可视区域的两个相对的顶点的像素坐标和目标显示级别下的单个瓦片的像素尺寸得到地图缩放之后的可视区域内的瓦片的编号。
- 一种电子地图瓦片请求队列处理方法,其中,该方法包括:根据接收到的电子地图交互指示,确定待下载的目标级别瓦片请求以及预加载级别瓦片请求;将所述目标级别瓦片请求及预加载级别瓦片请求加入电子地图瓦片请求队列中,且优先于原队列中原有的瓦片请求进行处理。
- 根据权利要求37所述的方法,其中,该方法还包括,在将所述目标级别瓦片请求及预加载级别瓦片请求加入瓦片请求队列之前,取消瓦片请求队列中的部分请求或全部请求。
- 根据权利要求37或38所述的方法,其中,所述取消瓦片请求队列中的部分请求或全部请求,具 体包括:将瓦片请求队列中的部分请求或全部请求的源属性设置为已经缓存好的文件。
- 根据权利要求37-39任一项所述的方法,该方法还包括:在取消瓦片请求队列中的部分请求或全部请求时,判断是否强制清除正在执行的请求,若判断为是,则强制清除正在执行的请求,若判断为否,则中断所述正在执行的请求并在检测到瓦片请求队列中请求的数目达到最大值时取消所述正在执行的请求。
- 根据权利要求37-40任一项所述的方法,其中,所述取消瓦片请求队列中的部分请求,包括:按照加入瓦片请求队列的时间顺序,将加入瓦片请求队列的时间早的部分请求取消。60、根据权利要求6-41任一项所述的方法,其中,所述提取所述拼音文本的特征,将提取的特征形成所述拼音文本的特征向量,具体包括:以单个汉字为切分粒度提取所述拼音文本的特征,并使用向量空间模型将提取的特征形成所述拼音文本的特征向量。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求6至60中的任一个所述的方法。
- 一种计算机可读介质,其中存储了如权利要求42所述的计算机程序。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/108,969 US9728167B2 (en) | 2013-12-30 | 2014-09-23 | Device and method for controlling electronic map |
US15/666,245 US9972285B2 (en) | 2013-12-30 | 2017-08-01 | Device and method for controlling electronic map |
Applications Claiming Priority (10)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310745782.7 | 2013-12-30 | ||
CN201310746249.2A CN103700126B (zh) | 2013-12-30 | 2013-12-30 | 一种控制电子地图缩放的装置及对应方法 |
CN201310745527.2 | 2013-12-30 | ||
CN201310745517.9 | 2013-12-30 | ||
CN201310744408.5 | 2013-12-30 | ||
CN201310745527.2A CN103699670B (zh) | 2013-12-30 | 2013-12-30 | 一种电子地图瓦片请求队列处理装置和处理方法 |
CN201310746249.2 | 2013-12-30 | ||
CN201310745517.9A CN103714164B (zh) | 2013-12-30 | 2013-12-30 | 一种控制电子地图平移的装置及对应方法 |
CN201310744408.5A CN103699439B (zh) | 2013-12-30 | 2013-12-30 | 一种计算电子地图可视区域内的瓦片的装置和方法 |
CN201310745782.7A CN103700125B (zh) | 2013-12-30 | 2013-12-30 | 一种电子地图控制装置和电子地图控制方法 |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/108,969 A-371-Of-International US9728167B2 (en) | 2013-12-30 | 2014-09-23 | Device and method for controlling electronic map |
US15/666,245 Continuation US9972285B2 (en) | 2013-12-30 | 2017-08-01 | Device and method for controlling electronic map |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015101070A1 true WO2015101070A1 (zh) | 2015-07-09 |
Family
ID=53493147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/087173 WO2015101070A1 (zh) | 2013-12-30 | 2014-09-23 | 一种控制电子地图的装置和方法 |
Country Status (2)
Country | Link |
---|---|
US (2) | US9728167B2 (zh) |
WO (1) | WO2015101070A1 (zh) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10593074B1 (en) * | 2016-03-16 | 2020-03-17 | Liberty Mutual Insurance Company | Interactive user interface for displaying geographic boundaries |
US10895954B2 (en) * | 2017-06-02 | 2021-01-19 | Apple Inc. | Providing a graphical canvas for handwritten input |
CN107274344B (zh) * | 2017-06-05 | 2020-10-23 | 上海蔚来汽车有限公司 | 基于资源分布的地图缩放方法及系统、存储器和控制设备 |
CN109542987B (zh) * | 2018-10-09 | 2021-10-22 | 中国电子科技集团公司第二十八研究所 | 一种基于Canvas的在线地图保存方法 |
CN110347950B (zh) * | 2019-06-27 | 2021-09-14 | 武汉光庭信息技术股份有限公司 | 一种移动端web地图的显示方法及系统 |
CN112800164A (zh) * | 2021-03-17 | 2021-05-14 | 统信软件技术有限公司 | 一种地图加载方法、装置、计算设备及可读存储介质 |
CN115775285B (zh) * | 2022-12-09 | 2023-09-15 | 杭州滨电信息技术有限公司 | 基于优先队列的客户端自适应地图矢量线简化方法及系统 |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819530A (zh) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | 电子地图的显示方法及装置 |
CN102880440A (zh) * | 2012-09-29 | 2013-01-16 | 广东威创视讯科技股份有限公司 | 拼接墙显示地图的方法与系统 |
US20130124563A1 (en) * | 2011-11-16 | 2013-05-16 | Google Inc. | Controlling pre-fetching of map data tiles based on selectable parameters |
US20130147846A1 (en) * | 2011-12-12 | 2013-06-13 | Google Inc. | Pre-fetching map tile data along a route |
CN103699670A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种电子地图瓦片请求队列处理装置和处理方法 |
CN103700125A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种电子地图控制装置和电子地图控制方法 |
CN103700126A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种控制电子地图缩放的装置及对应方法 |
CN103699439A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种计算电子地图可视区域内的瓦片的装置和方法 |
CN103714164A (zh) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | 一种控制电子地图平移的装置及对应方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7315259B2 (en) * | 2005-08-11 | 2008-01-01 | Google Inc. | Techniques for displaying and caching tiled map data on constrained-resource services |
US20090027418A1 (en) * | 2007-07-24 | 2009-01-29 | Maru Nimit H | Map-based interfaces for storing and locating information about geographical areas |
US8863256B1 (en) * | 2011-01-14 | 2014-10-14 | Cisco Technology, Inc. | System and method for enabling secure transactions using flexible identity management in a vehicular environment |
US8970632B2 (en) * | 2011-12-12 | 2015-03-03 | Google Inc. | Systems and methods for temporary display of map data stored in a display device high speed memory |
US9332387B2 (en) * | 2012-05-02 | 2016-05-03 | Google Inc. | Prefetching and caching map data based on mobile network coverage |
-
2014
- 2014-09-23 WO PCT/CN2014/087173 patent/WO2015101070A1/zh active Application Filing
- 2014-09-23 US US15/108,969 patent/US9728167B2/en active Active
-
2017
- 2017-08-01 US US15/666,245 patent/US9972285B2/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102819530A (zh) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | 电子地图的显示方法及装置 |
US20130124563A1 (en) * | 2011-11-16 | 2013-05-16 | Google Inc. | Controlling pre-fetching of map data tiles based on selectable parameters |
US20130147846A1 (en) * | 2011-12-12 | 2013-06-13 | Google Inc. | Pre-fetching map tile data along a route |
CN102880440A (zh) * | 2012-09-29 | 2013-01-16 | 广东威创视讯科技股份有限公司 | 拼接墙显示地图的方法与系统 |
CN103699670A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种电子地图瓦片请求队列处理装置和处理方法 |
CN103700125A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种电子地图控制装置和电子地图控制方法 |
CN103700126A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种控制电子地图缩放的装置及对应方法 |
CN103699439A (zh) * | 2013-12-30 | 2014-04-02 | 北京奇虎科技有限公司 | 一种计算电子地图可视区域内的瓦片的装置和方法 |
CN103714164A (zh) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | 一种控制电子地图平移的装置及对应方法 |
Also Published As
Publication number | Publication date |
---|---|
US9972285B2 (en) | 2018-05-15 |
US20170330532A1 (en) | 2017-11-16 |
US9728167B2 (en) | 2017-08-08 |
US20160329031A1 (en) | 2016-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015101070A1 (zh) | 一种控制电子地图的装置和方法 | |
US10529106B2 (en) | Optimizing image cropping | |
US11321593B2 (en) | Method and apparatus for detecting object, method and apparatus for training neural network, and electronic device | |
CN109977192B (zh) | 无人机瓦片地图快速加载方法、系统、设备及存储介质 | |
RU2632128C1 (ru) | Способ и система загрузки фрагментов изображения на клиентское устройство | |
AU2011270887B2 (en) | Alternative semantics for zoom operations in a zoomable scene | |
US6873329B2 (en) | System and method for caching and rendering images | |
US11320975B2 (en) | Automatically generating and applying graphical user interface resize-constraints based on design semantics | |
JP7032451B2 (ja) | デジタルマップ上のインジケータの視覚的なプロパティを動的に変更すること | |
US20140289607A1 (en) | Apparatus and method providing augmented reality contents based on web information structure | |
US8872848B1 (en) | Rendering vector data as tiles | |
US10452750B2 (en) | Systems and methods for interactively presenting a visible portion of a rendering surface on a user device | |
US9135885B2 (en) | Resolution independent client side rendering | |
CN103700126A (zh) | 一种控制电子地图缩放的装置及对应方法 | |
RU2632150C1 (ru) | Способ и система загрузки фрагментов изображения на клиентское устройство | |
EP4198962A1 (en) | Systems and methods for interactively presenting a visible portion of a rendering surface on a user device | |
CN111783508A (zh) | 用于处理图像的方法和装置 | |
US9646362B2 (en) | Algorithm for improved zooming in data visualization components | |
JP5255483B2 (ja) | オブジェクトの選択を容易にするための方法、装置およびプログラム | |
JP2012114722A (ja) | 物体追尾装置、物体追尾方法、及び物体追尾プログラム | |
CN114820878B (zh) | 图像编辑方法及设备 | |
US20130249835A1 (en) | User interface system and method | |
US10198164B1 (en) | Triggering location selector interface by continuous zooming | |
RU2643431C2 (ru) | Способ и сервер симплификации кривой | |
CN113763459B (zh) | 元素位置更新方法、装置、电子设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14876489 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15108969 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14876489 Country of ref document: EP Kind code of ref document: A1 |