Extending distributed tile format

Feedback


Distributed tiles support multiple formats: FastDFS, MongoDB, MBTiles, SMTiles, SVTiles. And it support the extension tile format. This example shows a new method to extend a map tile format, namely, extend the tiles in "Geographic Information Public Service Platform-Electronic Map Data Specification".

In the services of distributed tiles, extending a custom map tile format needs extending the following aspects:

  1. Implement the custom tile source information class

Extend TileSourceInfo. This class defines the tile storage path, tile set type, detailed tile storage type and so on. For example, the map tile type is "image".

  1. Implement the custom tile set, namely, the custom tile format

When implementing the custom map tile, it needs to extend the AbstractImageTileset class. It should define the tile storage and organization way, including the scale, tile separation, content organization, name and so on.

  1. Implement the custom tile source provider class

Extend the AbstractTileSourceProvider class. Encapsulate above custom tile format to the tile source provider, including new and loading tile set, which can be saved as this extension format when tiling.

 

Extension example: Support the tiles in "Geographic Information Public Service Platform-Electronic Map Data Specification". The download link of this specification is: http://files.ngcc.sbsm.gov.cn/www/201206/20120611090020330.pdf.