Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] PluginParameter doesn't work for Nokia plugin on QML's MapElement
Qt 6.11 is out! See what's new in the release blog

[SOLVED] PluginParameter doesn't work for Nokia plugin on QML's MapElement

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 4.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.
  • C Offline
    C Offline
    cpscotti
    wrote on last edited by
    #1

    Has anyone managed to pass parameters to the Nokia plugin when using the Map element?

    From the "documentation":http://doc.qt.nokia.com/qt-mobility-snapshot/location-overview.html#the-nokia-plugin one can see that many interesting parameters are accessible for plugin users but I can't figure out a way to set them.

    The most promising way I found was:

    @
    import QtMobility.location 1.2

    Page {
    Map {
    plugin: Plugin { name: "nokia"
    parameters: [
    PluginParameter {
    name: "mapping.cache.directory"
    value: "/var/tmp/sampleMap/"
    },
    PluginParameter {
    name: "mapping.cache.size"
    value: "50MB"
    }
    ]
    }
    }
    }
    @

    But when I try to run this it will produce bizarre errors and will have no effect:
    @
    QColor::setNamedColor: Unknown color name '/var/tmp/sampleMap/'
    QColor::setNamedColor: Unknown color name '50MB'
    @

    Color!?!?!

    anyone's got any ideas on how to set these parameters?

    cpscotti.com/blog/ - Used when I need to kill some time at work :D

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cpscotti
      wrote on last edited by
      #2

      just bumping it.. come on people! No clues at all? :/

      cpscotti.com/blog/ - Used when I need to kill some time at work :D

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        The parameters as you're trying to use them look correct to me. The QColor error messages seem odd, for sure. You might want to open a bug report on "Jira.":https://bugreports.qt.nokia.com/secure/Dashboard.jspa

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cpscotti
          wrote on last edited by
          #4

          Thanks for your review mlong,

          I was about to open the bug report but I tried to pinpoint the problem and found out I can't replicate the bug with the version from gitorious (on the desktop) so probably it has been fixed already. It was probably something around the QML bindings (QDeclarativeGraphicsGeoMap ... ) since using the plugin from c++ works fine (has no effect but produces no errors).

          The big next problem here that I was unaware of is that (from the same doc I linked before):
          "Map tile caching is disabled on Maemo, Meego and Windows CE platforms. Using the parameter on these platforms will have no effect."

          Can someone please tell me WHY caching is disabled at Meego/Harmattan ? If you look at the source, it was deliberately taken out! The implementation is already there (Linux/Unix/Maemo6 are all the same!)
          @
          #if defined(Q_OS_WINCE_WM) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
          #undef DISK_CACHE_ENABLED
          #else
          #define DISK_CACHE_ENABLED 1
          #endif
          @
          (From qgeomappingmanagerengine_nokia.cpp )
          I would understand why on WINCE but on Maemo 6? I'd say caching makes a lot more sense in a mobile device than in the desktop itself!

          :/

          cpscotti.com/blog/ - Used when I need to kill some time at work :D

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mlong
            wrote on last edited by
            #5

            I would assume it's for performance or storage conservation reasons. But that's just speculation.

            If you have the plugin sources, you could create your own plugin version with the disk caching enabled, I suppose (provided that any licensing implications work for your situation.)

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cpscotti
              wrote on last edited by
              #6

              Well, the plugin sources are available but changing them doesn't look like a good solution.
              Either providing a "custom" plugin or overwriting the official one looks bad.
              (And OVI store would certainly not like it for obvious reasons ;) )

              Since you mentioned the license, I gave it a check and found this:
              @
              ...
              When using the Ovi Maps API Developer Package and/or the Ovi Maps Service, You hereby agree that You will not:
              ...
              (ix) pre-fetch, cache, or store any Ovi Maps Content except that You may store limited amounts of Ovi Maps Content for the purpose of testing your Application, if You do so temporarily, securely, and in a manner that does not permit use of the Ovi Maps Content outside of the Ovi Maps Service; or
              ...
              @

              So I think that's really it.. no caching. I'll live with it..

              cpscotti.com/blog/ - Used when I need to kill some time at work :D

              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