Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How are people handling Landmarks with app specific attributes ?
Qt 6.11 is out! See what's new in the release blog

How are people handling Landmarks with app specific attributes ?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johnk
    wrote on last edited by
    #1

    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.

    Sincerely,
    John

    1 Reply Last reply
    0
    • J Offline
      J Offline
      johnk
      wrote on last edited by
      #2

      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?

      -jk

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amos.choy
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved