Moved the replacement code into separate function.
Moved the replacement code into separate function.

Can be refactored further to make it easy to add multiple map layers.

follesoe/MapReplace,follesoe/MapReplace