/
index.ios.ts
48 lines (35 loc) · 1.12 KB
/
index.ios.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import * as utils from "tns-core-modules/utils/utils";
import { MapView, Marker, Position } from "nativescript-google-maps-sdk"
const debugNull = function(...args: Array<any>): void { };
function debugDefault(...args: Array<any>) {
args = args.map((value) => {
if (typeof value === 'object' && value) {
try {
value = JSON.stringify(value);
} catch (e) {
value = value.toString();
}
}
return value;
});
args.unshift('nativescript-socket.io');
console.log.apply(console, args);
}
let debug = debugNull;
export function enableDebug(debugFn: ((...args: Array<any>) => any) = debugDefault): void {
debug = debugFn;
}
export function disableDebug(): void {
debug = debugNull;
}
export function setupMarkerCluster(mapView: MapView, markers: Array<Marker>, options) {
debug('setupMarkerCluster');
// TODO
}
export interface IHeatmapConfig {
}
export function setupHeatmap(mapView: MapView, positions: Array<Position>, config: IHeatmapConfig = null) : IHeatmapConfig {
debug('setupHeatmap');
// TODO
return config;
}