Java 9 JDK webview未正确显示openlayers映射

Java 9 JDK webview未正确显示openlayers映射,java,javafx,webview,openlayers,Java,Javafx,Webview,Openlayers,所以我在我的项目中使用了JavaJDK9.0.4,这样我就可以在我的javafx项目中使用j phoenix库。我用openlayers创建了一个网页,以便在webview的帮助下在javafx应用程序上显示地图。但是webview正在缩小网页的地图,并且OpenLayers光标移到了左侧。但同样的fxml适用于JDK1.8.0241。我不知道是什么导致了这个问题。有人请帮忙 下面是JDK 9.0.4上的webview的图片 下面是JDK1.8.0241上的webview的图片 下面是用开放

所以我在我的项目中使用了JavaJDK9.0.4,这样我就可以在我的javafx项目中使用j phoenix库。我用openlayers创建了一个网页,以便在webview的帮助下在javafx应用程序上显示地图。但是webview正在缩小网页的地图,并且OpenLayers光标移到了左侧。但同样的fxml适用于JDK1.8.0241。我不知道是什么导致了这个问题。有人请帮忙

下面是JDK 9.0.4上的webview的图片

下面是JDK1.8.0241上的webview的图片

下面是用开放层构建的html

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Draw Features</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.2.1/css/ol.css" type="text/css">
    <style>
        #map {
            height: 100%;
        }
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
    <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.2.1/build/ol.js"></script>
</head>
<body>
    <div id="map" class="map"></div>
    <script type="text/javascript">
        var lat=null;
        var lon=null;
        function getLat(){
            return lat;
        }
        function getLng(){
            return lng;
        }
        var raster = new ol.layer.Tile({
            source: new ol.source.OSM()
        });
        var source = new ol.source.Vector({wrapX: false});
        var vector = new ol.layer.Vector({
            source: source,
            style: new ol.style.Style({

                image: new ol.style.Circle({
                    radius: 8,
                    fill: new ol.style.Fill({
                        color: 'red'
                    })
                })
            })
        });
        var map = new ol.Map({
            layers: [raster, vector],
            target: 'map',
            view: new ol.View({
                center: ol.proj.fromLonLat([90.4125,23.8103]),
                zoom: 15
            })
        });
        var modify = new ol.interaction.Modify({source: source});
        map.addInteraction(modify);
        var draw = new ol.interaction.Draw({
                source: source,
                type: "Point"
        });
        map.addInteraction(draw);
        map.on('contextmenu', function(evt){
            remove();

            var coords = ol.proj.toLonLat(evt.coordinate);
            lat = coords[1];
            lon = coords[0];
            var locTxt = "Latitude: " + lat + " Longitude: " + lon;
        });
        function remove(){
            var features = source.getFeatures();
            var lastFeature = features[features.length-1];
            source.clear();
            console.log(lastFeature);
            source.addFeature(lastFeature);
        }
        map.on('click', function(evt){
            remove();
            var coords = ol.proj.toLonLat(evt.coordinate);
            lat = coords[1];
            lon = coords[0];
        });
</script>
</body>
</html>
最后是FXML代码

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.web.WebView?>

<AnchorPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="637.0" prefWidth="825.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/8.0.241" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.PostController">
   <children>
      <WebView fx:id="postWebView" layoutX="37.0" layoutY="128.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="900.0" AnchorPane.bottomAnchor="60.0" AnchorPane.leftAnchor="33.0" AnchorPane.rightAnchor="22.0" AnchorPane.topAnchor="185.0" />
   </children>
   <effect>
      <DropShadow />
   </effect>
</AnchorPane>

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.web.WebView?>

<AnchorPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="637.0" prefWidth="825.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/8.0.241" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.PostController">
   <children>
      <WebView fx:id="postWebView" layoutX="37.0" layoutY="128.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="900.0" AnchorPane.bottomAnchor="60.0" AnchorPane.leftAnchor="33.0" AnchorPane.rightAnchor="22.0" AnchorPane.topAnchor="185.0" />
   </children>
   <effect>
      <DropShadow />
   </effect>
</AnchorPane>