Class PeliasGeocoder
A geocoder which uses the Pelias geocoding API to retrieve results. More...
#include <peliasgeocoder.h>
Inherits the following classes: QgsGeocoderInterface
Public Functions
| Type | Name |
|---|---|
| PeliasGeocoder (const QString & endpoint=QString()) |
|
| QgsFields | appendedFields () override const |
| QString | endpoint () const |
| Flags | flags () override const |
| QList< QgsGeocoderResult > | geocodeString (const QString & string, const QgsGeocoderContext & context, QgsFeedback * feedback=nullptr) override const |
| QgsGeocoderResult | jsonToResult (const QVariantMap & json) const |
| QUrl | requestUrl (const QString & address, const QgsRectangle & bounds=QgsRectangle()) const |
| double | requestsPerSecond () const |
| void | setEndpoint (const QString & endpoint) |
| void | setRequestsPerSecond (double number) |
| Qgis::WkbType | wkbType () override const |
Detailed Description
This geocoder utilizes the Pelias geocoding API in order to geocode strings from an endpoint server.
Since:
QField 1.9
Public Functions Documentation
function PeliasGeocoder
explicit PeliasGeocoder::PeliasGeocoder (
const QString & endpoint=QString()
)
Constructor for PeliasGeocoder.
The endpoint argument is used to specify an endpoint to use for request.
function appendedFields
QgsFields PeliasGeocoder::appendedFields () override const
function endpoint
QString PeliasGeocoder::endpoint () const
Returns the API endpoint used for requests.
See also: setEndpoint()
function flags
Flags PeliasGeocoder::flags () override const
function geocodeString
QList< QgsGeocoderResult > PeliasGeocoder::geocodeString (
const QString & string,
const QgsGeocoderContext & context,
QgsFeedback * feedback=nullptr
) override const
function jsonToResult
QgsGeocoderResult PeliasGeocoder::jsonToResult (
const QVariantMap & json
) const
Converts a JSON result returned from the Pelias service to a geocoder result object.
function requestUrl
QUrl PeliasGeocoder::requestUrl (
const QString & address,
const QgsRectangle & bounds=QgsRectangle()
) const
Returns the URL generated for geocoding the specified address.
function requestsPerSecond
inline double PeliasGeocoder::requestsPerSecond () const
Returns the number of requests per seconds to the endpoint.
See also: setRequestsPerSecond()
function setEndpoint
void PeliasGeocoder::setEndpoint (
const QString & endpoint
)
Sets a specific API endpoint to use for requests. This is for internal testing purposes only.
See also: endpoint()
function setRequestsPerSecond
inline void PeliasGeocoder::setRequestsPerSecond (
double number
)
Sets the number of request per seconds to the endpoint.
See also: requestsPerSecond()
function wkbType
Qgis::WkbType PeliasGeocoder::wkbType () override const
The documentation for this class was generated from the following file src/core/peliasgeocoder.h