CN110347950B - Display method and system of mobile terminal web map - Google Patents

Display method and system of mobile terminal web map Download PDF

Info

Publication number
CN110347950B
CN110347950B CN201910570046.XA CN201910570046A CN110347950B CN 110347950 B CN110347950 B CN 110347950B CN 201910570046 A CN201910570046 A CN 201910570046A CN 110347950 B CN110347950 B CN 110347950B
Authority
CN
China
Prior art keywords
grid
map
server
mvt
grid tile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910570046.XA
Other languages
Chinese (zh)
Other versions
CN110347950A (en
Inventor
李森林
余俊
蔡春亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Kotei Informatics Co Ltd
Original Assignee
Wuhan Kotei Informatics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Kotei Informatics Co Ltd filed Critical Wuhan Kotei Informatics Co Ltd
Priority to CN201910570046.XA priority Critical patent/CN110347950B/en
Publication of CN110347950A publication Critical patent/CN110347950A/en
Application granted granted Critical
Publication of CN110347950B publication Critical patent/CN110347950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Instructional Devices (AREA)

Abstract

The invention relates to a display method and a system of a mobile terminal web map, wherein the method comprises the following steps: when the map scale in the browsing request of the user is judged to be larger than a set threshold value, sending a request of map data of a corresponding grid tile to a grid tile server; the grid server judges whether map data of a grid tile corresponding to the browsing request is stored locally, if so, the map data of the grid tile is returned; if not, requesting to a MVT (Mapbox Vector Tile) server to manufacture the grid Tile, storing the map data of the grid Tile by the grid server after the manufacture is finished, and returning the map data of the grid Tile to the client; and the client draws a map according to the received map data of the grid tiles and displays the map. The grid tiles are introduced into the large-scale display of the Mapbox map, the grid tiles are dynamically generated by the server side by means of MVT map data, and the problem that the display speed of the large-scale map at the mobile terminal is low can be effectively solved on the premise that the map display effect is not lost.

Description

Display method and system of mobile terminal web map
Technical Field
The invention relates to the field of web maps, in particular to a display method and a display system of a mobile terminal web map.
Background
The network map tile service (web map tile service) is a tile-based network map service, which organizes map data by taking tiles as units, and a user acquires the map tile data according to a required spatial range to realize quick access to a local map. The grid tile is to cut the image into JPEG or PNG pictures, and the vector layer has various coding formats, such as shapefile, GeoJSON, and the like. In order to save storage space and facilitate management, Mapbox sets out an encoding method of vector tile data: the Vector Tile specification can save space and simultaneously realize the quick drawing of a map and the quick query of attribute data.
However, when a web map is displayed on a mobile end web by adopting the Mapbox technology at present, the problems of large data size, large display calculation amount and slow map movement exist in a large scale.
Disclosure of Invention
The invention provides a method and a system for displaying a mobile terminal web map, aiming at the technical problems in the prior art.
The technical scheme for solving the technical problems is as follows: a display method of a mobile-side web map comprises the following steps:
step 1, when judging that a map scale in a browsing request of a user is larger than a set threshold value, sending a request of map data of a corresponding grid tile to a grid tile server;
step 2, the grid server judges whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, the map data of the grid tile is returned; if not, requesting to an MVT server to manufacture the grid tile, and after the manufacture is completed, the grid server stores the map data of the grid tile and returns the map data of the grid tile to the client;
and 3, drawing a map and displaying the map by the client according to the received map data of the grid tiles.
A display system of a mobile-side web map, the display system comprising: the system comprises a client, a grid server and an MVT server which are mutually connected in a communication manner;
the client receives a browsing request of a user, and sends a request of map data of a corresponding grid tile to a grid tile server when judging that a map scale in the browsing request is larger than a set threshold value; drawing a map according to the received map data and displaying the map;
when the grid server receives a request of the map data of the grid tile sent by the client, judging whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, returning the map data of the grid tile to the client; if not, sending a request to an MVT server to manufacture the grid tile; receiving the grid tile manufactured by the MVT server, storing map data of the grid tile and returning the map data of the grid tile to the client;
and after receiving the grid tile manufacturing request of the grid server, the MVT server returns the MVT data corresponding to the grid tile to manufacture the grid tile and transmits the grid tile to the grid tile server.
The invention has the beneficial effects that: the grid tiles are introduced into the large-scale display of the Mapbox map, the grid tiles are dynamically generated by a server side by utilizing MVT map data, and the map data of the grid tiles have the characteristics of small data volume, small display calculation amount and quick map movement, so that the problem of low display speed of the large-scale Mapbox map at the mobile terminal can be effectively solved on the premise of not losing the map display effect.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the step 1 further comprises: and when the map scale in the browsing request is judged to be less than or equal to the set threshold value, requesting corresponding MVT map data from the MVT server, returning the MVT map data to the client after the MVT server finds the corresponding MVT map data, and drawing a map according to the MVT map data and displaying the map according to an MVT mode by the client.
The threshold value of the map scale is adjusted and set according to the size of the area to which the map belongs or the habit of a user.
And (3) when the grid server requests the MVT server to manufacture the map data of the grid tile in the step (2), returning information in the manufacture of the grid tile to the client, and drawing a tile grid line by the client.
The process that the MVT server receives the request of the grid tile server to make the map data of the grid tile in the step 2 includes:
step 201, creating a corresponding grid tile manufacturing process;
step 202, the MVT server returns the corresponding MVT data of the grid tile to the manufacturing process;
step 203, the manufacturing process manufactures the grid tile according to the returned MVT data and transmits the grid tile to the grid tile server;
and step 204, the grid tile server receives and stores the map data of the grid tile and then exits the manufacturing process.
And when the client judges that the map scale in the browsing request of the user is smaller than or equal to a set threshold value, the client sends a request of corresponding MVT map data to the MVT server, and the MVT server returns the MVT map data to the client after finding the corresponding MVT map data.
When the client receives the map data of the grid tiles sent by the grid server, a map is drawn according to the map data of the grid tiles and displayed;
and when the client receives the MVT map data sent by the MVT server, drawing a map according to the MVT map data and displaying the map according to an MVT mode.
After the MVT server receives a request of the grid tile server to manufacture the map data of the grid tile, a corresponding manufacturing process of the grid tile is created, the MVT data of the corresponding grid tile is returned to the manufacturing process, and the manufacturing process manufactures the grid tile according to the returned MVT data and transmits the grid tile to the grid tile server.
The method has the advantages that the size of the threshold of the map scale can be flexibly set according to needs, and when the city to which the map belongs is large, the set threshold can be properly increased, and the storage pressure of the grid tile server is reduced; an appropriate threshold may also be set based on user habits, taking into account the storage and interaction capabilities of the grid tile server.
Generating and storing map data of the corresponding raster tiles when a user sends a browsing request, wherein map data of the corresponding raster tiles are not required to be generated in areas where the user does not browse; and the map data of the corresponding raster tiles are generated in the early stage when the user browses more areas, the arrival speed of the request data is high, the storage pressure of the raster tiles is reduced as much as possible, and the requirements of the user can be better met.
Drawings
Fig. 1 is a flowchart of a method for displaying a mobile-end web map according to the present invention;
fig. 2 is a block diagram of a display system of a mobile-end web map according to the present invention;
fig. 3 is a flowchart illustrating interaction among units included in an embodiment of a display system for a mobile-side web map according to the present invention.
In the drawings, the components represented by the respective reference numerals are listed below:
1. client side, 2, grid tile server, 3, MVT server.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
The invention provides a method for displaying a mobile terminal web map, as shown in fig. 1, which is a flowchart of the method for displaying a mobile terminal web map provided by the invention, and as can be seen from fig. 1, the method includes:
step 1, when judging that the map scale in the browsing request of the user is larger than a set threshold value, sending a request of map data of a corresponding grid tile to a grid tile server.
Step 2, the grid server judges whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, the map data of the grid tile is returned; and if not, requesting the MVT server to manufacture the grid tile, storing the map data of the grid tile by the grid server after the manufacture is finished, and returning the map data of the grid tile to the client.
And 3, drawing a map and displaying the map according to the received map data of the grid tiles by the client.
According to the display method of the mobile terminal web map, the grid tiles are introduced into the large-scale display of the Mapbox map, the grid tiles are dynamically generated by the server side by means of MVT map data, the map data of the grid tiles have the characteristics of small data size, small display calculation amount and rapid map movement, and the problem of slow display speed of the large-scale Mapbox map at the mobile terminal can be effectively solved on the premise of not losing the map display effect.
Example 1
Embodiment 1 provided by the present invention is an embodiment of a method for displaying a mobile-side web map provided by the present invention, where the embodiment of the method for displaying a mobile-side web map includes:
step 1, when judging that the map scale in the browsing request of the user is larger than a set threshold value, sending a request of map data of a corresponding grid tile to a grid tile server.
When the user browses the web map at the client, the size of the map scale in the browsing request can be judged according to the operation instruction of the user.
Further, step 1 further comprises: and when the map scale in the browsing request is judged to be less than or equal to the set threshold value, requesting corresponding MVT map data from the MVT server, returning the MVT map data to the client after the MVT server finds the corresponding MVT map data, and drawing and displaying a map according to the MVT map data and the MVT mode by the client.
Preferably, the threshold size of the map scale may be flexibly set according to needs, and may be determined according to the size of the area to which the map belongs, the habits of the user, and the like.
For example, when the city to which the map belongs is large, the set threshold value can be appropriately increased, and the storage pressure of the grid tile server is reduced.
An appropriate threshold may also be set based on user habits, taking into account the storage and interaction capabilities of the grid tile server.
Step 2, the grid server judges whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, the map data of the grid tile is returned; and if not, requesting the MVT server to manufacture the grid tile, storing the map data of the grid tile by the grid server after the manufacture is finished, and returning the map data of the grid tile to the client.
Further, when the grid server requests the MVT server to manufacture map data of the grid tiles in the step 2, information in the grid tile manufacturing process is returned to the client side, and the client side draws tile grid lines.
The process that the MVT server receives the request of the grid tile server to manufacture the map data of the grid tile in the step 2 comprises the following steps:
step 201, a corresponding grid tile making process is created.
In step 202, the MVT server returns MVT data of the corresponding grid tile to the manufacturing process.
Step 203, the making process makes a grid tile according to the returned MVT data and transmits the grid tile to a grid tile server.
And step 204, the grid tile server receives and stores the map data of the grid tiles and then quits the manufacturing process.
And 3, drawing a map and displaying the map by the client according to the received grid tiles.
In the embodiment of the display method of the mobile terminal web map, the map data of the corresponding grid tile is generated and stored when a user sends a browsing request, and the map data of the corresponding grid tile is not required to be generated in the area without the browsing of the user; and the map data of the corresponding raster tiles are generated in the early stage when the user browses more areas, the arrival speed of the request data is high, the storage pressure of the raster tiles is reduced as much as possible, and the requirements of the user can be better met.
Example 2
Embodiment 2 provided by the present invention is an embodiment of a display system of a mobile-side web map provided by the present invention, and fig. 2 is a block diagram of a structure of the display system of the mobile-side web map provided by the present invention, and fig. 3 is a flowchart of interaction between units included in the display system of the mobile-side web map provided by the present invention. As can be seen from fig. 2 and 3, the display system of the mobile-end web map provided by the present invention includes a client 1, a grid tile server 2 and an MVT server 3, which are communicatively connected to each other.
The method comprises the steps that a client 1 receives a browsing request of a user, and sends a request of map data of a corresponding grid tile to a grid tile server when judging that a map scale in the browsing request is larger than a set threshold; and drawing a map according to the received map data and displaying the map.
When receiving a request of map data of a grid tile sent by the client 1, the grid server 2 judges whether the map data of the grid tile corresponding to the browsing request is stored locally, and if so, returns the map data of the grid tile to the client 1; if not, sending a request to the MVT server 3 to manufacture the grid tile; and after receiving the grid tile made by the MVT server 3, storing the map data of the grid tile and returning the map data of the grid tile to the client 1.
And after receiving the grid tile making request of the grid server 2, the MVT server 3 returns the MVT data corresponding to the grid tile to make the grid tile and transmits the grid tile to the grid tile server.
Further, when the client 1 determines that the map scale in the browsing request of the user is less than or equal to the set threshold, the client 1 sends a request of corresponding MVT map data to the MVT server 3, and the MVT server 3 returns the MVT map data to the client 1 after finding the corresponding MVT map data.
When receiving the map data of the grid tiles sent by the grid server 2, the client 1 draws and displays a map according to the map data of the grid tiles; when receiving the MVT map data sent by the MVT server 3, the client 1 draws and displays a map according to the MVT map data and an MVT mode.
After receiving the request of the grid tile server 2 for making the map data of the grid tile, the MVT server 3 creates a corresponding making process of the grid tile, returns the MVT data 3 of the corresponding grid tile to the making process, and makes the grid tile according to the returned MVT data and transmits the grid tile to the grid tile server 2.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A display method of a mobile terminal web map is characterized by comprising the following steps:
step 1, when judging that a map scale in a browsing request of a user is larger than a set threshold value, sending a request of map data of a corresponding grid tile to a grid tile server;
step 2, the grid server judges whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, the map data of the grid tile is returned; if not, requesting to an MVT server to manufacture the grid tile, and after the manufacture is finished, the grid server stores the map data of the grid tile and returns the map data of the grid tile to a client;
and 3, drawing a map and displaying the map by the client according to the received map data of the grid tiles.
2. The method of claim 1, wherein step 1 further comprises: when the map scale in the browsing request is judged to be smaller than or equal to the set threshold value, the MVT server is requested for corresponding MVT map data, and the MVT server returns the MVT map data to the client after finding the corresponding MVT map data;
and the client draws and displays a map according to the MVT map data and an MVT mode.
3. The method according to claim 1 or 2, wherein the threshold size of the map scale is adjusted according to the size of the area to which the map belongs or the habit of the user.
4. The method of claim 1, wherein when the grid server requests the MVT server to make map data for the grid tile in step 2, the grid server returns information in making the grid tile to the client, and the client draws tile grid lines.
5. The method of claim 1, wherein the step 2 of the MVT server accepting the grid tile server's request to make map data of the grid tile comprises:
step 201, creating a corresponding grid tile manufacturing process;
step 202, the MVT server returns the corresponding MVT data of the grid tile to the manufacturing process;
step 203, the manufacturing process manufactures the grid tile according to the returned MVT data and transmits the grid tile to the grid tile server;
and step 204, the grid tile server receives and stores the map data of the grid tile and then exits the manufacturing process.
6. A display system of a mobile-side web map, the display system comprising: the system comprises a client, a grid server and an MVT server which are mutually connected in a communication manner;
the client receives a browsing request of a user, and sends a request of map data of a corresponding grid tile to a grid tile server when judging that a map scale in the browsing request is larger than a set threshold value; drawing a map according to the received map data and displaying the map;
when the grid server receives a request of the map data of the grid tile sent by the client, judging whether the map data of the grid tile corresponding to the browsing request is stored locally, if so, returning the map data of the grid tile to the client; if not, sending a request to an MVT server to manufacture the grid tile; receiving the grid tile manufactured by the MVT server, storing map data of the grid tile and returning the map data of the grid tile to the client;
and after receiving the grid tile manufacturing request of the grid server, the MVT server returns the MVT data corresponding to the grid tile to manufacture the grid tile and transmits the grid tile to the grid tile server.
7. The system of claim 6, wherein the client sends a request of corresponding MVT map data to the MVT server when determining that a map scale in a browsing request of a user is less than or equal to a set threshold, and the MVT server returns the MVT map data to the client after finding the corresponding MVT map data.
8. The system of claim 7, wherein the client, upon receiving the map data of the grid tile sent by the grid server, draws a map according to the map data of the grid tile and displays the map;
and when the client receives the MVT map data sent by the MVT server, drawing a map according to the MVT map data and displaying the map according to an MVT mode.
9. The system of claim 6, wherein the MVT server receives a request from the grid tile server to create map data of the grid tile, creates a corresponding grid tile creation process, returns MVT data of the corresponding grid tile to the creation process, and creates the grid tile according to the returned MVT data and transmits the grid tile to the grid tile server.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the method for displaying a mobile-end web map according to any one of claims 1 to 5.
CN201910570046.XA 2019-06-27 2019-06-27 Display method and system of mobile terminal web map Active CN110347950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910570046.XA CN110347950B (en) 2019-06-27 2019-06-27 Display method and system of mobile terminal web map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910570046.XA CN110347950B (en) 2019-06-27 2019-06-27 Display method and system of mobile terminal web map

Publications (2)

Publication Number Publication Date
CN110347950A CN110347950A (en) 2019-10-18
CN110347950B true CN110347950B (en) 2021-09-14

Family

ID=68176741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910570046.XA Active CN110347950B (en) 2019-06-27 2019-06-27 Display method and system of mobile terminal web map

Country Status (1)

Country Link
CN (1) CN110347950B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090657B (en) * 2019-10-28 2024-04-12 吉奥时空信息技术股份有限公司 Automatic updating and instant service system for vector tiles

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134187A (en) * 2014-07-30 2014-11-05 陈军 Point-to-point tile map dynamic projection method and device
CN105302830A (en) * 2014-07-09 2016-02-03 方正国际软件(北京)有限公司 Map tile caching method and apparatus
CN106803402A (en) * 2017-04-05 2017-06-06 山东慧行天下文化传媒有限公司 Intelligent guide guide system and method based on the classification display of map pantograph ratio

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015101070A1 (en) * 2013-12-30 2015-07-09 北京奇虎科技有限公司 Device and method for controlling electronic map

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302830A (en) * 2014-07-09 2016-02-03 方正国际软件(北京)有限公司 Map tile caching method and apparatus
CN104134187A (en) * 2014-07-30 2014-11-05 陈军 Point-to-point tile map dynamic projection method and device
CN106803402A (en) * 2017-04-05 2017-06-06 山东慧行天下文化传媒有限公司 Intelligent guide guide system and method based on the classification display of map pantograph ratio

Also Published As

Publication number Publication date
CN110347950A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
US9798819B2 (en) Selective map marker aggregation
US10533871B2 (en) Rendering a map using style identifiers
CN102186067B (en) Image frame transmission method, device, display method and system
CN110599891B (en) Map rendering method for power grid equipment
CN109002452B (en) Map tile updating method and device and computer readable storage medium
CN110597900B (en) Method for generating vector slice by GDB data in real time according to needs
JP2018513441A (en) Determination of region to be superimposed, image superimposition, image display method and apparatus
CN110704770A (en) Display method and device for expansion tile map based on WebGIS environment
CN103915033A (en) Method and apparatus for rendering map, and mobile terminal
CN103677930B (en) Based on GIS data loading method and the device of spelling wall system
CN115546331A (en) Data rendering method and device, electronic equipment and computer readable medium
CN110347950B (en) Display method and system of mobile terminal web map
CN105897865B (en) A kind of network file service management system and method that agreement is unrelated
CN104063224A (en) Method and device for switching multiple fine control scenarios based on three-dimensional GIS (geographic information system)
CN205899536U (en) Geographic information service system based on tile map
CN104616354A (en) Method for quickly loading space data through three-dimensional GIS (global information system)
US8674990B1 (en) Methods and systems for fractional level of detail assignment
CN109076110B (en) Image transmission method, image transmission device and storage medium
CN113419806B (en) Image processing method, device, computer equipment and storage medium
CN114143590A (en) Video playing method, server and storage medium
CN109697756B (en) Display method and system of full-element three-dimensional scene
CN107454168B (en) Three-dimensional geological model publishing and visualization method and system based on snapshot technology
KR20220012688A (en) System and method for providing GIS web service based on the international standard S-101 platform
CN113849255B (en) Data processing method, device and storage medium
CN112989250B (en) Web service response method and device and electronic equipment

Legal Events

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