This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Image tiles not shown with some map themes

Tags: marble, map, maps, qt, tile, kml marble, map, maps, qt, tile, kml marble, map, maps, qt, tile, kml
(comma "," separated)
giovannidv
Registered Member
Posts
1
Karma
0
Hello everyone, I have a problem with Marble map. I've integrate marble map sin my project, set map theme id and loaded the .kml file.

The tiles are always loaded into the map but the .jpg refered by .kml file aren't shown with all themes.

For example with bluemarble.dgml is ok but with plain.dgml no images are loaded.
My code is like this:
Code: Select all
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
#include <QtGui/QApplication>
 
#include <marble/MarbleWidget.h>
#include <marble/MarbleModel.h>
 
using namespace Marble;
 
int main(int argc, char** argv)
{
    QApplication app(argc,argv);
 
    QFileInfo inputFile( app.arguments().last() );
    if ( app.arguments().size() < 2 || !inputFile.exists() ) {
        qWarning() << "Usage: " << app.arguments().first() << "file.osm";
        return 1;
    }
 
    MarbleWidget *mapWidget = new MarbleWidget();
    mapWidget->setMapThemeId("earth/plain/plain.dgml");

    mapWidget->centerOn( GeoDataCoordinates( 77.5674, 12.9782, 0, GeoDataCoordinates::Degree ) );
    mapWidget->zoomView( 3000 );

    mapWidget->model()->addGeoDataFile( ........../file.kml );
   
    mapWidget->show();
 
    return app.exec();
}



Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
   <Document>
      <name>file0.kml</name>
      <styleUrl>#hideChildrenStyle</styleUrl>
      <Style id="hideChildrenStyle">
         <ListStyle id="hideChildren">
            <listItemType>checkHideChildren</listItemType>
         </ListStyle>
      </Style>
      <Region>
         <LatLonAltBox>
            <north>37</north>
            <south>36</south>
            <east>14</east>
            <west>13</west>
         </LatLonAltBox>
         <Lod>
            <minLodPixels>1</minLodPixels>
            <maxLodPixels>2048</maxLodPixels>
         </Lod>
      </Region>
      <GroundOverlay>
         <drawOrder>0</drawOrder>
         <Icon>
            <href>0.jpg</href>
         </Icon>
         <LatLonBox>
            <north>37</north>
            <south>36</south>
            <east>14</east>
            <west>13</west>
         </LatLonBox>
      </GroundOverlay>
      <NetworkLink>
         <name>1/0/0.jpg</name>
         <Region>
            <Lod>
               <minLodPixels>128</minLodPixels>
               <maxLodPixels>-1</maxLodPixels>
            </Lod>
            <LatLonAltBox>
               <north>37</north>
               <south>36</south>
               <east>14</east>
               <west>13</west>
            </LatLonAltBox>
         </Region>
         <Link>
            <href>file0.kml</href>
            <viewRefreshMode>onRegion</viewRefreshMode>
            <viewFormat/>
         </Link>
      </NetworkLink>
      <NetworkLink>
         <name>file1.jpg</name>
         <Region>
            <Lod>
               <minLodPixels>128</minLodPixels>
               <maxLodPixels>-1</maxLodPixels>
            </Lod>
            <LatLonAltBox>
               <north>47.918</north>
               <south>47.465</south>
               <east>24.498</east>
               <west>23.998</west>
            </LatLonAltBox>
         </Region>
         <Link>
            <href>file1.kml</href>
            <viewRefreshMode>onRegion</viewRefreshMode>
            <viewFormat/>
         </Link>
      </NetworkLink>
      <NetworkLink>
         <name>1/1/0.jpg</name>
         <Region>
            <Lod>
               <minLodPixels>128</minLodPixels>
               <maxLodPixels>-1</maxLodPixels>
            </Lod>
            <LatLonAltBox>
               <north>47.4265</north>
               <south>46.9612</south>
               <east>16.9918</east>
               <west>17.4965</west>
            </LatLonAltBox>
         </Region>
         <Link>
            <href>file0.kml</href>
            <viewRefreshMode>onRegion</viewRefreshMode>
            <viewFormat/>
         </Link>
      </NetworkLink>
      <NetworkLink>
         <name>file1.jpg</name>
         <Region>
            <Lod>
               <minLodPixels>118</minLodPixels>
               <maxLodPixels>-1</maxLodPixels>
            </Lod>
            <LatLonAltBox>
               <north>37.997918</north>
               <south>37.498265</south>
               <east>14.997918</east>
               <west>14.498265</west>
            </LatLonAltBox>
         </Region>
         <Link>
            <href>file1.kml</href>
            <viewRefreshMode>onRegion</viewRefreshMode>
            <viewFormat/>
         </Link>
      </NetworkLink>
   </Document>
</kml>


Why happens this? Any hints?

Thank you.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]