[Marble-devel] Marble Widget usage

Torsten Rahn tackat at t-online.de
Mon Sep 13 10:24:22 CEST 2010


Hi Doug,

Am Sonntag, 12. September 2010 04:38:32 schrieb Doug Penner:
> The application I am working on is actually a little more involved
> than a simple map. My goal is to create an open source app that will
> rival GSAK on all 3 major OS's (windows/mac/linux) since GSAK is a
> paid app and only works (well) in windows.

Sounds cool :-)
 
> I'm not sure about other geocaching websites, but groundspeak (owners
> of geocaching.com) have clearly stated that application access to
> their website (other than embedded web browsers) to download cache
> information is in violation of their TOS. 

In the Marble project we always look closely at the licenses and Terms of Use 
that maps and services are offered with. So yes, we'd have to find some site 
which would distribute geocaches under a suitable license (i.e. free as in 
Free Software).
What about OpenCaching? Do they have restrictions?
One of our primary missions in the Marble project is to promote Free Maps and 
free mapping services. So all the material that is displayed in Marble is 
provided under a license that is in the spirit of Free Software.

> The best bet (which I'm taking) is to have people do "pocket queries"
> which download a bunch of caches to a gpx file, then load those into
> their programs (that's how GSAK does it).

I don't quite understand this :-) Does the content then still get downloaded 
from "problematic" sites like geocaching.com? Do their Terms of Service allow 
for this?

> To improve the website, I would recommend a link to a page explaining
> the marble-widget with some links to those tutorials you listed. The
> only place I was able to find those tutorials (other than the email)
> was the kde techbase page that lists the tutorials for all of kde.
> Adding a mention of the #marble irc channel might help as well. Right
> now only the #kdeedu channel is mentioned.

Thanks. Problem is that Marble and its community has been growing rapidly 
during the last four years and unfortunately that doesn't reflect on the 
website. We need to polish up our website.

> I was able to compile the tutorial examples just fine by using the
> files that were installed to /usr/include/marble but trying to use the
> svn lib folder resulted in compile errors (either missing moc_
> instructions or missing icons). Is there anything particular I need to
> do to get my application to compile on systems that do not have the
> entire marble application installed.

Well, as I said: basically Marble is all about its library: The application 
code just consists of 

- qmain.cpp, QtMainWindow.*  (for the Qt version of Marble)
- kdemain.cpp, KdeMainWindow.* (for the KDE version of Marble).

These make up about < 1% of the whole Marble repository.

The rest is the MarbleWidget + the data.

On Linux there shouldn't be a problem with this approach since basically you 
only need to depend on the libmarblewidget package of the distribution (it's 
pretty unusual there to include the library code with your application 
package).
On Windows it's a bit different: there you most likely want to ship the 
library executable together with some map data.

> I am also hoping to get the application working in Windows (currently
> developing in Arch and testing in Ubuntu) and was wondering what kind
> of problems I might run into with that. I read that the marble-qt
> version did not do automatic map downloads, does this mean
> openstreetmaps/etc will not work if I use the widget in a qt-only
> application?

OpenStreetMaps will work with automatic map download. No worries:  Marble is 
using XML files to specify the properties of a map: e.g. the name, a short 
description and the Url of the map server.  Using the Url of the map further 
data can be downloaded automatically without problems. Every map 
(OpenStreetMap, Satellite View, Earth at Night, etc.) has got such an XML file 
associated.  And Marble already ships with several of them (including some 
"prefetched" data to allow for offline usage).

In the KDE version you can click a menu entry that will allow you to easily 
download more such XML files: That means that you can easily install more 
maps, like historic maps, a map of Venus, a map of Mars, etc. In the Qt 
version you need to use a web browser to do this. Once each of the XML files 
is downloaded all the further data for each of the maps is downloaded 
automatically. 

Got the idea? :-)
 
> One of the things I was unable to accomplish with the other library I
> was using (QMapWidget) was automatic resizing. My application has an
> area split (with an adjustable splitter) with the map on one side.

That should be no problem since Marble automatically deals with layouts. If 
there is still a feature missing don't hesitate to make a feature request.

> I
> was unable to figure out how to get the map to fill the entire space
> and have it resize when the window changed shape (resize event does
> not take splitter into account) or when the splitter was moved.
> Judging by the tutorials, it looks like marble-widget uses a
> diffferent system for sizing, so I don't think it will really be an issue.

Cool. Just tell us if you run into problems and we'll try to help you.
 
Best Regards,

Torsten

> > 
> > Am Samstag, 11. September 2010 08:46:11 schrieb Doug Penner:
> >> Hi, I am developing a geocaching application (qgeoview) in qt with the
> >> GPL3 license and would love to try the marble widget to see how it
> >> works compared to the other qt map widgets (of which I have sadly
> >> found very few).
> > 
> > Nice coincidence. I just looked on thursday into what it would take to
> 
> create
> 
> > a Geocaching plugin for Marble, which would maybe query the different
> 
> online
> 
> > caching sites and display the geocaches on the Marble map.
> > Maybe that could be nicely combined with our new Bookmark feature. So
> 
> maybe
> 
> > you could look into this ... ;-)
> > 
> >> The Marble homepage mentions a Marble Widget for developers, but I am
> >> unable to find a download for just the widget.
> > 
> > Ok, we'd like to improve our homepage. Any suggestions how we should
> > maybe improve it so that people can better find it? :-)
> > 
> >> I can only find the
> >> complete Marble and Marble-QT. I downloaded both sources and tried to
> >> find a marble-widget subfolder but found that MarbleWidget.h (and
> >> .cpp) were in the libs folder mixed with all sorts of other libraries.
> > 
> > In the source folder basically everything below marble/src/lib
> > is part of the widget. The MarbleWIdget class itself is located at
> > 
> > marble/src/lib/marblewidget.h
> > 
> > MarbleWidget is basically comparable to a widget like QWebView. So it
> > contains a ready-made solution for providing everything maps: Parsing of
> > different file formats (GPX, KML, etc.), Location API, Plugins, etc.
> > 
> > You've probably followed http://edu.kde.org/marble/obtain.php already for
> > compiling Marble, so the next step would be to follow the Tutorial:
> > 
> > 
> > There is a tutorial (with the API docs referenced) here:
> > 
> > http://techbase.kde.org/Projects/Marble/MarbleCPlusPlus
> > http://techbase.kde.org/Projects/Marble/MarbleMarbleWidget
> > http://techbase.kde.org/Projects/Marble/MarbleSignalsSlots
> > http://techbase.kde.org/Projects/Marble/MarbleGeoPainter
> > http://techbase.kde.org/Projects/Marble/LayerInterface
> > 
> > For creating a GeoCaching plugin you might want to read about creating
> 
> online
> 
> > plugins:
> > 
> > http://techbase.kde.org/Projects/Marble/OnlineServices
> > 
> > You can also join us on #marble on IRC for further questions. There's
> 
> also a
> 
> > Marble Facebook Group at
> > 
> > http://www.facebook.com/group.php?gid=346064806033
> > 
> >> I'm sure I could (with some work) follow the #include's and find all
> >> the required files, but I was wondering if there was a separate
> >> download that contained "just" the widget.
> > 
> > The application itself is usually just a very thin layer above the
> > widget. The widget provides all the capabilities like location
> > detection, GPX
> 
> support,
> 
> > KML support and lots of other stuff.
> > 
> >> I was also wondering if there was an API listed anywhere's or if I
> >> should just go by the comments in the source code.
> > 
> > http://api.kde.org/4.x-api/kdeedu-apidocs/marble/html/
> > 
> >> My project is still in the very early stages (a few features
> >> implemented, replacing a few parts right now). You can check it out at
> >> http://code.google.com/p/qgeoview/ if you want to know more.
> > 
> > I'll give it a try. :-)
> > 
> > Best Regards,
> > 
> > Torsten
> > 
> >> Thank You
> >> ~Doug Penner
> >> 
> >> _______________________________________________
> >> Marble-devel mailing list
> >> Marble-devel at kde.org
> >> https://mail.kde.org/mailman/listinfo/marble-devel
> 
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel


More information about the Marble-devel mailing list