-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarche.js
More file actions
164 lines (154 loc) · 7.47 KB
/
Copy pathMarche.js
File metadata and controls
164 lines (154 loc) · 7.47 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
// define default marker style for layers
var MapParam = {
"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":"all_feeds.html"}
,
"layerbar" :{"href":"Deputati_topbar.html"}
,
"layertab" :{"href":"all_feeds.html"}
,
"layers": []
};
__init = function(){
maptune.addFeedLayer('./data/collection.js',{
type:'data',
format:'json',
name:'Collection',
flag:'collapsed'});
maptune.addFeedLayer('./data/ElencoStruttureRicettiveMarche.csv',{
type:'csv',
format:'csv',
name:'Strutture Ricettive nelle Marche',
title:'Strutture Ricettive nelle Marche',
proxy: 'true',
parser:
{
title: 'vchStrDenominazione',
lat: 'Latitude_Y',
lon: 'Longitude_X',
image: 'URL Immagine',
label: 'false'
},
layer:
{ "name": "Strutture Ricettive nelle Marche",
"markerType":"categorical",
"category" :"Categoria",
"categoryList" : {
"ALLOGGI IN AFFITTO" : { "markerImage" : "resources/icons/map-icons-collection/lodging_0star.png",
"smallImage" : "resources/icons/default/default-small_softgreen.png"
},
"CASE PER FERIE" : { "markerImage" : "resources/icons/map-icons-collection/hostel_0star.png",
"smallImage" : "resources/icons/default/default-small_softgreen.png"
},
"ALBERGHI" : { "markerImage" : "resources/icons/map-icons-collection/hotel_0star.png",
"smallImage" : "resources/icons/default/default-small_green.png"
},
"BED & BREAKFAST" : { "markerImage" : "resources/icons/map-icons-collection/bed_breakfast1-2.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"ALLOGGI AGRITURISTICI": { "markerImage" : "resources/icons/map-icons-collection/hostel_0star.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"AREE DI SOSTA (PLEIN AIR)": { "markerImage" : "resources/icons/map-icons-collection/campingtents.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"STABILIMENTI BALNEARI": { "markerImage" : "resources/icons/map-icons-collection/chalet-0.png",
"smallImage" : "resources/icons/default/default-small_blue.png"
},
"CAMPEGGI" : { "markerImage" : "resources/icons/map-icons-collection/campingtents.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"TURISMO RURALE" : { "markerImage" : "resources/icons/map-icons-collection/hostel_0star.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"VILLAGGI TURISTICI" : { "markerImage" : "resources/icons/map-icons-collection/summercamp.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
},
"OSTELLI PER LA GIOVENTU'": { "markerImage" : "resources/icons/map-icons-collection/daycare_big.png",
"smallImage" : "resources/icons/default/default-small_darkgreen.png"
}
},
"markerImage" : "resources/icons/default/default_orange.png",
"smallImage" : "resources/icons/default/default-small_orange.png",
"markerImageType" : "png",
"description": '<div id="infodiv" style="margin-top:-10px;color:#aaa;">Elenco Beni Confiscati tratto dal GeoBlog di Libera Piemonte; csv preparato da Cesare Gerbinio</a></div>'
},
flag:'zoomto'});
}
setTimeout("__init()",2000);
/*
* 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) {
console.log(info);
if ( info.parent.source == "Libera-Piemonte" ){
if ( szContext == "map" ){
if ( !info.parent.fShowInfoInList ){
szInfo = "";
if ( info.properties["Tipologia"] ){
szInfo += "<div style='margin-top:0.5em;'><span style='font-weight:normal'>" + info.properties["Tipologia"] + "</span></div>";
}
if ( info.properties["Sottotipologia"] ){
szInfo += "<div style='margin-top:0.5em;'><span style='font-weight:normal'>" + info.properties["Sottotipologia"] + "</span></div>";
}
if ( info.properties["Descrizione del bene"] ){
szInfo += "<div style='margin-top:0.5em;'><b>Descrizione del bene</b>: <br><span style='font-weight:normal'>" + info.properties["Descrizione del bene"] + "</span></div>";
}
if ( info.properties["Data e motivo del sequestro e della confisca"] ){
szInfo += "<div style='margin-top:0.5em;'><b>Data e motivo del sequestro e della confisca</b>: <br><span style='font-weight:normal'>" + info.properties["Data e motivo del sequestro e della confisca"] + "</span></div>";
}
if ( info.properties["Profilo intestatario"] ){
szInfo += "<div style='margin-top:0.5em;'><b>Profilo intestatario</b>: <br><span style='font-weight:normal'>" + info.properties["Profilo intestatario"] + "</span></div>";
}
if ( info.properties["URL Immagine"] ){
szInfo += "<div style='margin-top:0.5em;'><img src='"+info.properties["URL Immagine"]+"'></div>";
}
var szZoomTo = "<span class='InfoWindowFooter' style='float:right;vertical-align:middle;'>";
szZoomTo += maptune.jsapi.getZoomLink(info.geometry.coordinates[1]+","+info.geometry.coordinates[0]);
szZoomTo += "</span>";
szInfo += szZoomTo;
}else{
szInfo = "";
if ( info.properties["Tipologia"] ){
szInfo += "<div style='margin-top:0.5em;'><span style='font-weight:normal'>" + info.properties["Tipologia"] + "</span></div>";
}
if ( info.properties["Descrizione del bene"] ){
szInfo += "<div style='margin-top:0.5em;'><b>Descrizione del bene</b>: <br><span style='font-weight:normal'>" + info.properties["Descrizione del bene"] + "</span></div>";
}
if ( info.properties["Data e motivo del sequestro e della confisca"] ){
szInfo += "<div style='margin-top:0.5em;'><b>Data e motivo del sequestro e della confisca</b>: <br><span style='font-weight:normal'>" + info.properties["Data e motivo del sequestro e della confisca"] + "</span></div>";
}
}
return szInfo;
}
}
/* 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;
};
// --------------------------------------
// EOF
// --------------------------------------
_TRACE("Libera.js ----- EOF");