openlayers3 loadingstrategy jsonp readFeatures 给出 'undefined is not a function'

openlayers3 loadingstrategy jsonp readFeatures gives 'undefined is not a function'

我明白了,JSONP 正在浏览器的网络监控选项卡中加载,并且在 ajax 加载数据后从 JSONP 正确调用该函数,但它给我以下关于 JSONP 函数的错误加载数据后调用:

TypeError: undefined is not a function (evaluating 'layerSrc['lsBbox'].readFeatures(response)')
loadFeaturesBbox

<!DOCTYPE html>
<html lang="ru">
<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width">

 <title>The Book of OpenLayers3 - Code samples</title>
 <link rel="stylesheet" href="progr/nm/ol.css" type="text/css">
 <script src="progr/nm/jquery-3.1.1.min.js" type="text/javascript"></script>
 <script src="progr/nm/ol.js" type="text/javascript"></script>
 <style type="text/css">
.map {
 width: calc(100% - 9px);
 height: 500px;
 box-shadow: 4px 4px 20px black;
 border: 3px solid blue;
 float: left;
}
.tree {
 width: auto;
 border: 3px solid red;
 background: yellow;
 float: left;
}
 </style>
</head>
<body>

<dev id='mapBbox' class='map col-sm-6'></dev>

<script>
var loadFeaturesBbox = function(response){layerSrc['lsBbox'].addFeatures(layerSrc['lsBbox'].readFeatures(response));};
var layerSrc = {
 lsBbox: new ol.source.Vector({
  format: new ol.format.GeoJSON(),
  loader: function(extent, resolution, projection){
   $.ajax({
    url: 'http://demo.opengeo.org/geoserver/wfs?service=WFS&request=GetFeature&version=1.1.0&typename=osm%3Awater_areas&outputFormat=text%2Fjavascript&format_options=callback%3AloadFeaturesBbox&srsname=EPSG%3A3857&bbox='+extent.join(','),
    dataType: 'jsonp'
   })
  },
  strategy: ol.loadingstrategy.bbox,
  projection: 'EPSG:3857'
 })
};

var layers = {
 OSM: new ol.layer.Tile({source: new ol.source.OSM()}),
 lsBbox: new ol.layer.Vector({
  source: layerSrc['lsBbox'],
  style: new ol.style.Style({
   stroke: new ol.style.Stroke({
    color: 'green',
    width: 2
   })
  })
 })
};

var view = new ol.View({
 center: ol.proj.transform([-75.923853, 45.428736], 'EPSG:4326', 'EPSG:3857'),
 maxZoom: 19,
 zoom: 10
});

var maps = {
 mapBbox: new ol.Map({
  target: 'mapBbox',
  renderer: 'canvas',
  layers: [layers['OSM'], layers['lsBbox']],
  view: view
 })
};
</script>

</body>
</html>

因此,通过 JSONP 调用加载的矢量数据未显示在地图上。 我该如何解决这个问题?
OpenLayers 版本:v3.20.1

矢量源上没有 readFeatures 方法参见:http://openlayers.org/en/latest/apidoc/ol.source.Vector.html 你需要在它的格式上调用它,所以 source.getFormat().readFeatures