MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Avoided Area?

This is a discussion on Avoided Area? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm currently using the following code:- Set objLoc = objMap.SelectedArea.Location If Not objLoc Is Nothing Then If Type Of objLoc ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Avoided Area?

I'm currently using the following code:-

Set objLoc = objMap.SelectedArea.Location
If Not objLoc Is Nothing Then
If Type Of objLoc Is Location Then
Set objShape = objMap.Shapes.AddShape(geoShapeRectangle, objLoc, 5, 5)
objShape.Avoided = True
End If
End If


This has been bugging me... How can I make the area to be avoided be the exact shape I've actually drawn? At the moment, I'm hard coding a distance of 5 x 5 miles. Surely there must be a simple way to use the Selected Areas distance?

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
  #2 (permalink)  
Old 09-25-2003
Junior Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 28
make avoided area same as selected area

If you're selecting area on the map and want the avoidance area to be the same size, try storing the selected area height and width before doing anything else. Or am I misreading your question?

Code:
Dim selWidth as long
Dim selHeight as long

selWidth = objMap.SelectedArea.Width
selHeight = objMap.SelectedArea.Height
..
..

Set objShape = objMap.Shapes.AddShape(geoShapeRectangle, objLoc, selWidth, selHeight)
..
..
fill in the rest of your code then substitute the height and width for your current values.
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
area, avoided


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
Surface Area Dazzer MapPoint 2006/2009 Discussion 9 01-05-2006 04:13 AM
is an address within an area? Anonymous MapPoint 2006/2009 Discussion 4 02-23-2005 01:51 PM
Mappoint fails calculating the fastest route with avoided zo Anonymous MapPoint 2006/2009 Discussion 4 06-08-2004 06:27 AM
How to get the 4 map area coordinates ? Anonymous MapPoint 2006/2009 Discussion 1 01-22-2004 01:44 PM
Selected Area amanuel MapPoint 2006/2009 Discussion 4 08-22-2002 01:23 PM


All times are GMT -5. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Costa Brava Holiday
Beautiful kilometres of sandy beaches await you should you choose a Costa Brava holiday through UlookUbook!



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