[Marble-devel] the World Clock plasmoid
Torsten Rahn
rahn at kde.org
Thu Oct 9 10:05:16 CEST 2008
Hi Harry,
On Thursday 09 October 2008 05:04:53 Henry de Valence wrote:
> I started tinkering with the world clock plasmoid a bit again, and there
> are two things I'm wondering about:
Yeah, I got it finally running the first time on my laptop and it's awesome :-)
I hope you'll get it implemented soon that one can actually set a fixed
position, so we can make it part of the default install (soon! :-) .
(oh and it would be cool if it could run fullscreen eventually as the plasma
background -- yeah, that's just a feature request ;-)
> a) I want to have it able to show a certain area of the world rather than
> the whole thing. Aside from the suggestion of having a combobox which has
> eg: World
> Africa
> Asia
> Europe
> North America
> Oceania
> South America
> or something like that, is there a practical way to have the user pick
> exactly what they want to see?
No, but you have different options:
1.) the Bounding Box way
One way of approaching this "user story" (hi jmho!) would be to define that
area via a boundingbox (which we refer to as latLonBox or latLonAltBox).
We are currently only able to determine the latLonAltBox from the viewport. In
that sense your feature request is about allowing to set the viewport by
specifying the latLonAltBox. That's a bit more of a challenge as the
relationship between both isn't exactly a bijection
(http://en.wikipedia.org/wiki/Bijection): think of e.g. the case where you
look directly at the north pole -- it could be either done with greenland
being displayed at the bottom, top, left or right depending on the rotation --
still the latLonAltBox would always contain a latitude between 0-90 deg and
longitudes that are always between -180 and 180 deg. So the issue is a little
bit less straight forward.
2.) The KML-Makes-Patrick-Happy way
That being said one can solve this issue in a different way (and hence make
Patrick happy): By implementing the KML "LookAt" attribute:
http://code.google.com/apis/kml/documentation/kmlreference.html#lookat
LookAt is derived from AbstractView and hence can be specified as a property of
a placemark:
http://code.google.com/apis/kml/documentation/kmlreference.html#placemark
That would however require that one would either set the values manually or
one would automatically guess a somewhat sane default.
3.) the greedy-selfish way ;-)
the third and most pragmatic way for now would be that you just store the
center coordinates and zoom factor for the objects of your list of objects
into a hash table that is part of your application. With that approach you can
have your feature today already ;-)
I'd recommend to start off with the 3rd suggestion and maybe help patrick
afterwards with 2.) so you can refactor it in the future. ;-)
Torsten
> b) (the tricky one) Using placemarks to show the location of the TZ instead
> of painting it on afterwards.
>
> Doing this makes it easier + it lets the user switch between doing the
> pretty way, where it shows a dot and the time is in nice white letters over
> the map, to the more practical way, which is having each placemark showing
> its time, which lets you see everything immediately.
>
> But, I think that the best way to do this involves direct use of geodata
> objects, because after making the placemarks, I will want to be constantly
> manipulating them. I want to change their visibility and their text, for
> one, and maybe more. I can't use a saved KML file because the timezones I
> get are dependent on the system time zone file.... though the actual zones
> don't change, the locations specified do; does *every* system have the
> proper TZ data for Pacific/Kiritimati ? Right now it uses all the zones it
> gets with locations defined, and this could be different from system to
> system.
>
> They'll be altered whenever the mouseover changes which zone it's closest
> to or possibly also whenever the time changes.
>
> I would rather use geodata objects because it's easier and there's no
> mucking about with XML generation & parsing every time the mouse moves; I
> already know what I want to be changing about these geodata objects and I
> know how, and I don't like the idea of having to go through two extra,
> unnecessary steps, especially since the plasmoid is already a bit big as
> is; adding one to the desktop takes about a second on my machine.
>
> If there's some other, better way to do this, I'd be interested to know of
> it, but it seems as though doing it that way would be the nicest.
>
> Henry de Valence
>
> P.S.: supposing the plasmoid got to a usable state, could it be added to
> the Marble CMake stuff similar to some of the other edu apps?
> _______________________________________________
> 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