<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>see
<a class="moz-txt-link-freetext" href="https://qgis.org/pyqgis/master/core/QgsGeocoderContext.html#qgis.core.QgsGeocoderContext">https://qgis.org/pyqgis/master/core/QgsGeocoderContext.html#qgis.core.QgsGeocoderContext</a></p>
    <p>You can use it to define an area of interest and to specify
      transformation settings.<br>
    </p>
    <p>I guess this should work:</p>
    <p>geocoder_context =
      QgsGeocoderContext(QgsProject.instance().transformContext())<br>
      geocoder = QgsGoogleMapsGeocoder(apiKey="foo")<br>
      for geocoder_result in geocoder.geocodeString("bar",
      geocoder_context):<br>
          print(geocoder_result)</p>
    <p>Cheers, Hannes</p>
    <div class="moz-cite-prefix">On 8/7/25 17:05, Guillermo D'Angelo via
      QGIS-Developer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:1134465087.37954969.1754579151098.JavaMail.zimbra@correo.mides.gub.uy">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div id="zimbraEditorContainer"
style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"
        class="40">
        <div>Hi there!</div>
        <div>Does somebody have an example or snippet on how to use the
          "QgsGoogleMapsGeocoder" class from PyQGIS?</div>
        <div><br data-mce-bogus="1">
        </div>
        <div>I want to geocode a string using the method "<!--StartFragment--><em
            class="property"><span class="w"></span></em><span
            class="sig-name descname"><span class="pre">geocodeString</span></span><span
            class="sig-paren"></span><!--EndFragment-->" but I don't
          undestand what is the qgis.core.QgsGeocoderContext class and
          how to use it.</div>
        <div><br data-mce-bogus="1">
        </div>
        <div>Thanks a lot.</div>
        <div><br>
        </div>
        <div data-marker="__SIG_PRE__">
          <table width="87%" cellspacing="9" cellpadding="3" border="0">
            <tbody>
              <tr>
                <td colspan="2">
                  <hr size="1" noshade="noshade"></td>
              </tr>
              <tr valign="top">
                <td width="280'" valign="middle"><img
src="https://intranet.mides.gub.uy/mides/firma/firma-correo-mides.png"
                    width="280" moz-do-not-send="true"></td>
                <td style="border-left:dotted #cccccc"><span
style="font-family:'arial' , 'georgia';font-size:9pt"> <span
                      style="font-weight:bold">Guillermo D'Angelo</span><br>
                    Encargado del Departamento de Geografía<br>
                    División de Trabajo de Campo<br>
                    Dirección Nacional Transferencias Monetarias y
                    Análisis de Datos<br>
                    Av. 18 de julio 1453 | Piso 1<br>
                    Tel.: (+598) 2400 0302, int. 1262<br>
                  </span><a href="mailto:"
rel="nofollow noopener noreferrer nofollow noopener noreferrer nofollow noopener noreferrer"
                    target="_blank" moz-do-not-send="true">gdangelo@mides.gub.uy</a><br>
                  <a href="http://www.mides.gub.uy"
rel="nofollow noopener noreferrer nofollow noopener noreferrer nofollow noopener noreferrer"
                    target="_blank" moz-do-not-send="true">www.mides.gub.uy</a><br>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <div class="moz-signature">
      <div>
        <table style="direction: ltr; color: rgb(0, 0, 0);">
          <tbody>
            <tr>
              <td
style="padding-right: 4.5pt; vertical-align: top; width: 192px; height: 37px;">
                <p
style="margin: 0; font-family: 'Ubuntu Medium', Ubuntu, sans-serif; font-size: 9pt; color: black; font-weight: 500;">
                  Johannes Kröger
                </p>
                <p
style="margin: 0; font-family: 'Ubuntu Light', Ubuntu, sans-serif; font-weight: 300; font-size: 8pt; color: black;">
                  GIS-Entwickler/-Berater
                </p>
                <br>
              </td>
            </tr>
            <tr>
              <td
style="width:192px; height:39px; text-align:left; padding:0; margin:0; overflow:visible;">
                <div style="width:140%; height:140%;">
                  <svg aria-label="WhereGroup Logo"
                    preserveAspectRatio="xMinYMin meet"
                    style="display:block" viewBox="0 0 720 211"><path
d="M221.466 82.996q4.116 13.725 8.22 24.883 4.102 11.158 8.084 20.462 2.934-10.08 5.915-23.735 2.982-13.654 5.74-28.869h5.724a793 793 0 0 1-3.138 17.138 371 371 0 0 1-3.285 15.201 326 326 0 0 1-3.616 13.826 238 238 0 0 1-4.124 13.015h-6.249l-4.016-9.75a425 425 0 0 1-3.98-10.031 407.502 407.502 0 0 1-7.928-22.746 426 426 0 0 1-4.021 11.984q-1.994 5.642-3.957 10.809c-1.963 5.167-2.633 6.789-3.969 10.034a577 577 0 0 1-4.102 9.699h-6.119a216 216 0 0 1-4.242-13.031 259 259 0 0 1-3.6-13.836 376 376 0 0 1-3.182-15.197 943 943 0 0 1-3.06-17.115h5.978q1.325 7.506 2.674 14.726a412 412 0 0 0 2.854 13.963 382 382 0 0 0 3.067 12.768 254 254 0 0 0 3.146 11.147 6657 6657 0 0 0 7.852-20.524q4.207-11.05 8.293-24.821zM267.188 134.916V75.875h5.551v16.172a35 35 0 0 1 5.551-1.58 29 29 0 0 1 5.637-.555q5.124 0 8.539 1.452t5.465 4.142 2.861 6.447q.811 3.759.811 8.283v24.68h-5.551V112.03q0-4.696-.64-7.942-.642-3.244-2.135-5.295-1.496-2.049-3.972-2.946t-6.233-.897a20.5 20.5 0 0 0-3.116.256q-1.666.256-3.117.555t-2.605.64q-1.153.343-1.494.513v38.001h-5.552zM314.838 112.799q0-5.806 1.664-10.12 1.666-4.311 4.355-7.216 2.69-2.903 6.148-4.312a18.75 18.75 0 0 1 7.131-1.409q8.112 0 12.938 5.294 4.824 5.296 4.824 16.311 0 .684-.042 1.366-.044.685-.128 1.281h-30.999q.256 8.113 4.014 12.468t11.956 4.355q4.524 0 7.173-.854 2.646-.853 3.843-1.451l1.024 4.782q-1.197.684-4.483 1.622c-3.286.938-4.769.939-7.729.939q-5.807 0-9.905-1.708-4.1-1.707-6.747-4.782c-2.647-3.075-3.045-4.483-3.842-7.301q-1.197-4.227-1.195-9.265m31.34-3.502q-.171-6.917-3.245-10.759t-8.71-3.843q-2.99 0-5.338 1.195a13.6 13.6 0 0 0-4.099 3.203q-1.751 2.007-2.733 4.654a19.1 19.1 0 0 0-1.152 5.55zM381.018 89.913q2.733 0 5.166.427 2.433.429 3.373.854l-1.109 4.782q-.685-.341-2.775-.726-2.094-.384-5.509-.384-3.586 0-5.764.513-2.178.512-2.861.854v38.684h-5.55v-42.1q2.133-.939 5.892-1.921 3.756-.983 9.137-.983M396.986 112.799q0-5.806 1.666-10.12 1.665-4.311 4.354-7.216 2.69-2.903 6.148-4.312c3.458-1.409 4.683-1.409 7.131-1.409q8.112 0 12.938 5.294 4.825 5.296 4.825 16.311 0 .684-.043 1.366-.044.685-.128 1.281h-30.999q.256 8.113 4.014 12.468t11.955 4.355q4.526 0 7.174-.854 2.646-.853 3.843-1.451l1.024 4.782q-1.197.684-4.483 1.622-3.289.939-7.728.939-5.809 0-9.906-1.708c-4.097-1.708-4.982-2.732-6.746-4.782q-2.649-3.075-3.843-7.301-1.196-4.227-1.196-9.265m31.341-3.502q-.171-6.917-3.245-10.759t-8.71-3.843q-2.99 0-5.338 1.195a13.6 13.6 0 0 0-4.099 3.203q-1.752 2.007-2.732 4.654a19 19 0 0 0-1.153 5.55zM487.932 106.906h5.808v26.388q-1.623.684-6.362 1.75-4.74 1.067-11.656 1.067-5.808 0-10.76-2.049a24.3 24.3 0 0 1-8.583-5.936q-3.63-3.886-5.679-9.649c-2.049-5.763-2.049-8.241-2.049-13.194q0-7.429 2.22-13.193 2.219-5.764 6.021-9.65a25.85 25.85 0 0 1 8.839-5.935q5.037-2.049 10.76-2.049 6.574 0 10.845 1.409 4.27 1.409 6.234 2.69l-1.965 4.953q-2.391-1.707-6.489-2.775-4.099-1.067-8.882-1.067-4.442 0-8.368 1.623-3.929 1.623-6.832 4.868t-4.568 8.027-1.665 11.101q0 5.894 1.366 10.632 1.365 4.74 4.142 8.113 2.776 3.374 6.874 5.166c4.098 1.792 5.893 1.794 9.479 1.794q4.355 0 7.301-.47 2.946-.468 3.971-.897v-22.717zM523.627 89.913q2.732 0 5.166.427 2.433.429 3.373.854l-1.11 4.782q-.684-.341-2.775-.726-2.093-.384-5.508-.384-3.586 0-5.764.513-2.178.512-2.861.854v38.684h-5.551v-42.1q2.134-.939 5.893-1.921 3.756-.983 9.137-.983M579.902 112.884q0 5.21-1.495 9.479c-1.495 4.269-2.391 5.266-4.185 7.258a19 19 0 0 1-6.361 4.654q-3.673 1.665-8.112 1.665-4.442 0-8.113-1.665a19 19 0 0 1-6.361-4.654q-2.691-2.988-4.185-7.258-1.495-4.27-1.495-9.479t1.495-9.479q1.493-4.27 4.185-7.301a18.8 18.8 0 0 1 6.361-4.697q3.671-1.665 8.113-1.665 4.44 0 8.112 1.665a18.8 18.8 0 0 1 6.361 4.697q2.69 3.032 4.185 7.301t1.495 9.479m-5.892 0q0-8.282-3.843-13.193t-10.418-4.91q-6.576 0-10.419 4.91t-3.843 13.193 3.843 13.151q3.842 4.867 10.419 4.867 6.574 0 10.418-4.867 3.843-4.868 3.843-13.151M627.552 133.379q-2.478.684-6.661 1.537-4.185.853-10.247.854-4.954 0-8.283-1.451-3.331-1.452-5.38-4.099c-2.049-2.647-2.349-3.899-2.946-6.405q-.896-3.756-.896-8.283V90.767h5.551v22.972q0 4.697.683 7.941.682 3.246 2.221 5.252 1.536 2.007 3.971 2.903 2.433.897 5.935.896 3.927 0 6.832-.427 2.902-.426 3.672-.769v-38.77h5.551v42.614zM649.496 150.714h-5.551v-58.41q2.476-.853 6.319-1.623 3.843-.768 9.735-.769 4.867 0 8.839 1.58 3.969 1.581 6.831 4.569 2.86 2.99 4.44 7.259c1.053 2.847 1.653 6.064 1.58 9.65-.062 3.08-.689 6.405-1.315 8.468-.688 2.266-1.526 4.17-3.062 6.5-1.391 2.109-3.844 4.141-6.642 5.522-2.057 1.016-5.011 1.941-8.396 2.174-3.583.246-8.535-.128-12.779-1.534zm0-21.745c1.913.831 6.251 1.898 12.088 1.781 2.011-.04 4.534-.592 6.583-1.75 2.194-1.241 3.874-3.134 4.666-4.5 1.834-3.167 2.834-6.833 2.965-11.53.162-5.805-1.451-10.261-4.354-13.365q-4.356-4.654-11.528-4.654-4.1 0-6.618.384-2.52.384-3.801.812z"></path><g
                      fill="#B1173F"><path
d="M142.204 138.147c-17.619.845-26.514-24.279-27.733-38.279-1.015-11.648 3.981-32.11 19.713-25.406 1.796.766 3.435 1.962 4.925 3.206-6.376-10.545-14.942-19.446-25.249-26.2 1.301 1.636 2.541 3.424 3.344 5.368 6.485 15.687-11.74 21.688-24.182 20.48C78.02 75.86 53.993 65.667 54.076 47.637c.009-1.831.641-3.69 1.535-5.266-13.281 4.15-24.661 12.252-32.882 23.483 3.553-1.41 7.354-2.479 11.18-2.774 20.565-1.587 39.006 13.306 39.45 34.466.492 23.425-19.937 42.666-42.879 42.862-3.714.032-7.483-.721-11.001-1.869 7.885 14.586 19.806 26.33 34.569 33.893-.748-2.814-1.25-5.786-1.202-8.707.359-22.559 19.596-42.821 42.59-42.542 20.402.249 34.196 18.031 32.071 37.718-.285 2.641-.993 5.26-1.847 7.767 9.687-7.808 16.76-18.071 20.759-29.843-1.273.702-2.749 1.253-4.215 1.322"></path><path
d="M92.074 67.419c7.764.854 20.902-2.587 16.598-12.991-3.59-8.678-14.258-13.58-22.957-15.109-6.629-1.165-19.615-.582-19.52 8.837.119 11.628 16.313 18.211 25.879 19.263"></path></g></svg>
                </div>
                <br>
              </td>
            </tr>
            <tr>
              <td
style="padding: 4.5pt 4.5pt 4.5pt 0; width: 192px; height: 65px;">
                <p
style="margin: 0; font-family: 'Ubuntu Light', Ubuntu, sans-serif; font-size: 8pt; color: #747577;">
                  <br>
                  WhereGroup GmbH<br>
                  Lange Reihe 29<br>
                  20099 Hamburg<br>
                  Germany<br>
                  <br>
                  Tel: +49 (0)228 / 90 90 38 - 36<br>
                  <br>
                  <a class="moz-txt-link-abbreviated" href="mailto:johannes.kroeger@wheregroup.com">johannes.kroeger@wheregroup.com</a><br>
                  <a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a><br>
                  <br>
                  Geschäftsführer:<br>
                  Olaf Knopp, Peter Stamm<br>
                  Amtsgericht Bonn, HRB 9885 <br>
                </p>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </body>
</html>