我正在尝试使用OpenLayers显示波兰地图,并添加了我之前上传到本地地理服务器的图层,但我不知道如何在代码中连接它?
波兰地图: https://jsfiddle.net/b2L6qppd/2/
geoserver的代码:
var untiled = new ol.layer.Image({
source: new ol.source.ImageWMS({
ratio: 1,
url: 'http://localhost:8080/geoserver/Geoserver/wms',
params: {'FORMAT': format,
'VERSION': '1.1.1',
STYLES: '',
LAYERS: 'Geoserver:ino',
}
})
});
var tiled = new ol.layer.Tile({
visible: false,
source: new ol.source.TileWMS({
url: 'http://localhost:8080/geoserver/Geoserver/wms',
params: {'FORMAT': format,
'VERSION': '1.1.1',
tiled: true,
STYLES: '',
LAYERS: 'Geoserver:ino',
tilesOrigin: 430624.45999999996 + "," + 519226.4500999991
}
})
});
var projection = new ol.proj.Projection({
code: 'EPSG:2180',
units: 'm',
axisOrientation: 'neu',
global: false
});
请帮助