我用geoserver发布了一个tiff文件,想用openlayer来访问他。百度了一下,按照搜到的教程做了一遍,但是页面上仍然load不出来地图,请问我哪儿出错了?
下面是Load地图的代码
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Image({
source: new ol.source.Image({
url:'http://localhost:8090/geoserver/ymc/wms',
params:{layers: 'ymc:TaskIMG072520471',version: '1.1.1',service:'WMS',request:'GetMap',srs:'EPSG:2409',format:'application/openlayers'}
})
})
],
view: new ol.View({
projection: 'EPSG:4326',
zoom: 4
})
});
请问这个问题解决了吗我现在也碰到这种问题。。。