Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 16:27
in response to: JeffTucker
|
|
|
One longshot: have you installed David's latest metadata package, metadata-extractor-2.20-main.jar? If you do, make sure to remove metadata-extractor-2.15.0.jar. Having both might do strange things.
Good point, yes I did that. But during deinstalling JA 39.4.8. I think I also that metadata-extractor-2.20-main.jar? got deleted. After the deinstalling I usually clean up the programm folder from any left overs. So, just installing JA 39.4.8. again everything should be OK. I'll try that later on.
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 16:30
in response to: RobM
|
|
|
|
|
I think this should work ....
Not quite - some mismatched quotes in there, and a drop into the shell that's not needed. A little cleanup (with some text as placeholders for the missing marker classes): <ja:if exists="gpsLocation">
| <a href="https://maps.google.com/?q=${gpsLocation}" class="mylink" rel="noreferrer nofollow"><abbr title="Google"><i class="fa fa-map-marker">GM</i></abbr></a>
| <a href="https://www.openstreetmap.org/?mlat='" + gpsLocation.split(',')[0] + '&mlon=' + gpsLocation.split(',')[1] + '&zoom=16#map=' + gpsLocation.split(',')[0] + '/' + gpsLocation.split(',')[1] + '" class="mylink" rel="noreferrer nofollow"><abbr title="OSM"><i class="fa fa-map-marker">OSM</i></abbr></a>
| <a href="https://kart.finn.no/?lng=' + gpsLocation.split(',')[1] + '&lat=' + gpsLocation.split(',')[0] + '" class="mylink" rel="noreferrer nofollow"><abbr title="kart.finn.no"><i class="fa fa-map-marker">KART</i></abbr></a>
| <a href="https://www.windy.com/?${gpsLocation},16" class="mylink" rel="noreferrer nofollow"><abbr title="windy.com"><i class="fa fa-map-marker">WINDY</i></abbr></a>
</ja:if>
Tested in jAlbum 39.4.8 and Tiger 8.0.4, and it produces what you see in the attached screenshot.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 16:48
in response to: JeffTucker
|
|
|
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 17:16
in response to: MarkusD
|
|
|
Some of the map links weren't working, so I did some major surgery on the code. I'm sure I can clean this up a bit more, but maybe later. <ja:if exists="gpsLocation">
| <a href="https://maps.google.com/?q=${gpsLocation}" class="mylink" rel="noreferrer nofollow"><abbr title="Google"><i class="fa fa-map-marker">GM</i></abbr></a>
| <a href="https://www.openstreetmap.org/?mlat=<%=gpsLocation.split(',')[0]%>&mlon=<%=gpsLocation.split(',')[1]%>&zoom=16#map=<%=gpsLocation.split(',')[0] + '/' + gpsLocation.split(',')[1]%>" class="mylink" rel="noreferrer nofollow"><abbr title="OSM"><i class="fa fa-map-marker">OSM</i></abbr></a>
| <a href="https://kart.finn.no/?lng=<%=gpsLocation.split(',')[1]%>&lat=<%=gpsLocation.split(',')[0]%>" class="mylink" rel="noreferrer nofollow"><abbr title="kart.finn.no"><i class="fa fa-map-marker">Kart</i></abbr></a>
| <a href="https://www.windy.com/?${gpsLocation},16" class="mylink" rel="noreferrer nofollow"><abbr title="windy.com"><i class="fa fa-map-marker">Windy</i></abbr></a>
</ja:if>
It now seems to be working, and the code validates (other than something in Laza's CSS that's not valid, unrelated to this exercise):
https://jefftucker.jalbum.net/MDtest/
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 18:57
in response to: JeffTucker
|
|
|
|
|
|
Jeff, I tried both of your code samples, but they looked broken, see screenshot. I used my own old code which looks good now with JA 39.4.1. and Tiger 8.0.4.
But when I started I was on 39.4.8. (I think that was a core update which David recommended the other day).
For now I'll stick with that combination (JA 39.4.1. and Tiger 8.0.4.) of the core and Tiger.
Edited by: MarkusD on 2 May 2026, 19:03
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
2 May 26, 19:35
in response to: MarkusD
|
|
|
Probably a small syntax error in there. Copy and paste this, which is what I used to make the sample album: <ja:if exists="originalDate"><i>${originalDate}</i></ja:if>
<ja:else>
<i>${fileDate}</i>
<ja:if test="${fileCategory}" value="video"> | <i>FPS: ${videoFPS} - Auflösung: ${videoWidth}x${videoHeight} - Dauer: ${videoDuration}</i></ja:if>
</ja:else>
<ja:if exists="gpsLocation">
| <a href="https://maps.google.com/?q=${gpsLocation}" class="mylink" rel="noreferrer nofollow"><abbr title="Google"><i class="fa fa-map-marker"> </i></abbr></a>
| <a href="https://www.openstreetmap.org/?mlat=<%=gpsLocation.split(',')[0]%>&mlon=<%=gpsLocation.split(',')[1]%>&zoom=16#map=<%=gpsLocation.split(',')[0] + '/' + gpsLocation.split(',')[1]%>" class="mylink" rel="noreferrer nofollow"><abbr title="OSM"><i class="fa fa-map-marker"> </i></abbr></a>
| <a href="https://kart.finn.no/?lng=<%=gpsLocation.split(',')[1]%>&lat=<%=gpsLocation.split(',')[0]%>" class="mylink" rel="noreferrer nofollow"><abbr title="kart.finn.no"><i class="fa fa-map-marker"> </i></abbr></a>
| <a href="https://www.windy.com/?${gpsLocation},16" class="mylink" rel="noreferrer nofollow"><abbr title="windy.com"><i class="fa fa-map-marker"> </i></abbr></a>
</ja:if>
<ja:if exists="meta">
<ja:if test="<%=meta.get("Gps.GPS Altitude") != null && !meta.get("Gps.GPS Altitude").equals("") %>"> | <i>Höhe: ${gpsAltitude}</i></ja:if>
<ja:if test="<%=meta.get("Iptc.Country/Primary Location Name") != null %>"> | <i>Land: <%=meta.get("Iptc.Country/Primary Location Name")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.City") != null %>"> | <i>Stadt: <%=meta.get("Iptc.City")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.Province/State") != null %>"> | <i>Bundesland: <%=meta.get("Iptc.Province/State")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.Sub-location") != null %>"> | <i>Ortsdetail: <%=meta.get("Iptc.Sub-location")%></i></ja:if>
</ja:if>
<ja:switch test="${rating}">
<ja:case value="1"> | <span style="color:gold;">★</span></ja:case>
<ja:case value="2"> | <span style="color:gold;">★★</span></ja:case>
<ja:case value="3"> | <span style="color:gold;">★★★</span></ja:case>
<ja:case value="4"> | <span style="color:gold;">★★★★</span></ja:case>
<ja:case value="5"> | <span style="color:gold;">★★★★★</span></ja:case>
<ja:default></ja:default>
</ja:switch>
<ja:if exists="fileTitle"> | ${fileTitle}</ja:if> | ${comment}
Edited by: JeffTucker on 3 May 2026, 12:28, to correct some UTF-8 issues.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 08:17
in response to: JeffTucker
|
|
|
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 12:58
in response to: MarkusD
|
|
|
|
Create a small test album with no more than a half-dozen images. No folders, nothing else. Upload it. Include the lifeboat file. Give us a link to it.
|
|
|
Posts:
1,511
Registered:
6-Sep-2005
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 13:19
in response to: MarkusD
|
|
|
|
|
Markus, the imagecaption field is empty in your album, which means there's an error. You can peek into the System Console (F7) to check what's wrong.
I used this template, and worked fine:
<ja:if exists="originalDate"><i>${originalDate}</i></ja:if>
<ja:if exists="gpsLocation">
| <a href="https://maps.google.com/?q=${gpsLocation}" class="mylink" rel="noreferrer nofollow"><span title="Google" class="icon-location"> </span></a>
| <a href="https://www.openstreetmap.org/?mlat=<%=gpsLocation.split(',')[0]%>&mlon=<%=gpsLocation.split(',')[1]%>&zoom=16#map=<%=gpsLocation.split(',')[0] + '/' + gpsLocation.split(',')[1]%>" class="mylink" rel="noreferrer nofollow"><span title="OSM" class="icon-location"> </span></a>
| <a href="https://kart.finn.no/?lng=<%=gpsLocation.split(',')[1]%>&lat=<%=gpsLocation.split(',')[0]%>" class="mylink" rel="noreferrer nofollow"><span title="Kart Finn No" class="icon-location"> </span></a>
| <a href="https://www.windy.com/?${gpsLocation},16" class="mylink" rel="noreferrer nofollow"><span title="Windy" class="icon-location"> </span></a>
</ja:if>
<ja:if exists="meta">
<ja:if test="<%=meta.get("Gps.GPS Altitude") != null && !meta.get("Gps.GPS Altitude").equals("") %>"> | <i>Höhe: ${gpsAltitude}</i></ja:if>
<ja:if test="<%=meta.get("Iptc.Country/Primary Location Name") != null %>"> | <i>Land: <%=meta.get("Iptc.Country/Primary Location Name")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.City") != null %>"> | <i>Stadt: <%=meta.get("Iptc.City")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.Province/State") != null %>"> | <i>Bundesland: <%=meta.get("Iptc.Province/State")%></i></ja:if>
<ja:if test="<%=meta.get("Iptc.Sub-location") != null %>"> | <i>Ortsdetail: <%=meta.get("Iptc.Sub-location")%></i></ja:if>
</ja:if>
<ja:switch test="${rating}">
<ja:case value="1"> | <span style="color:gold;">★</span></ja:case>
<ja:case value="2"> | <span style="color:gold;">★★</span></ja:case>
<ja:case value="3"> | <span style="color:gold;">★★★</span></ja:case>
<ja:case value="4"> | <span style="color:gold;">★★★★</span></ja:case>
<ja:case value="5"> | <span style="color:gold;">★★★★★</span></ja:case>
</ja:switch>
<ja:if exists="fileTitle"> | ${fileTitle}</ja:if> | ${comment}
I removed the icons and replaced them with Tiger's own placemark icon. I'm also not sure what the {abbr} tag stands for, but when I used it, nothing was displayed in the lightbox.
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 13:29
in response to: Laza
|
|
|
I'm also not sure what the {abbr} tag stands for, but when I used it, nothing was displayed in the lightbox.
I had to dig around a bit to figure out that one. In this case, it's a sneaky way to provide a tooltip, without going into CSS "hover" classes. See what happens when you mouse-hover over the four map entries in my demo album:
https://jefftucker.jalbum.net/MDtest/
Here, I've replaced the icons with simple text. Doesn't create any problems for me - I'll take a run at using the icons - that might be part of the problem.
ETA: Demo album updated, using simple calls to a map marker icon. Still no problems.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 13:33
in response to: Laza
|
|
|
|
|
|
Laza, thanks for joining. I used your code, same result, a blank footer. Attached the system console.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 13:47
in response to: JeffTucker
|
|
|
Create a small test album with no more than a half-dozen images. No folders, nothing else. Upload it. Include the lifeboat file. Give us a link to it.
MarkusD, if you refuse to do this, I'm done. Stop testing things in one of your large, complex projects. It's just not possible to debug a problem that way.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: <ja:if exists="gpsLocation"> not working any more
Posted:
3 May 26, 13:51
in response to: JeffTucker
|
|
|
Jeff, please be patient with me.  I'm not used to create small test projects. Please find a test project in my post above.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|