×

Discussion Board

Results 1 to 4 of 4

Thread: RouteQuery

  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    2

    RouteQuery

    Hi,
    is there any way to wait for quey completed to display results?
    Thank you

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: RouteQuery

    What would you want to do while waiting ?

    Basically of course you could bring up something on the screen which blocks useraction on it, anyway, you should always give user an option on cancelling the request, since if something goes wrong, it might on some case take some time.

  3. #3
    Registered User
    Join Date
    Sep 2013
    Posts
    2

    Re: RouteQuery

    well,
    this is the idea: my app calculate distances from actual position to some point of interest. Let's say pharmacies. I have a list of known coordinates of this POI. To display pushpin as soon as possible I calculate distances with mycoords.GetDistance(coordsOfPoi).
    I have added tap event on each pushpin and when user tap one of them, I display the address and drive distance and walk distance, using RouteQuery. But since it is an async function, I don't know exactly when it returns results that I'd like to display in a messagebox.
    Don't know if I was clear because I'm italian and my english might be not so good as I'd like.
    The scenario shuolud be.
    1. dysplay pushpin with numbers in text that show it from the nearest to the farest.
    2. add tap event to each pushpin
    3. when tapped, call RouteQuery
    4 when query completed display result.LenghtInMeters in a messagebox.
    That's it.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: RouteQuery

    Basically since you propably would not want to freeze the UI, then you could indeed have somekinf an indicator that you are fetching information, for example pop-up the note where you would have the information shown, and have either the normal in-progress animation in there, or something else to inidicate that something is being done.

    And once you get the information, then show it, and if you don't get it before user cancels the pop-up, then see whether you can cancel the query, or should you simply ignore the data once it arrives.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×