* @description getArcgisXYZTileTD XYZ构造天地图底图
* @param {Object} item 图层对象,包涵url、id
* @param {Object} olmap 地图对象
* @param {Number} zindex 层级
*/
var getArcgisXYZTileTD = (item , zindex , olmap) =>{
var layer = new olmap.layer.Tile({
id: item.id,
zIndex: zindex,
source: new olmap.source.XYZ({
url: item.url,
crossOrigin: 'anonymous' //防止地图打印出现问题
})
})
return layer
}