1
我有一個設置了maxResolution的圖層,因此只有在您放大某個級別時才顯示該圖層。我的問題是,只有在該級別縮放時才加載圖層源數據。有沒有辦法預載矢量源數據?OL3:強制加載源
var source = new ol.source.Vector({
url: '/mapsource/source.geojson',
format: new ol.format.GeoJSON()
});
// how do I force loading the source here, and not wait for the map to render at 80 zoom?
var layer = new ol.layer.Vector({
title: 'Test layer',
source: source,
style: my_style,
maxResolution: 80
});