Geomap: Fixed issue with adding a custom basemap.

Fixes #5698. Fixes #5298.
Merge pull request #5984 from jolevesq/fix-basemap

Geomap: Fixed issue with adding a custom basemap.