var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), loader: function(extent, resolution, projection) { var url = 'geojson2.php?p=' + extent.join(','); $.ajax({ url: url, success: function(data) { vectorSource.addFeatures(vectorSource.readFeatures(data)); } }); }, projection: 'EPSG:3857', strategy: ol.loadingstrategy.bbox});
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)