pass map to resource.