[Marble-devel] Marble Widget usage

Doug Penner darwinsurvivor at gmail.com
Mon Sep 13 11:57:51 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010-09-13 01:24, Torsten Rahn wrote:
> 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.
>
I have no idea what licensing opencaching uses (I'm assuming it would
be more open that geocaching.com). I am assuming you mean
opencaching.ork.uk? I am personally in Canada so I've never really
checked out many caching sites for other countries. I'll definitely
check it out in the future though.
>> 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?
Pocket Queries are only available to subscribed members ($30/year I
believe). The way they work is that you enter a bunch of paramaters
(location, radius, cache types, etc) up to a limit (I forget the
limit, but it's pretty decent). You also pick how often the queries
are run (daily, weekly, etc). The queries are all performed on a
dedicated server that generates custom gpx files for each one then it
zip's it up and emails it to you.

Groundspeak's terms of service are quite specific that you are not
allowed to redistribute these files. They do not claim copyright on
the data within the query, the problem is that people that "log" the
cache own the copyright to their logs and the Terms of service state
that those rights remain with the original author. This means that due
to the logs being in the pocket queries, sharing or posting the
queries is prohibited, but they do not care if you
filter/accumulate/put in them into a database, as long as you are the
only one that is using them.

I believe the reason for their stance on application API denials is
for 2 reasons. 1) Server strain. geocaching.com gets a LOT of traffic
and automated scripts could cause a lot of havoc. 2) Advertising.
groundspeak gets most of it's money (to pay for the servers) from
advertising, merchandise and subscriptions. Having API-only access
would defeat almost all of their revenue streams.
>
>> 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 had actually tried going to http://techbase.kde.org/Projects/Marble/
(with a trailing /) and found nothing, but the other day I did it
without the trailing / and it worked :P It might be an idea however to
add a link to that page at the bottom of http://edu.kde.org/marble/
where it talks about the widget. In fact, the edu.kde.org domain
doesn't seem to have any mention of the widget aside from that
paragraph at the bottom. Linking the 2 pages would probably alleviate
a lot of confusion on behalf of curious developers.
>
>> 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.
Once I "installed" the application (make install) the problems have
pretty much gone away. The only glitch I've found so far is that
qtcreator doesn't add "marble/" to the includes.
qtcreator adds
#include "MarbleWidget.h"
instead of
#include "marble/MarbleWidget.h"
Every time I recompile the ui (mainwindow.ui), the header
(mainwindow.h) gets recompiled and I have to re-add the "marble/" part
for it to compile. Is there any way to fix this locally?
>
>> 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? :-)
Cool. So if there is a particular map that I want to have available, I
should be able to simply add the xml file to the src of my
application? Sounds pretty simple to me :D
>
>> 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.
I did some tests with the widget in different configurations and I
have yet to get it to not work perfectly :D
>
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyN9Z8ACgkQznigyIaDZ0VyFACgk91BMDTc0rQhK17e5htcBq1y
AlUAn0H0tveiNffwBDvEAh830lVrm7yg
=X5zL
-----END PGP SIGNATURE-----



More information about the Marble-devel mailing list