Community of MapPoint and Bing Maps Users and Developers
This is a discussion on Queryshape not returning all records within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have drawn squares over a map and am using them to query the number of datapoints and draw a ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Queryshape not returning all records I have noticed that some datapoints near the left hand edge of the square are not selected as being within the square although visually, they clearly are (by 1/4 mile or so) . If I move the shape fractionally and then move it back to where it was and then query the shape again the datapoints ARE found to be within the shape. Can anyone explain this? Mappoint 2004 Europe |
| |||
| Re: Queryshape not returning all records
Further investigation shows that the problem is more complicated. It is not just near one border. The area that queryshape is looking at does not exactly match the shape. Sometimes it will return pushpins that are apparently outside the shape as well as sometimes missing those that appear to be within the shape. The shape moving may be a red herring as this does not always change the results that queryshape returns. |
| |||
| Re: Queryshape not returning all records
I can confirm that moving a shape does cause the number of records returned by QueryShape to change (and become correct). Here are the key code snippets objShape.Select() objRecords = objDataSet.QueryShape(objShape) lngTotalRecs = 0 objRecords.MoveFirst() Do While Not objRecords.EOF lngTotalRecs += 1 objRecords.MoveNext() Loop MsgBox("Number of records in shape: " & lngTotalRecs) ' Get e.g. 69 here ' Then I execute this code SavedLoc = objShape.Location objShape.Location = Mp.GetLocation(90, 0) objShape.Location = SavedLoc and re-run the above objShape.Select() objRecords = objDataSet.QueryShape(objShape) lngTotalRecs = 0 objRecords.MoveFirst() Do While Not objRecords.EOF lngTotalRecs += 1 objRecords.MoveNext() Loop MsgBox("Number of records in shape: " & lngTotalRecs) ' Get e.g now 74 |
![]() |
| Tags |
| queryshape, records, returning |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| QueryShape or QueryPolygon NOT IN | tfmiltz | MapPoint Desktop Discussion | 1 | 01-31-2008 08:03 AM |
| QueryShape recordset returning empty | tfmiltz | MapPoint Desktop Discussion | 7 | 01-31-2008 06:38 AM |
| Unmatched Records pop-up: Sort potential records | jempie | MapPoint Desktop Discussion | 0 | 10-12-2006 06:07 AM |
| problems with queryshape | chas | MapPoint Desktop Discussion | 1 | 09-08-2006 01:52 PM |
| QueryShape problem Please help | Anonymous | MapPoint Desktop Discussion | 2 | 03-13-2003 08:57 AM |