实例化geoserver wms服务

 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
        })
    });

猜你喜欢

转载自www.cnblogs.com/sjfsjf/p/9236978.html
今日推荐