0
votes

I am developing a JavaFX app in which I want to show a WebView and a Nokia Here Maps. I want to implement a navigation system using GPS coordenates I have and the turn-by-turn routing that Nokia Here Maps javascript api provides. My problem is when I am trying to plot the route in the map using webview. The route, the turn-by-turn instructions appear, but not the map. Instead, the route is plotted on a grey image. I have tried to show this url link but again, I can see everything but the map. Looks like for some reason, webview does not finish to load the map properly so it shows the grey image.

What do you guys thinks is wrong?

Thanks!

Example of what I can see on my app using webview and the web address mentioned before :

enter image description here

thanks!

private static final String WEB_INDEX = "https://developer.here.com/api-explorer/maps-js/servicesRouting/map-with-route-from-a-to-b";

@FXML
private WebView webBrowser;

private WebEngine engine;

engine = webBrowser.getEngine();

engine.load(WEB_INDEX);

I've tried the example on their web as well as my Own, using my API Key. Same result.

1
Post your code please.DVarga
DVarga already did it.Toni
If i tried to load this web link It loads and shows the map..then it turns grey for half a second but finally loads successfully and I can surf the map without problems.Toni

1 Answers

-1
votes

Which JDK version are you using? If it is post 1.8.40, then js from Here maps api is having some compatibility issue with Java's JavaScript interpreter.