[QGIS-Developer] Generic use of QgsLocator and friends?
Richard Duivenvoorde
rdmailings at duif.net
Tue Sep 26 00:03:55 PDT 2017
On 26-09-17 06:43, Nyall Dawson wrote:
>> - is it a good idea to make it a reusable component for geocoder(s0?
> *maybe*. Is there any reason NOT to use the existing, all powerful,
> integrated with everything locator widget? The intention with the
> creation of the locator was specifically to avoid the need for
> multiple different search widgets reimplemented by each plugin and
> cluttering up the interface. I personally can't see any reason not to
> include geolocator results here too.
>
>> - is it possible to make the results go down instead of up (as I think
>> these geocoders should be somewhere in the toolbars)
> Not in the current API - it's hardcoded at
> https://github.com/qgis/QGIS/blob/master/src/gui/locator/qgslocatorwidget.cpp#L64
> . But this could be exposed to the public API for the widget if
> there's a strong use case.
Hi Nyall,
Thanks for your answer (and the QgsLocator :-) ). I have the widget
working in a PluginToolbar after my posting.
I agree with your point that multiple search-like widgets would clutter
the interface, but I think a generic geocoder search widget could be a
good candidate for for a second search widget
Again plz see: https://github.com/qgis/QGIS-Enhancement-Proposals/issues/64
Some arguments:
- historically I would look for it somewhere in the toolbar :-)
- I hope/think that we will end up with a long list of geocoder
implementations (as plugins I already see a LOT of different national
versions...)
- the results of geocoders (like full address lines) can be pretty long.
So I think a (dockable) widget (like a toolbar) would be most usefull
for this
- I think geocoders can be a little different beast as other locators,
having different properties/functions too
- one result list(!) of a geocoding search could be enough to navigate
around (like searching for a street often results in different
addresses/houses, so you can find individual houses by clicking on the
individual addresses for some time).
Not sure what others think though.
But I could start with using current Locator Widget (thinking about
using the Nominatim as an example).
Some features I would be happy with then:
- make the search a dockable widget (so free to use it in whatever toolbar)
- make the number of results a setting (now a hardcoded 30)
Regards,
Richard
More information about the QGIS-Developer
mailing list