Closed palmerj closed 11 months ago
Simlar to this Issue it poses the question where the user would find the setting to control whether to search inside the current Canvas or world wide. This could also result in bad user experiences, when results are not found due to canvas restrictions.
A way could be to parse all results and group them into results within the current Canvas and result outside the canvas, using the 'group' attribute (https://qgis.org/api/classQgsLocatorResult.html#ad08b1fd1fcda583298937140bb8070c6)
@rduivenvoorde Let me know if that would be a feature you'd like to see.
See the other issue: I think IF we would do such a thing, I think it would be better to do this over al locators?
Although there is also something to say for "just implement it here, and see what others think etc etc"
So implementing over all locators would actually involve modifying the Qgs and PyQgs source, wouldn't it? Also it would mean spatially evaluating the actual results, if they are in- or outside the canvas. This would be a rather big undertaking and perhaps this is outside the scope of this issue.
Maybe I'll play around with the idea on my fork of your repo and report back.
@cxcandid implemented this, and calls it 'local search': by prepending &
before your text string, you the plugin sents the bbox to Nominatim in version 0.3.1
So I think we can close this one?
Also note that in 0.3.1 we show nice icons AND there is a rubberband in case the result is a polygon
e.g https://nominatim.openstreetmap.org/ui/search.html?q=84+Tio+Tio+Road&viewbox=174.82236%2C-41.32112%2C174.83338%2C-41.32382