MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Circumference of a geoFreeform or Polygon

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 ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-27-2008
Junior Member
White Belt
 
Join Date: Mar 2008
Posts: 2
Circumference of a geoFreeform or Polygon

Hi everyone,

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)
09-28-2004
John Meyer
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.
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 03-28-2008
Junior Member
White Belt
 
Join Date: Mar 2008
Posts: 2
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
It's not the best code as I'm not that good but it works and I'm chuffed!!!

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"
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
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


All times are GMT -5. The time now is 01:22 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

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.


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