Important: Please read the Qt Code of Conduct -

How are people handling Landmarks with app specific attributes ?

  • Hello,

    With location based apps, a large number of points of interests (POI) are storaged. Many of the attributes of a given POI is generic. The Landmark API address this well. However, it is common for an application to need to track application specific attributes.

    I'm sure this has been thought through with the Qt Mobility APIs but I feel like I'm fighting with the API at the moment. Does Qt's Landmark API allow one to store application specific attributes in the Qt Landmark data store? Or is there an preferred alternative? Perhaps, simply storing a guid in the Landmark data store and retrieving it an sqlite database?

    Thanks for your time and consideration.


  • Hello,

    I think I see a clean way of solving this one. Using a map to associate the ptr of the landmark with the guid (index in the sqlite table). Still love to hear of alternatives?


  • Hi John,
    Unfortunately the API doesn't allow application specific attributes to be stored. This was a limitation of the underlying platforms. As to a suitable workaround, each landmark has local id(inside QLandmarkId), it may be possible to use this to associate the landmark with application specific data in an sqlite database. Care needs to be taken however since other applications may remove landmarks leaving the sqlite database out of sync.

    I'm not sure I understand how associating the ptr of a landmark with a guid will be helpful since the memory address of an object (a landmark object in this case) is not persistent.

    I agree though that the utility of the API is limited, hopefully we can address this shortcoming in a future release. Your feedback will certainly help with that.

Log in to reply