Skip to content

Multiple GoogleMapViews not working #118

Open
@rbs90

Description

@rbs90

When I use multiple GoogleMapViews in one JavaFX-Window the following exception occurs and both maps do not work:
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: ReferenceError: Can't find variable: loadMapLibrary at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:137) at com.sun.webkit.WebPage.twkExecuteScript(Native Method) at com.sun.webkit.WebPage.executeScript(WebPage.java:1473) at javafx.scene.web.WebEngine.executeScript(WebEngine.java:982) at com.lynden.gmapsfx.javascript.JavaFxWebEngine.executeScript(JavaFxWebEngine.java:42) at com.lynden.gmapsfx.GoogleMapView.initialiseScript(GoogleMapView.java:255) at com.lynden.gmapsfx.GoogleMapView.access$000(GoogleMapView.java:53) at com.lynden.gmapsfx.GoogleMapView$1.changed(GoogleMapView.java:214) at com.lynden.gmapsfx.GoogleMapView$1.changed(GoogleMapView.java:211) at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:74) at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102) at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112) at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146) at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1260) at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1371) at javafx.scene.web.WebEngine$LoadWorker.access$1200(WebEngine.java:1253) at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1240) at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2434) at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2278) at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:844) at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$99(URLLoader.java:835) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:745)

Example code: https://gist.github.com/rbs90/36cc916cedfc7ae4f4ee66d1704a7090

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions