[QGIS-Developer] Generic use of QgsLocator and friends?

Nyall Dawson nyall.dawson at gmail.com
Sun Oct 1 17:06:05 PDT 2017


On 26 September 2017 at 17:03, Richard Duivenvoorde <rdmailings at duif.net> wrote:
> Hi Nyall,
>
> 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

I (respectfully!) disagree. I think we diminish the usefulness of both
the geocoder and the locator if we split them into separate widgets,
further complexify the UI, and make things harder for plugin devs who
then need to decide between two mostly-overlapping interfaces to
utilise.

If there's issues or omissions which prevent the locator being awesome
for geocoding, let's just fix these instead of splitting things up.

> Some arguments:
> - historically I would look for it somewhere in the toolbar :-)

Problem here is that the toolbar is a very "fluid" piece of UI. Every
QGIS install I sit in front of has a different toolbar layout, and it
takes me time to locate buttons in that install. And i know EXACTLY
what I'm looking for. While this flexibility can be good, it also
presents a very real problem for people writing documentation and
training material for QGIS.

That's why I think the fixed "locator is ALWAYS in the bottom left"
rule is a valid approach for a UI component of this importance. It's
always there, regardless of what plugins and UI tweaks a user has
applied.

> - make the search a dockable widget (so free to use it in whatever toolbar)

Given the above, I'm a -1 here. BUT if the only other alternative is
two separate locator widgets, then I'll bend and compromise, and
suggest: "locator is in the bottom left. But you can turn on a
"locator" toolbar, and if you do that, the widget moves from the
bottom left up to the toolbar. Close the toolbar, and it goes back to
the lower left."

> - 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...)

Me too!

> - 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 we just tweak the display of results in the locator to better
meet this need. There was already some discussion about this resulting
from a presentation at Nodebo, but no concrete suggestions/mockups
have emerged yet.

> - I think geocoders can be a little different beast as other locators,
> having different properties/functions too

Can you expand on this? When I wrote the locator it was with geocoders
in mind too, and there's already been some implemented for the
locator. I think it's just a refinement required here, not a restart.

> - 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).

I can't see any reason why this couldn't be done through the locator.
I'd suggest something like hovering over a result "flashes" the
geometry in the canvas as a quick preview (See
https://github.com/qgis/QGIS/pull/5268)

> 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)

Configurable to users? Or plugins devs?

More implementable suggestions like these would be very welcome :)
Locator is still very young, and we've got time to tweak the API
before freeze.

Please don't read this email in the wrong way - i don't want it to
come across aggressive. Rather I'm also passionate about making
geocoding/searching better in QGIS, and I'm really glad to see this
discussion happening.

Nyall


More information about the QGIS-Developer mailing list