More dynamic way of composing map URL.
Some small refactoring to load map logic.