×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    Geocoding and reverse geocoding in Qt Mobility

    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/Symbian?

    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Geocoding and reverse geocoding in Qt Mobility

    they should be, just take the Mobility 1.1.0 maps examples, there should be codes that implement these ones as well, and I did try them and they appear to be working just fine.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    Re: Geocoding and reverse geocoding in Qt Mobility

    Which examples are you referring to in particular? Can you provide any code? The following code displays "Found 0 places" for me.

    QStringList sl = QGeoServiceProvider::availableServiceProviders();
    QString provider = sl.at(0);
    QGeoServiceProvider gsp(provider);
    QGeoSearchManager* searchManager = gsp.searchManager();
    QString city("Bangkok");
    QGeoAddress gcAddress;
    gcAddress.setCity(city);
    QGeoSearchReply* searchReply = searchManager->geocode(gcAddress);
    QList<QGeoPlace> places = searchReply->places();
    std::cout << "Found " << places.size() << " places" << std::endl;

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Geocoding and reverse geocoding in Qt Mobility

    Definetely it returns 0, just check the mapviewer example from Mobility 1.1.0, and use the signals to get your slot called once the query has been successfully executad and the reply formed.

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    Re: Geocoding and reverse geocoding in Qt Mobility

    Perhaps I'm using the wrong Qt Mobility then. I'm listening for both finished and error signals, and neither are being fired...

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Geocoding and reverse geocoding in Qt Mobility

    Can you please just check the example I mentioned. it indeed has working code sample. I'm still polishing mine, thus it will take awhile untill i get them posted into our wiki.

Similar Threads

  1. Reverse Geocoding in Java
    By harriskorn in forum Mobile Java General
    Replies: 6
    Last Post: 2011-02-27, 17:02
  2. reverse geocoding prior to storage
    By roryoflynn1@gmail.com in forum Mobile Java General
    Replies: 4
    Last Post: 2010-07-05, 14:03
  3. Reverse Geocoding with static maps on Symbian Phone
    By ryn004 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 4
    Last Post: 2009-12-01, 15:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×