Merge pull request #8853 from ahocevar/rendercomplete-vector
Make rendercomplete work with vector sources without loader
This commit is contained in:
@@ -889,7 +889,7 @@ class VectorSource extends Source {
|
|||||||
if (!alreadyLoaded) {
|
if (!alreadyLoaded) {
|
||||||
this.loader_.call(this, extentToLoad, resolution, projection);
|
this.loader_.call(this, extentToLoad, resolution, projection);
|
||||||
loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});
|
loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});
|
||||||
this.loading = true;
|
this.loading = this.loader_ !== VOID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Map from '../../../src/ol/Map.js';
|
|||||||
import MapEvent from '../../../src/ol/MapEvent.js';
|
import MapEvent from '../../../src/ol/MapEvent.js';
|
||||||
import Overlay from '../../../src/ol/Overlay.js';
|
import Overlay from '../../../src/ol/Overlay.js';
|
||||||
import View from '../../../src/ol/View.js';
|
import View from '../../../src/ol/View.js';
|
||||||
import LineString from '../../../src/ol/geom/LineString.js';
|
import {LineString, Point} from '../../../src/ol/geom';
|
||||||
import {TOUCH} from '../../../src/ol/has.js';
|
import {TOUCH} from '../../../src/ol/has.js';
|
||||||
import {focus} from '../../../src/ol/events/condition.js';
|
import {focus} from '../../../src/ol/events/condition.js';
|
||||||
import {defaults as defaultInteractions} from '../../../src/ol/interaction.js';
|
import {defaults as defaultInteractions} from '../../../src/ol/interaction.js';
|
||||||
@@ -220,6 +220,13 @@ describe('ol.Map', function() {
|
|||||||
url: 'spec/ol/data/point.json',
|
url: 'spec/ol/data/point.json',
|
||||||
format: new GeoJSON()
|
format: new GeoJSON()
|
||||||
})
|
})
|
||||||
|
}),
|
||||||
|
new VectorLayer({
|
||||||
|
source: new VectorSource({
|
||||||
|
features: [
|
||||||
|
new Feature(new Point([0, 0]))
|
||||||
|
]
|
||||||
|
})
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user