Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Geocoding and reverse geocoding in Qt Mobility
Forum Update on Monday, May 27th 2025

Geocoding and reverse geocoding in Qt Mobility

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtQueries
    wrote on 14 Feb 2011, 16:34 last edited by
    #1

    Hi

    I'm using the latest Qt Mobility in my app. QGeoServiceProvider::availableServiceProviders() returns one result - "nokia". This search provider returns true for both supportsGeocoding() and supportsReverseGeocoding(), however all geocoding and reversegeocoding requests return no results.

    Are these features currently supported? Is there any other way to access them on Qt?

    Thanks

    1 Reply Last reply
    0
    • F Offline
      F Offline
      frankcyblogic.de
      wrote on 14 Feb 2011, 20:46 last edited by
      #2

      I recently tried this on Maemo (qtm1.2 beta), where it wasn't working and then two weeks later on Symbian^3 with qtm1.1 it worked fine. I'm still unsure, if it's just a fluctuation in service availability, or if it's something else. So if you are lucky getting it spit out something, it would be nice to hear, which configuration worked when and how.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mariusbu
        wrote on 8 Dec 2011, 16:43 last edited by
        #3

        I have the same problem. Does anybody have an update on this issue ? Is the service just flaky, am I doing something stupid or is QGeoSearchManager borked ?

        *Update: problem solved - I was creating the service provider object on the stack. Without the service provider object, nothing works, obviously. Updated the code to show the working version.

        Here is the code I'm using:

        @
        QGeoServiceProvider *geoServiceProvider = new QGeoServiceProvider("nokia");
        if (geoServiceProvider->error() == QGeoServiceProvider::NoError) {
        QGeoSearchManager *geoSearchManager = geoServiceProvider->searchManager();
        if (geoSearchManager && geoSearchManager->supportsReverseGeocoding()) {
        m_geoSearchReply = geoSearchManager->reverseGeocode(m_geoCoordinate);
        if (m_geoSearchReply) {
        if (m_geoSearchReply->isFinished()) {
        if (m_geoSearchReply->error() == QGeoSearchReply::NoError) {
        finished();
        } else {
        error(m_geoSearchReply->error(), m_geoSearchReply->errorString());
        }
        } else {
        connect(m_geoSearchReply, SIGNAL(finished()), this, SLOT(finished()));
        connect(m_geoSearchReply, SIGNAL(error(QGeoSearchReply::Error, const QString&)), this, SLOT(error(QGeoSearchReply::Error, const QString&)));
        }
        }
        } else {
        qDebug() << "failed to find search manager";
        }
        }
        }@

        Cheers,
        Marius Bugge Monsen (mbm)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved