Classes and functions for WMS layers in R