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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 28
Registered: ‎12-19-2012
My Device: BB 10
My Carrier: BB

'UnsupportedOptionError' error while Geocoding or Reverse Geocoding

Hello,

I am trying to use the Geocoding and Reverse Geocoding feature,

I used the code snippets provided here 

http://developer.blackberry.com/native/documentation/cascades/device_platform/location/geocoding.htm...

 

But it returns the error 

 'The requested operation or one of the options for the operation are not supported by the service provider'

 

 

 

What am I missing !

 

Please help !

 

 

Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: 'UnsupportedOptionError' error while Geocoding or Reverse Geocoding

Hi,
Can you share the exact code snippet that is throwing the error? Also, please confirm that you have added location permissions to your bar-descriptor.xml.

Thanks.

Shadid
New Developer
Posts: 28
Registered: ‎12-19-2012
My Device: BB 10
My Carrier: BB

Re: 'UnsupportedOptionError' error while Geocoding or Reverse Geocoding

[ Edited ]

 

This is what I am using, I am following the example provided by blackberry.

 

 

 

// Initialize QGeoSearchManager

    QStringList serviceProviders =

            QGeoServiceProvider::availableServiceProviders();

 

    if ( serviceProviders.size() ) {

 

        SafeDelete(serviceProvider);

        // serviceProvider is a QGeoServiceProvider *

        serviceProvider = new QtMobilitySubset::QGeoServiceProvider(

                serviceProviders.at(0));

        // searchManager is a QGeoSearchManager *

        SafeDelete(searchManager);

        searchManager = serviceProvider->searchManager();

    }

 

    QtMobilitySubset::QGeoAddress address = QtMobilitySubset::QGeoAddress();

    address.setStreet(locality);

    address.setCity(city);

    // Request geocoding

    SafeDelete(reply);

    reply = searchManager->geocode(address);

    bool finished_connected = QObject::connect(reply,

            SIGNAL(finished()),

            this,

            SLOT(readGeocode()));

 

    Q_ASSERT(finished_connected);

 

 

    bool error_connected = QObject::connect(reply,

            SIGNAL(error(QGeoSearchReply::Error, QString)),

            this,

            SLOT(geocodeError(QGeoSearchReply::Error, QString)));

 

 

    Q_ASSERT(error_connected);

 

 

void Geocoder::readGeocode()

{

    if(!reply->places().size())

        return;

    QGeoPlace place = reply->places().at(0);

    qDebug() << place.address().text();

    // SafeDelete(reply);

    _searchedResult = reply->places();

 

    if(m_pSearchListView)

    {

        m_pSearchListView->reload();

    }

 

}

 

 

void Geocoder::geocodeError(QGeoSearchReply::Error pReply, QString str)

{

    qDebug() << str;

 

}

 

Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: 'UnsupportedOptionError' error while Geocoding or Reverse Geocoding

Thanks. From which city, country are you trying this? I want to make sure that we have coverage for geocoding in your area.

Shadid
Highlighted
New Developer
Posts: 28
Registered: ‎12-19-2012
My Device: BB 10
My Carrier: BB

Re: 'UnsupportedOptionError' error while Geocoding or Reverse Geocoding

Thanks for reply,
I am trying this for Indian city 'mumbai' and 'andheri' as a locality in mumbai.