Improve to avoid NPE if the base layer is not in map
Merge branch 'master' of github.com:geosdi/geo-platform