MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Find a start of line

This is a discussion on Find a start of line within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have a line in my map, who can i to know if the selection is a start or end ...


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

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-29-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Find a start of line

I have a line in my map, who can i to know if the selection is a start or end of the line?

code of the line:

Code:
 Dim Line As MapPoint.Shape
        Dim olocation1, olocation2 As MapPoint.Location
        olocation1 = mapa.ActiveMap.GetLocation(iPushpin.pLatitud, iPushpin.pLongitud)
        olocation2 = mapa.ActiveMap.GetLocation(fPushpin.pLatitud, fPushpin.pLongitud)
        Line = mapa.ActiveMap.Shapes.AddLine(BeginLocation:=olocation1, EndLocation:=olocation2)


        Line.Line.Weight = 1
        ' Pixel
        Line.Line.ForeColor = RGB(color, color, color)
THANKSSSSSS!!!!!!!!!
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-30-2004
Junior Member
White Belt
 
Join Date: May 2004
Posts: 9
No te acabo de entender la pregunta, así que si me la haces en español intentaré ayudarte, ¿vale?

Saludos.
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-30-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
I'm not sure I understand your question really. At what point are you trying to find out whether the point is the start or end of your line?

It seems pretty obvious in your code that olocation1 is your start, is it that you are trying to click on the point and find out? If that's the case then you could put something in the OnClick event to see if the selected location is olocation1.
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 08-03-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
En español (para clavijo)

A ver dibuja una linea entre todos los pushpin de la ruta, entonces quiero que cuando el usuario clickee sobre el inicio o final de cada linea salga mi menu contextual, me explico.

inicialmente doy la posibilidad de ver propiedades en un pushpin dado (velocidad y todo eso), pero ahora tengo que dibujar la ruta con lineas, no con pushpin, y seguir dando la posibilidad de ver propiedades de los puntos donde "deberia" haber un pushpin

Espero que me haya explicado mejor

Gracias
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 08-03-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Who can i know the location

Who compare the location of the start of line and the point of the click
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 08-03-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 903
Blog Entries: 10
Do you mean you have location S and location E, and given location P, is P closer to S or E?

If so, a Location object has a DistanceTo() method that can be used to find the closest.

ie. in C++ :

Code:
if ( S.DistanceTo(P) < E.DistanceTo(P) )
{
// P is closer to S than E
}
This is pretty simple, and it is possible that P isn't even anywhere near the line, so a more algebraic solution could be derived using the equation for a line. This would then be able to tell if the point is on the line, and if not how far away it is.

Does this help?

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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
find, line, start


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
How Do I get My app to start with Mappoint ? P_Hairy MapPoint 2006/2009 Discussion 2 01-15-2006 10:07 AM
how to find a line???? Anonymous MapPoint 2006/2009 Discussion 1 03-08-2004 03:03 PM
MapPoint will not start in 600*800 resolution Anonymous MapPoint 2006/2009 Discussion 3 12-30-2002 03:34 PM
Is there an easy way to change the start and end t.... Anonymous MapPoint 2006/2009 Discussion 1 07-19-2002 01:49 PM
As I draw a line and then a pushpin on that line, .... Anonymous MapPoint 2006/2009 Discussion 1 07-16-2002 09:35 AM


All times are GMT -5. The time now is 12:59 PM.


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


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