Map map = new Map(width, height);
map.getLayerCollection().setLayers(capbilities.getLayers());
// getImage
map.getView().setViewEnvelop(envelop);
map.render();
Image image = (Image)map.getPainter().getData();
// toByteArray
return ImageUtil.Image2ByteArray(image, formatName);
}