Kasa, Assuming you include the BdccGeo.js
<script src="js/BdccGeo.js" type="text/javascript"></script> In somewhere in your code you had to do: var distance = Math.round(bdccGeoDistanceToPolyMtrs(gp,point)); Where: gp is the Polyline reference; point is the GLatLng gived you by the geocode On Wed, Apr 14, 2010 at 12:41 PM, kasa <[email protected]> wrote: > So Rossko what will help. I need to do this as soon as possible. I > check this site but it is not of much help. > > http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm. I have added the > polyline. Now I want the user to put any address in the field and the > distance between the address and the polyline will be calculated. > > Thanks for all your help. > > On Apr 14, 9:16 am, Rossko <[email protected]> wrote: > > > Hi Fernando, I am new at using Javascript or google map api. Do you > > > have any sample codes using getVertex(index) that can be ofhelp. Can > > > you explain more? > > > > It's not going tohelp, really. If you want to know thedistance > > between some line and a point, working out thedistancebetween the > > point and the vertices of a segmented line isn't always going to give > > the answer. (Imagine a straight line section, which is quite likely > > on a powerline, with vertices 1km away from the test point on either > > side. The line may still pass directly overhead) > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
