Results 1 to 3 of 3

Thread: Load time for the maps

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

    Default Load time for the maps

    Dear All,

    I am developing an app in Qt 5.7/ESRi ARC GIs Runtime 100.0.0. I want to check the load time of the .tpk/.mmpk files.
    I want to apply simple strategy, placed 3 labels obtained the milliseconds when the map start loading, map end loaded and difference between the time.

    Since I am not aware about control flow in the qml, the value is wrong.
    Code snippets:

    Qt Code:
    1. import QtQuick 2.3
    2. import QtQuick.Controls 1.2
    3. import Esri.ArcGISRuntime 100.0
    4. import Esri.ArcGISExtras 1.1
    5.  
    6. ApplicationWindow {
    7. id: appWindow
    8. width: 800
    9. height: 500
    10. title: "LoadTPKV1"
    11.  
    12. property int intHours
    13. property int intMinutes
    14. property int intSeconds
    15. property int intMilliseconds
    16. property bool internationalTime: true
    17.  
    18.  
    19.  
    20.  
    21.  
    22. Text {
    23. id: idtxtPath
    24. x: 14
    25. y: 15
    26. width: 73
    27. height: 29
    28. styleColor: "#b30707"
    29. //text: qsTr(System.userHomePath + "/CarTPKLevel1.tpk")
    30. //text: qsTr(Qt.formatDateTime(new Date().getSeconds()))
    31. //text: appWindow.timeChanged()
    32. // text: Qt.formatDateTime(new Date())
    33. //text: appWindow.timeChanged()
    34.  
    35. }
    36.  
    37.  
    38.  
    39.  
    40. MapView {
    41.  
    42. //anchors.fill: parent
    43.  
    44. height: 400
    45. width: 800
    46. anchors.bottom:parent
    47.  
    48.  
    49. // add a map to the mapview
    50. Map {
    51.  
    52. Basemap{
    53.  
    54. ArcGISTiledLayer{
    55.  
    56. TileCache{
    57.  
    58. path: System.userHomePath + "/CarTPKLevel1.tpk"
    59.  
    60. }
    61. /*
    62.   onComponentCompleted: {
    63.   idtxtPath.text = appWindow.timeChanged()
    64.   }
    65.   */
    66.  
    67.  
    68. onLoadStatusChanged: {
    69. //End Event
    70.  
    71. if(loadStatus === Enums.LoadStatusLoaded)
    72. {
    73.  
    74. idtxtPath.text = appWindow.timeChanged()
    75.  
    76. }
    77.  
    78.  
    79. }
    80.  
    81. }
    82.  
    83.  
    84. }
    85.  
    86. onComponentCompleted: {
    87. idtxtPath.text = appWindow.timeChanged()
    88.  
    89.  
    90. }
    91. }
    92.  
    93.  
    94. }
    95.  
    96.  
    97.  
    98.  
    99. Text {
    100. id: idEndTxt
    101. x: 128
    102. y: 15
    103. width: 93
    104. height: 29
    105. text: ""
    106. styleColor: "#bb0808"
    107.  
    108. }
    109.  
    110.  
    111.  
    112.  
    113.  
    114.  
    115.  
    116. function timeChanged() {
    117. var date = new Date;
    118.  
    119. //intHours = date.getUTCHours()
    120. intMinutes = date.getMinutes();
    121. intSeconds = date.getUTCSeconds();
    122. intMilliseconds = date.getUTCMilliseconds();
    123. return intMilliseconds
    124. }
    125. }//ApplicationWindow
    To copy to clipboard, switch view to plain text mode 
    Last edited by anda_skoa; 15th August 2016 at 18:39. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Load time for the maps

    Hard to tell wihout knowing the API contracts of the component.

    If it does not indicate start of loading then it will be difficult to save the time when loading starts.

    Since you have obviously tried Component.onCompleted, is it called after the loading is done?

    Cheers,
    _

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

    Default Re: Load time for the maps

    Thanks for the reply.

Similar Threads

  1. Load multi language fonts at the same time
    By lllturtle in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th April 2012, 08:20
  2. Load and render time?
    By djstava in forum Newbie
    Replies: 1
    Last Post: 27th February 2011, 09:00
  3. How to load a Qwidget in groupBox at run time?
    By AviMittal in forum Qt Programming
    Replies: 8
    Last Post: 25th June 2009, 11:35
  4. Load WebKit dll at run time
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 10th September 2008, 09:11
  5. Any ideas on determining cpu load in run-time?
    By a550ee in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2006, 08:38

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.