OpenLayers layer.vector 未在 Mac 和 Iphone 上显示

OpenLayers layer.vector not showing on Mac and Iphone

我想在网站上显示 'Germany' 的地图及其边界。 使用 Windows 10 和 Firefox 一切正常,但在 Mac OS 和 iPhone 下 layer.vector 没有显示。有什么想法吗?

<script>
  var fill = new ol.style.Fill({
    color: 'rgba(30,144,255,0.2)'
  });
  
  var stroke = new ol.style.Stroke({
    color: '#1E90FF',
    width: 2
  });
  
  var style = new ol.style.Style({
    fill: fill,
    stroke: stroke
  });
  
  var vectorLayer = new ol.layer.Vector({
    source: new ol.source.Vector({
      url: '[URL TO JSON]',
      format: new ol.format.GeoJSON()
      }),
    style: style
  });

  var map = new ol.Map({
    layers: [
        new ol.layer.Tile({
            source: new ol.source.OSM()
        }),
        vectorLayer

    ],
    target: 'map',
    view: new ol.View({
      center: ol.proj.fromLonLat([5.9688, 51.0852]),
      zoom: 5
    })
  });

顶部:Windows 10 + Firefox

底部:Mac OS + Firefox/Safari

忘了这个问题。这都是我的错。我在我的 Window 10 PC 上本地获得了这个 运行 XAMPP。 URL 类似于 localhost/... 。是的,这导致了这个问题,我是盲人,已经 2 天没看到它了 :D