var bool = false;//测试时只修改该值,以进入不同判断
if(bool)
{
tiandituLayer = new SuperMap.Layer.Tianditu();
//tianMarkerLayer = new SuperMap.Layer.Tianditu();
//tianMarkerLayer.layerType="cva";
//tianMarkerLayer.isLabel=true;
}
else
{
var matrixIds_baselayer = ['1','2','3','4','5', '6','7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'];
var resolutions_baselayer = [0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625, 0.0006866455078125, 0.00034332275390625, 0.000171661376953125, 8.58306884765625e-005, 4.291534423828125e-005, 2.1457672119140625e-005, 1.0728836059570313e-005, 5.3644180297851563e-006, 2.6822090148925781e-006, 1.3411045074462891e-006];
var baselayer_vec_options = {
name: "baselayer_vec",
url: "
http://t1.tianditu.com/vec_c/wmts",
layer: "vec",
style: "default",
format: "tiles",
matrixIds: matrixIds_baselayer,
matrixSet: "c",
buffer: 0,
resolutions: resolutions_baselayer
};
tiandituLayer = new SuperMap.Layer.WMTS(baselayer_vec_options);
}
//vectorLayer = new SuperMap.Layer.Vector("Vector Layer");
cartoCss=document.getElementById("cartoCssStr").text;
var hightLightCartoCss=document.getElementById("textData").text;
layer = new SuperMap.Layer.TiledVectorLayer("China", url,{cacheEnabled:true,returnAttributes:true},{useLocalStorage:true,cartoCss:cartoCss,donotNeedServerCartoCss:true,highLightCartoCss:hightLightCartoCss});
map.addLayers([tiandituLayer,layer]);
当我使用tiandituLayer = new SuperMap.Layer.Tianditu();时,TiledVectorLayer就可以显示,使用WMTS的时候,图层就不显示了。。但是也会去请求tilefeature.json,但是都是空值。。这是为什么。。难道是我数据问题?