Repository navigation
Expand file tree
/
Copy pathmarker-cluster.js
More file actions
57 lines (57 loc) · 1.77 KB
/
Copy pathmarker-cluster.js
File metadata and controls
57 lines (57 loc) · 1.77 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
55
56
57
/**
* Marker clustersample
*/
this.default = function () {
var maps = new ej.maps.Maps({
// custom code start
load: function (args) {
var marker = location.hash.split('/')[1];
marker = marker ? marker : 'Material';
args.maps.theme = (marker.charAt(0).toUpperCase() + marker.slice(1));
},
// custom code end
useGroupingSeparator: true,
format: 'n',
zoomSettings: {
enable: true
},
titleSettings: {
text: 'Top 50 largest cities in the World',
textStyle: {
size: '16px'
}
},
layers: [
{
shapeData: new ej.maps.MapAjax('./src/maps/map-data/world-map.json'),
shapeSettings: {
fill: '#C1DFF5'
},
markerClusterSettings: {
allowClustering: true,
shape: 'Image',
height: 40,
width: 40,
imageUrl: 'src/maps/images/cluster.svg'
},
markerSettings: [
{
visible: true,
dataSource: window.cluster,
shape: 'Image',
imageUrl: 'src/maps/images/ballon.png',
tooltipSettings: {
template: '#template',
visible: true,
valuePath: 'area',
},
height: 20,
width: 20,
animationDuration: 0
},
]
}
]
});
maps.appendTo('#container');
};