iEdge's pre-caching tool can make cache for the agented map services directly, supporting map tile in a variety of formats and distributed storage formats such as FastDFS, MongoDB, local storage formats such as SMT, MBTiles and so on.

Create task

Enter the iEdge server manager, click service>pre cache>create pre-cache task, and then set the server component, map, cache scales, etc.

Set parameters

  • Service component: It lists all published map service components.
  • Map: The all maps in current map component.
  • Storage type: Specify the generated map tiles storage type. For details please see: Tile Formats. The supported tile type of iEdge is map tiles, and the supported storage types are FastDFS, MongoDB, SMTiles, MBTiles.
  • Storage path: Specify the storage path. When the selected storage type is SMTiles or MBTiles, the default value for the storage path is the default output path (output) for the current product package. For more information, please refer to The tile format.
  • Storage ID: ID of the distributed storage position. When it selects FastFDS or MongoDB, it needs to select the created tile library ID. If the storage position is not set, please Add distributed cache library.
  • Scale scheme: Specify the cache scale levels. Available scale scheme contains:
  • Google Maps/Bing Maps: only for the maps with Web Mercator coordinates system (EPSG Code: 3857)
  • Tianditu: only for the maps with WGS 1984 (EPSG Code:4326 ) or Web Mercator (EPSG Code: 3857). Tianditu uses scale 2-18 by default. Users can select them according to the requirements.
  • Recommended scales: recommended by system
  • Customized: Input manually

The detailed scales of Google Maps/Bing Maps and Tianditu are:

Level The scale. Level The scale. Level The scale. Level The scale.
0 1/591658710.9091312 5 1/18489334.71591035 10 1/577791.7098721984 15 1/18055.9909335062
1 1/295829355.4545656 6 1/9244667.357955175 11 1/288895.8549360992 16 1/9027.9954667531
2 1/147914677.7272828 7 1/4622333.678977587 12 1/144447.9274680496 17 1/4513.99773337655
3 1/73957338.8636414 8 1/2311166.8394887936 13 1/72223.9637340248 18 1/2256.998866688275
4 1/36978669.4318207 9 1/1155583.4197443968 14 1/36111.9818670124 19 1/1128.4994333441375

 

  • Cache scale: the list box will display the selected scales. You can add a scale denominator in the text box, and then click Add Scale Denominator to add it to the scale list. If you select the scales for Google Maps or Bing Maps or recommended scales, you can choose select the appropriate scale range by the scale range. You also can remove the not needed scales. The recommended way to select the cache scale is: first confirm the required scales or the scale values near to the requirements in the client, then set multiple cache scales, so that the client can use the map tile when scaling between multiple scales.

    Note(except UGCV5 tiles):

  • If a fixed scale is not set for the current map, the added scales when caching will automatically be set to the fixed scale of the map.
  • If a fixed scale is set in the current map, a different scale is added to the map, after the pre-caching task is opened, the scale will be added to the fixed scale of the map. Later, if there is a pre-cache task for the same map, the scale is added again to the fixed scale of the map.
  • Cache range: Specify the cached map range, the format is: -180, -90, 180, 90. The default is the full map.
  • Tile size: the file size, supporting 256*256 and 512*512.
  • Picture format: the format of the tile when the tile type is map tile. Supported tile formats contain: PNG, JPG and GIF.
  • Background transparent: whether the background of the tile is transparent when the tile is map tile. If checked, the background is transparent; otherwise it will use the background color of the map.
  • Timing task: Set the specific time to perform the caching task. You can specify a date, or you can set an interval, that is, it will preform the task on the same time every day or every week.

Add tile version and append tiles

After setting above parameters, click Create precache task to create it.

If there is a map caching task with the same parameters like map name, tile size, whether it is transparent in the storage location specified by the above parameters, that is, the file name in single machine (e.g., *.smtiles) or the tile set name in the same tile library is the same, then there will be the following two cases:

  • For the file name in single machine, e.g., SMTiles, MBTiles, after creating the precache task, the system will add tiles to the tile file with the same name(e.g., *.smtiles), and will cover the tiles in the same position, or add new tiles.
  • For the distributed stored tiles, the system will pop up that "The tiles have existed, do you want to add a tile version?" If selecting Yes, the system will Add a new version for the tile set; if selecting No, you need to specify a version in the tile set, then the system will Add tiles to the tile set, and update the tiles in the same position, or append new tiles.

The concept of the tile version here is consistent with iServer, for details please see: version of the tile set.

View the task list

On the Pre-Cache page, you can see all the working and completed pre-caching tasks on the current server, and you can view the basic information, progress information, and so on for each task.

You can stop the task you are performing, start or delete the suspended task, click on the map name in the task to view more detailed task information, progress information and various scales, you can restart the task to re-cache it.

For tasks that have already been completed, you can view the map name, component name, task start time, time-consuming, number of tiles, and the tile type and storage type, storage location, and so on.

Monitor the caching progress

In the task list, click the map name in the created pre-cache task to view the progress information. Including the stored information, the cache configuration information, the pre-cach task total schedule (the dynamic caching speed and time), the task time statistics, the generated tile version, the occupied storage (occupied storage and storage expected to take up). You can also perform "pause", "start", "restart" and other management operations on the page.