Map tile packaging method and device, map display method and device and electronic equipment
By packaging multiple map tiles into a map file in .mbtiles format, the problem of low efficiency in managing multi-level map tile files is solved, achieving efficient storage and fast reading, and simplifying the transmission and backup process.
Patent Information
- Application Number
- CN202510848119.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-24
AI Technical Summary
In existing technologies, the file management of multi-level map tiles is inefficient, has slow read and write speeds, slow migration and backup transmission, and is inconvenient to manage.
Multiple map tiles are packaged into a map file in .mbtiles format in SQLite. By obtaining the tile file and building the metadata file, the packaging tool is used to convert it into .mbtiles format, thereby achieving unified storage and management of map tiles.
It improves storage efficiency, reduces file system overhead, increases read speed, simplifies the transmission and backup process, is compatible with more map servers and clients, and preserves spatial reference information.
Smart Images

Figure CN120832391A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic map, and particularly to a map tile packaging method and device, a map display method and device, and an electronic device. BACKGROUND
[0002] With the development of electronic map technology, more and more electronic maps are included in Apps. A complete electronic map includes multiple levels of map tiles. According to a pyramid structure, the number of adjacent two levels of map tiles is in a 4-fold relationship, that is, the number of n+1 level map tiles is 4 times the number of n level map tiles.
[0003] In the related art, millions of map tiles corresponding to multiple levels of map tiles are usually stored separately, that is, each map tile is a file. Even if the files corresponding to multiple map tiles are stored in a folder, the multiple map tiles are still separate files.
[0004] However, the files corresponding to multiple map tiles have many small files, the speed of separate reading and writing is slow, the file management efficiency is low, and the migration backup transmission is slow. SUMMARY
[0005] The present application provides a map tile packaging method and device, a map display method and device, and an electronic device, which at least partially overcome the problems in the related art.
[0006] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.
[0007] According to one aspect of the present application, a map tile packaging method is provided, including: obtaining a tile file, the tile file including multiple map tiles named by coordinate triplets, the data encoding format of the multiple map tiles being the same; constructing a metadata file, the metadata file including metadata corresponding to the multiple map tiles; and converting the tile file and the metadata file into a map file in.mbtiles format of SQLite by using a packaging tool.
[0008] By packaging the multiple map tiles in a loose tile file into a map file in.mbtiles format, millions of small files are changed into a single file, reducing file system overhead and improving storage efficiency. The speed of reading data in a file is fast, changing from accessing multiple files to accessing a single file, reducing the occupation of system resources by I / O operations. A single file is convenient for transmission and backup, and is compatible with more map servers and clients. Converting the metadata file into data in a map file in.mbtiles format can preserve all spatial reference information and standardize the storage format.
[0009] In some embodiments, the metadata file comprises at least one of the following: a map name, a map type, a geographic range, a map version, a version declaration, a tile format, a minimum level, a maximum level, an initial center, a tile height, a tile width, and a tiling scheme.
[0010] In some embodiments, the obtaining the tile file comprises: obtaining a plurality of to-be-processed tiles, the plurality of to-be-processed tiles corresponding to at least two data encoding formats; converting the plurality of to-be-processed tiles into a same data encoding format to obtain the plurality of map tiles; and packing the plurality of map tiles to obtain the tile file.
[0011] According to another aspect of the present application, a map display method is also provided, comprising: obtaining a map file, the map file being a.mbtiles format file in SQLite and being packed from a tile file and a metadata file, the tile file comprising a plurality of map tiles named according to coordinate triplets, and the metadata file comprising metadata corresponding to the plurality of map tiles; performing map service publishing according to the metadata in the map file, each map tile, and the corresponding coordinate triplet; and after receiving a map tile request, feeding back a map tile corresponding to the map tile request to a requesting device so as to facilitate the requesting device to perform map display.
[0012] According to still another aspect of the present application, a map tile packing apparatus is also provided, comprising: a first obtaining module, configured to obtain a tile file, the tile file comprising a plurality of map tiles named according to coordinate triplets, the plurality of map tiles having a same data encoding format; a constructing module, configured to construct a metadata file, the metadata file comprising metadata corresponding to the plurality of map tiles; and a packing module, configured to convert the tile file and the metadata file into a map file in.mbtiles format in SQLite by using a packing tool.
[0013] In some embodiments, the first obtaining module is configured to obtain a plurality of to-be-processed tiles, the plurality of to-be-processed tiles corresponding to at least two data encoding formats; convert the plurality of to-be-processed tiles into a same data encoding format to obtain the plurality of map tiles; and pack the plurality of map tiles to obtain the tile file.
[0014] According to yet another aspect of the present application, a map display device is also provided, comprising: a second obtaining module configured to obtain a map file, the map file being a.mbtiles format file in SQLite packaged by a tile file and a metadata file, the tile file comprising a plurality of map tiles named by coordinate triplets, and the metadata file comprising metadata corresponding to the plurality of map tiles; a service publishing module configured to publish a map service according to the metadata, each map tile and corresponding coordinate triplet in the map file; and a feedback module configured to feed back a map tile corresponding to a map tile request to a requesting device after receiving the map tile request, so as to facilitate the requesting device to display a map.
[0015] According to yet another aspect of the present application, an electronic device is also provided, comprising: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned map tile packaging methods or map display methods via execution of the executable instructions.
[0016] According to yet another aspect of the present application, a computer readable storage medium is also provided, having a computer program stored thereon, the computer program being executed by a processor to implement any one of the above-mentioned map tile packaging methods or map display methods.
[0017] According to yet another aspect of the present application, a computer program product is also provided, comprising a computer program, the computer program being executed by a processor to implement any one of the above-mentioned map tile packaging methods or map display methods. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flow chart of a map tile packaging method in an embodiment of the present application is shown;
[0019] Figure 2 A flow chart of a map display method in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a map tile packaging device in an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram of a map display device in an embodiment of the present application is shown;
[0022] Figure 5 A structural block diagram of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] Example implementations are now described with reference to the drawings. Example implementations can be implemented in any of various forms, and are not limited to the examples described herein; instead, the example implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example implementations to those skilled in the art. Features described in one implementation can be combined with features described in another implementation.
[0024] Moreover, the drawings are not necessarily drawn to scale. Like reference numerals can be used to denote like parts throughout the specification and figures. Some of the blocks in the drawings can be functional blocks that represent functions implemented by a processor, software, or hardware, or a combination of a processor, software, or hardware. Some of the blocks in the drawings can be implemented as software modules, or as one or more hardware modules or integrated circuits, or as a combination of software and a processor or processors, or a combination of a software and one or more hardware modules or integrated circuits.
[0025] Figure 1 A flowchart of a method for packing map tiles in an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the method for packing map tiles provided in an embodiment of the present application includes the following S101-S103. Figure 1
[0026] S101, a tile file is obtained, the tile file including a plurality of map tiles named by coordinate triplets, the plurality of map tiles having the same data encoding format.
[0027] The tile file can be any file including a plurality of map tiles that are independent of each other, or a file including a plurality of map tiles corresponding to any region (each map tile being an independent file). An example for better understanding is that a folder contains a large number of pictures, each picture being a map tile, and the folder being the tile file.
[0028] The plurality of map tiles can be obtained by photographing by a satellite, a drone, or the like.
[0029] The coordinate triplet is used to represent the zoom level of the map tile and the position of the map tile relative to other map tiles.
[0030] For example, when the slicing scheme of the plurality of map tiles is an XYZ slicing scheme, the coordinate triplet is (x, y, z), where x and y represent the position of the map tile relative to other map tiles, and z represents the zoom level of the map tile.
[0031] In the tile file, each map tile is named by its own coordinate triplet.
[0032] In one embodiment, the obtaining the tile file can include: obtaining a plurality of to-be-processed tiles, the plurality of to-be-processed tiles corresponding to at least two data encoding formats; converting the plurality of to-be-processed tiles into a same data encoding format to obtain a plurality of map tiles, and packing the plurality of map tiles to obtain the tile file.
[0033] Generally, a.mbtiles file only contains map tiles of one format, that is, the tile format in the metadata file is a single format. If the map tiles included in the input tile file have multiple data formats, it will cause errors when the.mbtiles file is called for subsequent map services. Therefore, when multiple map tiles have multiple data formats, the formats of the multiple map tiles need to be converted and unified in advance.
[0034] Therefore, after obtaining the plurality of to-be-processed tiles, the plurality of to-be-processed tiles cannot be simply packed into a tile file, but need to be converted into a same data encoding format first, and then the tiles converted into the same data encoding format are packed into a same data encoding format.
[0035] For example, the data encoding format of the to-be-processed tiles is such that the to-be-processed tiles are vector tiles or raster tiles, and the data encoding format of the vector tiles can also be PBF or MVT, and the data encoding format of the raster tiles can also be PNG or JPG.
[0036] For example, the data encoding format of the to-be-processed tiles can be uniformly converted into PNG format. For raster tiles that are not in PNG format, any one of the following batch conversion tools can be used:
[0037] imagemagick (command line): mogrify -format webp *.png (convert to.png format)
[0038] GDAL (gdal_translate): can format conversion and compression, including conversion to.png format.
[0039] Script (for example, Python+Pillow library to implement batch file format conversion to.png format).
[0040] For vector tiles: the vector tiles can be converted into.png format raster tiles based on the core engine: Mapnik (an open source C++ map rendering engine), and the process is as follows:
[0041] Configure a map style (XML or CartoCSS, XML and CartoCSS are two markup languages used to define map styles, which are used to describe the visual representation rules of geographic features (such as roads, buildings, water areas, etc.) in a map), specify vector tiles and symbolization rules, and then let Mapnik render PNG image tiles at the specified zoom / x / y position to get.png format map tiles.
[0042] S102, construct a metadata file, the metadata file includes metadata corresponding to a plurality of map tiles.
[0043] The embodiments of the present application do not limit what the metadata corresponding to the plurality of map tiles includes.
[0044] In one embodiment, the metadata file includes at least one of the following: map name, map type, geographic range, map version, version declaration, tile format, minimum level, maximum level, initial center, tile height, tile width, and tile scheme.
[0045] For example, the metadata file includes the following:
[0046] name: China_BaseMap (map name: China BaseMap)
[0047] format: pbf (tile format: vector tile PBF)
[0048] bounds: 73.66, 18.16, 135.05, 53.55 (map range: China longitude and latitude boundary - east longitude 73.66 to 135.05, north latitude 18.16 to 53.55)
[0049] minzoom: 0 (minimum zoom level: 0 level - display global)
[0050] maxzoom: 18 (maximum zoom level: 18 level - can see street details)
[0051] tile_size: 256 (tile size: 256x256 pixels)
[0052] scheme: xyz (tile scheme: use XYZ standard, which is currently the most commonly used scheme adopted by Google / OSM, etc.)
[0053] version: "1.2.0" (version number)
[0054] The embodiments of the present application do not limit how to construct the metadata file. In one embodiment, the metadata file can be constructed manually.
[0055] S103, converting the tile files and the metadata file into a map file in.mbtiles format of SQLite by using a packing tool.
[0056] The tile files and the metadata file are input into the packing tool, and the tile files and the metadata file are converted into a map file in.mbtiles format of SQLite by the packing tool.
[0057] The packing tool reads the metadata file and understands the rules. Then all the map tiles in the tile files are traversed, and according to the path (zoom (z), x, y coordinates) and format information of the map tiles, the map tiles are written into a newly created SQLite database file (.mbtiles format file) as BLOB (Binary Large Object) data together with corresponding zoom, x, y values and other key information extracted from the metadata file.
[0058] Final output: a single.mbtiles file (such as China_BaseMap.mbtiles), which contains all the map tiles in the tile files and all the metadata in the metadata file.
[0059] By packing multiple map tiles in loose tile files into a map file in.mbtiles format, millions of small files are changed into a single file, reducing file system overhead and improving storage efficiency. The speed of reading data in a file is fast, changing from accessing multiple files to accessing one file, reducing the occupation of system resources by I / O operations. A single file is convenient for transmission and backup, and is compatible with more map servers and clients. Converting the metadata file into data in the map file in.mbtiles format can preserve all spatial reference information and standardize the storage format.
[0060] Figure 2 A flow chart of a map display method in an embodiment of the present application is shown in FIG. 1. Figure 2 As shown in FIG. 1, the map tile packing method provided in the embodiment of the present application includes the following S201 to S203.
[0061] S201, obtaining a map file, the map file being a file in.mbtiles format of SQLite packed from a tile file and a metadata file, the tile file including multiple map tiles named according to coordinate triplets, and the metadata file including metadata corresponding to the multiple map tiles.
[0062] The construction of the map file in.mbtiles format can refer to the above Figure 1Corresponding embodiments, not described hereinafter, when the map file is built, the device for map service publishing can obtain the map file from the corresponding database.
[0063] S202, according to the metadata in the map file, each map tile and the corresponding coordinate triplet, the map service is published.
[0064] In one embodiment, the device for map service publishing is installed with map server software (such as TileServer GL (a kind of map server software), GeoServer (a kind of map server software), MapServer (a kind of map server software) and the like), which can directly read the map file in.mbtiles format for map service publishing, and the process is as follows:
[0065] The device loads the map file in.mbtiles format;
[0066] The device reads the metadata table (a table for storing metadata) in the file to obtain key metadata information such as map name, range, zoom level, tile format, slicing scheme and the like;
[0067] The device configures itself into a standard map tile service according to the information;
[0068] The device supports providing tiles to the outside through standard network map service protocols (for example, WMTS, TMS, XYZ).
[0069] S203, after receiving the map tile request, the corresponding map tile of the map tile request is fed back to the requesting device, so that the requesting device performs map display.
[0070] After the device receives the map tile request sent by the requesting device, the map tile specified in the map tile request is obtained from the map file in.mbtiles format, and the map tile is fed back to the requesting device, and the requesting device performs map display after receiving the map tile.
[0071] Step 1: the developer introduces a map library (such as Mapbox GL JS, OpenLayers, CesiumJS) in the webpage.
[0072] Step 2: configure the map library, specify the URL (Uniform Resource Locator Template, Uniform Resource Locator Template) of the tile service, for example, http: / / tileserver / China_BaseMap / {z} / {x} / {y}.png), and specify the map tile format (png) and coordinate system.
[0073] Step 3: When the user opens the webpage, the map library automatically calculates which map tiles (zoom / x / y combination) are needed based on the current view range.
[0074] Step 4: The map library sends multiple asynchronous requests to the configured URL (each request corresponds to a map tile).
[0075] Step 5: The map server returns the requested map tile.
[0076] Step 6: The map library renders the received map tiles into the Canvas or WebGL (WebGraphics Library) context of the web page and stitches them into a complete map view.
[0077] When the user zooms or pans, steps 3-6 are repeated to dynamically load the map tiles required for the new view.
[0078] Pack a large number of small map tile files into a SQLite database and use them as .mbtiles files, using the database's efficiency to solve storage management and transmission problems.
[0079] Published as WMTS / TMS / XYZ services through standard map servers; ultimately seamlessly loaded and rendered by front-end map libraries that support these standards, providing a smooth user experience.
[0080] Based on the same inventive concept, the present application also provides a map tile packaging device and a map display device, as described in the following embodiments. Since the principles of these two device embodiments are similar to those of the above-mentioned method embodiment, the implementation of these two device embodiments can refer to the implementation of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0081] Figure 3 A schematic diagram of a map tile packaging device in an embodiment of the present application is shown as follows: Figure 3 As shown, the device includes: a first acquisition module 31, used to obtain a tile file, the tile file includes multiple map tiles named by coordinate triples, and the data encoding format of the multiple map tiles is the same; a construction module 32, used to construct a metadata file, the metadata file includes metadata corresponding to multiple map tiles; a packaging module 33, used to use a packaging tool to convert the tile file and the metadata file into a map file in the .mbtiles format in SQLite.
[0082] In some embodiments, the first acquisition module 31 is used to obtain multiple tiles to be processed, and the multiple tiles to be processed correspond to at least two data encoding formats; convert the multiple tiles to be processed into the same data encoding format to obtain multiple map tiles, and package the multiple map tiles to obtain a tile file.
[0083] By packaging multiple map tiles in loose tile files into a .mbtiles format map file, tens of millions of small files can be converted into a single file, reducing file system overhead and improving storage efficiency. Reading data from a file is faster, as accessing multiple files becomes accessing a single file, reducing the system resource usage of I / O operations. A single file facilitates transfer and backup, and is compatible with more map servers and clients. Converting metadata files to data in a .mbtiles format map file preserves all spatial reference information and standardizes the storage format.
[0084] Figure 4 A map display device in an embodiment of the present application is shown, including: a second acquisition module 41, used to obtain a map file, which is a file in the .mbtiles format in SQLite obtained by packaging a tile file and a metadata file, the tile file includes multiple map tiles named by coordinate triples, and the metadata file includes metadata corresponding to multiple map tiles; a service publishing module 42, used to publish map services based on the metadata in the map file, each map tile and the corresponding coordinate triplet; a feedback module 43, used to feedback the map tile corresponding to the map tile request to the requesting device after receiving the map tile request, so that the requesting device can display the map.
[0085] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."
[0086] Refer to the following Figure 5 hereinafter, an electronic device 500 according to this embodiment of the present application is described. Figure 5 The electronic device 500 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0087] like Figure 5As shown, the electronic device 500 is in the form of a general computing device. Components of the electronic device 500 can include, but are not limited to, the at least one processing unit 510 described above, the at least one storage unit 520 described above, and a bus 530 that connects the various system components, including the storage unit 520 and the processing unit 510.
[0088] The storage unit stores program code that can be executed by the processing unit 510 such that the processing unit 510 performs the steps described in the above "Exemplary Methods" section according to various exemplary embodiments of the present application. For example, the processing unit 510 can perform the steps of the above method embodiments: S101-S103 or S201-S203.
[0089] The storage unit 520 can include a readable medium in the form of volatile storage such as random access memory (RAM) 5201 and / or cache memory 5202, and also can include non-volatile storage such as read-only memory (ROM) 5203.
[0090] The storage unit 520 can further include program / utility 5204 having a set of at least one program modules 5205, including operating system, one or more application programs, other program modules, and program data, and each or a combination thereof can include implementation of a network environment.
[0091] The bus 530 can be representative of one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics acceleration bus, a processing bus, or a local bus using any of a variety of bus architectures.
[0092] The electronic device 500 can also communicate with one or more external devices 540 such as a keyboard or pointing device, a Bluetooth device, or a database, and / or one or more devices that enable a user to interact with the electronic device 500 and / or one or more devices (e.g., a router, a modem, a server, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication can occur via an input / output (I / O) interface 550. Still yet, the electronic device 500 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through a network adapter 560. As depicted, the network adapter 560 communicates with the other components of the electronic device 500 via the bus 530. It should be appreciated that the network adapter 560 and / or the bus 530 can be implemented using one or more types of technology, including, but not limited to, Ethernet, Bluetooth, and / or any other suitable technology.
[0093] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by software in combination with the necessary hardware. Thus, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the present application.
[0094] In particular, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer program product, which includes a computer program that, when executed by a processor, implements the above-mentioned map tile packaging method or map display method.
[0095] In the example embodiments of the present application, a computer readable storage medium is also provided, which can be a readable signal medium or a readable storage medium. The computer readable storage medium has stored thereon a program product capable of implementing the above-mentioned methods of the present application.
[0096] In some possible embodiments, various aspects of the present application can also be implemented in the form of a program product, which includes program code, when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various example embodiments of the present application described in the above "example method" section of the specification.
[0097] More specific examples of the computer-readable storage medium in the present application can include but are not limited to the electrical connection having one or more wires, the portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any appropriate combination of the aforementioned examples.
[0098] In the present application, a computer readable storage medium can include a data signal embodied in or transmitted by a carrier wave or other transport medium embodying the prescriptive program code. Such a propagated signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A computer readable medium can be any medium that can be read by a computer or a device.
[0099] Optionally, program code embodied on a computer readable storage medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the aforementioned.
[0100] In an implementation, the program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0101] It should be noted that, although several modules or units for device for action execution are mentioned in the foregoing detailed description, such a division into modules or units is not mandatory. Indeed, according to an embodiment of the application, features and functionalities of two or more modules or units described above can be embodied in one module or unit. Conversely, features and functionalities of one module or unit described above can be further divided into several modules or units.
[0102] Moreover, although individual steps of the methods of the present application are described in a particular order in the figures, this is not required or implied, nor is it required that all of the steps be performed to achieve the desired result. Additionally or alternatively, certain steps can be omitted, combined into a single step, broken into multiple steps, and / or performed in a different order than shown.
[0103] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by hardware coupled with software, as described above. Thus, the techniques of the present embodiments can be embodied in a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB, mobile hard disk, etc.) or on a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the methods according to the present embodiments.
[0104] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that come within the scope of the present application, along with all of the equivalents thereof. It is intended that the specification and examples be considered exemplary only, with the true scope and spirit of the application being indicated by the following claims.
Claims
1. A map tile packing method, characterized by, The method comprises the following steps: obtaining a tile file, wherein the tile file comprises a plurality of map tiles named by coordinate triplets, and the plurality of map tiles have the same data encoding format; constructing a metadata file, wherein the metadata file comprises metadata corresponding to the plurality of map tiles; converting the tile file and the metadata file into a map file in.mbtiles format of SQLite by using a packaging tool.
2. The method of claim 1, wherein, The metadata file comprises at least one of the following: map name, map type, geographic range, map version, version declaration, tile format, minimum level, maximum level, initial center, tile height, tile width and slicing scheme.
3. The method of claim 1, wherein, The method of obtaining the tile file comprises the following steps: obtaining a plurality of to-be-processed tiles, wherein the plurality of to-be-processed tiles correspond to at least two data encoding formats; converting the plurality of to-be-processed tiles into the same data encoding format to obtain the plurality of map tiles, and packaging the plurality of map tiles to obtain the tile file.
4. A map display method characterized by, The method comprises the following steps: obtaining a map file, wherein the map file is a file in.mbtiles format of SQLite obtained by packaging a tile file and a metadata file, the tile file comprises a plurality of map tiles named by coordinate triplets, and the metadata file comprises metadata corresponding to the plurality of map tiles; publishing a map service according to the metadata in the map file, each map tile and the corresponding coordinate triplet; after receiving a map tile request, feeding back a map tile corresponding to the map tile request to a requesting device, so that the requesting device displays a map.
5. A map tile packing apparatus, characterized by, The method comprises the following steps: a first obtaining module is configured to obtain a tile file, wherein the tile file comprises a plurality of map tiles named by coordinate triplets, and the plurality of map tiles have the same data encoding format; a constructing module is configured to construct a metadata file, wherein the metadata file comprises metadata corresponding to the plurality of map tiles; a packaging module is configured to convert the tile file and the metadata file into a map file in.mbtiles format of SQLite by using a packaging tool.
6. A map display device characterized by comprising: The method comprises the following steps: a second obtaining module is configured to obtain a map file, wherein the map file is a file in.mbtiles format of SQLite obtained by packaging a tile file and a metadata file, the tile file comprises a plurality of map tiles named by coordinate triplets, and the metadata file comprises metadata corresponding to the plurality of map tiles; a service publishing module is configured to publish a map service according to the metadata in the map file, each map tile and the corresponding coordinate triplet; a feeding back module is configured to, after receiving a map tile request, feed back a map tile corresponding to the map tile request to a requesting device, so that the requesting device displays a map.
7. An electronic device, comprising: The method comprises the following steps: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the executable instructions to perform the map tile packaging method of any one of claims 1-3, or the map display method of claim 4.
8. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the map tile packaging method in any one of claims 1-3 or the map display method in claim 4.
9. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the map tile packaging method in any one of claims 1-3 or the map display method in claim 4.