Update map_layers.js

to use the functionality on modal