Skip to content

Commit 0e42ed1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0f08f66 commit 0e42ed1

File tree

3 files changed

+29
-33
lines changed

3 files changed

+29
-33
lines changed

platform/ios/app/MBXViewController.mm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ @implementation MBXViewController
256256

257257
NSDictionary* _pointFeatures;
258258
NSLock* _loadLock;
259-
259+
260260
MBXTileLodMode _tileLodMode;
261261
}
262262

@@ -2014,7 +2014,7 @@ -(void)cycleTileLodMode
20142014
static const double defaultRadius = self.mapView.tileLodMinRadius;
20152015
static const double defaultScale = self.mapView.tileLodScale;
20162016
static const double defaultPitchThreshold = self.mapView.tileLodPitchThreshold;
2017-
2017+
20182018
_tileLodMode = static_cast<MBXTileLodMode>((static_cast<int>(_tileLodMode) + 1) % static_cast<int>(MBXTileLodModeCount));
20192019

20202020
switch (_tileLodMode) {
@@ -2040,25 +2040,25 @@ -(void)cycleTileLodMode
20402040
default:
20412041
break;
20422042
}
2043-
2043+
20442044
// update UI
20452045
static UISlider* zoomSlider = nil;
20462046
if (zoomSlider && _tileLodMode == MBXTileLodModeNoLod) {
20472047
[zoomSlider removeFromSuperview];
20482048
zoomSlider = nil;
20492049
}
2050-
2050+
20512051
if (!zoomSlider && _tileLodMode != MBXTileLodModeNoLod) {
20522052
const float zoomShiftRange = 5.0f;
20532053
zoomSlider = [[UISlider alloc] init];
20542054
zoomSlider.minimumValue = -zoomShiftRange / 2.0f;
20552055
zoomSlider.maximumValue = zoomShiftRange / 2.0f;
20562056
zoomSlider.value = self.mapView.tileLodZoomShift;
20572057
zoomSlider.continuous = NO;
2058-
2058+
20592059
[zoomSlider addTarget:self action:@selector(updateTileLodZoom:) forControlEvents:UIControlEventValueChanged];
20602060
[self.view addSubview:zoomSlider];
2061-
2061+
20622062
zoomSlider.translatesAutoresizingMaskIntoConstraints = NO;
20632063
zoomSlider.frame = CGRectMake(0, 0, 100, 100);
20642064

@@ -2085,10 +2085,10 @@ -(void)cycleTileLodMode
20852085
multiplier:1
20862086
constant:0],
20872087
[zoomSlider.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor]];
2088-
2088+
20892089
[self.view addConstraints:layout];
20902090
}
2091-
2091+
20922092
[self.mapView triggerRepaint];
20932093
}
20942094

@@ -2097,7 +2097,7 @@ -(void)updateTileLodZoom:(id)sender {
20972097

20982098
self.mapView.tileLodZoomShift = slider.value;
20992099
[self.mapView triggerRepaint];
2100-
2100+
21012101
NSLog(@"Tile LOD zoom shift: %f", self.mapView.tileLodZoomShift);
21022102
}
21032103

platform/ios/src/MLNMapView.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ MLN_EXPORT
430430

431431
/**
432432
Camera based tile level of detail controls
433-
433+
434434
Minimum radius around the view point in unit of tiles in which the fine
435435
grained zoom level tiles are always used when performing LOD
436436
radius must be greater than 1 (At least 1 fine detailed tile is present)
@@ -441,7 +441,7 @@ MLN_EXPORT
441441

442442
/**
443443
Camera based tile level of detail controls
444-
444+
445445
Factor for the distance to the camera view point
446446
A value larger than 1 increases the distance to the camera view point reducing LOD
447447
Larger values may improve performance at the cost of quality (tiles away from camera
@@ -451,24 +451,22 @@ MLN_EXPORT
451451

452452
/**
453453
Camera based tile level of detail controls
454-
454+
455455
Pitch angle in radians above which LOD calculation is performed
456456
A smaller radius value may improve performance at the cost of quality
457457
*/
458458
@property (nonatomic, assign) double tileLodPitchThreshold;
459459

460460
/**
461461
Camera based tile level of detail controls
462-
462+
463463
Shift applied to the Zoom level during LOD calculation
464-
A negative value shifts the Zoom level to a coarser level reducing quality but improving performance
465-
A positive value shifts the Zoom level to a finer level increasing details but negatively affecting performance
466-
A value of zero (default) does not apply any shift to the Zoom level
467-
It is not recommended to change the default value unless performance is critical
468-
and the loss of quality is acceptable. A value of -1 reduces the number of
469-
displayed tiles by a factor of 4 on average
470-
It is recommended to first configure the pixelRatio before adjusting
471-
TileLodZoomShift.
464+
A negative value shifts the Zoom level to a coarser level reducing quality but improving
465+
performance A positive value shifts the Zoom level to a finer level increasing details but
466+
negatively affecting performance A value of zero (default) does not apply any shift to the Zoom
467+
level It is not recommended to change the default value unless performance is critical and the loss
468+
of quality is acceptable. A value of -1 reduces the number of displayed tiles by a factor of 4 on
469+
average It is recommended to first configure the pixelRatio before adjusting TileLodZoomShift.
472470
*/
473471
@property (nonatomic, assign) double tileLodZoomShift;
474472

platform/macos/src/MLNMapView.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ MLN_EXPORT IB_DESIGNABLE @interface MLNMapView : NSView<MLNStylable>
195195

196196
/**
197197
Camera based tile level of detail controls
198-
198+
199199
Minimum radius around the view point in unit of tiles in which the fine
200200
grained zoom level tiles are always used when performing LOD
201201
radius must be greater than 1 (At least 1 fine detailed tile is present)
@@ -206,7 +206,7 @@ MLN_EXPORT IB_DESIGNABLE @interface MLNMapView : NSView<MLNStylable>
206206

207207
/**
208208
Camera based tile level of detail controls
209-
209+
210210
Factor for the distance to the camera view point
211211
A value larger than 1 increases the distance to the camera view point reducing LOD
212212
Larger values may improve performance at the cost of quality (tiles away from camera
@@ -216,24 +216,22 @@ MLN_EXPORT IB_DESIGNABLE @interface MLNMapView : NSView<MLNStylable>
216216

217217
/**
218218
Camera based tile level of detail controls
219-
219+
220220
Pitch angle in radians above which LOD calculation is performed
221221
A smaller radius value may improve performance at the cost of quality
222222
*/
223223
@property (nonatomic, assign) double tileLodPitchThreshold;
224224

225225
/**
226226
Camera based tile level of detail controls
227-
227+
228228
Shift applied to the Zoom level during LOD calculation
229-
A negative value shifts the Zoom level to a coarser level reducing quality but improving performance
230-
A positive value shifts the Zoom level to a finer level increasing details but negatively affecting performance
231-
A value of zero (default) does not apply any shift to the Zoom level
232-
It is not recommended to change the default value unless performance is critical
233-
and the loss of quality is acceptable. A value of -1 reduces the number of
234-
displayed tiles by a factor of 4 on average
235-
It is recommended to first configure the pixelRatio before adjusting
236-
TileLodZoomShift.
229+
A negative value shifts the Zoom level to a coarser level reducing quality but improving
230+
performance A positive value shifts the Zoom level to a finer level increasing details but
231+
negatively affecting performance A value of zero (default) does not apply any shift to the Zoom
232+
level It is not recommended to change the default value unless performance is critical and the loss
233+
of quality is acceptable. A value of -1 reduces the number of displayed tiles by a factor of 4 on
234+
average It is recommended to first configure the pixelRatio before adjusting TileLodZoomShift.
237235
*/
238236
@property (nonatomic, assign) double tileLodZoomShift;
239237

0 commit comments

Comments
 (0)