MapPoint Forums

MapForums

Community of VE/MapPoint 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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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


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:36 AM.


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

Cheap flights to Athens
Book cheap flights to Athens on Holiday Hypermarket and you can book some great value accommodation too! Check it out online.

Flights to Portugal
Find cheap flights to Portugal on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Portugal.

Holiday in Turkey
A Holiday in Turkey is great value when you book with dealchecker.co.uk. There is an abundance of things to see and do. Check out the well-preserved Greco-Roman ruins.

Holidays in Egypt
A holiday in Egypt will stimulate your mind, captivate your heart and spark your senses. Visit this exceptional country, book today!

Tunisia
Tunisia enjoys excellent weather, golden beaches and a beautiful blue sea. Moving away from the beach you will find a country that has a rich and varied past. Discover the secrets of history yourself by exploring all the ruins.

Cheap family holidays
To plan cheap family holidays, use Travel.co.uk to explore all the delightful possibilities that there are.

Holidays in Goa
Want to know more about Indian culture? Visit On The Beach for information on holidays in Goa.


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