diff --git a/src/kits/shared/Geolocation.cpp b/src/kits/shared/Geolocation.cpp index af6099b0ab..7d2f4e8485 100644 --- a/src/kits/shared/Geolocation.cpp +++ b/src/kits/shared/Geolocation.cpp @@ -141,9 +141,19 @@ BGeolocation::LocateSelf(float& latitude, float& longitude) } -// FIXME switch to an openly available service that will actually work with the -// "standard" geolocation API. Openbmap has a few variations. -const char* BGeolocation::kDefaultService = "http://openbmap.org/api/json.php5"; +#ifdef HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY + +#include "DefaultGeolocationServiceKey.h" + +const char* BGeolocation::kDefaultService + = "https://location.services.mozilla.com/v1/geolocate?key=" + DEFAULT_GEOLOCATION_SERVICE_KEY; + +#else + +const char* BGeolocation::kDefaultService = ""; + +#endif } // namespace BPrivate diff --git a/src/kits/shared/Jamfile b/src/kits/shared/Jamfile index 20cd4908d9..31858029b9 100644 --- a/src/kits/shared/Jamfile +++ b/src/kits/shared/Jamfile @@ -6,6 +6,10 @@ AddSubDirSupportedPlatforms libbe_test ; UseLibraryHeaders agg ; UsePrivateHeaders shared locale ; +if [ Glob $(SUBDIR) : DefaultGeolocationServiceKey.h ] { + SubDirC++Flags [ FDefines HAVE_DEFAULT_GEOLOCATION_SERVICE_KEY ] ; +} + local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) {