forked from naderio/nativescript-google-maps-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ios.ts
More file actions
54 lines (39 loc) · 1.33 KB
/
index.ios.ts
File metadata and controls
54 lines (39 loc) · 1.33 KB
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
49
50
51
52
53
54
import * as utils from "tns-core-modules/utils/utils";
import { MapView, Marker, Position } from "nativescript-google-maps-sdk"
declare var GMUClusterManager: any;
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');
console.log("*** init ios map view: ");
// TODO
const clusterManager = NSClassFromString('GMUClusterManager').alloc();
console.log("*** map view: ", clusterManager);
}
export interface IHeatmapConfig {
}
export function setupHeatmap(mapView: MapView, positions: Array<Position>, config: IHeatmapConfig = null) : IHeatmapConfig {
debug('setupHeatmap');
// TODO
return config;
}