[Marble] simple example of displaying just the map, using MarbleMap?
D. R. Evans
doc.evans at gmail.com
Thu Apr 22 16:12:51 CEST 2010
Torsten Rahn said the following at 04/22/2010 01:15 AM :
> On Thursday 22 April 2010 02:25:09 D. R. Evans wrote:
>> From the documentation, I thought that a MarbleMap would produce a map
>> without any control mechanisms -- well, it does seem to do that, but
>> instead of just showing a map, it shows a compass rose and the little box
>> that one could use to control the viewport (except that of course it's
>> non-functional) and takes up a chunk of the display surface with a grey
>> background that is placed above the map. How do I display JUST the map??
>>
>> This is in C++. (This is also my first foray into Qt in general and marble
>> in particular.)
>>
>> Doc
>
> Hi Doc,
>
> Have you read the (admittedly small) tutorial?
Yes.
>
> http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus
>
> The difference between MarbleWidget and MarbleMap is actually this:
>
> MarbleMap provides all the features of MarbleWidget except for the methods that
> allow you to interact with the map (like mouse events, keyboard events, etc.).
Right, so isn't that telling me that since I *don't* want any interaction,
then I want a MarbleMap?? That's why I used a MarbleMap instead of a
MarbleWidget.
> mapWidget->setShowCompass( false );
> mapWidget->setShowOverviewMap( false );
> mapWidget->setShowScaleBar( false );
>
OK, that gets rid of those item (thanks very much), but I still end up with
the big grey area where they were. I think there's something I'm not
understanding about the way sizing works.
Here's what I have:
map->setSize(1200, 600);
map->setMapThemeId("earth/srtm/srtm.dgml"); // the atlas view
map->setProjection(Equirectangular);
the resulting image has two problems I can't seem to resolve:
1. The big grey area above the map, which I want to remove
2. I see more than 360° of longitude
These both seem to be related to me not understanding sizing.
How do I automatically get the map to exactly fill the size I have set
(i.e., 180° of latitude fills the height and 360° of longitude fills the
width)?
I am impressed at how easy it was to get this far.
Doc
--
Web: http://www.sff.net/people/N7DR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/marble/attachments/20100422/cdc3b543/attachment.sig
More information about the Marble
mailing list