To understand how the liblocation works, please have a look at the developer guide and the liblocation API docs. Further the example is explained in the guide, which is linked on the wiki-page of the example as well. But please be aware, that the general information, you find there is a bit outdated. But the discription of the location example is quite ok.