Adapt code to gaLayers service