Si è verificato un errore nell'elaborarazione del modello.
Java method "it.sisal.wincity.tool.context.contributor.TemplateTool.getFields(long, String)" threw an exception when invoked on it.sisal.wincity.tool.context.contributor.TemplateTool object "it.sisal.wincity.tool.context.contributor.TemplateTool@319634b7"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fields = template_tool.getFie...  [in template "20116#20152#48542" at line 56, column 29]
----
1<#-- ################### GUEST GROUP ID #########################  --> 
2<#assign groupUtil = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") /> 
3<#assign guestGroupId = groupUtil.getGroup(companyId?long, "Guest").getGroupId() /> 
4<#assign classNameLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService") /> 
5<#assign classNameId = classNameLocalServiceUtil.getClassNameId("com.liferay.dynamic.data.mapping.model.DDMStructure") /> 
6<#assign templatesPath = "_TEMPLATE_CONTEXT_/" + companyId + "/" + guestGroupId + "/" + classNameId /> 
7<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
8 
9<section class="pdv_map"> 
10 
11    <div id="cerca-swc"> 
12        <button class="btn btn-danger sidenav-toggler1"> 
13            <svg viewBox="0 0 52 69" version="1.1" xmlns="http://www.w3.org/2000/svg" 
14                 xmlns:xlink="http://www.w3.org/1999/xlink" style="fill: white;" width="30px" height="20px"> 
15                 <g stroke="none" fill="white" fill-rule="" stroke-width="2"> 
16                     <g stroke-width="2" fill-rule="nonzero" fill="#ffffff" stroke="#ffffff"> 
17                         <g id="pin"> 
18                            <path d="M25.5537368,14.7102631 C20.5114568,14.7102631 16.4073361,18.5606744 16.4073361,23.2912498 C16.4073361,28.0218253 
19                                    20.5114568,31.8722366 25.5537368,31.8722366 C30.5960168,31.8722366 34.7001374,28.0218253 34.7001374,23.2912498 
20                                    C34.7001374,18.5606744 30.5960168,14.7102631 25.5537368,14.7102631 Z M25.5537368,29.4205261 C21.9513615,29.4205261 
21                                    19.0205934,26.6709328 19.0205934,23.2912498 C19.0205934,19.9115669 21.9513615,17.1619736 25.5537368,17.1619736 
22                                    C29.156112,17.1619736 32.0868801,19.9115669 32.0868801,23.2912498 C32.0868801,26.6709328 29.156112,29.4205261 
23                                    25.5537368,29.4205261 Z" id="Shape"></path> 
24                            <path d="M43.0403482,6.88562897 C38.3077391,2.44558123 32.0150155,0 25.3224635,0 C18.6286048,0 12.3371878,2.44558123 
25                                    7.60457882,6.88562897 C-1.15375311,15.1013109 -2.24217479,30.5593456 5.24742071,39.9248798 L25.3224635,67.1241562 
26                                    L45.3674538,39.9628813 C52.8871018,30.5593456 51.7986801,15.1013109 43.0403482,6.88562897 Z M43.2481021,38.5298565 
27                                    L25.3224635,62.8165008 L7.36807903,38.491855 C0.574916612,29.9942264 1.54835497,16.0341867 9.45345838,8.6189883 
28                                    C13.6921618,4.64231385 19.3276512,2.45171051 25.3224635,2.45171051 C31.3172758,2.45171051 36.9527652,4.64231385 
29                                    41.1927752,8.6189883 C49.0978786,16.0341867 50.071317,29.9942264 43.2481021,38.5298565 Z" id="Shape"></path> 
30                         </g> 
31                    </g> 
32                </g> 
33            </svg> 
34            <span class="text">TROVA UN SISAL WINCITY</span> 
35        </button> 
36    </div> 
37 
38    <div class="closed sidenav-container" id="mySidenavContainerId1"> 
39        <div class="sidenav-menu-slider" id="sideNavMenu"> 
40            <div class="sidenav-menu"> 
41                <div class='black-sidebar-header'> 
42                    <div class="black-sidebar-title">Tutti i punti vendita</div> 
43                    <a href="javascript:void(0);" class="icon-monospaced sidenav-close"> 
44                        <svg class="lexicon-icon lexicon-icon-times" focusable="false" role="img" title="" viewBox="0 0 512 512" style="fill: white;"> 
45                            <path class="lexicon-icon-outline" d="M295.781 256l205.205-205.205c10.998-10.998 10.998-28.814 
46                                0-39.781-10.998-10.998-28.815-10.998-39.781 0l-205.205 205.205-205.205-205.238c-10.966-10.998-28.814-10.998-39.781 
47                                0-10.998 10.998-10.998 28.814 0 39.781l205.205 205.238-205.205 205.205c-10.998 10.998-10.998 28.815 0 39.781 5.467 
48                                5.531 12.671 8.265 19.874 8.265s14.407-2.734 19.907-8.233l205.205-205.238 205.205 205.205c5.5 5.5 12.703 8.233 
49                                19.906 8.233s14.407-2.734 19.906-8.233c10.998-10.998 10.998-28.815 0-39.781l-205.238-205.205z"></path> 
50                        </svg> 
51                    </a> 
52                </div> 
53                <div class='map-pdv-list' id='style-scrollbar'> 
54                    <#if entries?has_content> 
55                        <#list entries as curEntry> 
56                            <#assign fields = template_tool.getFields(curEntry.getClassPK(), locale)/> 
57 
58                            <#assign siteGroupId = fields["siteGroupId"]/> 
59                            <#assign geoLocation = fields["coordinate"]/> 
60                            <#assign immagineBox = ""/> 
61                            <#attempt> 
62                                <#assign immagineBox = fields["img"].get("data")!""/> 
63                            <#recover> 
64                            </#attempt> 
65                            <#assign titoloBox = fields["titoloBox"]/> 
66                            <#assign orari = fields["orari"]/> 
67                            <#assign linkToPage = fields["linkToPage"]/> 
68                            <#assign googleLink = fields["googleLink"]/> 
69 
70                            <#if siteGroupId??> 
71 
72                                <#-- CUSTOM FIELDS DI SITO --> 
73                                <#assign contentScopeId = siteGroupId?number /> 
74                                <#include "${templatesPath}/SCOPE" /> 
75 
76                                <#if googleLinkPdv?has_content> 
77                                    <#assign googleLink = googleLinkPdv /> 
78                                </#if> 
79 
80                                <#assign linkToPageUrl = "#"/> 
81 
82                                <#if linkToPage?has_content> 
83                                    <#assign pageGroupId = linkToPage?keep_after('groupId":"')?keep_before('"')/> 
84                                    <#assign pageLayoutId = linkToPage?keep_after('layoutId":"')?keep_before('"')/> 
85                                    <#assign linkToPageUrl = layoutLocalService.getLayout(pageGroupId?number, false, pageLayoutId?number)/> 
86                                </#if> 
87 
88                                <#assign lat = 'null'/> 
89                                <#assign lon = 'null'/> 
90 
91                                <#if geoLocation?contains(",")> 
92                                    <#assign lat = geoLocation?keep_before(",")/> 
93                                    <#assign lon = geoLocation?keep_after(",")/> 
94                                <#elseif googleLink?contains("@") && googleLink?contains("z/")> 
95                                    <#assign lat = googleLink?keep_after("@")?keep_before(",")/> 
96                                    <#assign lon = googleLink?keep_before("z/")?keep_before_last(",")?keep_after_last(",")/> 
97                                </#if> 
98 
99                                <div class="map-pdv-item" data-lat="${lat}" data-long="${lon}" data-pk="${curEntry.getClassPK()}"> 
100                                    <div class="row"> 
101                                        <div class="pull-left"> 
102                                        <svg viewBox="0 0 52 69" version="1.1" xmlns="http://www.w3.org/2000/svg" 
103                                             xmlns:xlink="http://www.w3.org/1999/xlink" style="fill: red; 
104                                             float: left; margin-top: 9px;" width="38px" height="25px"> 
105                                             <g stroke="none" fill="red" fill-rule="" stroke-width="2"> 
106                                                 <g stroke-width="2" fill-rule="nonzero" fill="#ff0000" stroke="#ff0000"> 
107                                                     <g id="pin"> 
108                                                        <path d="M25.5537368,14.7102631 C20.5114568,14.7102631 16.4073361,18.5606744 16.4073361,23.2912498 C16.4073361,28.0218253 
109                                                                20.5114568,31.8722366 25.5537368,31.8722366 C30.5960168,31.8722366 34.7001374,28.0218253 34.7001374,23.2912498 
110                                                                C34.7001374,18.5606744 30.5960168,14.7102631 25.5537368,14.7102631 Z M25.5537368,29.4205261 C21.9513615,29.4205261 
111                                                                19.0205934,26.6709328 19.0205934,23.2912498 C19.0205934,19.9115669 21.9513615,17.1619736 25.5537368,17.1619736 
112                                                                C29.156112,17.1619736 32.0868801,19.9115669 32.0868801,23.2912498 C32.0868801,26.6709328 29.156112,29.4205261 
113                                                                25.5537368,29.4205261 Z" id="Shape"></path> 
114                                                        <path d="M43.0403482,6.88562897 C38.3077391,2.44558123 32.0150155,0 25.3224635,0 C18.6286048,0 12.3371878,2.44558123 
115                                                                7.60457882,6.88562897 C-1.15375311,15.1013109 -2.24217479,30.5593456 5.24742071,39.9248798 L25.3224635,67.1241562 
116                                                                L45.3674538,39.9628813 C52.8871018,30.5593456 51.7986801,15.1013109 43.0403482,6.88562897 Z M43.2481021,38.5298565 
117                                                                L25.3224635,62.8165008 L7.36807903,38.491855 C0.574916612,29.9942264 1.54835497,16.0341867 9.45345838,8.6189883 
118                                                                C13.6921618,4.64231385 19.3276512,2.45171051 25.3224635,2.45171051 C31.3172758,2.45171051 36.9527652,4.64231385 
119                                                                41.1927752,8.6189883 C49.0978786,16.0341867 50.071317,29.9942264 43.2481021,38.5298565 Z" id="Shape"></path> 
120                                                     </g> 
121                                                </g> 
122                                            </g> 
123                                        </svg> 
124                                        </div> 
125                                        <div class="pull-left" style="width:80%;"> 
126                                            <div class="map-pdv-name">${titoloBox}</div> 
127                                            <div class="map-pdv-address">${indirizzoPdv}</div> 
128                                        </div> 
129                                    </div> 
130                                </div> 
131                                <div class="map-pdv-detail" id="${curEntry.getClassPK()}"> 
132                                    <#if immagineBox?has_content> 
133                                        <div class="map-pdv-detail-img"> 
134                                            <img src="${immagineBox}"/> 
135                                        </div> 
136                                    </#if> 
137                                    <div class="map-pdv-info-container"> 
138                                        <a href='javascript:void(0);' id="close-pdv-link" data-pk="${curEntry.getClassPK()}" class="icon-monospaced sidenav-close"> 
139                                            <span class="glyphicon glyphicon-menu-left back-icon" aria-hidden="true"></span> 
140                                        </a> 
141                                        <#if titoloBox?has_content> 
142                                            <div class="map-pdv-description">${'Sisal Wincity ' + titoloBox}</div> 
143                                        </#if> 
144                                        <#if orari?has_content> 
145                                            <div class="map-pdv-orario">${orari}</div> 
146                                        </#if> 
147 
148                                        <#if indirizzoPdv?has_content> 
149                                            <div class="map-pdv-indirizzo">${indirizzoPdv}</div> 
150                                        </#if> 
151 
152                                        <#if emailPdv?has_content> 
153                                            <div class="map-pdv-email"> 
154                                                <a href="mailto:${emailPdv}"><strong>${emailPdv}</strong></a> 
155                                            </div> 
156                                        </#if> 
157 
158                                        <#if telPdv?has_content> 
159                                            <div class="map-pdv-telefono"> 
160                                              <a href="tel:${telPdv}" class="text-number" target="_blank">${telPdv}</a> 
161                                            </div> 
162                                        </#if> 
163 
164                                        <div class="map-pdv-dettaglio"> 
165                                            <a class="btn btn-danger" href="${linkToPageUrl.getFriendlyURL()}">VAI ALLA SCHEDA</a> 
166                                        </div> 
167                                        <div class="map-pdv-percorso"> 
168                                            <a href="${googleLink}" target='_blank'>INDICAZIONI STRADALI</a> 
169                                        </div> 
170                                    </div> 
171                                </div> 
172                            </#if> 
173                        </#list> 
174                    </#if> 
175                </div> 
176                <div class='map-pdv-footer'></div> 
177            </div> 
178        </div> 
179        <div id="map" class="sidenav-content"></div> 
180    </div> 
181 
182</section> 
183 
184<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDqjNFSoJI9dDxIOfJxe4pI6kgIsIRvnTI"> </script> 
185 
186<script> 
187$(function(){ 
188 
189    wincityVars.resizeFunction.generaMappa = function(){ 
190 
191        var register = { 
192            global: { 
193                map: "", 
194                wcIcon: { 
195                    url: '/o/wincity-theme/images/wincity/pin_sisal.png', 
196                    size: new google.maps.Size(80, 80), 
197                    origin: new google.maps.Point(0, 0), 
198                    anchor: new google.maps.Point(12, 25), 
199                    scaledSize: new google.maps.Size(25, 25) 
200                }, 
201                sideWidth: sideWidth = 400, 
202                shift: sideWidth / 2, 
203                sidenav: $(".sidenav-toggler1"), 
204                item: $(".map-pdv-item"), 
205                sidenavContainer: "#mySidenavContainerId1", 
206                closeButton: $("#close-pdv-link .glyphicon") 
207            }, 
208            check: function(){ 
209                if(wincityVars.mediaquery.isTablet){ 
210                    //sideWidth = visualViewport.width/2; 
211                    this.global.sideWidth = wincityVars.mediaquery.viewportW / 2; 
212                    this.global.shift = this.global.sideWidth / 2; 
213
214                if(wincityVars.mediaquery.isPhone){ 
215                    this.global.sideWidth = wincityVars.mediaquery.viewportW; 
216                    this.global.shift = 0; 
217
218            }, 
219            init: function(){ 
220                var globalThis = this; 
221 
222                this.check(); 
223 
224                this.sidebar(); 
225 
226                this.generate(); 
227 
228                /* OPEN PDV SIDEBAR */ 
229                this.global.item.on('click',function(){ 
230                    var pk = $(this).data("pk"); 
231                    var lat = $(this).data("lat"); 
232                    var long = $(this).data("long"); 
233 
234                    $('.map-pdv-detail.active').removeClass('active'); 
235                    $('#'+ pk).addClass('active'); 
236 
237					var currLat = globalThis.global.map.getCenter().lat(); 
238					var currLong = globalThis.global.map.getCenter().lng(); 
239					var currZoom = globalThis.global.map.getZoom(); 
240					var backMapState = { 
241						'backLat' : currLat, 
242						'backLong' : currLong, 
243						'backZoom' : currZoom 
244
245 
246                    globalThis.openPDV(lat,long,pk,2,backMapState); 
247                }); 
248 
249            }, 
250            generate: function(){ 
251 
252                var globalThis = this; 
253 
254                this.global.map = new google.maps.Map(document.getElementById('map'),{ 
255                    center: { 
256                        lat: -34.397, 
257                        lng: 150.644 
258                    }, 
259                    zoom: 6, 
260                    mapTypeControl: false, 
261                    fullscreenControl:false, 
262                    streetViewControl: false, 
263                    //zoomControlOptions: {position: google.maps.ControlPosition.LEFT_BOTTOM}, 
264                    disableDefaultUI: true, 
265                    styles: [ 
266
267                          "featureType": "water", 
268                          "elementType": "geometry", 
269                          "stylers": [{"color": "#e9e9e9"},{"lightness": 17}] 
270                      }, 
271
272                          "featureType": "landscape", 
273                          "elementType": "geometry", 
274                          "stylers": [{"color": "#f5f5f5"},{"lightness": 20}] 
275                      }, 
276
277                          "featureType": "road.highway", 
278                          "elementType": "geometry.fill", 
279                          "stylers": [{"color": "#ffffff"},{"lightness": 17}] 
280                      }, 
281
282                          "featureType": "road.highway", 
283                          "elementType": "geometry.stroke", 
284                          "stylers": [{"color": "#ffffff"},{"lightness": 29},{"weight": 0.2}] 
285                      }, 
286
287                          "featureType": "road.arterial", 
288                          "elementType": "geometry", 
289                          "stylers": [{"color": "#ffffff"},{"lightness": 18}] 
290                      }, 
291
292                          "featureType": "road.local", 
293                          "elementType": "geometry", 
294                          "stylers": [{"color": "#ffffff"},{"lightness": 16}] 
295                      }, 
296
297                          "featureType": "poi", 
298                          "elementType": "geometry", 
299                          "stylers": [{"color": "#f5f5f5"},{"lightness": 21}] 
300                      }, 
301
302                          "featureType": "poi.park", 
303                          "elementType": "geometry", 
304                          "stylers": [{"color": "#dedede"},{"lightness": 21}] 
305                      }, 
306
307                          "elementType": "labels.text.stroke", 
308                          "stylers": [{"visibility": "on"},{"color": "#ffffff"},{"lightness": 16}] 
309                      }, 
310
311                          "elementType": "labels.text.fill", 
312                          "stylers": [{"saturation": 36},{"color": "#333333"},{"lightness": 40}] 
313                      }, 
314
315                          "elementType": "labels.icon", 
316                          "stylers": [{"visibility": "off"}] 
317                      }, 
318
319                          "featureType": "transit", 
320                          "elementType": "geometry", 
321                          "stylers": [{"color": "#f2f2f2"},{"lightness": 19}] 
322                      }, 
323
324                          "featureType": "administrative", 
325                          "elementType": "geometry.fill", 
326                          "stylers": [{"color": "#fefefe"},{"lightness": 20}] 
327                      }, 
328
329                          "featureType": "administrative", 
330                          "elementType": "geometry.stroke", 
331                          "stylers": [{"color": "#aaaaaa"},{"lightness": 17},{"weight": 1.5}] 
332                      }, 
333
334                          "featureType": "administrative.locality", 
335                          "elementType": "labels", 
336                          "stylers": [{"visibility": "on"}] 
337                      }, 
338
339                          "featureType": "landscape.natural.terrain", 
340                          "elementType": "geometry", 
341                          "stylers": [{"color": "#e6e6e6"}] 
342
343
344                }); 
345 
346                /* ZOOM CONTROLS */ 
347                var zoomControlDiv = document.createElement('div'); 
348                var zoomControl = this.zoomControl(zoomControlDiv, this.global.map); 
349                zoomControlDiv.index = 1; 
350                this.global.map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(zoomControlDiv); 
351 
352                var pos = { lat: 41.9099856, lng: 12.3955697 }; 
353                this.global.map.setCenter(pos); 
354 
355                var marker_list = []; // MARKER CLUSTERER 
356 
357                <#if entries?has_content> 
358                  <#list entries as curEntry> 
359                      <#assign fields = template_tool.getFields(curEntry.getClassPK(), locale)/> 
360                      <#assign geoLocation = fields["coordinate"]/> 
361                      <#assign googleLink = fields["googleLink"]/> 
362                      <#assign siteGroupId = fields["siteGroupId"]/> 
363					  <#assign altMarker = "Sisal Wincity " + fields["titoloBox"]/> 
364 
365                      <#-- CUSTOM FIELDS DI SITO --> 
366                      <#assign contentScopeId = siteGroupId?number /> 
367                      <#include "${templatesPath}/SCOPE" /> 
368                      <#if googleLinkPdv?has_content> 
369                          <#assign googleLink = googleLinkPdv /> 
370                      </#if> 
371 
372                      <#assign lat = "null"/> 
373                      <#if geoLocation?contains(",")> 
374                          <#assign lat = geoLocation?keep_before(",")/> 
375                          <#assign lon = geoLocation?keep_after(",")/> 
376                      <#elseif googleLink?contains("@") && googleLink?contains("z/")> 
377                          <#assign lat = googleLink?keep_after("@")?keep_before(",")/> 
378                          <#assign lon = googleLink?keep_before("z/")?keep_before_last(",")?keep_after_last(",")/> 
379                      </#if> 
380 
381                        <#if lat!="null"> 
382                            var pos = {lat: ${lat}, lng: ${lon}} 
383                            var marker_${curEntry_index} = new google.maps.Marker({ 
384                                position: pos, 
385                                map: globalThis.global.map, 
386                                icon: globalThis.global.wcIcon, 
387                                title: "${altMarker}" 
388                            }); 
389                            marker_${curEntry_index}.addListener('click', function() { 
390 
391 
392								var currLat = globalThis.global.map.getCenter().lat(); 
393								var currLong = globalThis.global.map.getCenter().lng(); 
394								var currZoom = globalThis.global.map.getZoom(); 
395								var backMapState = { 
396									'backLat' : currLat, 
397									'backLong' : currLong, 
398									'backZoom' : currZoom 
399
400 
401                                //HIDE THE ACTIVE PDV 
402                                $('.map-pdv-detail.active').hide(); 
403 
404                                // SET THE CLICKED PDV AS ACTIVE 
405                                $('.map-pdv-detail.active').removeClass('active'); 
406                                $('#${curEntry.getClassPK()}').addClass('active'); 
407 
408 
409                                globalThis.global.sidenav.sideNavigation('show'); 
410                                globalThis.openPDV("${lat}","${lon}","${curEntry.getClassPK()}",1,backMapState); 
411                                //globalThis.global.map.panBy(this.global.shift, 0); 
412                            }); 
413 
414                            marker_list.push(marker_${curEntry_index}); // MARKER CLUSTERER 
415 
416                        </#if> 
417                  </#list> 
418                </#if> 
419 
420                /* MARKER CLUSTERER */ 
421                var markerCluster = new MarkerClusterer(this.global.map, marker_list, { 
422                    gridSize:40, 
423                    minimumClusterSize: 2, 
424                    //imagePath: '/o/wincity-theme/images/wincity/pin_sisal_back', 
425                    styles: [{ 
426                        width: 70, 
427                        height: 70, 
428                        url: '/o/wincity-theme/images/wincity/pin_sisal_back.png', 
429                        textColor: 'white', 
430                        textSize: 11, 
431                        anchor: [23, 23] 
432                    }], 
433                    calculator: function(markers, numStyles) { 
434                        return { 
435                            text: markers.length, 
436                            index: numStyles 
437                        }; 
438
439                }); 
440                /* END MARKER CLUSTERER */ 
441 
442                if( !wincityVars.mediaquery.isPhone ){ 
443                    $(this.global.sidenavContainer).on({ 
444                        'openStart.lexicon.sidenav': function(event){ 
445                            globalThis.global.map.panBy(globalThis.global.shift, 0); 
446                        }, 
447                        'closedStart.lexicon.sidenav': function(event){ 
448                            globalThis.global.map.panBy(-1*globalThis.global.shift, 0); 
449
450                    }); 
451
452            }, 
453            zoomControl: function(controlDiv, map) { 
454 
455                // Creating divs & styles for custom zoom control 
456                controlDiv.style.padding = '5px'; 
457 
458                // Set CSS for the control wrapper 
459                var controlWrapper = document.createElement('div'); 
460                    controlWrapper.className = 'zoom-controls-wrapper'; 
461                    controlDiv.appendChild(controlWrapper); 
462 
463                // Set CSS for the zoomIn 
464                var zoomInButton = document.createElement('div'); 
465                    zoomInButton.className = 'zoom-in-btn'; 
466                    zoomInButton.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> <polygon fill="#fff" points="18,7 11,7 11,0 7,0 7,7 0,7 0,11 7,11 7,18 11,18 11,11 18,11"/></svg>'; 
467                    controlWrapper.appendChild(zoomInButton); 
468 
469                // Set CSS for the zoomOut 
470                var zoomOutButton = document.createElement('div'); 
471                    zoomOutButton.className = 'zoom-out-btn'; 
472                    zoomOutButton.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path fill="#fff" d="M0,7h18v4H0V7z"/></svg>'; 
473                    controlWrapper.appendChild(zoomOutButton); 
474 
475                // Setup the click event listener - zoomIn 
476                google.maps.event.addDomListener(zoomInButton, 'click', function() { 
477                    map.setZoom(map.getZoom() + 1); 
478                }); 
479 
480                // Setup the click event listener - zoomOut 
481                google.maps.event.addDomListener(zoomOutButton, 'click', function() { 
482                    map.setZoom(map.getZoom() - 1); 
483                }); 
484 
485            }, 
486            sidebar: function(){ 
487                this.global.sidenav.sideNavigation({ 
488                    breakpoint: 767, 
489                    container: this.global.sidenavContainer, 
490                    position: 'right', 
491                    type: 'relative', 
492                    typeMobile: 'relative', 
493                    width: this.global.sideWidth 
494                }); 
495            }, 
496            openPDV: function(lat,long,pdvId,mode,backMapState){ 
497                if(lat != "null" && long != "null"){ 
498                    var pos = {lat: Number(lat), lng: Number(long)}; 
499                    this.global.map.setCenter(pos); 
500                    this.global.map.setZoom(14); 
501                    this.global.map.panBy(this.global.shift, 0); 
502
503                $('#' + pdvId).show(); 
504 
505                /* UNBIND */ 
506                this.global.closeButton.off("click"); 
507 
508				if(backMapState){ 
509                	this.closePDV(mode,pdvId,backMapState); 
510				}else{ 
511					this.closePDV(mode,pdvId); 
512
513            }, 
514            closePDV: function(mode,pdvId,backMapState){ 
515 
516                var globalThis = this; 
517 
518                //$(document).on('open.lexicon.sidenav', function(event) { 
519                    globalThis.global.closeButton.on("click",function(){ 
520 
521						if(backMapState){ 
522							var pos = { lat: backMapState.backLat, lng: backMapState.backLong }; 
523	                        globalThis.global.map.setCenter(pos); 
524	                        globalThis.global.map.setZoom(backMapState.backZoom); 
525						}else{ 
526 
527							var pos = { lat: 41.9099856, lng: 12.3955697 }; 
528	                        globalThis.global.map.setCenter(pos); 
529	                        globalThis.global.map.setZoom(6); 
530
531 
532                        /* CLICK FROM MARKER */ 
533                        if(mode == 1) { 
534							globalThis.global.map.panBy(globalThis.global.shift, 0); 
535                            globalThis.global.sidenav.sideNavigation('hide'); 
536                            $(document).on('closed.lexicon.sidenav', function(event) { 
537                                $('#' + pdvId).hide(); 
538                            }); 
539
540                        else { 
541                            $('#' + pdvId).hide('slide',{ 
542                                direction: "right", 
543                                duration: "slow" 
544                            }); 
545
546                    }); 
547 
548                //}); 
549 
550
551
552        register.init(); 
553 
554
555    wincityVars.resizeFunction.generaMappa(); 
556 
557}); 
558</script>