Class: QgsGeocoderLocatorFilter¶
An adapter class which implements a locator filter populated from a
QgsGeocoderInterface.
This class implements the required logic to bridge a class which
implements the QgsGeocoderInterface interface to a
QgsLocatorFilter. It allows easy creation of a locator
filter from a geocoder.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
An abstract base class which implements a locator filter populated from a |
|
Abstract base class for filters which collect locator results. |
|
- class qgis.gui.QgsGeocoderLocatorFilter[source]¶
Bases:
QgsAbstractGeocoderLocatorFilter- __init__(name: str | None, displayName: str | None, prefix: str | None, geocoder: QgsGeocoderInterface | None, canvas: QgsMapCanvas | None, boundingBox: QgsRectangle = QgsRectangle())
Constructor for QgsGeocoderLocatorFilter.
The
nameargument specifies a unique name for the filter. This should be an untranslated string identifying the filter.The
displayNameargument must specify a translated, user-friendly name for the filter.The
prefixargument specifies the prefix character(s) for this filter. Prefixing a search with these characters will restrict the locator search to only include results from this filter. Theprefixmust consist of at least three characters.The
geocodermust specify an instance of a class which implements theQgsGeocoderInterfaceinterface. Ownership ofgeocoderis not transferred, and the caller must ensure thatgeocoderexists for the lifetime of this filter.The
boundingBoxargument specifies the geographic bounding box, in WGS84, covered by the filter.- Parameters:
name (Optional[str])
displayName (Optional[str])
prefix (Optional[str])
geocoder (Optional[QgsGeocoderInterface])
canvas (Optional[QgsMapCanvas])
boundingBox (
QgsRectangle= QgsRectangle())