Community of VE/MapPoint Users and Developers
This is a discussion on Circumference of a geoFreeform or Polygon within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi everyone, I have a problem that my ambition outweighs my abilities by a considerable margin. What I want to ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Circumference of a geoFreeform or Polygon I have a problem that my ambition outweighs my abilities by a considerable margin. What I want to do is obtain the same value as the "shapes" "SizeVisible" value but apparently reading this forum this isn't available. ![]() Reading Johns post (below) bit seems it is possible from reading the "shapes" vertices and using the distance method???? I'm really not sure how to deal with vertices if anyone can help. I'm using MP2004 and VB6 ... any information would be greatly appreciated. Cheers Phil #4 (permalink) Senior Member Blue Belt Join Date: Jul 2002 Posts: 479 The value does not appear to be available via the object model. You can get the value yourself using the Distance method. |
| |||
| Re: Circumference of a geoFreeform or Polygon
Hi all, I've figured it out with the help of all the info on this forum. Here's my vb6 code, I hope it saves someone else of 2 days of hell!! Here's the bit that calculates distance between all the vertices for the selected freeform shape. Code: Dim curshape As Integer
Dim objLoc1 As MapPointCtl.Location
Dim objLoc2 As MapPointCtl.Location
Set obj1 = objMap.Selection
'curshape = obj1.Name
n = UBound(obj1.Vertices)
dist = 0
i = 0
Text6.Text = 0
For i = 0 To (n - 1) ' loop through all the points
Set objLoc1 = obj1.Vertices(i)
Set objLoc2 = obj1.Vertices(i + 1)
dist = dist + objMap.Distance(objLoc1, objLoc2)
Next i
' calculate the distance from the end point back to the start point
Set objLoc1 = obj1.Vertices(0)
Set objLoc2 = obj1.Vertices(i)
dist = dist + objMap.Distance(objLoc1, objLoc2)
Text6.Text = Int(dist)
obj1.SizeVisible = True Time for a beer! Cheers Phil Last edited by DRZ400; 03-29-2008 at 03:37 PM. Reason: replaced "objMap.Shapes.Item(curshape)." with "obj1" |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mappoint Circumference and Post Code | nick72blue | MapPoint 2006/2009 Discussion | 6 | 01-23-2008 03:36 AM |
| MapPoint Polygon | robinsongm | MapPoint 2006/2009 Discussion | 2 | 11-22-2006 01:57 AM |
| Information within polygon | Dazzer | MapPoint 2006/2009 Discussion | 1 | 04-28-2004 08:50 AM |
| Distance from Polygon | random0000 | MapPoint 2006/2009 Discussion | 1 | 04-14-2003 09:18 PM |
| Query by shape / polygon | blackmap | MapPoint 2006/2009 Discussion | 7 | 02-12-2003 03:35 AM |
Flight Deals
Book a holiday bargain online. Check out the latest fantastic flight deals. Holiday Hypermarket works with the leading Tour Operators to find the best flight deals available.
Italy Weather
Check Italy Weather before you travel. We provide information on Italy including weather, flights and accommodation.
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.
Holidays to Jamaica
Holidays to Jamaica are about taking things easy. Forget your watch and chill out beneath the clear Jamaican sky.
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.
Inclusive Holidays
At Travel.co.uk travel comparison will help you plan the perfect inclusive holidays.
Cyprus Holidays
Fancy a Mediterranean holiday? Get information on Cyprus holidays at On The Beach.