CN105022732B - A kind of Configuration Online map and the method and system for generating tile caching - Google Patents
A kind of Configuration Online map and the method and system for generating tile caching Download PDFInfo
- Publication number
- CN105022732B CN105022732B CN201410152153.8A CN201410152153A CN105022732B CN 105022732 B CN105022732 B CN 105022732B CN 201410152153 A CN201410152153 A CN 201410152153A CN 105022732 B CN105022732 B CN 105022732B
- Authority
- CN
- China
- Prior art keywords
- tile
- version number
- server
- preview
- map
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000000875 corresponding Effects 0.000 claims abstract description 19
- 230000005540 biological transmission Effects 0.000 claims abstract description 10
- 238000009877 rendering Methods 0.000 claims abstract description 6
- 230000004048 modification Effects 0.000 abstract description 2
- 238000006011 modification reaction Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 1
Abstract
The application provides a kind of Configuration Online map and generates the method and system of tile caching, changes map styles in client browser, and by modified map styles data transmission to server end;Received server-side map styles data, build version number and preview tile, and the version number and preview tile are returned into client browser;Browser sends confirmation message to server-side, and confirmation message includes version number;After server-side receives the confirmation message, is searched according to the version number in confirmation message and be sliced accordingly data cached, data cached browser is returned to if it does, will be sliced;If it does not, generating whole tiles, the pattern that the version is read according to version number describes and is based on the corresponding slice of data of pattern rendering, and then system caches the slice of generation, and returns to browser.Map view pattern can be voluntarily arranged in the present invention, and the modification of energy live preview map styles is as a result, have good user experience.
Description
Technical field
The present invention relates to technical field of geographic information more particularly to Configuration Online map and generate tile caching method and
System.
Background technology
Completely new popular application of the Online Map as internet, is used by more and more Internet users, online
This block market of map is also by the increasingly favor of the investor.It is relatively common in the market to have Google, Baidu, search dog, 365 maps
Deng.
The most common ways of presentation of Online Map is tile caching at present, and geodata is pressed certain pattern by this technology
The picture as many fixed sizes is rendered in advance, and in the intended manner in various terminals(Such as browser, mobile device)
Lower display.
Tile caching online at present is configured, generated and is issued by software in server-side, and terminal user is only
The data that server-side provides can be passively used, it can not the display content of self-defining map, color matching, font etc..
Under many scenes, map content and terminal applies(Such as Web page, mobile App etc.)In pattern, style etc.
It can not unify well, can not meet the individual demand of application.
Patent as described in application publication number CN102750180A, adoption status machine express display window geographic range and
Display scale, separating interface main thread, task send thread and tile shows thread, reduce the response time of client, realize
Good man-machine interaction experience.In this patent, user, which can only see, carries out the effect after tile is cached, and cannot voluntarily determine
Justice content to be shown.
Invention content
In order to overcome the drawbacks described above of the prior art, the present invention proposes a kind of Configuration Online map and generates tile caching
Method and system.
According to an aspect of the present invention, it proposes a kind of Configuration Online map and generate tile caching method, the party
Method includes the following steps:Step A:Map datum is shown in a browser, and map styles information, including face are sent to server
Color, line width, fill color etc.;Step B:Server receives map styles data, generates the preview tile after rendering, and will be described pre-
Tile of looking at returns to browser;Step C:The preview tile that browser display receives sends confirmation message to server;D steps:
After server-side receives the confirmation message, generates all tiles and be cached in server.
According to another aspect of the present invention, the system for providing a kind of Configuration Online map and generating tile caching, packet
It includes:Style configuration and previewing module send map styles data or confirmation letter for being configured to map styles to server
Breath receives the preview tile that simultaneously display server returns;Server module, the map for receiving configuration and previewing module transmission
Pattern data sends to tile caching generation module and generates tile preview request;Receive the confirmation of configuration and previewing module transmission
Information sends to tile caching generation module and generates whole tile requests;The preview tile of tile caching generation module is received, and
The preview tile is returned into style configuration and previewing module;Tile caches generation module, for receiving server module transmission
The request of preview tile is generated, server module is returned to by map styles data render tile, and by the tile, for receiving service
Whole tiles that device module is sent generate request, generate whole tiles and are cached;
The present invention provides the method and system that a kind of Online Map configures and generates tile caching, not only solve it is existing
Line map, which can only see, carries out the effect after tile is cached, and cannot online live preview dynamic tile map defect, also
The preview tile data that server has rendered can be directly displayed, reduces system response time, improves user experience.
Description of the drawings
Fig. 1 is Configuration Online map and generates the flow chart of tile caching method;
Fig. 2 is the browser interface schematic diagram according to the application;
Fig. 3 is the flow chart of online request tile caching method;
Fig. 4 show Configuration Online map and generates the schematic diagram of the system of tile caching.
As shown, in order to clearly realize the structure of the embodiment of the present invention, be labelled in figure specific structure and
Device, but signal needs are only for, it is not intended to limit the invention in the specific structure, device and environment, according to specific
Need, these devices and environment can be adjusted or changed by those skilled in the art, the adjustment that is carried out or
Person's modification is still included in the range of appended claims.
Specific implementation mode
To a kind of Configuration Online map provided by the invention and generate tile caching in the following with reference to the drawings and specific embodiments
Method and system is described in detail.
In the following description, by multiple and different aspects of the description present invention, however, for common skill in the art
For art personnel, the present invention can be implemented just with some or all structures or flow of the present invention.In order to explain
Definition for, specific number, configuration and sequence are elaborated, however, it will be apparent that these specific details the case where
Under can also implement the present invention.It in other cases, will no longer for some well-known features in order not to obscure the present invention
It is described in detail.
Configuration Online map is provided shown in Fig. 1 and generates tile caching implementation flow chart, is included the following steps:Step A:
Map datum is shown in a browser, map styles information, including color, line width, fill color etc. is sent to server, 1 in Fig. 1
It show browser and sends configuration style information to server.;Step B:Server receives map styles data, generates after rendering
Preview tile, and the preview tile is returned into browser, in Fig. 14 show server preview tile is returned to it is clear
Look at device;Step C:Browser sends confirmation message to server, as shown in 5 in Fig. 1;D steps:Server-side receives the confirmation
After information, all tiles are generated, are then cached in server, 6 show and request to generate all tiles in Fig. 1,7 institutes in Fig. 1
It is shown as caching all tiles.
In step, map styles data are that JSON describes file, and is communicated with server by http protocol.
In stepb, further, the corresponding globally unique version number of map styles is generated in the server, by version
This number returns to browser, at this point, browser sends tile preview request to server, wherein including version number, server is received
It is data cached according to version number's lookup tile in request to after the preview request, if it does, the tile found is cached number
According to returning to browser;If it does not, according to version number read the corresponding pattern of the version describe and ask be based on the pattern
It renders corresponding tile data, generates and return to browser after tile data, 2 show and request to generate preview tile in Fig. 1, scheme
3 show generation preview tile in 1.
Fig. 4 show Configuration Online map and generates the schematic diagram of the system of tile caching, including:Style configuration and preview
Module, server module and tile cache generation module.
Style configuration and previewing module, for being configured to map styles, to server send map styles data or
Confirmation message receives the preview tile that simultaneously display server returns;
Server module, the map styles data for receiving configuration and previewing module transmission, caches to tile and generates mould
Block, which is sent, generates tile preview request;The confirmation message for receiving configuration and previewing module transmission, to tile caching generation module hair
Send generation whole tile requests;The preview tile of tile caching generation module is received, and the preview tile is returned into style configuration
And previewing module;
Tile caches generation module, the generation preview tile request for receiving server module transmission, by map styles
Data render tile, and the tile is returned into server module, whole tiles generation for receiving server module transmission is asked
It asks, generate whole tiles and is cached.
Further, as shown in figure 3, server module be additionally operable to generate the map styles data of reception it is globally unique
Version number preserves version number and map styles corresponding informance, and version number is returned to style configuration and previewing module;The sample
Formula configures and previewing module is additionally operable to send preview request, and preview request carries version number;The server module is additionally operable to sentence
Tile caching in disconnected preview request corresponding to version number whether there is, if it does, tile caching is returned to server module,
If the tile caching corresponding to version number is not present, taken in the preview tile request sent to tile caching generation module
The corresponding map styles information of band version number, pattern generates, renders tile caching generation module according to the map, and returns to server
Module, then server module tile is returned into style configuration and previewing module again.
Further, the style configuration in user browser and previewing module include a map cases, for directly aobvious
Show the preview tile data that server has rendered.Map cases are there are VERSION attributes, after updating style configuration every time, to
Server-side sends request, and server generates and returns to corresponding version VERSION_ID, then, by map cases
In VERSION attributes, once the VERSION attributes of map cases are varied from, map cases will re-request preview tile,
And it is attached to the VERSION_ID stored in VERSION attributes in the request, the corresponding request examples of this VERSION_ID are as follows:
http://<host>/map/VERSION_ID?zoom=16&row=0&col=0
After server receives the request, it is data cached that tile is searched according to VERSION_ID, if it does, will find
Tile is data cached to return to browser;It describes and asks if it does not, reading the corresponding pattern of the version according to version number
Based on the corresponding tile data of pattern rendering, browser is sent back by http response after generation tile data, and be shown to
In map cases.
Claims (7)
1. a kind of Configuration Online map and the method for generating tile caching, including:
Step A:Map datum is shown in a browser, and map styles data are sent to server;
Step B:Server receives map styles data, generates the preview tile after rendering, and the preview tile is returned to
Browser;
Step C:Browser shows the preview tile received, and confirmation message is sent to server;
D steps:After server receives the confirmation message, generates all tiles and is cached in server,
Wherein, step B includes:
B1 steps:Server receives map styles data, and globally unique version number is generated for map styles, preserve version number with
Version number is returned to browser by pattern corresponding informance;
B2 steps:Browser sends tile preview request and version number to server;With
B3 steps:Server receives the tile preview request and version number, data cached according to version number's lookup tile, if
In the presence of returning to browser by the tile found is data cached;If it does not, reading the corresponding sample of the version according to version number
Formula describes and is based on the corresponding tile data of pattern rendering, and returns to browser.
2. according to the method described in claim 1, wherein:
B2 steps are:It detects whether version number changes in browser, if changed, sends tile preview request, and asking
In subsidiary version number;And
B3 steps are:Server receives the tile preview request and version number, the corresponding pattern of version number is searched, in conjunction with map
Data and the pattern generate tile, and tile are returned to browser in real time.
3. according to the method described in claim 1, wherein, map styles data include color, line width, fill color in step A.
4. a kind of Configuration Online map and the system for generating tile caching, including:
Style configuration and previewing module send map styles data or confirmation for being configured to map styles to server
Information receives the preview tile that simultaneously display server returns;
Tile caches generation module, the generation preview tile request for receiving server module transmission, by map styles data
Tile is rendered, and the tile is returned into server module, the generation whole tile request for receiving server module transmission is raw
At whole tiles and cached;With
Server module caches to tile for the map styles data that receiving style configuration and previewing module are sent and generates mould
Block, which is sent, generates the request of preview tile;The confirmation message that receiving style configures and previewing module is sent caches to tile and generates mould
Block, which is sent, generates whole tile requests;The preview tile of tile caching generation module is received, and the preview tile is returned into pattern
Configuration and previewing module.
5. system according to claim 4, wherein the server module is additionally operable to the map styles data life to reception
At global unique version number, version number and map styles corresponding informance are preserved, and return to version number to style configuration and preview
Module.
6. system according to claim 4, wherein the style configuration and previewing module are additionally operable to send preview request,
Preview request carries version number.
7. system according to claim 4, wherein the server module is additionally operable to judge institute of version number in preview request
Corresponding tile caching whether there is, if it does, tile caching is returned to server module, if watt corresponding to version number
Piece caching is not present, then version number is carried in the generation preview tile request sent to tile caching generation module correspondingly
Figure pattern data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410152153.8A CN105022732B (en) | 2014-04-16 | A kind of Configuration Online map and the method and system for generating tile caching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410152153.8A CN105022732B (en) | 2014-04-16 | A kind of Configuration Online map and the method and system for generating tile caching |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105022732A CN105022732A (en) | 2015-11-04 |
CN105022732B true CN105022732B (en) | 2018-08-31 |
Family
ID=
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279487A (en) * | 2013-04-25 | 2013-09-04 | 中国科学院遥感与数字地球研究所 | Organization and management method of map tile caching |
CN103425754A (en) * | 2013-07-24 | 2013-12-04 | 浙江大学 | Tile-type map service caching real-time dynamic update method applicable to on-line edit of user |
US8683008B1 (en) * | 2011-08-04 | 2014-03-25 | Google Inc. | Management of pre-fetched mapping data incorporating user-specified locations |
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8683008B1 (en) * | 2011-08-04 | 2014-03-25 | Google Inc. | Management of pre-fetched mapping data incorporating user-specified locations |
CN103279487A (en) * | 2013-04-25 | 2013-09-04 | 中国科学院遥感与数字地球研究所 | Organization and management method of map tile caching |
CN103425754A (en) * | 2013-07-24 | 2013-12-04 | 浙江大学 | Tile-type map service caching real-time dynamic update method applicable to on-line edit of user |
Non-Patent Citations (1)
Title |
---|
《基于REST的瓦片地图Web服务研究》;关颖;《中国优秀硕士学位论文全文数据库(基础科学辑)》;20140415(第4期);A008-41 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107004028B (en) | Scalable3D mapping system | |
US9661059B2 (en) | System and method for zero latency browsing | |
TWI396991B (en) | Context avatar | |
KR20150026367A (en) | Method for providing services using screen mirroring and apparatus thereof | |
JP6580132B2 (en) | Method and apparatus for providing information associated with media content | |
CN104519130B (en) | A kind of data sharing caching method across IDC | |
JP2016518647A (en) | Campaign optimization for experience content datasets | |
CN103493455A (en) | Global flow management using modified hostname | |
JP2016533602A (en) | Router-based networking control method, apparatus, router, program, and recording medium | |
JP6517182B2 (en) | Identifier synchronization system, advertisement delivery system, and program | |
WO2013029388A1 (en) | Method for accessing augmented reality user context | |
CN103839479A (en) | High-efficiency electronic-map lettering interaction method | |
CN108021586A (en) | A kind of page generation method and device | |
JP2014199648A (en) | Distribution control system, distribution system, distribution control method, and program | |
JP2016005015A (en) | Content delivery system and content delivery device | |
CN105022732B (en) | A kind of Configuration Online map and the method and system for generating tile caching | |
CN108600509B (en) | Method and device for sharing information in three-dimensional scene model | |
US20210234941A1 (en) | Wireless Device, Computer Server Node, and Methods Thereof | |
JP5823668B2 (en) | Information processing apparatus, message transmission method, and program | |
KR102027172B1 (en) | VR content streaming server and method based on ROI information | |
CA2929829C (en) | Displaying activity across multiple devices | |
JP2014533869A (en) | Method and system for accessing a miniblog album and miniblog client | |
TWI493473B (en) | Alternate visual presentations | |
CN112784201A (en) | Webpage display method, device, terminal and storage medium | |
CN111047714A (en) | Virtual tourism system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |