Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Show stops with address in text box

This is a discussion on Show stops with address in text box within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am writing a delphi application with mappoint controls. In my program I can add several stops, set them up ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Show stops with address in text box

    I am writing a delphi application with mappoint controls. In my program I can add several stops, set them up as pushpins and optimize the route. Also I can show the address in a text box when I move the mouse over to the stops. However, it is so awkward since the mouse has to be placed on the exact location on the map to get the text box. Is there anyway that the mouse doesn't need to be put on the exact location on the map and still shows me the text box with address? I am using ObjectFromPoint to convert the X and Y coordinates to get the mouse location. Is it ok or if there is another way to do it. If someone shows me some sample codes that will be great. Thanks.

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Instead of ObjectsFromPoint you could use FindNearby. The distance has to be according the zoom level (Altitude), so that when the mouse is near the pushpin, the textbox can popup.

    To not slow down I think it is good to only calculate when the mouse does not move for some time. Eg by posting a custom message to a thread in the MoseMove event, and the thread can fire an event to a custom message handler when it did not received a mouse move message for a while. A timer can do also, not sure what is the best.

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hi

    Thanks for your reply.

    But I just have a stupid question cuz I am still new to the mappoint controls. If I don't use ObjectsFromPoint, how can I get the location from the X and Y coordinates so that I can use the FindNearBy method?

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    You can use XYToLocation to get a Location object from x,y points.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to add text to a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-21-2004, 01:55 PM
  2. TEXT
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 07-12-2004, 04:39 PM
  3. TEXT WITHIN COUNTIES
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-09-2004, 01:54 PM
  4. Show information of text balloons
    By Jasmino in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-26-2004, 01:19 PM
  5. Text Boxes
    By ClactonEssex in forum Wish List
    Replies: 0
    Last Post: 12-10-2002, 08:52 AM

Tags for this Thread

Posting Permissions

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66