diff --git a/test/widget/widget.home.controller.spec.js b/test/widget/widget.home.controller.spec.js index 911c4cf..4a6622b 100644 --- a/test/widget/widget.home.controller.spec.js +++ b/test/widget/widget.home.controller.spec.js @@ -146,13 +146,13 @@ describe('Unit : contactUs Plugin widget.home.controller.js', function () { it('should pass if it returns html when valid string is passed', function () { WidgetHome.device = {platform: 'ios'}; WidgetHome.onAddressClick(1, 1); - expect(spy).toHaveBeenCalledWith('maps://maps.google.com/maps?daddr=1,1'); - }) + expect(spy).toHaveBeenCalledWith('maps://maps.google.com/maps?daddr=1,1', '_system'); + }); it('should pass if it returns html when valid string is passed', function () { WidgetHome.device = {platform: 'android'}; WidgetHome.onAddressClick(1, 1); - expect(spy).toHaveBeenCalledWith('http://maps.google.com/maps?daddr=1,1'); + expect(spy).toHaveBeenCalledWith('http://maps.google.com/maps?daddr=1,1', '_system'); }); }); diff --git a/widget/app.js b/widget/app.js index 32edd77..9c648f0 100644 --- a/widget/app.js +++ b/widget/app.js @@ -76,9 +76,9 @@ map.setMapTypeId("Report Error Hide Style"); marker.addListener('click', function () { if (buildfire.context.device && buildfire.context.device.platform == 'ios') - window.open("maps://maps.google.com/maps?daddr=" + scope.coordinates[1] + "," + scope.coordinates[0]); + buildfire.navigation.openWindow("maps://maps.google.com/maps?daddr=" + scope.coordinates[1] + "," + scope.coordinates[0], '_system'); else - window.open("http://maps.google.com/maps?daddr=" + scope.coordinates[1] + "," + scope.coordinates[0]); + buildfire.navigation.openWindow("http://maps.google.com/maps?daddr=" + scope.coordinates[1] + "," + scope.coordinates[0], '_system'); }); } diff --git a/widget/controllers/widget.home.controller.js b/widget/controllers/widget.home.controller.js index 3a51c4b..64f778d 100644 --- a/widget/controllers/widget.home.controller.js +++ b/widget/controllers/widget.home.controller.js @@ -152,9 +152,9 @@ WidgetHome.onAddressClick = function (long, lat) { if (WidgetHome.device && WidgetHome.device.platform == 'ios') - buildfire.navigation.openWindow("maps://maps.google.com/maps?daddr=" + lat + "," + long) + buildfire.navigation.openWindow("maps://maps.google.com/maps?daddr=" + lat + "," + long, '_system'); else - buildfire.navigation.openWindow("http://maps.google.com/maps?daddr=" + lat + "," + long) + buildfire.navigation.openWindow("http://maps.google.com/maps?daddr=" + lat + "," + long, '_system'); } }])