add index methods to layer and map