Community of VE/MapPoint Users and Developers
This is a discussion on Shapes and Queries within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Shapes and Queries |
| |||
| 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. |
![]() |
| Tags |
| queries, shapes |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Speeding up Getlocation queries? Help! | Solo4357 | MapPoint Web Service and Virtual Earth | 0 | 10-13-2005 03:34 PM |
| How to build MDX Queries in MAP Point 2004 tool .... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 05-17-2004 12:43 AM |
| using access 2003 queries as a data source | roberta walker | MapPoint 2006/2009 Discussion | 2 | 04-27-2004 08:06 AM |
| Pushpins from shapes | glennuser | MapPoint 2006/2009 Discussion | 12 | 03-29-2004 08:36 AM |
| link data wizard won't let me use parameter queries | Anonymous | MapPoint 2006/2009 Discussion | 7 | 08-23-2002 11:14 AM |