Skip to content

Commit cec5528

Browse files
committed
chore: lint
1 parent a70a592 commit cec5528

File tree

2 files changed

+33
-44
lines changed

2 files changed

+33
-44
lines changed

src/layers/vector.android.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
import { BaseNative } from '..';
2-
import { nativeProperty } from '..';
1+
import { Layer, TileLayer } from '.';
2+
import { BaseNative, nativeProperty } from '..';
33
import { fromNativeMapPos, fromNativeScreenPos } from '../core';
4-
import { VectorDataSource } from '../datasources/vector';
54
import { Projection } from '../projections';
65
import { nativeVariantToJS } from '../utils';
76
import { VectorElement } from '../vectorelements';
7+
import { Line } from '../vectorelements/line';
88
import { MBVectorTileDecoder, VectorTileDecoder } from '../vectortiles';
9-
import { Layer, TileLayer } from '.';
109
import {
1110
CartoOfflineVectorTileLayerOptions,
1211
ClusteredVectorLayerLayerOptions,
1312
CartoOnlineVectorTileLayerOptions as ICartoOnlineVectorTileLayerOptions,
1413
VectorEditEventListener as IVectorEditEventListener,
1514
VectorElementEventListener as IVectorElementEventListener,
1615
VectorTileEventListener as IVectorTileEventListener,
16+
VectorTileRenderOrder as IVectorTileRenderOrder,
1717
VectorLayerOptions,
1818
VectorTileLayerOptions,
19-
VectorTileRenderOrder as IVectorTileRenderOrder,
2019
} from './vector';
21-
import { Line } from '../vectorelements/line';
2220

2321
export { VectorTileDecoder };
2422

@@ -65,13 +63,13 @@ export abstract class BaseVectorTileLayer<T extends com.carto.layers.VectorTileL
6563
projection?: Projection;
6664
listener?: IVectorTileEventListener;
6765
nListener?: com.akylas.carto.additions.AKVectorTileEventListener;
68-
69-
@nativeProperty layerBlendingSpeed:number
70-
@nativeProperty labelBlendingSpeed:number
71-
@nativeProperty tileCacheCapacity:number
72-
@nativeProperty clickRadius:number
73-
@nativeProperty labelRenderOrder: IVectorTileRenderOrder
74-
@nativeProperty buildingRenderOrder: IVectorTileRenderOrder
66+
67+
@nativeProperty layerBlendingSpeed: number;
68+
@nativeProperty labelBlendingSpeed: number;
69+
@nativeProperty tileCacheCapacity: number;
70+
@nativeProperty clickRadius: number;
71+
@nativeProperty labelRenderOrder: IVectorTileRenderOrder;
72+
@nativeProperty buildingRenderOrder: IVectorTileRenderOrder;
7573
constructor(options) {
7674
super(options);
7775
for (const property of ['listener', 'nListener']) {

src/layers/vector.ios.ts

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1+
import { Layer, TileLayer } from '.';
2+
import { BaseNative, nativeProperty } from '..';
3+
import { fromNativeMapPos } from '../core';
4+
import { Projection } from '../projections';
5+
import { nativeVariantToJS } from '../utils';
6+
import { VectorElement } from '../vectorelements';
7+
import { MBVectorTileDecoder } from '../vectortiles';
18
import {
29
CartoOfflineVectorTileLayerOptions,
310
CartoOnlineVectorTileLayerOptions,
411
ClusteredVectorLayerLayerOptions,
512
VectorElementEventListener as IVectorElementEventListener,
613
VectorTileEventListener as IVectorTileEventListener,
14+
VectorTileRenderOrder as IVectorTileRenderOrder,
715
VectorLayerOptions,
8-
VectorTileRenderOrder as IVectorTileRenderOrder,
916
VectorTileLayerOptions,
1017
} from './vector';
11-
import { Layer, TileLayer } from '.';
12-
import { BaseNative } from '..';
13-
import { VectorDataSource } from '../datasources/vector';
14-
import { MBVectorTileDecoder } from '../vectortiles';
15-
import { nativeProperty } from '..';
16-
import { fromNativeMapPos } from '../core';
17-
import { Projection } from '../projections';
18-
import { VectorElement } from '../vectorelements';
19-
import { nativeVariantToJS } from '../utils';
2018

2119
export enum VectorTileRenderOrder {
2220
HIDDEN = NTVectorTileRenderOrder.T_VECTOR_TILE_RENDER_ORDER_HIDDEN,
2321
LAYER = NTVectorTileRenderOrder.T_VECTOR_TILE_RENDER_ORDER_LAYER,
24-
LAST = NTVectorTileRenderOrder.T_VECTOR_TILE_RENDER_ORDER_LAST
22+
LAST = NTVectorTileRenderOrder.T_VECTOR_TILE_RENDER_ORDER_LAST,
2523
}
2624

2725
export enum VectorElementDragResult {
2826
IGNORE = NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_IGNORE,
2927
STOP = NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_STOP,
3028
MODIFY = NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_MODIFY,
31-
DELETE = NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_DELETE
29+
DELETE = NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_DELETE,
3230
}
3331

3432
@NativeClass
@@ -51,11 +49,7 @@ export class NTVectorElementEventListenerImpl extends NTVectorElementEventListen
5149
let position = info.getClickPos();
5250
let elementPos = info.getElementClickPos();
5351
if (this.projection) {
54-
const layerProj = this._layer
55-
.get()
56-
.getNative()
57-
.getDataSource()
58-
.getProjection();
52+
const layerProj = this._layer.get().getNative().getDataSource().getProjection();
5953
const nProj = this.projection.getNative();
6054
elementPos = nProj.fromWgs84(layerProj.toWgs84(elementPos));
6155
position = nProj.fromWgs84(layerProj.toWgs84(position));
@@ -67,7 +61,7 @@ export class NTVectorElementEventListenerImpl extends NTVectorElementEventListen
6761
element,
6862
metaData: element.metaData,
6963
position: fromNativeMapPos(position),
70-
elementPos: fromNativeMapPos(elementPos)
64+
elementPos: fromNativeMapPos(elementPos),
7165
}) || false
7266
);
7367
}
@@ -140,7 +134,7 @@ export class NTVectorTileEventListenerImpl extends NTVectorTileEventListener {
140134
featureLayerName: geoFeature.layer,
141135
featureGeometry: geometry,
142136
featurePosition: fromNativeMapPos(featurePos),
143-
position: fromNativeMapPos(position)
137+
position: fromNativeMapPos(position),
144138
}) || false
145139
);
146140
}
@@ -149,13 +143,12 @@ export class NTVectorTileEventListenerImpl extends NTVectorTileEventListener {
149143
}
150144

151145
export abstract class BaseVectorTileLayer<T extends NTVectorTileLayer, U extends VectorTileLayerOptions> extends TileLayer<T, U> {
152-
153-
@nativeProperty layerBlendingSpeed:number
154-
@nativeProperty labelBlendingSpeed:number
155-
@nativeProperty tileCacheCapacity:number
156-
@nativeProperty clickRadius:number
157-
@nativeProperty labelRenderOrder: IVectorTileRenderOrder
158-
@nativeProperty buildingRenderOrder: IVectorTileRenderOrder
146+
@nativeProperty layerBlendingSpeed: number;
147+
@nativeProperty labelBlendingSpeed: number;
148+
@nativeProperty tileCacheCapacity: number;
149+
@nativeProperty clickRadius: number;
150+
@nativeProperty labelRenderOrder: IVectorTileRenderOrder;
151+
@nativeProperty buildingRenderOrder: IVectorTileRenderOrder;
159152
setLabelRenderOrder(order: NTVectorTileRenderOrder) {
160153
this.getNative().setLabelRenderOrder(order);
161154
}
@@ -248,11 +241,9 @@ class NTVectorEditEventListenerImpl extends NTVectorEditEventListener {
248241
return NTVectorElementDragResult.T_VECTOR_ELEMENT_DRAG_RESULT_IGNORE;
249242
}
250243

251-
onElementDelete(element: NTVectorElement) {
252-
}
244+
onElementDelete(element: NTVectorElement) {}
253245

254-
onElementDeselected(element: NTVectorElement) {
255-
}
246+
onElementDeselected(element: NTVectorElement) {}
256247

257248
// onElementModifyGeometry(element: NTVectorElement, geometry: NTGeometry) {
258249
// console.log('onElementModifyGeometry', element);
@@ -294,7 +285,7 @@ export class ClusteredVectorLayer extends BaseVectorLayer<NTClusteredVectorLayer
294285
@nativeProperty minimumClusterDistance: number;
295286
@nativeProperty maximumClusterZoom: number;
296287
@nativeProperty({
297-
nativeGetterName: 'isAnimatedClusters'
288+
nativeGetterName: 'isAnimatedClusters',
298289
})
299290
animatedClusters: boolean;
300291
}

0 commit comments

Comments
 (0)