Community of VE/MapPoint Users and Developers
This is a discussion on Problem with the QueryShape method within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi , I have developped a vba code that creates a "pavement" of shapes (rectangles) on a map to cover ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Problem with the QueryShape method I have developped a vba code that creates a "pavement" of shapes (rectangles) on a map to cover it without empty spaces. There is a dataset of locations (pushpins) in this map, and I want to know which pushpins are within which shape. All should work fine using the QueryShape method over each shape, but I found out that a few pushpins are not returned by the method although I can see they are well within a shape. The "export to Excel" command doesn't function either (I have a "no data found" message) If I move slightly (even by 1 pixel) the shape then it works again... But I have hundreds of shape, and don't want to move them all to make it work.. Has anyone had such a problem?? Thanks in advance |
| |||
| Re: Problem with the QueryShape method
Hi, As a workaround you could move all shapes in your code a little if that gives a solution.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problem with the QueryShape method Quote:
It doens't work, some pushpins in some shapes are still missed, and again if I move a shape within which it happened with my mouse it works again... It's crazy. I don't know how I can make programmaticaly an action equivalent as "moving around a little bit with my mouse" Any idea welcome, Regards |
| |||
| Re: Problem with the QueryShape method
Hi, get the Location of it. modify latitude or longitude of it and then again. this should do the same as what you do with the mouse.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Problem with the QueryShape method
I didn't know it was possible to get the latitude and longitude coordinates of a location... But I googled again on my problem and found a reference to a similar problem. The answer given was another piece of code doing the same, but using a Polylines object instead of a Shape. And that works just fine ! ... my conclusion is that there is a bug with the Shape objects Anyway now I have to find ways to calculate the area of my polylines, but I'm confident it is feasible. Thanks |
![]() |
| Tags |
| method, problem, queryshape |
| ||||
| Posted By | For | Type | Date | |
| Spatial Data Importer Contest Submission - MP2K Magazine | This thread | Refback | 07-21-2008 01:13 PM | |
| 2006: Blogs, Photos, Videos and more on Technorati | This thread | Refback | 07-18-2008 01:00 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bizarre solution to a QueryShape problem... | jlewis | MapPoint 2006/2009 Discussion | 8 | 06-27-2008 10:01 AM |
| VB6 error "Method 'QueryShape' of object 'DataSet' fail | David J | MapPoint 2006/2009 Discussion | 2 | 12-07-2005 02:13 PM |
| Problem with dataset.QueryShape Method | Ray Liu | MapPoint 2006/2009 Discussion | 1 | 07-15-2004 11:55 AM |
| Problem with the optermise method | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-14-2003 10:06 AM |
| QueryShape problem Please help | Anonymous | MapPoint 2006/2009 Discussion | 2 | 03-13-2003 09:57 AM |