On Sep 25, 6:40 pm, peachepe <[EMAIL PROTECTED]> wrote:
> I changed the coordinates to points inside the US.
>
> http://www.solucioneslogisticasintegrales.com/logistica/test
>
> getDistance returns null
> getStatus return 200 (which is supposed to mean no errors ocurred)

Those 2 points work for me:
http://www.geocodezip.com/example_geo2.asp?addr1=50.736455137010665,-105.46875&addr2=42.81152174509788,-108.6328125&geocode=1&geocode=2

typing:
javascript:alert(gdir.getDistance().html);
into the address bar yields:
1,229&nbsp;km


>
> On Sep 25, 7:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > On Sep 25, 5:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Sep 25, 5:01 pm, peachepe <[EMAIL PROTECTED]> wrote:
>
> > > > I have the following code:
>
> > > > <script type="text/javascript">
> > > > var coordenadas_origen = "12.14137557787746,-86.2701416015625";
> > > > var coordenadas_destino = "12.14137557787746,-86.8798828125";
>
> > > > function set_distance()
> > > > {
> > > >    alert(gdir.getDistance().html);
>
> > > > }
>
> > > > gdir = new GDirections();
> > > > gdir.load("from: " + coordenadas_origen + " to: " +
> > > > coordenadas_destino);
> > > > GEvent.addListener(gdir,"load", set_distance());
> > > > </script>
>
> > > > it just doesnt work, not even the alert pops up.
>
> > > >http://www.solucioneslogisticasintegrales.com/logistica/test
>
> > > You don't have any html...
> > > The error I get is:
> > > 'gdir.getDistance().html' is null or not an object
>
> > > What does that imply to you?
>
> > > If you had put a map on that page, you would see the 
> > > problem:http://www.geocodezip.com/xmlTabsQueryStringLinkTo.asp?lat=12.1414&lo...
>
> > > The second point is in the Pacific Ocean, the GDirections object can't
> > > find a road there.
>
> > PS - you may want to listen for the error event as well as the load
> > event...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to