[KPhotoAlbum] Map implementation
Tobias Leupold
tobias.leupold at web.de
Tue Oct 21 12:38:30 BST 2014
Hi list/Johannes/Jesper :-)
Just a brainstorming about what we could do with the new map code, also having
in mind the effort to add a map showing all selected photos (as Jesper started
to implement in the GPS branch):
What about creating a new directory, e. g. simply "Map" that keeps the classes
providing the map functionality? The AnnotationMap class then could be e. g.
"MapView", implemented in a unified way, so that both the annotation dialog
and the (still to write/adapt) image selection map view could use it. We could
also create a popup accessible from the viewer like "Show photo on map" in
this way.
About the coordinates: we could create a small class caching coordinates. At
the moment, the coordinates are read out of the file when it's displayed. When
another image is shown and the first is shown again, they are read out again.
With a cache, we would avoid this. Not that I think I would be able to
implement something like that, but if we add support for multiple images
later, this cache could also gather the data asynchronously, when a large list
of images is requested (either by the annotation dialog or by the map view),
we could then add coordinates as they are read and calculated (also perhaps a
good moment to dive into C++/Qt a bit more for me ;-).
For the coordinate cache, we could also simply use the existing
KGeoMap::GeoCoordinates class, as we need libkgeomap for all this anyway.
I'm not completely sure if I'm right here, but adding support for thumbnails
could be implemented in the MapMarkerModelHelper, using the existing
(asynchronously working?) thumbnail requester, couldn't it? For the current
one-image display of the annotation dialog, we would not need this, but,
thinking of asynchronous coordinate fetching, we could display all selected
images as well ...
What do you think?
Cheers, Tobias
More information about the Kphotoalbum
mailing list