var vectorWmsJHdataLayer = new ol.layer.Tile({ source: new ol.source.TileWMS({ //地址 url:'http://localhost:8082/geoserver/HKKJ/wms', //必要参数 ,geoserver 的服务地址有 params: {'LAYERS': 'HKKJ:jhdata', 'TILED': true}, //服务类型 serverType: 'geoserver', // transition: 0 }) });