Summary: | map search returns photos from what you see on the map and not the area you select | ||
---|---|---|---|
Product: | [Applications] marble | Reporter: | Salvatore Brigaglia <opensourcecat> |
Component: | general | Assignee: | Torsten Rahn <rahn> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arnd.baecker, ps_ml |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | return the right latlonbox |
Description
Salvatore Brigaglia
2008-12-27 19:27:24 UTC
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). |