diff --git a/src/BingMap.cpp b/src/BingMap.cpp index 42bfca18e..2d085428f 100644 --- a/src/BingMap.cpp +++ b/src/BingMap.cpp @@ -96,6 +96,11 @@ void BingMap::loadRide() void BingMap::updateFrame() { + // deleting the web bridge seems to be the only way to + // reset state between it and the webpage. + delete webBridge; + webBridge = new BWebBridge(context, this); + view->page()->mainFrame()->addToJavaScriptWindowObject("webBridge", webBridge); } diff --git a/src/GoogleMapControl.cpp b/src/GoogleMapControl.cpp index f64d03cd6..7ab728f66 100644 --- a/src/GoogleMapControl.cpp +++ b/src/GoogleMapControl.cpp @@ -109,6 +109,11 @@ void GoogleMapControl::loadRide() void GoogleMapControl::updateFrame() { + // deleting the web bridge seems to be the only way to + // reset state between it and the webpage. + delete webBridge; + webBridge = new WebBridge(context, this); + view->page()->mainFrame()->addToJavaScriptWindowObject("webBridge", webBridge); }