An error occurred while processing the template.
For "." left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar): ==> lookAtLatitude [in template "37703#37743#1559015" at line 660, column 169] ---- FTL stack trace ("~" means nesting-related): - Failed at: ${lookAtLatitude.getText()} [in template "37703#37743#1559015" at line 660, column 167] ----
1<#-- Services -->
2<#assign assetEntryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")/>
3<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")/>
4<#assign journalArticleResourceServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")/>
5
6<#-- Reserved vbles -->
7<#assign title = .vars['reserved-article-title'].data>
8<#assign articleId=.vars["reserved-article-id"].data />
9<#assign description=.vars["reserved-article-description"].data />
10<#assign smallImageUrl=.vars["reserved-article-small-image-url"].data />
11<#assign date=.vars["reserved-article-display-date"].data />
12<#assign request = .vars['request']>
13
14<#-- Init -->
15<#assign assetEntry = journalTool.getAssetEntryByArticleId(groupId, articleId)>
16<#assign journalArticle = journalTool.getJournalArticleByAssetEntry(assetEntry)>
17<#assign articleURL = themeDisplay.getURLPortal()+themeDisplay.getURLCurrent()>
18<#assign articleSocialBookmarks = themeDisplay.getThemeSetting("article-social-bookmarks")!>
19<#assign layoutSetBannerPath = layoutTool.getLayoutSetBannerPath(groupId, themeDisplay.getLayout().isPrivateLayout())!>
20<#assign articleMainImageThumbnail3 = dlTool.getThumbnail(smallImageUrl, "3", layoutSetBannerPath)! />
21<#assign articleMainImageThumbnail1 = dlTool.getThumbnail(smallImageUrl, "1")! />
22<#assign ddmStructureNameNormalize = "template-${friendlyURLNormalizerTool.normalize(journalArticle.getDDMStructure().getName(localeUtil.getDefault()))}" />
23<#assign baseUrl = themeDisplay.getURLPortal()/>
24
25<#-- Build -->
26<#if Nombre.data?has_content>
27 <#assign title = Nombre.data>
28</#if>
29<#assign address = []>
30<#if Contacto.Zona.data?has_content>
31 <#assign address = address + [Contacto.Zona.data] />
32</#if>
33
34<#-- KML -->
35<#assign dlFileEntryKML = dlTool.getDLFileEntryByPath(TrazadoRuta.getData())!/>
36<#assign document = "" />
37<#assign lookAtLongitude = ""/>
38<#assign lookAtLatitude = ""/>
39<#assign coordinates_all = "" />
40<#if validator.isNotNull(dlFileEntryKML)>
41 <#assign document = saxReaderUtil.read(dlFileEntryKML.getContentStream())/>
42 <#assign rootElement = document.getRootElement()/>
43 <#assign xpath = saxReaderUtil.createXPath("//root:Camera/root:longitude", "root", "http://www.opengis.net/kml/2.2")/>
44 <#assign lookAtLongitude = xpath.selectSingleNode(document)!>
45 <#assign xpath = saxReaderUtil.createXPath("//root:Camera/root:latitude", "root", "http://www.opengis.net/kml/2.2")/>
46 <#assign lookAtLatitude = xpath.selectSingleNode(document)!>
47</#if>
48
49<#if validator.isNotNull(document) && validator.isNull(lookAtLongitude)>
50 <#assign xpath = saxReaderUtil.createXPath("//root:LookAt/root:longitude", "root", "http://www.opengis.net/kml/2.2")/>
51 <#assign lookAtLongitude = xpath.selectSingleNode(document)!>
52</#if>
53
54<#if validator.isNotNull(document) && validator.isNull(lookAtLatitude)>
55 <#assign xpath = saxReaderUtil.createXPath("//root:LookAt/root:latitude", "root", "http://www.opengis.net/kml/2.2")/>
56 <#assign lookAtLatitude = xpath.selectSingleNode(document)!>
57</#if>
58
59<#-- En caso de que no haya ni lookAt ni camera -->
60<#if validator.isNotNull(document) && (validator.isNull(lookAtLongitude) || validator.isNull(lookAtLatitude))>
61 <#assign xpath = saxReaderUtil.createXPath("//root:Placemark/root:LineString/root:coordinates", "root", "http://www.opengis.net/kml/2.2")/>
62 <#assign coordinates_all = xpath.selectSingleNode(document)!>
63 <#assign coordinates_array = coordinates_all.data?split(" ")>
64 <#assign coordinate_middle_pos = getterUtil.getInteger(coordinates_array?size/2)>
65 <#assign coordinate_middle = coordinates_array[coordinate_middle_pos]?split(",")>
66 <#assign lookAtLongitude = coordinate_middle[0]>
67 <#assign lookAtLatitude = coordinate_middle[1]>
68</#if>
69
70<#if validator.isNotNull(document) && validator.isNotNull(coordinates_all) >
71 <#assign xpath = saxReaderUtil.createXPath("//root:Placemark/root:LineString/root:coordinates", "root", "http://www.opengis.net/kml/2.2")/>
72 <#assign coordinates_all = xpath.selectSingleNode(document)!>
73 <#assign coordinates_array = coordinates_all.getData()?split(" ")/>
74 <#assign coordinates_start = coordinates_array[0]?split(",")/>
75</#if>
76
77<#assign tramosAlternativosArray = []/>
78
79<#if Tramos.getSiblings()?size!=0>
80
81 <#list Tramos.getSiblings() as tramo>
82 <#if tramo.TramoAlternativo.getData()=="true">
83 <#assign tramosAlternativosArray = tramosAlternativosArray + ["true"] />
84 <#else>
85 <#assign tramosAlternativosArray = tramosAlternativosArray + [ "false" ] />
86 </#if>
87
88 </#list>
89
90</#if>
91
92<#-- Id de los tramos -->
93<#assign counter = 1>
94<#assign count = 0>
95
96<#-- Obtener el nombre de los tramos -->
97<#assign xpath = saxReaderUtil.createXPath("//root:LineString/ancestor::root:Placemark/root:name", "root", "http://www.opengis.net/kml/2.2")>
98<#assign placemarksName = xpath.selectNodes(document)>
99
100<#assign tipoRuta = stringUtil.lowerCase(TipoRuta.getData())/>
101
102<article class="template ${ddmStructureNameNormalize}" role="article" itemscope itemtype="http://schema.org/TouristicAttraction">
103
104 <header class="article-header-wrapper row no-gutters">
105
106 <div class="article-header-container article-header-container-static">
107 <div class="container">
108 <div class="row no-gutters">
109 <div class="col-md-6">
110 <div class="article-image" style="background-image: url('${articleMainImageThumbnail3}')">
111 <img class="sr-only" src="${articleMainImageThumbnail3}" alt="${languageUtil.format(request,'go-to-x','image')} ${title}" itemprop="image"/>
112 </div>
113 </div>
114 <div class="article-info-wrapper col-md-6">
115 <div class="article-info">
116
117 <div class="article-title" itemprop="name">${title}</div>
118 <div class="article-list-wrapper">
119
120 <ul class="article-list list-unstyled article-list-info">
121 <li class="article-list-item mb-4">
122 <span class="fas fa-map-marker-alt">
123 <span class="hide-accessible">${languageUtil.get(request,"address")}</span>
124 </span>
125 <span class="field-wrapper" itemprop="address">
126 <span class="important">
127 <#assign concejos = []/>
128 <#list Contacto.Concejos.getSiblings() as Item>
129 <#if Item.data?has_content>
130 <#assign concejos = [Item.data] />
131 </#if>
132 </#list>
133 ${stringUtil.merge(concejos)}
134 </span>
135 <span class="text d-block">${stringUtil.merge(address)}</span>
136 </span>
137 </li>
138 </ul>
139
140 <div class="article-info-table article-info-table-fixed">
141 <div class="article-info-table-row">
142 <div class="article-info-table-cell">
143 <div class="article-list-wrapper">
144 <ul class="article-list list-unstyled article-list-info info-route">
145
146 <#if Contacto.Distancia.data?has_content>
147 <li class="article-list-item">
148 <span class="fas fa-ruler-horizontal">
149 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-distancia")}</span>
150 </span>
151 <span class="field-wrapper">
152 <span class="field">${languageUtil.get(request, "infoasturias-distancia")}:</span>
153 <#list Contacto.Distancia.getSiblings() as Item>
154 <span class="text btn btn-primary btn-thin text-capitalize"><span class="font-size-11 text-distance">${Item.data}</span> kms</span><#if Item_has_next> </#if>
155 </#list>
156 </span>
157 </li>
158 </#if>
159
160 <#if Contacto.Dificultad.data?has_content && tipoRuta!="coche">
161 <#assign dificultadMap = {
162 "1": languageUtil.get(request,"infoasturias-dificultad-baja"),
163 "2": languageUtil.get(request,"infoasturias-dificultad-media"),
164 "3": languageUtil.get(request,"infoasturias-dificultad-alta")
165 }
166 />
167 <li class="article-list-item">
168 <span class="fas fa-layer-group">
169 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-dificultad")}</span>
170 </span>
171 <span class="field-wrapper">
172 <span class="field">${languageUtil.get(request, "infoasturias-dificultad")}:</span>
173 <span class="text">
174 <span>${dificultadMap[Contacto.Dificultad.data]}</span>
175 </span>
176 </span>
177 </li>
178 </#if>
179
180 <#if Contacto.Codigo.data?has_content>
181 <li class="article-list-item">
182 <span class="fas fa-info">
183 <span class="hide-accessible">${languageUtil.get(request,"code")}</span>
184 </span>
185 <span class="field-wrapper">
186 <span class="field">${languageUtil.get(request, "code")}:</span>
187 <span class="text">
188 <span>${Contacto.Codigo.data}</span>
189 </span>
190 </span>
191 </li>
192 </#if>
193
194 <#if Contacto.Altitud.data?has_content>
195 <li class="article-list-item">
196 <span class="fas fa-ruler-vertical">
197 <span class="hide-accessible">${languageUtil.get(request,"metadata.Geographic.ALTITUDE")}</span>
198 </span>
199 <span class="field-wrapper">
200 <span class="field">${languageUtil.get(request, "metadata.Geographic.ALTITUDE")}:</span>
201 <span class="text">${Contacto.Altitud.data}</span>
202 </span>
203 </li>
204 </#if>
205
206 <#if Contacto.Desnivel.data?has_content>
207 <li class="article-list-item">
208 <span class="fas fa-chart-line">
209 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-desnivel")}</span>
210 </span>
211 <span class="field-wrapper">
212 <span class="field">${languageUtil.get(request, "infoasturias-desnivel")}:</span>
213 <span class="text">${Contacto.Desnivel.data} m.</span>
214 </span>
215 </li>
216 </#if>
217 </ul>
218 </div>
219 </div>
220 <div class="article-info-table-cell">
221 <div class="article-list-wrapper">
222 <ul class="article-list list-unstyled article-list-info">
223 <#if Contacto.TiempoBTT.data?has_content>
224 <li class="article-list-item">
225 <span class="fas fa-bicycle">
226 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-btt")}</span>
227 </span>
228 <span class="field-wrapper">
229 <span class="field">${languageUtil.get(request, "infoasturias-btt")}:</span>
230 <span class="text">${Contacto.TiempoBTT.data}</span>
231 </span>
232 </li>
233 </#if>
234
235 <#if Contacto.TiempoAPie.data?has_content>
236 <li class="article-list-item">
237 <span class="fas fa-shoe-prints">
238 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-a-pie")}</span>
239 </span>
240 <span class="field-wrapper">
241 <span class="field">${languageUtil.get(request, "infoasturias-a-pie")}:</span>
242 <span class="text">${Contacto.TiempoAPie.data}</span>
243 </span>
244 </li>
245 </#if>
246
247 <#if Contacto.TiempoCoche.data?has_content>
248 <li class="article-list-item">
249 <span class="fas fa-car">
250 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-coches")}</span>
251 </span>
252 <span class="field-wrapper">
253 <span class="field">${languageUtil.get(request, "infoasturias-coches")}:</span>
254 <span class="text">${Contacto.TiempoCoche.data}</span>
255 </span>
256 </li>
257 </#if>
258
259 <#if Contacto.TiempoViasVerdes.data?has_content>
260 <li class="article-list-item">
261 <span class="fas fa-route">
262 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-vias-verdes")}</span>
263 </span>
264 <span class="field-wrapper">
265 <span class="field">${languageUtil.get(request, "infoasturias-vias-verdes")}:</span>
266 <span class="text">${Contacto.TiempoViasVerdes.data}</span>
267 </span>
268 </li>
269 </#if>
270
271 <#if Contacto.TiempoAscension.data?has_content>
272 <li class="article-list-item">
273 <span class="fas fa-hiking">
274 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-ascension")}</span>
275 </span>
276 <span class="field-wrapper">
277 <span class="field">${languageUtil.get(request, "infoasturias-ascension")}:</span>
278 <span class="text">${Contacto.TiempoAscension.data}</span>
279 </span>
280 </li>
281 </#if>
282 </ul>
283 </div>
284 </div>
285 </div>
286 <div class="article-info-table-row">
287 <div class="article-info-table-cell">
288 <div class="article-list-wrapper">
289 <ul class="article-list list-unstyled article-list-info">
290 <#if Contacto.SituacionGeografica.data?has_content>
291 <li class="article-list-item">
292 <span class="fas fa-map-marked-alt">
293 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-situacion-geografica")}</span>
294 </span>
295 <span class="field-wrapper">
296 <span class="field">${languageUtil.get(request, "infoasturias-situacion-geografica")}:</span>
297 <span class="text">${Contacto.SituacionGeografica.data}</span>
298 </span>
299 </li>
300 </#if>
301
302 <#if Contacto.PuntoDePartida.data?has_content>
303 <li class="article-list-item">
304 <span class="fas fa-map-marker">
305 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-punto-de-partida")}</span>
306 </span>
307 <span class="field-wrapper">
308 <span class="field">${languageUtil.get(request, "infoasturias-punto-de-partida")}:</span>
309 <span class="text">${Contacto.PuntoDePartida.data}</span>
310 </span>
311 </li>
312 </#if>
313
314 <#if TipoRuta.data?has_content>
315 <li class="article-list-item hide"><#-- Se oculta por indicación de Noemí 27062022 -->
316 <span class="fas fa-route">
317 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-tipo-de-ruta")}</span>
318 </span>
319 <span class="field-wrapper">
320 <span class="field">${languageUtil.get(request, "infoasturias-tipo-de-ruta")}:</span>
321 <span class="text">${TipoRuta.data}</span>
322 </span>
323 </li>
324 </#if>
325
326 <#if Contacto.TipoDeRecorrido.data?has_content>
327 <li class="article-list-item">
328 <span class="fas fa-route">
329 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-tipo-recorrido")}</span>
330 </span>
331 <span class="field-wrapper">
332 <span class="field">${languageUtil.get(request, "infoasturias-tipo-recorrido")}:</span>
333 <span class="text">${Contacto.TipoDeRecorrido.data}</span>
334 </span>
335 </li>
336 </#if>
337 </ul>
338 </div>
339 </div>
340 <div class="article-info-table-cell">
341 <div class="article-list-wrapper">
342 <ul class="article-list list-unstyled article-list-info">
343 <#if Folletos.Folleto.data?has_content>
344 <#assign dlFileEntry = dlTool.getDLFileEntryByPath(Folletos.Folleto.data) />
345 <#if validator.isNotNull(dlFileEntry)>
346 <#assign downloadURL = "/documents/${groupId}/${dlFileEntry.getUuid()}" />
347 <#assign ext = dlFileEntry.getExtension()/>
348 <li class="article-list-item document document-${ext}">
349 <i class="far fa-file-pdf"></i>
350 <span class="field-wrapper">
351 <span class="field">${languageUtil.get(request, "visuality-issuu")}:</span>
352 <span class="text">
353 <#list Folletos.Folleto.getSiblings() as Item>
354 <#assign dlFileEntry = dlTool.getDLFileEntryByPath(Item.data) />
355 <#if validator.isNotNull(dlFileEntry)>
356 <#assign downloadURL = "/documents/${groupId}/${dlFileEntry.getUuid()}" />
357 <a href="${downloadURL}" title='${dlFileEntry.getTitle()}' class="">${dlFileEntry.getTitle()}</a><#if Item_has_next>, </#if>
358 </#if>
359 </#list>
360 </span>
361 </span>
362 </li>
363 </#if>
364 </#if>
365
366 <#if TrazadoRuta.data?has_content || TrazadoRutaGPX.data?has_content>
367 <li class="article-list-item document">
368 <span class="far fa-file">
369 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-trazado-de-la-ruta")}</span>
370 </span>
371 <span class="field-wrapper">
372 <span class="field">${languageUtil.get(request, "infoasturias-trazado-de-la-ruta")}:</span>
373 <span class="text">
374
375 <#assign tracks = [] />
376 <#if TrazadoRuta.data?has_content>
377 <#assign tracks = tracks + [TrazadoRuta.data] />
378 </#if>
379 <#if TrazadoRutaGPX.data?has_content >
380 <#assign tracks = tracks + [TrazadoRutaGPX.data] />
381 </#if>
382
383 <#if tracks?has_content >
384 <#list tracks as track>
385 <#assign dlFileEntryTrack = dlTool.getDLFileEntryByPath(track) />
386 <#if validator.isNotNull(dlFileEntryTrack)>
387 <#assign downloadURLkml = "/documents/${groupId}/${dlFileEntryTrack.getUuid()}" />
388 <#assign extKML = dlFileEntryTrack.getExtension()/>
389 <a href="${downloadURLkml}" class="${extKML}" title="${languageUtil.get(request,'infoasturias-download')} ${extKML}">${languageUtil.get(request,'infoasturias-download')} ${extKML}</a><#if track?has_next>, </#if>
390 </#if>
391 </#list>
392 </#if>
393
394 </span>
395 </span>
396 </li>
397 </#if>
398 </ul>
399 </div>
400 </div>
401 </div>
402 </div>
403 </div>
404 </div>
405 </div>
406 </div>
407 </div>
408 </div>
409 </header>
410
411 <div class="sheet sheet-lg">
412
413
414 <div class="article-great <#if validator.isNull(Informacion.Resumen.data)>hide</#if>">
415 <div class="route-resume-tracks-box hide">
416 <div class="route-resume-tracks">
417 <div class="route-resume-track-marker route-resume-track-marker-first"><div class="route-point-text"></div><div class="route-km-text">Km 0</div></div>
418 <div class="route-resume-track-marker route-resume-track-marker-last"><div class="route-point-text"></div><div class="route-km-text">Km 0</div></div>
419 </div>
420 </div>
421 <#if Informacion.Resumen.data?has_content>
422 <p>${htmlUtil.extractText(Informacion.Resumen.data)}</p>
423 </#if>
424 </div>
425
426
427
428 <#assign hasTab1 = Contacto.ContactoTexto.data?has_content || Informacion.InformacionTexto.data?has_content>
429 <#assign hasTab2 = Informacion.TextoTramos.data?has_content || validator.isNotNull(Tramos.TramoAlternativo.data) || Tramos.OrigenDestino.data?has_content || Tramos.DistanciaTramo.data?has_content || Tramos.DescripcionTramo.data?has_content>
430 <#assign hasTab3 = Geolocalizacion.Coordenadas.data?has_content || validator.isNotNull(TrazadoRuta.getData())>
431 <#assign hasTab4 = Informacion.Itinerario.data?has_content>
432 <#assign hasTab5 = Detalle.DetalleTexto.data?has_content || Detalle.DetalleImagen.data?has_content>
433 <#assign showFirstTab = true>
434
435 <div class="article-accordion accordion">
436 <#if Visualizador.Slide.getData()?has_content>
437 <div class="slick article-slick article-section <#if Visualizador.Slide.getSiblings()?size==1>hide</#if>">
438 <#list Visualizador.Slide.getSiblings() as Slide>
439 <#if validator.isNotNull(Slide.getData()) || validator.isNotNull(Slide.SlideUrl.getData())>
440 <#assign slideThumbnail3 = dlTool.getThumbnailByJSON(Slide.data, "3")! />
441 <#assign slideThumbnail2 = dlTool.getThumbnailByJSON(Slide.data, "2")! />
442 <#assign slidePath = dlTool.getPathByJSON(Slide.data, themeDisplay.getScopeGroupId())! />
443 <#assign slideUrl = Slide.SlideUrl.data />
444 <#assign dataMap = "" />
445
446 <#if slideUrl?has_content>
447
448 <#assign slideTitle = "${languageUtil.get(request, 'video')} ${Slide?index}" />
449 <#if Slide.SlideTitulo.data?has_content>
450 <#assign slideTitle = Slide.SlideTitulo.data />
451 </#if>
452
453 <#-- Youtube -->
454 <#assign slideUrl = stringUtil.replace(slideUrl, 'watch?v=', 'embed/') />
455 <#assign slideThumbnail2 = stringUtil.replace(slideUrl, 'www', 'img') />
456 <#assign slideThumbnail2 = stringUtil.replace(slideThumbnail2, 'embed', 'vi') />
457 <#assign slideThumbnail2 = '${slideThumbnail2}/mqdefault.jpg' />
458
459 <#-- Vimeo -->
460 <#if slideUrl?contains("vimeo")>
461 <#assign slideUrl = stringUtil.replace(slideUrl, 'http://vimeo.com/', 'https://player.vimeo.com/video/') />
462 <#assign slideVimeoId = stringUtil.extractLast(slideUrl, 'https://player.vimeo.com/video/') />
463 <#if slideVimeoId?has_content>
464 <#assign slideVimeoJsonPath = 'http://vimeo.com/api/v2/video/${slideVimeoId}.json' />
465 <#assign slideVimeoJsonContent = getUrlContent.getContent(slideVimeoJsonPath)! />
466 <#if slideVimeoJsonContent?has_content>
467 <#assign slideVimeoJsonArray = jsonFactoryUtil.createJSONArray(slideVimeoJsonContent) />
468 <#assign slideVimeoJsonItem = slideVimeoJsonArray.get(0) />
469 <#assign slideThumbnail2 = slideVimeoJsonItem.thumbnail_medium />
470 </#if>
471 </#if>
472 </#if>
473
474 <div id="slide-${Slide?index}" class="slide">
475 <a class="card card-simple card-video" href="#" onclick="javascript: event.preventDefault(); showDialogIframe('${slideUrl}', '${slideTitle}', 800, 600, 'videoPopup', 'videoPopupIframe');" title="${slideTitle}">
476 <span class="d-block image-wrapper aspect-ratio-bg-cover aspect-ratio-4-to-3" style="background-image: url('${slideThumbnail2}');">
477 <img class="hide-accessible" alt="${slideTitle}" src="${slideThumbnail2}">
478 </a>
479 </div>
480 <#else>
481 <#assign slideTitle = "${languageUtil.get(request, 'image')} ${Slide?index}" />
482 <#if Slide.SlideTitulo.data?has_content>
483 <#assign slideTitle = Slide.SlideTitulo.data />
484 </#if>
485
486 <div class="slide">
487 <a class="card card-simple lightbox" href="${slidePath}" title="${slideTitle}">
488 <span class="d-block image-wrapper aspect-ratio-bg-cover aspect-ratio-4-to-3" style="background-image: url('${slideThumbnail2}');">
489 <img class="hide-accessible" alt="${slideTitle}" src="${slideThumbnail2}">
490 </a>
491 </div>
492 </#if>
493 </#if>
494 </#list>
495 </div>
496 </#if>
497
498 <#if hasTab1>
499 <div id="tab1" class="article-section accordion-item">
500 <a href="#tabContent1" id="tabHeading" class="h3 accordion-header <#if !showFirstTab>collapsed</#if>" aria-expanded="${getterUtil.getString(showFirstTab)}" data-toggle="liferay-collapse" aria-controls="tabContent1" role="button"><h2>${languageUtil.get(request,'info')}</h2></a>
501 <div id="tabContent1" class="article-section-content article-section-info accordion-collapse collapse <#if showFirstTab>show</#if>" aria-labelledby="tabHeading">
502 <#if Contacto.ContactoTexto.data?has_content>
503 ${Contacto.ContactoTexto.data}
504 </#if>
505 <#if Informacion.InformacionTexto.data?has_content>
506 ${Informacion.InformacionTexto.data}
507 </#if>
508 </div>
509 </div>
510 <#assign showFirstTab = false>
511 </#if>
512
513 <#if hasTab2>
514 <div id="tab2" class="article-section accordion-item">
515 <a href="#tabContent2" id="tabHeading2" class="h3 accordion-header <#if !showFirstTab>collapsed</#if>" aria-expanded="${getterUtil.getString(showFirstTab)}" data-toggle="liferay-collapse" aria-controls="tabContent2" role="button"><h2>${languageUtil.get(request,'infoasturias-recorrido')}</h2></a>
516 <div id="tabContent2" class="article-section-content article-section-color article-section-background accordion-collapse collapse <#if showFirstTab>show</#if>" aria-labelledby="tabHeading2">
517 <#list Informacion.TextoTramos.getSiblings() as Item>
518 <#if validator.isNotNull(Item.data)>
519 <p>${Item.data}</p>
520 </#if>
521 </#list>
522 <#list Tramos.getSiblings() as Item>
523 <h3 id="track-${Item?index+1}" class="h4 mt-5 route-${Item?index+1}">
524 <#if tipoRuta=="coche">${languageUtil.get(request,"day")} ${Item?index+1}:</#if> ${Item.OrigenDestino.data}
525 <span class="route-distance btn btn-link float-right text-capitalize">
526 ${Item.DistanciaTramo.data}
527 </span>
528 </h3>
529 <ul class="article-list list-unstyled article-list-info">
530 <#if getterUtil.getBoolean(Item.TramoAlternativo.getData()) && getterUtil.getBoolean(Item.TramoAlternativo.getData())>
531 <li class="article-list-item">
532 <span class="fas fa-route">
533 <span class="hide-accessible">${languageUtil.get(request,"infoasturias-tramo-alternativo")}</span>
534 </span>
535 <span class="field-wrapper">
536 <span class="field">${languageUtil.get(request, "infoasturias-tramo-alternativo")}:</span>
537 </span>
538 </li>
539 </#if>
540 </ul>
541 <#if Item.DescripcionTramo.data?has_content>
542 ${Item.DescripcionTramo.data}
543 </#if>
544 </#list>
545 </div>
546 </div>
547 <#assign showFirstTab = false>
548 </#if>
549
550 <#if hasTab3>
551 <#assign showFirstTab = true>
552 <#assign coordenadas=stringUtil.split(Geolocalizacion.Coordenadas.data) />
553 <div id="tab3" class="article-section accordion-item">
554 <a href="#tabContent3" id="tabHeading3" class="h3 accordion-header <#if !showFirstTab>collapsed</#if>" aria-expanded="${getterUtil.getString(showFirstTab)}" data-toggle="liferay-collapse" aria-controls="tabContent3" role="button"><h2>${languageUtil.get(request,'map')}</h2></a>
555 <div id="tabContent3" class="article-section-content accordion-collapse collapse <#if showFirstTab>show</#if>" aria-labelledby="tabHeading3">
556 <script src="/o/turismo-asturias-theme/js/leaflet/leaflet.js"></script>
557 <script type="text/javascript">
558 <#assign xpath = saxReaderUtil.createXPath("//root:StyleMap", "root", "http://www.opengis.net/kml/2.2")/>
559 <#assign style_maps = xpath.selectNodes(document)/>
560
561 var style_mapsJS = {};
562 var line_stylesJS = {};
563
564 <#list style_maps as style_map>
565 <#assign style_map_styleurl_path = "${style_map.getUniquePath()}/*[name()='Pair']/*[name()='styleUrl']"/>
566 <#assign style_map_styleurl_node = style_map.selectSingleNode(style_map_styleurl_path)/>
567 <#assign nodeText = style_map_styleurl_node.getText()/>
568 style_mapsJS['${style_map.selectSingleNode("${style_map.getUniquePath()}/@id").getText()}'] = '${nodeText?substring(1)}';
569 </#list>
570 <#assign xpath = saxReaderUtil.createXPath("//root:Style", "root", "http://www.opengis.net/kml/2.2")/>
571 <#assign line_styles = xpath.selectNodes(document)/>
572
573 <#list line_styles as line_style>
574 <#assign line_style_color_path = "${line_style.getUniquePath()}/*[name()='LineStyle']/*[name()='color']"/>
575 <#assign line_style_color_node = line_style.selectSingleNode(line_style_color_path)!/>
576 <#if validator.isNotNull(line_style_color_node)>
577 line_stylesJS['${line_style.selectSingleNode("${line_style.getUniquePath()}/@id").getText()}'] = {color: '#${line_style_color_node.getText()?substring(6,8)}${line_style_color_node.getText()?substring(4,6)}${line_style_color_node.getText()?substring(2,4)}', opacity: 0x${line_style_color_node.getText()?substring(0,2)}/0xFF};
578 </#if>
579 </#list>
580 </script>
581
582
583 <script type="text/javascript">
584 var route = {};//Ruta
585 var totalDistance = 0;
586 <#list placemarksName as name>
587
588 var nombreTramo = "${name.getText()}";
589 nombreTramo = nombreTramo.replace("Tramo ","");
590 nombreTramo = nombreTramo.replace(/[–]/gi,'-');
591 nombreTramo = nombreTramo.trim();
592
593
594 var tramo = {};//Datos del tramo
595 var coordinatesJS = [];//Coordenadas del tramo
596
597 <#-- Identificador color del Tramo -->
598 <#assign xpath = saxReaderUtil.createXPath("//root:LineString/ancestor::root:Placemark[root:name='${name.getText()}']/root:styleUrl", "root", "http://www.opengis.net/kml/2.2")/>
599 <#assign styleUrl = xpath.selectSingleNode(document)!>
600
601 <#-- Obtener los puntos de ruta para dibujarlos -->
602 <#assign xpath = saxReaderUtil.createXPath("//root:LineString/ancestor::root:Placemark[root:name='${name.getText()}']/root:LineString/root:coordinates", "root", "http://www.opengis.net/kml/2.2")/>
603 <#assign coordinates = xpath.selectSingleNode(document)!>
604 <#-- Hacemos un split para separar las coordenadas -->
605 <#assign arrayCoordinates = coordinates.getText()?split(" ")/>
606 <#assign start=""/>
607 <#assign end=""/>
608 <#list arrayCoordinates as coordinate>
609 <#assign splitCoordinates = coordinate?split(",")/>
610
611
612 <#if splitCoordinates?size gte 2>
613 coordinatesJS.push(new L.LatLng(${splitCoordinates[1]}, ${splitCoordinates[0]}));
614 <#if validator.isNull(start)>
615 <#assign start = "${splitCoordinates[1]} +',' + ${splitCoordinates[0]}">
616 </#if>
617 <#assign end = "${splitCoordinates[1]} +',' + ${splitCoordinates[0]}">
618 </#if>
619
620 </#list>
621 tramo['start'] = ${start};
622 tramo['end'] = ${end};
623
624 var distance = 0;
625 var previousPoint="";
626
627 tramo['name'] = nombreTramo;
628 tramo['lineStyle'] = line_stylesJS[style_mapsJS['${styleUrl.getText()?substring(1)}']];
629 tramo['coordinates'] = coordinatesJS;
630
631 coordinatesJS.forEach(function (latLng) {
632 if (previousPoint) {
633 distance += previousPoint.distanceTo(latLng);
634 }
635 previousPoint = latLng;
636 });
637
638 tramo['distance'] = (distance/1000).toFixed(1)/1;
639 totalDistance +=(distance/1000).toFixed(1)/1;
640
641 <#if tramosAlternativosArray?size!=0>
642 tramo['isAlternative'] = ${tramosAlternativosArray[count]};
643 <#else>
644 tramo['isAlternative'] = false;
645 </#if>
646
647
648 route['${counter}'] = tramo;
649
650 <#assign counter = counter +1/>
651 <#assign count = count +1/>
652
653 </#list>
654 </script>
655 <div class="article-section-content">
656 <div id="article-map-wrapper-${articleId}" class="article-map-wrapper">
657 <div id="article-map-content-${articleId}" style="width: 100%; height: 400px; z-index:1"><!-- MAP --></div>
658 <div class="article-map-form">
659 <div class="name important">${title}</div>
660 <div class="gps"><span class="label">GPS:</span> <span class="value important" itemprop="geo">${lookAtLatitude.getText()}, ${lookAtLongitude.getText()}</span></div>
661 <form action="https://maps.google.es/maps" method="get" target="_blank">
662 <input type="hidden" name="daddr" value="${lookAtLatitude.getText()}, ${lookAtLongitude.getText()}">
663 <label for="saddrText"><span class="label hide-accessible">${languageUtil.get(request,'infoasturias-insert-from')}: </span></label>
664 <label for="saddr"><span class="label">${languageUtil.get(request,'infoasturias-from')}: </span></label>
665 <input class="form-control" type="text" maxlength="40" name="saddrText" id="saddrText" value="" placeholder="${languageUtil.get(request,'infoasturias-insert-from')}">
666 <input class="form-control" type="hidden" name="saddr" id="saddr" value="" placeholder="${languageUtil.get(request,'infoasturias-insert-from')}">
667 <button class="btn btn-text" type="submit">${languageUtil.get(request,'infoasturias-como-llegar')} »</button>
668 </form>
669 </div>
670 </div>
671
672 <script type="text/javascript">
673 AUI().ready('aui-base', function(A){
674 var lookAt = new L.LatLng(${lookAtLatitude.getText()}, ${lookAtLongitude.getText()});//Cámara
675
676 <#if validator.isNotNull (Geolocalizacion.Coordenadas.data)>
677 lookAt = new L.LatLng(${Geolocalizacion.Coordenadas.data});//contenido
678 </#if>
679 const mapContent = new L.Map('article-map-content-${articleId}', { center: lookAt, zoom: 10 });
680 const osm = new L.TileLayer('http://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}');
681
682
683 mapContent.addLayer(osm);
684
685 //definir iconos inicio y fin tramo
686 var startMarker;
687 var middleMarker;
688 var endMarker;
689 var colorSeries = ["e9ecef","f5f7f9","fff"];
690 var colorSeriesSelector = 0;
691 var generalDistance =0;
692
693 var endIconTheme = '/o/turismo-asturias-theme/images/icons/routes/Icono_Fin_Ruta_${tipoRuta}_min.png';
694 var endIcon = L.icon({
695 iconUrl: endIconTheme,
696 iconSize: [27, 35],
697 iconAnchor: [13, 35],
698 iconShadow: [0,0],
699 popupAnchor: [0, -30]
700 });
701 var middleIconTheme = '/o/turismo-asturias-theme/images/icons/routes/gmaps-marker-icon-grey.png';
702 var middleIcon = L.icon({
703 iconUrl: middleIconTheme,
704 iconSize: [20, 28],
705 iconAnchor: [10, 28],
706 iconShadow: [0,0],
707 popupAnchor: [0, -30]
708 });
709
710 var startIconTheme = '/o/turismo-asturias-theme/images/icons/routes/Icono_Inicio_Ruta_${tipoRuta}_min.png';
711 var startIcon = L.icon({
712 iconUrl: startIconTheme,
713 iconSize: [27, 35],
714 iconAnchor: [13, 35],
715 iconShadow: [0,0],
716 popupAnchor: [0, -30]
717 });
718
719 for (const ruta in route) {
720 var stretch = route[ruta];
721
722 var name = stretch.name;
723 var nameArray = name.split("-");
724 var coordinates = stretch.coordinates;
725 var distance =''+ stretch.distance;
726 var isStrechAlternative = stretch.isAlternative;
727 var lineStyle = stretch.lineStyle || { color: '#3c3be3', opacity: 1 };
728 var startCoordinates = stretch.start.split(",");
729 var endCoordinates = stretch.end.split(",");
730
731 var track_node = A.Node.create('<div class="route-resume-track ' + (ruta==1?'route-resume-track-first':'') + '"><a class="route-resume-track-link" href="#track-'+(ruta)+'"></a></div>');
732 var track_size = ((distance/totalDistance*100) + '%');
733 track_node.setStyles({width: track_size, backgroundColor: '#' + colorSeries[colorSeriesSelector]});
734 track_node.appendTo(A.one('.route-resume-tracks'));
735
736
737 if(distance)
738 A.one('.template .route-'+ ruta + ' .route-distance').text(distance.replace(".",",") + ' Kms');
739
740 if(!isStrechAlternative)
741 generalDistance = generalDistance + stretch.distance;
742
743 if(Object.keys(route).length == 1){
744 A.one('.route-resume-track-marker-first .route-point-text').text(nameArray[0]);
745 A.one('.route-resume-track-marker-last .route-km-text').text('Km ' + distance.replace(".",","));
746 A.one('.route-resume-track-marker-last .route-point-text').text(nameArray[nameArray.length-1]);
747 startMarker = L.marker([startCoordinates[0],startCoordinates[1]], {icon: startIcon}).bindPopup(nameArray[0]).addTo(mapContent);
748 endMarker = L.marker([endCoordinates[0],endCoordinates[1]], {icon: endIcon}).bindPopup(nameArray.length-1).addTo(mapContent);
749 }
750 else{
751 var track_point =A.Node.create('<div class="route-resume-point"></div>');
752 if(ruta==1){
753 A.one('.route-resume-track-marker-first .route-point-text').text(nameArray[0]);
754 var track_point_text = A.Node.create('<div class="route-point-text">' + nameArray[1] + '</div><div class="route-km-text">Km '+distance+'</div>');
755 startMarker = L.marker([startCoordinates[0],startCoordinates[1]], {icon: startIcon}).bindPopup(nameArray[0]).addTo(mapContent);
756
757 if(ruta == Object.keys(route).length-1 && route[Object.keys(route).length].isAlternative)
758 endMarker = L.marker([endCoordinates[0],endCoordinates[1]], {icon: endIcon}).bindPopup(nameArray.length-1).addTo(mapContent);
759 else
760 middleMarker = L.marker([endCoordinates[0],endCoordinates[1]], {icon: middleIcon}).bindPopup(nameArray.length-1).addTo(mapContent);
761
762 track_point_text.appendTo(track_point);
763 track_point.appendTo(A.one('.route-resume-tracks'));
764 }
765 else if(ruta == Object.keys(route).length){
766 A.one('.route-resume-track-marker-last .route-km-text').text('Km ' + distance.replace(".",","));
767 A.one('.route-resume-track-marker-last .route-point-text').text(nameArray[nameArray.length-1]);
768
769 if(isStrechAlternative){
770 middleMarker = L.marker([endCoordinates[0],endCoordinates[1]], {icon: middleIcon}).bindPopup(nameArray[nameArray.length-1]).addTo(mapContent);
771 var alternativetrack_node = A.Node.create('<li class="article-list-item distance-wrapper"><span class="fas fa-ruler-horizontal"><span class="hide-accessible"> ${languageUtil.get(request, "infoasturias-tramo-alternativo")}</span></span><span class="field-wrapper"><span class="field">${languageUtil.get(request, "infoasturias-tramo-alternativo")}: </span><span class="text btn btn-secondary btn-thin text-lowercase"><span class="font-size-11 text-white text-distance-alternative">'+distance +'</span> kms</span></span></li>');
772 alternativetrack_node.appendTo(A.one('.template .info-route'));
773 }
774 else{
775 endMarker = L.marker([endCoordinates[0],endCoordinates[1]], {icon: endIcon}).bindPopup(nameArray[nameArray.length-1]).addTo(mapContent);
776 }
777 }
778 else{
779 var track_point_text = A.Node.create('<div class="route-point-text">' + nameArray[nameArray.length-1] + '</div><div class="route-km-text">Km '+distance+'</div>');
780 track_point_text.appendTo(track_point);
781 track_point.appendTo(A.one('.route-resume-tracks'));
782 middleMarker = L.marker([startCoordinates[0],startCoordinates[1]], {icon: middleIcon}).bindPopup(nameArray[0]).addTo(mapContent);
783 }
784 }
785
786 var polyline = new L.Polyline(coordinates, {
787 color: '' + lineStyle.color,
788 opacity: lineStyle.opacity
789 });
790 polyline.bindPopup(name).addTo(mapContent);
791
792
793 colorSeriesSelector++;
794 if(colorSeriesSelector == 3)
795 colorSeriesSelector = 0;
796
797 }//fin rutas
798
799 if(generalDistance)
800 A.one('.template .text-distance').text(''+ Math.round(generalDistance * 100) / 100);
801
802 //Contributor
803 L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
804 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'
805 }).addTo(mapContent);
806
807 }); //AUI.ready
808 </script>
809 </div>
810 <#if validator.isNotNull(dlFileEntryKML) && tipoRuta!="coche">
811
812 <#assign params = {
813 "displayStyle":"ddmTemplate_435797",
814 "displayStyleGroupId":"${themeDisplay.getCompanyGroupId()}",
815 "portletId": portletTool.getPortletId(request),
816 "articleId":"${articleId}",
817 "dlFileEntryuuId":"${dlFileEntryKML.getUuid()}"
818 }>
819 <#assign portletURL = portletTool.createURL(request, "as_asac_adtvisor_portlet_AdtVisorDialogPortlet", themeDisplay.getPlid(), "RENDER_PHASE", "pop_up", params) />
820 <div class="button-row button-row-center my-3">
821 <button type="button" class="btn btn-primary btn-small text-center text-uppercase" onclick="event.preventDefault(); showDialogIframe('${portletURL}','${languageUtil.get(request,'profile')}', '800px', '','elevationProfile', 'elevationProfileIframe');">
822 ${languageUtil.get(request,'infoasturias-ver-perfil-elevacion')}
823 </button>
824 </div>
825
826 </#if>
827 </div>
828 </div>
829 <#assign showFirstTab = false>
830 </#if>
831
832 <#if hasTab4>
833 <div id="tab4" class="article-section accordion-item hide">
834 <a href="#tabContent4" id="tabHeading4" class="h3 accordion-header <#if !showFirstTab>collapsed</#if>" aria-expanded="${getterUtil.getString(showFirstTab)}" data-toggle="liferay-collapse" aria-controls="tabContent4" role="button"><h3>${languageUtil.get(request,'infoasturias-itinerario')}</h3></a>
835 <div id="tabContent4" class="article-section-content article-section-color article-section-background accordion-collapse collapse <#if showFirstTab>show</#if>" aria-labelledby="tabHeading4">
836 <#list Informacion.Itinerario.getSiblings() as Item>
837 <#if Item.data?has_content>
838 <div class=" itinerario <#if !Item?is_last>pb-5</#if>"><p>${Item.data}</p></div>
839 </#if>
840 </#list>
841 </div>
842 </div>
843 <#assign showFirstTab = false>
844 </#if>
845
846 <#if hasTab5>
847 <div id="tab5" class="article-section accordion-item">
848 <a href="#tabContent5" id="tabHeading5" class="h3 accordion-header <#if !showFirstTab>collapsed</#if>" aria-expanded="${getterUtil.getString(showFirstTab)}" data-toggle="liferay-collapse" aria-controls="tabContent5" role="button">${languageUtil.get(request,'detail')}</a>
849 <div id="tabContent5" class="article-section-content article-section-color article-section-background accordion-collapse collapse <#if showFirstTab>show</#if>" aria-labelledby="tabHeading5">
850 <#assign htmlGallery = journalTool.getHTMLGallery(Detalle.DetalleImagen.getSiblings(), 3, "gallery-thumbs") />
851
852 <#if Detalle.DetalleTexto.data?has_content>
853 ${Detalle.DetalleTexto.data}
854 </#if>
855
856 <#if validator.isNotNull(htmlGallery)>
857 <section class="image-gallery">
858 <div class="h5 pb-0">${languageUtil.get(locale, "image-gallery")}</div>
859 ${htmlGallery}
860 </section>
861 </#if>
862 </div>
863 </div>
864 <#assign showFirstTab = false>
865 </#if>
866 </div>
867 <#if Informacion.Observaciones.data?has_content>
868 <div class="article-border">
869 ${Informacion.Observaciones.data}
870 </div>
871 </#if>
872 </div>
873
874 <#-- Related -->
875 <#assign relatedJournalArticles = assetTool.getRelatedJournalArticlesApproved(assetEntry)/>
876 <#if validator.isNotNull(relatedJournalArticles) && relatedJournalArticles?size gt 0>
877 <div class="article-related portlet-background-grey-container">
878 <div class="container">
879 <h3 class="title-section">${languageUtil.get(request,'related-assets')}</h3>
880 <div class="slick article-related-slick">
881 <#list relatedJournalArticles as currentJournalArticle>
882 <#assign viewURL = journalTool.getDisplayPage(currentJournalArticle, themeDisplay, true)/>
883 <div class="slide">
884 <a class="card background card-background-9-14" href="${viewURL}" title="${languageUtil.format(request, 'go-to-x', currentJournalArticle.getTitle(locale))}">
885 <span class="d-block image-wrapper aspect-ratio-bg-cover" style="background-image: url('${currentJournalArticle.getSmallImageURL()}');">
886 <img class="hide-accessible" src="${currentJournalArticle.getSmallImageURL()}" alt="${currentJournalArticle.getTitle(locale)}">
887 <span class="card-body">
888 <span class="card-title">${currentJournalArticle.getTitle(locale)}</span>
889 </span>
890 </span>
891 </a>
892 </div>
893 </#list>
894 </div>
895 </div>
896 </div>
897 </#if>
898
899 <#-- Nearby -->
900 <#assign classTypeIds = [598853,582814,625593,623117,609431,593783]>
901 <#assign assetsNearJournalArticles = assetNearTool.getNearJournalArticles(themeDisplay.getScopeGroupId(), assetEntry.getEntryId(), 50.0, classTypeIds, 25)! />
902 <#if validator.isNotNull(assetsNearJournalArticles) && assetsNearJournalArticles?size gt 0>
903 <div class="article-nearby portlet-container-margin">
904 <div class="container">
905 <div class="article-nearby-container">
906 <h3 class="title-section">${languageUtil.get(request,'infoasturias-near-here')}</h3>
907 <div class="slick article-nearby-slick">
908 <#list assetsNearJournalArticles as currentJournalArticle>
909 <#assign viewURL = journalTool.getDisplayPage(currentJournalArticle, themeDisplay, true)/>
910 <div class="slide">
911 <a class="card" href="${viewURL}" title="${languageUtil.format(request, 'go-to-x', currentJournalArticle.getTitle(locale))}">
912 <span class="d-block image-wrapper aspect-ratio-bg-cover aspect-ratio-4-to-3" style="background-image: url('${currentJournalArticle.getSmallImageURL()}');">
913 <img class="hide-accessible" src="${currentJournalArticle.getSmallImageURL()}" alt="${currentJournalArticle.getTitle(locale)}">
914 <span class="card-hover">
915 <span class="card-text">${currentJournalArticle.getDescription(locale)}</span>
916 </span>
917 </span>
918 <span class="card-body">
919 <span class="card-title">${currentJournalArticle.getTitle(locale)}</span>
920 <span class="card-subtitle">
921 <span class="d-block">${currentJournalArticle.getVersion()} Kms</span>
922 <span class="d-block">${journalTool.getCategoriesNames(groupId, currentJournalArticle.getArticleId(), locale, ["Concejos"])}</span>
923 </span>
924 </span>
925 </a>
926 </div>
927 </#list>
928 </div>
929 </div>
930 </div>
931 </div>
932 </#if>
933</article>