ensureAndCreateLocator()

in src/windows/GeolocationProxy.js [99:127]


        ensureAndCreateLocator().done(function (loc) {
            if (loc) {
                const highAccuracy = args[0];
                const maxAge = args[1];

                loc.desiredAccuracy = highAccuracy
                    ? Windows.Devices.Geolocation.PositionAccuracy.high
                    : Windows.Devices.Geolocation.PositionAccuracy.default;

                loc.reportInterval = maxAge || 0;

                loc.getGeopositionAsync().then(
                    function (pos) {
                        success(createResult(pos));
                    },
                    function (err) {
                        fail({
                            code: createErrorCode(loc),
                            message: err.message
                        });
                    }
                );
            } else {
                fail({
                    code: PositionError.POSITION_UNAVAILABLE,
                    message: 'You do not have the required location services present on your system.'
                });
            }
        }, fail);