Just a late remarque, if we specify a wmsurl I don't think that this code is doing something right ?