Bug 336061

Summary: Images in the BalloonStyle don't work with relative path
Product: [Applications] marble Reporter: Tobias <tobias.jakobs>
Component: generalAssignee: Dennis Nienhüser <nienhueser>
Status: RESOLVED FIXED    
Severity: normal CC: nienhueser
Priority: NOR    
Version: 1.8 (KDE 4.13)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.3
Attachments: Exsample KMZ file

Description Tobias 2014-06-10 21:46:14 UTC
If I create a BalloonStyle like this, the image isn't shown:

      <BalloonStyle>
        <text><![CDATA[<img src="files/DSC_4234_JPG.jpg"><br/>]]></text>
        <textColor>ff000000</textColor>
        <displayMode>default</displayMode>
      </BalloonStyle>

A fix Path like this works:

      <BalloonStyle>
        <text><![CDATA[<img src="https://developers.google.com/kml/documentation/images/campus2.gif"><br/>]]></text>
        <textColor>ff000000</textColor>
        <displayMode>default</displayMode>
      </BalloonStyle>

Reproducible: Always

Steps to Reproduce:
1. Open a KML or KMZ file with an image in a BalloonStyle like above 
2. Open the Balloon

Actual Results:  
Nothing there

Expected Results:  
An nice image
Comment 1 Tobias 2014-06-10 21:47:45 UTC
Created attachment 87119 [details]
Exsample KMZ file
Comment 2 Dennis Nienhüser 2014-06-14 11:49:19 UTC
Git commit bf287898f84207c9939300f5adfc2124217c532d by Dennis Nienhüser.
Committed on 14/06/2014 at 11:46.
Pushed by nienhueser into branch 'master'.

Fix loading of relative local resources in popup dialog

Set the baseUrl of QWebView to that of the parent geo document (KML).
Fixes e.g. showing relative images in the popup balloon for placemarks
in a KML/KMZ file.

M  +4    -3    src/lib/marble/PopupItem.cpp
M  +2    -1    src/lib/marble/PopupItem.h
M  +5    -3    src/lib/marble/layers/PopupLayer.cpp
M  +1    -1    src/lib/marble/layers/PopupLayer.h

http://commits.kde.org/marble/bf287898f84207c9939300f5adfc2124217c532d
Comment 3 Dennis Nienhüser 2014-06-14 12:05:00 UTC
Git commit 459a1c83100de62069405ab838a5c81647e82c6c by Dennis Nienhüser.
Committed on 14/06/2014 at 11:46.
Pushed by nienhueser into branch 'KDE/4.13'.

Fix loading of relative local resources in popup dialog

Set the baseUrl of QWebView to that of the parent geo document (KML).
Fixes e.g. showing relative images in the popup balloon for placemarks
in a KML/KMZ file.
FIXED-IN: 4.13.3
(cherry picked from commit bf287898f84207c9939300f5adfc2124217c532d)

Conflicts:
	src/lib/marble/layers/PopupLayer.cpp

M  +4    -3    src/lib/marble/PopupItem.cpp
M  +2    -1    src/lib/marble/PopupItem.h
M  +5    -3    src/lib/marble/layers/PopupLayer.cpp
M  +1    -1    src/lib/marble/layers/PopupLayer.h

http://commits.kde.org/marble/459a1c83100de62069405ab838a5c81647e82c6c