QGIS/python/core/auto_generated/geocoding/qgsgooglemapsgeocoder.sip.in
Nyall Dawson 3f6b490218 Sipify
2025-04-02 11:11:10 +10:00

122 lines
3.9 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocoding/qgsgooglemapsgeocoder.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsGoogleMapsGeocoder : QgsGeocoderInterface
{
%Docstring(signature="appended")
A geocoder which uses the Google Map geocoding API to retrieve results.
This geocoder utilizes the Google Maps "geocoding" API in order to
geocode strings. The Google Maps service is not publicly available, and
accordingly an API key must be first obtained from Google and specified
when constructing this class.
.. warning::
The user is responsible for managing their Google Maps API key, and ensuring
that the use of this geocoder does not exceed their usage limits! Excessive use
of the Google Maps geocoder API can result in charges being applied to the API key
holder.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgsgooglemapsgeocoder.h"
%End
public:
QgsGoogleMapsGeocoder( const QString &apiKey, const QString &regionBias = QString() );
%Docstring
Constructor for QgsGoogleMapsGeocoder.
The ``apiKey`` argument must specify a valid Google Maps API key. All
use of this geocoder will be associated with the specified key for
Google's billing purposes!
Optionally, a ``regionBias`` can be specified to prioritize results in a
certain region. The ``regionBias`` argument must be set to a two letter
country code top-level domain value, e.g. "gb" for Great Britain.
%End
virtual Flags flags() const;
virtual QgsFields appendedFields() const;
virtual Qgis::WkbType wkbType() const;
virtual QList< QgsGeocoderResult > geocodeString( const QString &string, const QgsGeocoderContext &context, QgsFeedback *feedback = 0 ) const;
QUrl requestUrl( const QString &address, const QgsRectangle &bounds = QgsRectangle() ) const;
%Docstring
Returns the URL generated for geocoding the specified ``address``.
%End
QgsGeocoderResult jsonToResult( const QVariantMap &json ) const;
%Docstring
Converts a JSON result returned from the Google Maps service to a
geocoder result object.
%End
void setEndpoint( const QString &endpoint );
%Docstring
Sets a specific API ``endpoint`` to use for requests. This is for
internal testing purposes only.
%End
QString apiKey() const;
%Docstring
Returns the API key which will be used when accessing the Google Maps
API.
.. seealso:: :py:func:`setApiKey`
%End
void setApiKey( const QString &key );
%Docstring
Sets the API ``key`` to use when accessing the Google Maps API.
All use of this geocoder will be associated with the specified key for
Google's billing purposes!
.. seealso:: :py:func:`apiKey`
%End
QString region() const;
%Docstring
Returns the optional region bias which will be used to prioritize
results in a certain region.
.. seealso:: :py:func:`setRegion`
%End
void setRegion( const QString &region );
%Docstring
Sets the optional ``region`` bias which will be used to prioritize
results in a certain region.
The ``region`` argument must be set to a two letter country code
top-level domain value, e.g. "gb" for Great Britain.
.. seealso:: :py:func:`region`
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geocoding/qgsgooglemapsgeocoder.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/