fixed checking perimission for map and map layers