forked from KIGroup/YandexMapPortlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KZDashboards-KZMap.dashboard.dfi.xml
141 lines (124 loc) · 7.71 KB
/
KZDashboards-KZMap.dashboard.dfi.xml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Document name="KZDashboards-KZMap.dashboard.DFI">
<dashboard xmlns="http://www.intersystems.com/deepsee/library" name="KZMap" folderName="KZDashboards" title="" description="" keywords="" owner="" shared="true" public="true" locked="false" resource="" timeCreated="2013-07-04T05:29:56.446Z" createdBy="ilson" category="" bookCover="" scheme="" worklistCount="0" snapTo="true" snapGrid="true" gridRows="10" gridCols="10" canResize="true" canModify="true" showTitleBar="true" companyName="" companyLogo="" companyStyle="">
<widget name="MapW" type="portlet" subtype="KZ.MapPortlet" subtypeClass="" title="Казахстан" dataSource="KZMapKPI.kpi" dataLink="" drillDownDataSource="" width="200" height="200" sidebarContent="" showSidebar="false" sidebarWidth="" maximized="false" homeRowL="0" homeColL="0" colSpanL="10" rowSpanL="10" showToolbar="true" theme="" dataColorList="">
<control name="" action="applyFilter" target="*" targetProperty="ParentGuid" location="widget" type="hidden" controlClass="" label="ParentGuid" title="" value="" text="" readOnly="false" valueList="" displayList="" activeWhen=""></control>
<control name="" action="applyFilter" target="*" targetProperty="ParameterName" location="widget" type="dropdown" controlClass="" label="Параметр" title="" value="Население" text="" readOnly="false" valueList="" displayList="" activeWhen=""></control>
<control name="" action="applyFilter" target="" targetProperty="PolygonsMarkers" location="widget" type="dropdown" controlClass="" label="Вариант отображения" title="" value="Polygons" text="" readOnly="false" valueList="" displayList="" activeWhen=""></control>
<property name="drillUpButtonPosition">top</property>
<property name="getAdditionInfoForObjectById">KZ.ParameterValue;GetParametersData</property>
<property name="latitude">49</property>
<property name="longitude">65</property>
<property name="mapType">Дорожная карта:yandex#map</property>
<property name="onaddplacemark">
placemark.properties.set("hintContent", placemark.data.Name + ' (' + placemark.data.Value + ')');
</property>
<property name="onaddpolygon">
polygon.properties.set("hintContent", polygon.data.Name + ' (' + polygon.data.Value + ')');
</property>
<property name="onclickplacemark"><![CDATA[
var content = '<div style="font-size: 12px; font-family:arial;"><span style="font-weight: bold;">' + placemark.data.Name + '</span><br>';
var otherInfo = zenThis.GetAdditionInformationForObjectById(placemark.data.Guid);
otherInfo.parameters = otherInfo.parameters.split(';');
otherInfo.unitNames = otherInfo.unitNames.split(';');
otherInfo.values = otherInfo.values.split(';');
for (var i=0; i < otherInfo.parameters.length-1; i++){
content += '<br>' + otherInfo.parameters[i] + ': ' + zenThis.beatNumber(otherInfo.values[i]) + ' ' + otherInfo.unitNames[i];
}
zenThis.openBallonAtPosition(placemark.geometry.getCoordinates(), content + '</div>');
]]></property>
<property name="onclickpolygon"><![CDATA[
if(!zenThis.lastPolygon){
zenThis.lastPolygon = [];
}
zenThis.drillDown(polygon.data.Name, position, polygon.data.DefaultZoom, {Guid: polygon.data.Guid, Level: polygon.data.Level});
if (zenThis.lastPolygon.length > 0){
zenThis.lastPolygon[zenThis.lastPolygon.length - 1].options.set('visible', false);
}
zenThis.currPolygon = new ymaps.Polygon(
polygon.geometry.getCoordinates(),
{
hintContent: polygon.data.Name
},
{
fill: false,
zIndex: 1,
strokeColor: polygon.options.get('fillColor'),
strokeWidth: 4,
strokeOpacity: 0.9
});
zenThis.lastPolygon.push(zenThis.currPolygon);
zenThis.getMapObject().geoObjects.add(zenThis.currPolygon);
]]></property>
<property name="oncontextmenuplacemark">
console.log('oncontextmenuplacemark');
</property>
<property name="oncontextmenupolygon"><![CDATA[
var content = '<div style="font-size: 12px; font-family:arial;"><span style="font-weight: bold;">' + polygon.data.Name + '</span><br>';
if(polygon.data.Level==0 || polygon.data.Level==1){
content += polygon.data.CenterName ? ('<br>Административный центр: ' + polygon.data.CenterName + '<br>') : '';
}
var otherInfo = zenThis.GetAdditionInformationForObjectById(polygon.data.Guid);
otherInfo.parameters = otherInfo.parameters.split(';');
otherInfo.unitNames = otherInfo.unitNames.split(';');
otherInfo.values = otherInfo.values.split(';');
for (var i=0; i < otherInfo.parameters.length-1; i++){
content += '<br>' + otherInfo.parameters[i] + ': ' + zenThis.beatNumber(otherInfo.values[i]) + ' ' + otherInfo.unitNames[i];
}
zenThis.openBallonAtPosition(position, content + '</div>');
]]></property>
<property name="ondrilldown">
console.log("dash ondrilldown");
if(!zenThis.lastGuid){
zenThis.lastGuid = [];
zenThis.lastLevel = [];
zenThis.currGuid = '';
zenThis.currName = '';
zenThis.currLevel = '';
}
zenThis.lastLevel.push(zenThis.currLevel);
zenThis.lastGuid.push(zenThis.currGuid);
zenThis.currLevel = data.Level;
zenThis.currGuid = data.Guid;
zenThis.getSliderData().setGuid(data.Guid);
zenPage.dashboardEventHandler(zenThis, 'click', zenThis.currGuid, 'applyFilter', '*', 'ParentGuid');
</property>
<property name="ondrillup"><![CDATA[
if (zenThis.lastGuid){
zenThis.currGuid = zenThis.lastGuid.pop();
zenThis.currLevel = zenThis.lastLevel.pop();
zenThis.currPolygon = zenThis.lastPolygon.pop();
zenThis.getSliderData().setGuid(zenThis.currGuid);
zenPage.dashboardEventHandler(zenThis,'click', zenThis.currGuid, 'applyFilter', '*', 'ParentGuid');
if (zenThis.lastPolygon.length > 0){
zenThis.lastPolygon[zenThis.lastPolygon.length - 1].options.set('visible', true);
}
if (zenThis.currPolygon){
zenThis.getMapObject().geoObjects.remove(zenThis.currPolygon);
}
}
]]></property>
<property name="placemarkDataProperties">Name,Guid,DefaultZoom,CanDrillDown,Value,ParameterId,Level,CenterName,SpecialIcon</property>
<property name="placemarkIcon">http://i.imgur.com/pBB7MYT.png</property>
<property name="placemarkIconSize"></property>
<property name="placemarkLatitudeProperty">Latitude</property>
<property name="placemarkLongitudeProperty">Longitude</property>
<property name="placemarkSpecialIcon">http://i.imgur.com/bFJRQfv.png</property>
<property name="placemarkSpecialProperty">SpecialIcon</property>
<property name="placemarkTitleProperty">Name</property>
<property name="polygonColorProperty"></property>
<property name="polygonCoordsJsFile">polygonsKZ.js</property>
<property name="polygonCoordsProperty">Guid</property>
<property name="polygonDataProperties">Name,Guid,DefaultZoom,CanDrillDown,Value,DataUrl,ParameterId,Level,CenterName,Color</property>
<property name="polygonFillOpacity">0.6</property>
<property name="polygonHoverOpacity">0.4</property>
<property name="polygonLoadBordersMethod">KZ.Borders;GetBorders</property>
<property name="polygonSaveBordersMethod">KZ.Borders;SaveBorders</property>
<property name="polygonStrokeOpacity">1</property>
<property name="polygonStrokeWeight">1</property>
<property name="polygonTitleProperty">Name</property>
<property name="zoom">4</property>
</widget>
</dashboard>
</Document></Export>