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 }
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.Code:MouseArea{ onClicked: {console.log(geohelper.findAddress(latitude, longitude)} }
What's wrong?
May someone check Qt C++ par whether it works at all?
Tried to reach the author of the article, but seems like it is impossible - navigation to private messages is very awkward on this site...Code:void GeoHelper::findAddress(double latitude, double longitude) { QGeoCoordinate location(latitude,longitude); searchManager->reverseGeocode(location); }

Reply With Quote

