Fixes #12. Improved url detection and avoid double loadingof the map