Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Find a start of 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)
|
| |||
|
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. |
| |||
| 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 |
| ||||
|
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
}
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 |
![]() |
| Tags |
| find, line, start |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |