MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




Problem with the QueryShape method

This is a discussion on Problem with the QueryShape method within the MapPoint Desktop 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 Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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
Location: Belgium
Posts: 2,407
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
Location: Belgium
Posts: 2,407
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


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 Desktop Discussion 8 06-27-2008 09:01 AM
VB6 error "Method 'QueryShape' of object 'DataSet' fail David J MapPoint Desktop Discussion 2 12-07-2005 01:13 PM
Problem with dataset.QueryShape Method Ray Liu MapPoint Desktop Discussion 1 07-15-2004 10:55 AM
Problem with the optermise method Anonymous MapPoint Desktop Discussion 0 07-14-2003 09:06 AM
QueryShape problem Please help Anonymous MapPoint Desktop Discussion 2 03-13-2003 08:57 AM


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


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.0 RC3
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70