@@ -400,23 +400,23 @@ App.prototype.setWatchDogTimer = function(time) {
400400
401401} ;
402402
403- function onBackButton ( ) {
404- _mapInstance . closeDialog ( ) ;
403+ function onBackbutton ( ) {
404+ _mapInstance . closeDialog ( ) ;
405405}
406406
407407/**
408408 * @desc Open the map dialog
409409 */
410410App . prototype . showDialog = function ( ) {
411- this . set ( "isDialogOpen ", true ) ;
411+ document . addEventListener ( "backbutton ", onBackbutton , false ) ;
412412 cordova . exec ( null , this . errorHandler , PLUGIN_NAME , 'showDialog' , [ ] ) ;
413413} ;
414414
415415/**
416416 * @desc Close the map dialog
417417 */
418418App . prototype . closeDialog = function ( ) {
419- this . set ( "isDialogOpen" , false ) ;
419+ document . removeEventListener ( "backbutton" , onBackbutton , false ) ;
420420 cordova . exec ( null , this . errorHandler , PLUGIN_NAME , 'closeDialog' , [ ] ) ;
421421} ;
422422
@@ -2636,11 +2636,6 @@ function getAllChildren(root) {
26362636
26372637document . addEventListener ( "deviceready" , function ( ) {
26382638 document . removeEventListener ( "deviceready" , arguments . callee ) ;
2639- document . addEventListener ( "backbutton" , function ( ) {
2640- if ( _mapInstance . get ( "isDialogOpen" ) ) {
2641- _mapInstance . closeDialog ( ) ;
2642- }
2643- } , false ) ;
26442639 plugin . google . maps . Map . isAvailable ( ) ;
26452640} ) ;
26462641
0 commit comments