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
Developer
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
My Carrier: BlackBerry
Accepted Solution

Is there any way to integrate map search option in the app in c++

Hi I want to add map search option in my app. User should search for a location name and it should find that location's geo informations. I saw the place picker class. But I could not understand how to use it. There is a sample but its on qml. I need that in c++.And also it says this class uses local database to find the places. But I don't want to store any database. I just want it to be like google map app. Where you search and find the informations. Thanks.

Developer
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
My Carrier: BlackBerry

Re: Is there any way to integrate map search option in the app in c++

Can anyone please give me an answer. I really need this fast. Thanks.
Developer
Posts: 163
Registered: ‎12-06-2012
My Device: Z10, Q10
My Carrier: BlackBerry

Re: Is there any way to integrate map search option in the app in c++

Actually the place picker control class does it. I misundestood and wasted time. Here is the sample code that works. Its from the place picker class page of the developer site.

 

#include <bb/cascades/places/PlacePicker>
 
PlacePicker *picker = new PlacePicker(pContainer);
SelectedPlace *sp = picker->show();
if (sp != NULL) {
  // Extract details from SelectedPlace object.
  label.text(sp->name());
} else {
  // Either the user has canceled the operation or the location capability is not enabled.
}