Beispiel #1
0
  public synchronized String calculateTileId(ITileSource map, int x, int y, int zoom) {
    builder.setLength(0);
    if (map == null) {
      builder.append(IndexConstants.TEMP_SOURCE_TO_LOAD);
    } else {
      builder.append(map.getName());
    }

    if (map instanceof SQLiteTileSource) {
      builder.append('@');
    } else {
      builder.append('/');
    }
    builder
        .append(zoom)
        .append('/')
        .append(x)
        .append('/')
        .append(y)
        .append(map == null ? ".jpg" : map.getTileFormat())
        .append(".tile"); // $NON-NLS-1$ //$NON-NLS-2$
    return builder.toString();
  }
 @Override
 public String getTileFormat() {
   return base != null ? base.getTileFormat() : ".png"; // $NON-NLS-1$
 }