Looking at the source code:
Old plugin (2.x) Source :
watchPosition: function(success, error, args) { var win = function() { var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); geo.watchPosition(success, error, { enableHighAccuracy: args[1] }); }; exec(win, error, "Geolocation", "getPermission", []); },
New plugin (master) Source :
watchPosition: function(success, error, args) { var pluginWatchId = utils.createUUID(); var win = function() { var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); pluginToNativeWatchMap[pluginWatchId] = geo.watchPosition(success, error, args); }; var fail = function() { if (error) { error(new PositionError(PositionError.PERMISSION_DENIED, 'Illegal Access')); } }; exec(win, fail, "Geolocation", "getPermission", []); return pluginWatchId; },
In the OLD code of the plugin, enableHighAccuracy is a boolean value (arg1 array).
With the new version of the plugin, you need to pass arg as JSON with the specified flag: {enableHighAccuracy: true} to play the same call to the geo.watchPosition function with high precision.
Old way:
navigator.geolocation.watchPosition(geolocationSuccess, geolocationError, [false,true]);
New way:
navigator.geolocation.watchPosition(geolocationSuccess, geolocationError, { enableHighAccuracy: true });