File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed
Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -32,23 +32,27 @@ class TileBuilderPageState extends State<TileBuilderPage> {
3232 children: [
3333 tileWidget,
3434 if (showLoadingTime || showCoordinates)
35- Column (
36- mainAxisAlignment: MainAxisAlignment .center,
37- children: [
38- if (showCoordinates)
39- Text (
40- '${coords .x } : ${coords .y } : ${coords .z }' ,
41- style: Theme .of (context).textTheme.headlineSmall,
42- ),
43- if (showLoadingTime)
44- Text (
45- tile.loadFinishedAt == null
46- ? 'Loading'
47- // sometimes result is negative which shouldn't happen, abs() corrects it
48- : '${(tile .loadFinishedAt !.millisecond - tile .loadStarted !.millisecond ).abs ()} ms' ,
49- style: Theme .of (context).textTheme.headlineSmall,
50- ),
51- ],
35+ FittedBox (
36+ fit: BoxFit .scaleDown,
37+ alignment: Alignment .center,
38+ child: Column (
39+ mainAxisAlignment: MainAxisAlignment .center,
40+ children: [
41+ if (showCoordinates)
42+ Text (
43+ '${coords .x } : ${coords .y } : ${coords .z }' ,
44+ style: Theme .of (context).textTheme.headlineSmall,
45+ ),
46+ if (showLoadingTime)
47+ Text (
48+ tile.loadFinishedAt == null
49+ ? 'Loading'
50+ // sometimes result is negative which shouldn't happen, abs() corrects it
51+ : '${(tile .loadFinishedAt !.millisecond - tile .loadStarted !.millisecond ).abs ()} ms' ,
52+ style: Theme .of (context).textTheme.headlineSmall,
53+ ),
54+ ],
55+ ),
5256 ),
5357 ],
5458 ),
Original file line number Diff line number Diff line change @@ -77,10 +77,11 @@ class TileCoordinatesResolver {
7777 if (! replicatesWorldLongitude) {
7878 return positionCoordinates;
7979 }
80- if (positionCoordinates.z < 0 ) {
80+ final z = positionCoordinates.z + zoomOffset;
81+ if (z < 0 ) {
8182 return positionCoordinates;
8283 }
83- final modulo = 1 << (positionCoordinates.z + zoomOffset) ;
84+ final modulo = 1 << z ;
8485 int x = positionCoordinates.x;
8586 while (x < 0 ) {
8687 x += modulo;
You can’t perform that action at this time.
0 commit comments