Version: (using Devel) OS: Linux Installed from: Compiled sources The map search is supposed to return pictures taken on the area you select using CTRL + mouse drag. You can select an area doing so but pictures found as a resuld are from the entire map visualized at the moment you performed the search. e.g.: I have pictures taken in annecy (France) and winchester (England). If i perform a search in the area of london when the entire europe is visualized also pictures from annecy are visualized as result. If i zoom in to see only great britain and perform a search oved Belfast, pictures from winchester are visualized as result.
I also observe this behaviour. On the konsole I get for different selection regions: Selection region: ( 120 , 123 ) ( 202 , 191 ) West: 8.88512 North: 57.8784 East: 11.2337 South: 56.5583 Selection region: ( 18 , 6 ) ( 226 , 247 ) West: 8.88512 North: 57.8784 East: 11.2337 South: 56.5583 Ie, the lat-lon-box corresponds to the entire visible region. This output comes from marble, where the conversion from the selection region should be performed in void MarbleWidget::setSelection(const QRect& region) Looking at the code, d->m_map->viewParams()->viewport() is used and the selected region (region.topLeft(), region.bottomRight() ) is not used. So IMO, this bug should be transferred to marble.
this bug is due to AbstractProjection::latLonAltBox() not using the QRegion parameter. I transfer this to marble because of that.
Created attachment 29729 [details] return the right latlonbox The attached patch tries to return the right lat-lon-box for a selection with the mouse. With this the geographical search from within digikam seems to work correctly. As GeoDataLatLonAltBox AbstractProjection::latLonAltBox appears to be called also on other occasions, the patch needs review (especially, because on block of code has to be commented out).
Great. Next to the Oxygen style thing (now fixed -- at least with KDE 4.2) this was the other remaining bug remaining from the previous "big" one. And yes I think this patch brings us closer to the "real" solution. Without looking at the whole issue closely I think that (IIRC) the whole algorithm uses the center point of the screen and the related coordinates as a reference point for the selected region. Arnd: could you check this? (I'm not entirely sure, so I might be wrong about it) Otherwise: feel free to commit this patch and thanks for taking care of the issue! :-)
Updated patch has been committed to svn: r904264 marble/trunk/KDE/kdeedu/marble/src/lib/Projection/AbstractProjection.cpp: Make latLonAltBox respect the given screen region. (Thanks to Torsten and Patrick for their help!). With this the original issue, that the selected rectangular region is not respected for a geo-search in digikam, appears solved (i.e. I mark this bug as fixed).