File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,15 +381,17 @@ async function getHeightMapForLocalCompute(
381381 }
382382 }
383383
384- const storedHeightMap = await findStoredHeightMap (
385- latLng . lat ,
386- latLng . lng ,
387- settings . gridSize ,
388- ) ;
389- if ( storedHeightMap !== undefined ) {
390- const terrainHeight = lookupTerrainHeight ( storedHeightMap , latLng ) ;
391- const requiredMargin = estimateSearchMarginMeters ( settings , terrainHeight ) ;
392- return cropHeightMap ( storedHeightMap , latLng , requiredMargin ) ;
384+ if ( ! navigator . onLine ) {
385+ const storedHeightMap = await findStoredHeightMap (
386+ latLng . lat ,
387+ latLng . lng ,
388+ settings . gridSize ,
389+ ) ;
390+ if ( storedHeightMap !== undefined ) {
391+ const terrainHeight = lookupTerrainHeight ( storedHeightMap , latLng ) ;
392+ const requiredMargin = estimateSearchMarginMeters ( settings , terrainHeight ) ;
393+ return cropHeightMap ( storedHeightMap , latLng , requiredMargin ) ;
394+ }
393395 }
394396
395397 // Let the backend choose a sufficiently large initial margin and report start height.
You can’t perform that action at this time.
0 commit comments