Geomap: Fixed issue with adding a custom basemap.

Fixes #5698. Fixes #5298.