File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -849,7 +849,7 @@ if (typeof global.process === 'undefined')
849849 this . _handleGeospatialResult ( result ) ;
850850 }
851851 } ,
852- _process_map_data : function ( ) {
852+ _processMapData : function ( ) {
853853 var self = this ;
854854 const resultsToProcess = this . _mapResultsBuffer . splice ( 0 ) ;
855855 for ( const bindings of resultsToProcess ) {
@@ -908,14 +908,20 @@ if (typeof global.process === 'undefined')
908908 }
909909 }
910910 }
911+ this . _processingScheduled = false ;
911912 } ,
912913
913914 // If the given result contains geospatial data, show it on the map
914915 _handleGeospatialResult : function ( bindings ) {
915916 if ( ! this . _mapResultsBuffer ) this . _mapResultsBuffer = [ ] ;
916917 this . _mapResultsBuffer . push ( bindings ) ;
917918
918- requestAnimationFrame ( this . _process_map_data . bind ( this ) ) ;
919+ if ( this . _mapResultsBuffer . length > 0 ) {
920+ if ( ! this . _processingScheduled ) {
921+ this . _processingScheduled = true ;
922+ requestAnimationFrame ( this . _processMapData . bind ( this ) ) ;
923+ }
924+ }
919925 } ,
920926
921927 // Finalizes the display after all results have been added
You can’t perform that action at this time.
0 commit comments