File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,15 +16,12 @@ export class EnforceNonZeroErrorPlugin {
1616
1717 let parent = tile . parent ;
1818 let depth = 1 ;
19-
20- let targetDepth = - 1 ;
21- let targetError = Infinity ;
2219 while ( parent !== null ) {
2320
24- if ( parent . geometricError !== 0 && parent . geometricError < targetError ) {
21+ if ( parent . geometricError !== 0 ) {
2522
26- targetError = parent . geometricError ;
27- targetDepth = depth ;
23+ tile . geometricError = parent . geometricError * ( 2 ** - depth ) ;
24+ break ;
2825
2926 }
3027
@@ -33,14 +30,6 @@ export class EnforceNonZeroErrorPlugin {
3330
3431 }
3532
36- // find the smallest error in the parent list to avoid grabbing artificially inflated error values
37- // for the sake of forced refinement. Then scale the error by the depth.
38- if ( targetDepth !== - 1 ) {
39-
40- tile . geometricError = targetError * ( 2 ** - depth ) ;
41-
42- }
43-
4433 }
4534
4635 }
Original file line number Diff line number Diff line change @@ -816,6 +816,11 @@ export class ImageOverlayPlugin {
816816
817817 } ) ;
818818
819+ // force the tile "refine" mode to be set to "REPLACE" if we're splitting tiles
820+ // TODO: If a tile is of type "ADD" refine and it has children then it will not be split
821+ // as expected since only geometry tiles with no children are split. Instead we'd want
822+ // to split this tiles geometry in addition to adding the child tiles.
823+ tile . refine = 'REPLACE' ;
819824 tile . children . push ( ...children ) ;
820825
821826 }
You can’t perform that action at this time.
0 commit comments