Sharing a location

The Places framework provides the user interface for users to search, save, and manage their places. A place is a location on a map, an address, or a point of interest. Users can find their current location, browse existing places in their database, and conduct searches for places.

Applications with permission to access location services can access a user’s database of places using the Places APIs.

Screen showing the Place picker sample.

You can add place selection to your app using either the PlacePickerControl class or the PlacePicker class.

You can use the SelectedPlace class to extract the information about a place that the user has selected to share or display.

To use the places classes, you must add the following line to the .pro file in your project:

LIBS += -lbbcascadesplaces

To enable your app to access the Places framework, you must add the Location permission to your bar-descriptor.xml file. For more information, see Location.

You can download the Place picker sample app to learn how to add a PlacePicker as an attached object and use the show() function to let the user select a place from the Places database. You can also follow a tutorial that teaches you how to create the Place picker sample app.

Last modified: 2015-03-31

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus