Skip to content

Commit f1868b1

Browse files
author
farfromrefug
committed
chore: clenaup
1 parent 2be7df8 commit f1868b1

File tree

2 files changed

+10
-66
lines changed

2 files changed

+10
-66
lines changed

src/ui-carto/ui/index.android.ts

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -53,41 +53,6 @@ export const PanningMode = {
5353
}
5454
};
5555

56-
let licenseKey: string;
57-
58-
export function registerLicense(value: string, callback?: (result: boolean) => void) {
59-
const context = Utils.android.getApplicationContext();
60-
if (!context) {
61-
throw new Error('application context not initialized!');
62-
}
63-
if (callback) {
64-
return com.akylas.carto.additions.AKLicenseManager.registerLicenseCallback(
65-
value,
66-
context,
67-
new com.akylas.carto.additions.RegisterLicenseCallback({
68-
onLicenseRegistered: (result: any) => {
69-
if (result) {
70-
licenseKey = value;
71-
}
72-
setLicenseKeyRegistered(result);
73-
callback(result);
74-
}
75-
})
76-
);
77-
} else {
78-
const result = com.carto.ui.MapView.registerLicense(value, context);
79-
80-
if (result) {
81-
licenseKey = value;
82-
}
83-
setLicenseKeyRegistered(result);
84-
return result;
85-
}
86-
}
87-
export function getLicenseKey() {
88-
return licenseKey;
89-
}
90-
9156
export class CartoMap<T = DefaultLatLonKeys> extends CartoViewBase {
9257
public useTextureView: boolean;
9358
public static setRunOnMainThread(value: boolean) {
@@ -112,12 +77,6 @@ export class CartoMap<T = DefaultLatLonKeys> extends CartoViewBase {
11277
}
11378
}
11479
public createNativeView(): Object {
115-
if (!isLicenseKeyRegistered()) {
116-
const license = this.style['licenseKey'] || getLicenseKey();
117-
if (license) {
118-
registerLicense(license);
119-
}
120-
}
12180
let view;
12281
if (this.useTextureView) {
12382
view = new com.akylas.carto.additions.AKTextureMapView(this._context);
@@ -306,7 +265,7 @@ export class CartoMap<T = DefaultLatLonKeys> extends CartoViewBase {
306265
layers.add(native);
307266
}
308267
} catch (error) {
309-
console.error(error)
268+
console.error(error);
310269
}
311270
}
312271
}

src/ui-carto/ui/index.d.ts

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ export interface MapPosEventData<T = DefaultLatLonKeys> extends EventData {
3939
MapPos: GenericMapPos<T>;
4040
}
4141

42-
export interface MapClickInfo {}
42+
export interface MapClickInfo<T = DefaultLatLonKeys> {
43+
clickType: number,
44+
clickInfo:{
45+
duration:number
46+
},
47+
position: GenericMapPos<T>;
48+
}
4349
export interface MapInteractionInfo {
4450
userAction: boolean;
4551
isAnimationStarted: boolean;
@@ -96,17 +102,6 @@ export class MapOptions {
96102
* @returns native Carto MapRange
97103
*/
98104
getTiltRange(): any;
99-
getWatermarkAlignmentX(): number;
100-
getWatermarkAlignmentY(): number;
101-
/**
102-
* @returns native Carto Bitmap
103-
*/
104-
getWatermarkBitmap(): any;
105-
/**
106-
* @returns native ScreenPos padding
107-
*/
108-
getWatermarkPadding(): any;
109-
getWatermarkScale(): number;
110105
getZoomRange(): any;
111106
isClickTypeDetection(): boolean;
112107
isKineticPan(): boolean;
@@ -171,18 +166,6 @@ export class MapOptions {
171166
*/
172167
setTiltRange(tiltRange: any): void;
173168
setUserInput(enabled: boolean): void;
174-
setWatermarkAlignmentX(alignmentX: number): void;
175-
setWatermarkAlignmentY(alignmentY: number): void;
176-
/**
177-
* @param watermarkBitmap native Carto Bitmap
178-
*/
179-
setWatermarkBitmap(watermarkBitmap: any): void;
180-
/**
181-
* @param padding: native ScreenPos parameter
182-
*/
183-
setWatermarkPadding(padding: any): void;
184-
185-
setWatermarkScale(scale: number): void;
186169
setZoomGestures(enabled: boolean): void;
187170
/**
188171
* @param zoomRange native Carto MapRange
@@ -195,6 +178,8 @@ export class MapOptions {
195178
setLongClickDuration(param0: number): void;
196179
getDoubleClickMaxDuration(): number;
197180
setDoubleClickMaxDuration(param0: number): void;
181+
setLayersLabelsProcessedInReverseOrder(enabled: boolean): void;
182+
isLayersLabelsProcessedInReverseOrder(): boolean;
198183
}
199184

200185
interface CartoMapStyle extends Style {

0 commit comments

Comments
 (0)