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 2 of 2

Shapes and Queries

This is a discussion on Shapes and Queries within the MapPoint Desktop Discussion forums, part of the Map Forums category; If I am creating an application that requires the user to draw a shape on a map around pushpins, and ...

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

    Shapes and Queries

    If I am creating an application that requires the user to draw a shape on a map around pushpins, and want the shape to be queried, what event should i use to call the queryshape method to get the results from the map. I can't quite seem to get a handle on the timing. Thanks

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

    About using the QueryShape method

    What has worked for me is a combination of two events, the mousedown and the mouseup event. I use the mousedown to get the coordinates of one of the corners of the shape, and the mouseup to get the other corner of the shape, this way I have a method of drawing a shape when the user lets go of the mouse and then I proceed to query the shape to get the results I want. Also, I have found out that there are other methods that work faster than the QueryShape method (depending on your needs). If you have for example a list of locations geocoded with lat/long, then by obtaining the location objects of the two corners of the shape, and getting the lat/long of each of them by using Gilles Kohl's Location to Lat/Long method, then you can find out which locations are contained inside your shape by evaluating if certain coordinates are within the bounds of the corners of the shape. Hope this helps, if not, it will help a bit if you tell a bit more about what you want to accomplish.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Speeding up Getlocation queries? Help!
    By Solo4357 in forum Bing Maps and MapPoint Web Service
    Replies: 0
    Last Post: 10-13-2005, 02:34 PM
  2. How to build MDX Queries in MAP Point 2004 tool ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-16-2004, 11:43 PM
  3. using access 2003 queries as a data source
    By roberta walker in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 04-27-2004, 07:06 AM
  4. Pushpins from shapes
    By glennuser in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 03-29-2004, 07:36 AM
  5. link data wizard won't let me use parameter queries
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 08-23-2002, 10:14 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83