使用产品:supermap-iobjectsjava-9.1.0-16317-68001-win64-all-Bin
操作系统:win10 x64
数据类型:文件型
问题详细描述:
在iDesktop中二维地图缓存生成的参数(即代码中fromConfigFile引用的缓存):
源码:
package gettingstarted;
import java.util.Date;
import com.supermap.data.Workspace;
import com.supermap.data.WorkspaceConnectionInfo;
import com.supermap.data.processing.MapCacheBuilder;
import com.supermap.mapping.Map;
public class clip {
public static void main(String[] args) {
Workspace workspace = new Workspace();
String file = "F:/SuperMap/180725guiG/map/China400.smwu";//
WorkspaceConnectionInfo workspaceConnectionInfo = new WorkspaceConnectionInfo(file);
workspace.open(workspaceConnectionInfo);
Map map = new Map(workspace);
map.open("China400");
MapCacheBuilder builder = new MapCacheBuilder();//二维地图缓存生成类
builder.setMap(map);//设置需要生成缓存的地图。
builder.fromConfigFile("F:/SuperMap/180725guiG/map/cache/China400.sci");//导入地图缓存配置文件
builder.setOutputFolder("F:/SuperMap/180725guiG/map/newCache");//设置生成地图缓存的路径
builder.setMVTTileBuffer(78);//设置图片压缩率
builder.setMultiProcessing(false);
builder.setMVTWithAllField(true);
builder.setMVTStyleWithoutFont(false);
Date time1 = new Date();
builder.build(true, true);//根据参数生成矢量瓦片或风格
Date time2 = new Date();
long time = time2.getTime() - time1.getTime();
System.out.println(time);
}
}
为什么会报 瓦片格式必须是pbf格式?怎么解决?我记得瓦片格式没有pdf啊!