Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const source = this.map.getSource('my-source');
- function loop() {
- source.on('data', requestFrame);
- source.setData(updatedGeoJson);
- }
- function requestFrame(event) {
- if (event.dataType !== 'source') {
- return;
- }
- source.off('data', this.requestFrame);
- requestAnimationFrame(loop);
- }
Add Comment
Please, Sign In to add comment