On Sep 26, 6:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Sep 26, 6:02 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Sep 25, 6:05 pm, peachepe <[EMAIL PROTECTED]> wrote:
>
> > > Well
>
> > > I fixed the second point. It should not be in the ocean now.
>
> > > You can see the complete code here:
>
> > >http://www.solucioneslogisticasintegrales.com/logistica/SolicitarFlete
>
> > > it has a map.  the idea is that when you select both cities from
> > > "Origen de carga" and "Destino de carga" both points show on the map
> > > and the distance is told.
>
> > > I got the same error now, about the gdir.getDistance() is null
>
> > > still have no idea how to fix it
>
> > at a minimum:
> > GEvent.addListener(gdir,"load", set_distance());
> > should be:
> > GEvent.addListener(gdir,"load", set_distance);
> > (as just about everyone has been telling you)
>
> The first time you select a city, you get an error returned from the
> call to get directions (I think because the other city isn't set...),
> you probably want to verify that you have both a source and a
> destination before you make a call to GDirections.

Actually, you get an error both times (I hadn't noticed that you were
recreating the gdir object for each call and had only added the error
listener to the first).  You may want to add an error listener and see
what the error is...

>
>
>
> > > On Sep 25, 6: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.
>
> > > >   -- Larry
--~--~---------~--~----~------------~-------~--~----~
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