使用产品:iserver 8c 、openlayer v5.3.0 操作系统:win8 x64
数据类型:文件型
问题详细描述:由于项目需求,需要改用openlayer开发客户端GIS,iclient-openlayer无法加载我发布的ugcv瓦片地图,程序运行时只能获得一系列的透明图片(地图本身没有问题,使用classic可以加载),投影坐标系、中心点这些都设好了。
代码:
<script>
var map, url;
url = "http://localhost:8090/iserver/services/map-ugcv5-mapunclear/rest/maps/map_unclear";
// url = "http://localhost:8090/iserver/services/maps/rest/maps/World";
map = new ol.Map({
target: 'map',
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
.extend([new ol.supermap.control.Logo()]),
view: new ol.View({
center: [102.18,31.01],
zoom: 3,
projection: 'EPSG:4326'
})
});
var layer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: url,
wrapX: true
}),
projection: 'EPSG:4326'
});
map.addLayer(layer);
map.addControl(new ol.supermap.control.ScaleLine());
</script>