Skip to content

Commit afe4d5b

Browse files
committed
lint: fixes
1 parent 02731f4 commit afe4d5b

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

src/layers/parser/property-parser.android.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Color } from '@nativescript/core';
2-
31
function toCamelCase(s) {
42
return s.replace(/([-_][a-z])/gi, ($1) => $1.toUpperCase().replace('-', '').replace('_', ''));
53
}

src/layers/parser/property-parser.ios.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ export class PropertyParser {
6464

6565
if (propertiesObject) {
6666
Object.keys(propertiesObject).forEach((k) => {
67-
// if (Array.isArray(propertiesObject[k])) {
6867
const actualKey = keysMap[k] || toCamelCase(k);
6968
nProperties[actualKey] = (NSExpression as any).expressionWithMGLJSONObject(transformValue(k, propertiesObject[k]));
70-
// delete propertiesObject[k];
71-
// }
7269
});
7370
}
7471

src/mapbox.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,11 +2402,11 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
24022402
}
24032403

24042404
const geoJsonSource = new com.mapbox.mapboxsdk.style.sources.GeoJsonSource(id, geojsonOptions);
2405-
if(options.data) {
2405+
if (options.data) {
24062406
const geoJsonString = JSON.stringify(options.data);
24072407
geoJsonSource.setGeoJson(geoJsonString);
24082408
}
2409-
2409+
24102410
source = geoJsonSource;
24112411

24122412
break;

src/mapbox.ios.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,11 +2156,10 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
21562156
}
21572157
}
21582158
if (options.bounds) {
2159-
sourceOptions[MGLTileSourceOptionCoordinateBounds] = (NSValue as any).valueWithMGLCoordinateBounds({
2159+
sourceOptions[MGLTileSourceOptionCoordinateBounds] = (NSValue as any).valueWithMGLCoordinateBounds({
21602160
sw: CLLocationCoordinate2DMake(options.bounds[1], options.bounds[0]),
21612161
ne: CLLocationCoordinate2DMake(options.bounds[3], options.bounds[2]),
21622162
});
2163-
21642163
}
21652164
source = MGLVectorTileSource.alloc().initWithIdentifierTileURLTemplatesOptions(id, options.tiles, sourceOptions);
21662165
}
@@ -2175,9 +2174,9 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
21752174
if (options.data) {
21762175
const content: NSString = NSString.stringWithString(JSON.stringify(options.data));
21772176
const nsData: NSData = content.dataUsingEncoding(NSUTF8StringEncoding);
2178-
geoJsonShape = MGLShape.shapeWithDataEncodingError(nsData, NSUTF8StringEncoding);
2177+
geoJsonShape = MGLShape.shapeWithDataEncodingError(nsData, NSUTF8StringEncoding);
21792178
}
2180-
2179+
21812180
const sourceOptions: any = {};
21822181
if (options.minzoom !== undefined) {
21832182
sourceOptions[MGLShapeSourceOptionMinimumZoomLevel] = options.minzoom;
@@ -2213,11 +2212,11 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
22132212
}
22142213

22152214
if (options.bounds) {
2216-
sourceOptions[MGLTileSourceOptionCoordinateBounds] = (NSValue as any).valueWithMGLCoordinateBounds(({
2215+
sourceOptions[MGLTileSourceOptionCoordinateBounds] = (NSValue as any).valueWithMGLCoordinateBounds({
22172216
sw: CLLocationCoordinate2DMake(options.bounds[1], options.bounds[0]),
22182217
ne: CLLocationCoordinate2DMake(options.bounds[3], options.bounds[2]),
2219-
}));
2220-
console.log('test', sourceOptions[MGLTileSourceOptionCoordinateBounds])
2218+
});
2219+
console.log('test', sourceOptions[MGLTileSourceOptionCoordinateBounds]);
22212220
}
22222221
source = MGLRasterTileSource.alloc().initWithIdentifierTileURLTemplatesOptions(id, options.tiles, sourceOptions);
22232222

0 commit comments

Comments
 (0)