×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    6

    GeoHelper plugin - code example needed

    Hi gents and ladies,

    Here is a very nice plugin that could ease the live of a qml developer while Qt Mobility 1.3+ is not yet here.

    THe installation of the plugin is pretty straight forward. Just adding header file and copy paste what should be there + source file (cpp) and same copy&paste. After which I managed properly expose GeoHelper element to QML and include it into my code.

    More to say I have GeoHelper::drawText function working flawlessly and can add any text on top of my map element.

    Problem is that all the other core functions like findAddress (reverseGeocode) keep returning me "undefined" value...what's wrong?

    Code snippet below (i leave below only stuff that matters):

    Code:
    GeoHelper {
    id: geohelper
    map: mymapobject
    }
    ...
    Code:
    MouseArea{
    onClicked: {console.log(geohelper.findAddress(latitude, longitude)}
    }
    I tried many real double cooridnates already for existing addresses, but it keeps returning undefined value. If I do just geohelper.findAddress() - it responses properly that insufficient parameters.

    What's wrong?

    May someone check Qt C++ par whether it works at all?

    Code:
    void GeoHelper::findAddress(double latitude, double longitude)
    {
        QGeoCoordinate location(latitude,longitude);
        searchManager->reverseGeocode(location);
    }
    Tried to reach the author of the article, but seems like it is impossible - navigation to private messages is very awkward on this site...

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: GeoHelper plugin - code example needed

    Hi,
    More than a problem related to the code itself, this is a QML problem.
    "undefined" value means that the value that you are passing as argument to the method is not valid. So you should check its correctness.
    I hope you are not passing strings: "90.000".

Similar Threads

  1. Any example code for WAP push plugin ?
    By chandpasha in forum Symbian
    Replies: 2
    Last Post: 2008-10-29, 09:07
  2. Audoplayer plugin example
    By kakakakaka in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2008-07-09, 14:29
  3. Audio player plugin example in 3.1
    By kakakakaka in forum Symbian
    Replies: 1
    Last Post: 2008-07-09, 11:39
  4. Problem with DLL plugin example---EComCalculator
    By mobilepig in forum Symbian
    Replies: 0
    Last Post: 2006-07-25, 09:32

Posting Permissions

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