MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Problem with the QueryShape method

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-17-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 3
Problem with the QueryShape method

Hi ,

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 07-18-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 07-21-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 3
Re: Problem with the QueryShape method

Quote:
Originally Posted by Wilfried View Post
Hi,
As a workaround you could move all shapes in your code a little if that gives a solution.
Hi thanks for your answer, I tried to create my shapes in 2 steps : 1st at MyMap.getlocation(0,0), and 2nd to place them at the right location.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 07-22-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 07-23-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 3
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
method, problem, queryshape


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/problem-queryshape-method-8067.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 10:31 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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