-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenpuglia.js
More file actions
197 lines (178 loc) · 7.27 KB
/
Copy pathopenpuglia.js
File metadata and controls
197 lines (178 loc) · 7.27 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/**********************************************************************
OpenPuglia_Luoghi_della_Cultura
$Comment: maptune config file
$Source : OpenPuglia_Luoghi_della_Cultura.js,v $
$InitialAuthor: guenter richter $
$InitialDate: 2015/12/17 $
$Author: guenter richter $
$Id:OpenPuglia_Luoghi_della_Cultura.js 1 2015-12-17 10:30:35Z Guenter Richter $
$Log:OpenPuglia_Luoghi_della_Cultura.js,v $
**********************************************************************/
/**
* @fileoverview This file is a MapTune config file for Open Puglia
* @version 0.9
*/
// define default marker style for layers
var MapParam = {
"all" :
{
"smallInfoClipDescription" : "500",
"smallInfoKeepImage" : "true"
},
"default":
{
"thumbnailRoot" : "resources/images/tn/",
"markerImageRoot" : "resources/icons/map-icons-collection/numeric/orange",
"markerImageType" : "png"
}
,
"noItemText" : "<span style=\"color:#888\">lista vuota <br>"+
"aggiungi un layer via <a href=\"javascript:openMegaBox(null,'feed-dialog',MapParam.layerdialog.href,'add layer','auto',500,400)\"><span style=\"font-weight:bold;border:solid #ddd 1px;padding:2px;\"> + add </span></a><br><br>"+
"info <a href=\"javascript:openMegaBox(null,'feed-dialog','./about.html','about','auto',500,400)\"><span style=\"font-weight:bold;border:solid #ddd 1px;padding:2px;\"> i </span></a></span>"
,
"layerdialog" :{"href":"Puglia_feeds.html"}
,
"layerbar" :{"href":"Puglia_feeds.html"}
,
"layertab" :{"href":"Puglia_feeds.html"}
,
"layers": []
,
"filter": {
"Archivio":"Archivio"
,"Architettura fortificata":"Architettura fortificata"
,"Area archeologica":"Area archeologica"
,"Biblioteca":"Biblioteca"
,"Chiesa o edificio di Culto":"Chiesa o edificio di Culto"
,"Monumento":"Monumento"
,"Monumento funerario":"Monumento funerario"
,"Parco archeologico":"Parco archeologico"
,"Villa o palazzo di interesse storico o artistico":"Villa o palazzo di interesse storico o artistico"
,"Altro":"Altro"
}
};
__init = function(){
maptune.addFeedLayer('./data/collection.js',{
type:'data',
format:'json',
name:'Collection',
flag:'collapsed'});
// './data/Luoghi_Puglia_Nominatim_Vers0.3.csv'
// 'https://docs.google.com/spreadsheets/d/12Vx_dXVpQ4ErSPVWNt54bFCSPJK-dsAyIVvnpbh-Bv4/pub?single=true&gid=2&output=csv'
maptune.addFeedLayer('./data/Luoghi_Puglia_Nominatim_Vers0.3.csv',{
type:'csv',
format:'csv',
name:'Open Puglia - Luoghi di Cultura',
title:'Open Puglia - Luoghi di Cultura',
proxy:'true',
parser:
{
title: 'nome',
lat: 'latitudine',
lon: 'longitudine',
image: 'foto',
label: 'true'
},
layer:
{ 'name': 'Open Puglia - Luoghi di Cultura',
'markerType' : 'categorical',
'category' : 'tipologia prevalente',
'categoryList': {
'Chiesa o edificio di Culto':
{ 'markerImage' : 'resources/icons/map-icons-collection/chapel.png',
'smallImage' : 'resources/icons/default/default-small_violet.png'
},
'Parco archeologico':
{ 'markerImage' : 'resources/icons/map-icons-collection/museum-archeological.png',
'smallImage' : 'resources/icons/default/museum-archeological.png'
},
'Monumento funerario':
{ 'markerImage' : 'resources/icons/map-icons-collection/modernmonument.png',
'smallImage' : 'resources/icons/default/default-small_celeste.png'
},
'Biblioteca':
{ 'markerImage' : 'resources/icons/map-icons-collection/book.png',
'smallImage' : 'resources/icons/default/default-small_violet.png'
},
'Archivio':
{ 'markerImage' : 'resources/icons/map-icons-collection/book.png',
'smallImage' : 'resources/icons/default/default-small_violet.png'
},
'Architettura fortificata':
{ 'markerImage' : 'resources/icons/map-icons-collection/citywalls.png',
'smallImage' : 'resources/icons/default/default-small_green.png'
},
'Area archeologica':
{ 'markerImage' : 'resources/icons/map-icons-collection/museum-archeological.png',
'smallImage' : 'resources/icons/default/default-small_orange.png'
},
'Museo, galleria non a scopo di lucro e\\/o raccolta':
{ 'markerImage' : 'resources/icons/map-icons-collection/artgallery.png',
'smallImage' : 'resources/icons/default/default-small_turque.png'
},
'Villa o palazzo di interesse storico o artistico':
{ 'markerImage' : 'resources/icons/map-icons-collection/villa.png',
'smallImage' : 'resources/icons/default/default-small_green.png'
},
'Monumento':
{ 'markerImage' : 'resources/icons/map-icons-collection/temple-2.png',
'smallImage' : 'resources/icons/default/default-small_turque.png'
},
'Altro':
{ 'markerImage' : 'resources/icons/map-icons-collection/departmentstore.png',
'smallImage' : 'resources/icons/default/default-small_red.png'
}
},
'markerImageType' : 'png',
'markerCluster' : 'false',
'description': '<div id="infodiv" style="margin-top:-20px;margin-bottom:-10px;padding-bottom:10px;color:#444;">Layer collegato (-offline) a <a href="https://docs.google.com/spreadsheets/d/12Vx_dXVpQ4ErSPVWNt54bFCSPJK-dsAyIVvnpbh-Bv4/edit?usp=sharing" target="_blank"><b>https://docs.google.com/spreadsheets/d/12Vx_dXVpQ4ErSPVWNt54bFCSPJK-dsAyIVvnpbh-Bv4/edit?usp=sharing</b></a><br>posizioni da latitudine/longitudine</div>',
},
flag:'open',
maxLargeIcons: 3});
};
maptune.onMapReady = function(){
maptune.setView([41.12967564007184,16.869817972183228],16);
setTimeout("__init()",1000);
};
/*
* overwrite standard info layout
* ------------------------------
* maptune.jsapi.onOpenInfoWindow is called everytime a info bubble is to be opened,
* or the info is diplayed in the sidebar
*
* @param szInfo the actual info content, must be returned if not return of new content
* @param info the info structiìure of the item
* @param szContext "map" or "sidebar", identifies the context of the 'onOpenInfoWindow' request
*/
maptune.jsapi.onOpenInfoWindow = function(szInfo,info,szContext) {
/* default onOpenInfoWindow */
if ( 1 ){
var szZoomTo = "<div style='float:right;margin-top:-0.3em;'>";
szZoomTo += maptune.jsapi.getZoomLink(info.geometry.coordinates[1]+","+info.geometry.coordinates[0]);
szZoomTo += "</div>";
szInfo += szZoomTo;
}
return szInfo;
};
/*
* overwrite standard/predefined icon
* ------------------------------
* maptune.jsapi.onGetIcon is called everytime an icon is placed on the map
*
* @param icon the actual icon object
* @param marker the actual marker object
* @param i the marker index
* @param flag icon type flag, actually only "normal" or "small"
*/
maptune.jsapi.onGetIcon = function(icon,marker,i,flag) {
// enter user code here to change item icon
// --->
if ( marker.properties.servizi_disabili.match(/JOB/i) ){
icon.image = (flag && flag=="small")?"resources/icons/default/default-small_green.png":"resources/icons/default/default_middle_green.png";
return icon;
}
return null;
};
// --------------------------------------
// EOF
// --------------------------------------