Skip to content

Commit

Permalink
Merge pull request #80 from sakshityagi/master
Browse files Browse the repository at this point in the history
Fixed "No way to go back" issue when clicked on map marker
  • Loading branch information
DanielHindi committed Feb 25, 2016
2 parents 018ccf7 + 503c188 commit ab85fd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/widget/widget.home.controller.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});

Expand Down
4 changes: 2 additions & 2 deletions widget/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

}
Expand Down
4 changes: 2 additions & 2 deletions widget/controllers/widget.home.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

}])
Expand Down

0 comments on commit ab85fd2

Please sign in to comment.