being able to select subcounty layer, refactoring javascript [#56612548]