MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Flows in mappoint 02 or 04 (arrows depending on the size of

This is a discussion on Flows in mappoint 02 or 04 (arrows depending on the size of within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Good Afternoon, I've got a small question. I am trying to show flows in Mappoint but I do not manage ...


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 11-17-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Flows in mappoint 02 or 04 (arrows depending on the size of

Good Afternoon,

I've got a small question.
I am trying to show flows in Mappoint but I do not manage to do it. Anybody
has got an idea how I could do that ?

Ok I'll give an exemple. Let's say I've got this information in excel:
- New York -> Atlanta 30 Tons
- New York -> Chicago 75 Tons
- Chicago -> Denver 10 Tons
- Denver -> New York 20 Tons
(In fact i've got Zip Codes)
I would like nice arrows, and with a size depending on the tonnage.

I am ready to use some code or code a bit.

Or if I have to buy another software pliz tell me.

Thanks a lot for your help
Edouard
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 11-18-2003
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Hope this helps to get you started.

Code:
Dim objmap As MapPointCtl.Map
Set objmap = MappointControl1.ActiveMap
Dim aShape As MapPointCtl.Shape
Dim aPushpin As MapPointCtl.Pushpin
Dim bPushpin As MapPointCtl.Pushpin

Set aPushpin = objmap.AddPushpin(objmap.FindResults("New York, NY").Item(1))
Set bPushpin = objmap.AddPushpin(objmap.FindResults("Atlanta, GA").Item(1))
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location)
aShape.Line.BeginArrowhead = False
aShape.Line.EndArrowhead = True
aShape.Line.Weight = 7
aShape.Line.ForeColor = vbBlue


Set aPushpin = objmap.AddPushpin(objmap.FindResults("Chicago, IL").Item(1))
Set bPushpin = objmap.AddPushpin(objmap.FindResults("Denver, CO").Item(1))
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location)
aShape.Line.BeginArrowhead = False
aShape.Line.EndArrowhead = True
aShape.Line.Weight = 10
aShape.Line.ForeColor = vbGreen


Set aPushpin = objmap.AddPushpin(objmap.FindResults("Denver, CO").Item(1))
Set bPushpin = objmap.AddPushpin(objmap.FindResults("New York, NY").Item(1))
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location)
aShape.Line.BeginArrowhead = False
aShape.Line.EndArrowhead = True
aShape.Line.Weight = 2
aShape.Line.ForeColor = vbRed
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
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 11-19-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
VB or VBA

Hi,

thanks a lot for the answer

Still a small question:
Does it it work with (XL) VBA or do I need VB 6?

Txs a lot for your help
Thanxs a lot

EDouard
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 11-19-2003
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
I have not tried it in VBA but I think if you just change the way you declare the var's/setup the app it will work.

Try this.

Code:
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.Map
Dim aPushpin As MapPoint.Pushpin
Dim bPushpin As MapPoint.Pushpin
Dim aShape As MapPoint.Shape
Set objApp = CreateObject("Mappoint.Application")	
Set objMap = objApp.NewMap
    
Set aPushpin = objmap.AddPushpin(objmap.FindResults("New York, NY").Item(1)) 
Set bPushpin = objmap.AddPushpin(objmap.FindResults("Atlanta, GA").Item(1)) 
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location) 
aShape.Line.BeginArrowhead = False 
aShape.Line.EndArrowhead = True 
aShape.Line.Weight = 7 
aShape.Line.ForeColor = vbBlue 


Set aPushpin = objmap.AddPushpin(objmap.FindResults("Chicago, IL").Item(1)) 
Set bPushpin = objmap.AddPushpin(objmap.FindResults("Denver, CO").Item(1)) 
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location) 
aShape.Line.BeginArrowhead = False 
aShape.Line.EndArrowhead = True 
aShape.Line.Weight = 10 
aShape.Line.ForeColor = vbGreen 


Set aPushpin = objmap.AddPushpin(objmap.FindResults("Denver, CO").Item(1)) 
Set bPushpin = objmap.AddPushpin(objmap.FindResults("New York, NY").Item(1)) 
Set aShape = objmap.Shapes.AddLine(aPushpin.Location, bPushpin.Location) 
aShape.Line.BeginArrowhead = False 
aShape.Line.EndArrowhead = True 
aShape.Line.Weight = 2 
aShape.Line.ForeColor = vbRed
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
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
arrows disappear after zoom out Gerhard Faber MapPoint 2006/2009 Discussion 4 01-27-2006 03:00 AM
joining recordsets with arrows (II) Anonymous MapPoint 2006/2009 Discussion 0 10-28-2003 06:37 AM
joining recordsets with arrows Anonymous MapPoint 2006/2009 Discussion 1 10-22-2003 07:54 AM
Need help with map scrolling arrows please! Anonymous MapPoint 2006/2009 Discussion 2 09-09-2003 10:29 AM
Inserting Arrows Anonymous MapPoint 2006/2009 Discussion 1 01-25-2003 05:36 AM


All times are GMT -5. The time now is 01:23 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

Flights to Antalya
Book flights to Antalya with Holiday Hypermarket to take advantage of cheap flights. You can enjoy plenty of watersports and some stunning scenery.

Family Holidays
Family holidays, ski holidays, cruises, luxury holidays. Whatever your travel needs your personal Travel Counsellor can help.

Holidays to Cuba
Situated between Jamaica and the Bahamas, Cuba has a delightful tropical climate and warm, clear waters with beaches of white sand. Check for cheap holidays to Cuba.

Cuba Holidays
Cuba holidays offer an exciting cultural and wonderful culinary experience. Book with The Holiday Place for a great deal.

Greece
Greece covers a large area and as a result there is an abundance of things to do, see and taste. You can relax on a beach, visit ancient sites or make a trip to one of the islands like Corfu, Crete or Rhodes.

Air Travel
Interested in air travel? Search and compare millions of holidays, flights and hotels with our help at Travel.co.uk

Sharm Holidays
See beautiful Egyptian sites! Info on Sharm holidays, only at On The Beach.


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