MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How can I locate the position of a freeform shape ....

This is a discussion on How can I locate the position of a freeform shape .... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; How can I locate the position of a freeform shape object so I can keep this information in a database ...


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 07-31-2002
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
How can I locate the position of a freeform shape object so I can keep this information in a database and use it to reproduce the same shape and position when I need it?
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 07-31-2002
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thanks John, the only problem I have is a freeform has no Location or a center point to start from. I also did not find a way of using the "Points" of the freeform.

Sylvain
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 07-31-2002
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
Use the vertices. Look in Walt's code (referenced above) to see how he accomplishes it.. or just use Walt's solution. - Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ Upgrade to MapForums Plus membership ~
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 07-31-2002
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
Also, check out Walt's mif/mid exporter: http://www.mp2kmag.com/importersub01.asp . Whether you have MapInfo or not, this can still be useful as it exports text files, you can parse those to get the coordinates. It's compiled for you and linked from a past update: http://www.mp2kmag.com/update/?id=5 Look near the bottom. - Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 07-31-2002
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
First you need to read/download the code written by Gilles Kohl "A More Compact Method for Obtaining Lat/Long " at


http://www.mp2kmag.com/articles.asp?ArticleID=13



cut/paste that code into a module. Make sure you have a reference to the Microsoft Mappoint 9.0 object Library(North America)



Assuming you have a shape on your map this code will give you a message box with the Lat/Long for the shape. Store them in you database. When you want to recreate the shape use the GetLocation method with your lat/long. Then use the addshape method. You will also need the size you want the shape to be so you might want to store that as well.



Public thelat As Double

Public thelon As Double


Private Sub Command1_Click()

Dim iShape As MapPointCtl.Shape

Set iShape = MappointControl1.ActiveMap.Shapes(1)



Dim themap As MapPoint.Map

Set themap = MappointControl1.ActiveMap

Dim theloc As MapPoint.Location

Set theloc = iShape.Location


CalcPos themap, theloc, thelat, thelon

MsgBox thelat & " , " & thelon


John

john@support-pc.com
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
freeform, locate, position, shape


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
Start Draw shape (freeform) Anonymous MapPoint 2006/2009 Discussion 2 10-24-2006 06:37 PM
Getting the coordinates from a freeform shape pst MapPoint 2006/2009 Discussion 5 07-14-2005 07:19 AM
Locate nearest polygon shape Dazzer MapPoint 2006/2009 Discussion 1 07-12-2004 09:19 AM
freeform shape exporting.. database maybe? Yard MapPoint 2006/2009 Discussion 3 07-25-2003 08:22 AM
View bounds of a Freeform Shape Anonymous MapPoint 2006/2009 Discussion 0 04-29-2003 05:35 PM


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

Antalya Holiday
Check out the Antalya holiday options through UlookUbook and find amazing offers that suit your pocket...



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