使用产品:iclient-openlayer 9d 操作系统:win8 x64
数据类型:文件型
问题详细描述:无法加载地图,编译器显示:Uncaught ReferenceError: ol is not defined
代码:
url = "http://localhost:8090/iserver/services/map-ugcv5-mapunclear/rest/maps/map_unclear";
map = new ol.Map({
target: 'map',
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
.extend([new ol.supermap.control.Logo()]),
view: new ol.View({
center: [103.71,30.38],
zoom: 3,
projection: 'EPSG:4326'
})
});
layer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: url
}),
projection: 'EPSG:4326'
});
map.addLayer(layer);