mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			115 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			115 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.pl 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 ®ionBias = 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 QgsWkbTypes::Type 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 ®ion );
 | 
						|
%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.pl again   *
 | 
						|
 ************************************************************************/
 |