I am using the Leaflet API to show a map in a JavaFX application. I'm using a WebView to visualize the website with the map in my application.
The application shows a driving simulation of a car between some Points.
If I use the OSMR Routing i don't have any problems to visualize the website & the map.
The problem is that I have to use the GraphHopper routing machine.
If I use the GraphHopper routing the control elements of the map will be shown,
but the map is only grey.
If I open the website in a browser I don't have any problems.
Here is the Code of the Map
<div id="map" class="map"></div>
<script src="rm/dist/leaflet-routing-machine.js"></script>
<script src="rm/lrm-graphhopper.js"></script>
<script type="text/javascript">
L.latLng(57.6792, 11.949)
And this is the code of the javaFX application:
WebEngine webEngine = webView.getEngine();
webEngine.setJavaScriptEnabled(true);
webEngine.load(Main.class.getResource("/application/index.html").toExternalForm() );
Can anybody help me ?