Results 1 to 4 of 4

Thread: Path for SD Card.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jul 2016
    Posts
    53
    Qt products
    Qt4 Qt5
    Platforms
    Windows Android
    Thanks
    13

    Default Re: Path for SD Card.

    Hi Anda_skoa,

    Thanks for the reply. I don't want my maps stored in Qrc.

    Scenario:
    Maps will be copied to SD Card manually, The qt application will display the map from the SD Card.
    In this case how to set the SD card Path.

    Code snippets what I tried according to ESRI ArcGIS Runtime SDK for Qt 100.0.0:
    Qt Code:
    1. import QtQuick 2.6
    2. import Esri.ArcGISRuntime 100.0
    3. import Esri.ArcGISExtras 1.1
    4.  
    5. Rectangle {
    6. width: 800
    7. height: 600
    8.  
    9. property real scaleFactor: System.displayScaleFactor
    10. // property string dataPath: System.userHomePath + "/ArcGIS/Runtime/Data/mmpk/"
    11. [B][I]property string dataPath: "file:///storage/sdcard1/"[/I][/B]
    12.  
    13. // Create MapView
    14. MapView {
    15. id: mapView
    16. anchors.fill: parent
    17. }
    18.  
    19. // Create a Mobile Map Package and set the path
    20. MobileMapPackage {
    21. id: mmpk
    22. path: dataPath + "Yellowstone.mmpk"
    23.  
    24. // load the mobile map package
    25. Component.onCompleted: {
    26. mmpk.load();
    27. }
    28.  
    29. // wait for the mobile map package to load
    30. onLoadStatusChanged: {
    31. if (loadStatus === Enums.LoadStatusLoaded) {
    32. // set the map view's map to the first map in the mobile map package
    33. mapView.map = mmpk.maps[0];
    34. }
    35. }
    36. }
    37.  
    38. Rectangle {
    39. anchors.fill: parent
    40. color: "transparent"
    41. border {
    42. width: 0.5 * scaleFactor
    43. color: "black"
    44. }
    45. }
    46. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by anda_skoa; 10th August 2016 at 12:54. Reason: missing [code] tags

Similar Threads

  1. How to set path to memory card of the mobile?
    By harish in forum Qt Programming
    Replies: 1
    Last Post: 20th February 2012, 18:15
  2. sd card
    By dmartino in forum Newbie
    Replies: 6
    Last Post: 19th January 2011, 22:34
  3. Qt and graphics card
    By leoalvesmachado in forum Newbie
    Replies: 2
    Last Post: 21st May 2010, 21:57
  4. Replies: 8
    Last Post: 17th October 2009, 09:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.