Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware
My Carrier: (none)

Trying to add the result of a QGeoSearchReply to a maps::DataProvider

[ Edited ]

Hi, I am trying to add the result of a QGeoSearchReply to a maps :: DataProvider, and have found a function called convertToGeoList at this site: http://developer.blackberry.com/cascades/reference/bb__platform__geo.html, and am trying to use it, but the documentation doesn't even tell me what class the function is part of - as the geo class itself doesn't seem to exist in Blackberry Cascades. Anyway - here is code I have come up with:

 

    void Mapper::mapSearchResults(QtMobilitySubset::QGeoSearchReply *reply)

    {

        disconnect(mapSearchManagerEngine_, SIGNAL(finished(QtMobilitySubset::QGeoSearchReply*)),
            this, SLOT(mapSearchResults(QMobilitySubset::QGeoSearchReply*)));
        maps :: DataProvider provider;
        provider.add(bb :: platform::geo::convertToGeoList(reply->places()));
        maps::MapData mapData;
        mapData.addProvider(&provider);
        mapView_->setMapData(&mapData);

    }

 

But I end up with this error: error: 'convertToGeoList' is not a member of 'bb :: platform::geo'-

Could someone please clarify how to do this?

Highlighted
BlackBerry Development Advisor
Posts: 68
Registered: ‎10-15-2012
My Device: Z10
My Carrier: Telus

Re: Trying to add the result of a QGeoSearchReply to a maps::DataProvider

Hi, do you have this in your cpp file?

 

#include <bb/platform/geo/geo_converters>