Do you mean requesting directions, but not displaying the polyline
results in a map or the direction steps in a text div? If so, I
recently had to do that with a map I put together. You need to
construct the GDirections object with no arguments and then execute
load() on it as you normally would. If you want the polyline or
direction steps to be available to your code, you'll need to specify
that in your call to load(). Here's some example code:
var directions = new GDirections();
directions.load("from: point A to: point B", {"getSteps": true,
"getPolyline": true});
GEvent.addListener(directions, "load", function() {
alert('Going from point A to point B will take this many seconds:
'+directions.getDuration().seconds);
});
GEvent.addListener(gdir, "error", function() {
//do something to say error occurred
});
--Matt
On Sep 21, 9:45 am, visit <[email protected]> wrote:
> Dear all:
>
> I don't know how to hide the Gdirection's result...
> when I use Gdirection, I could hide the map..but I couldn't hide the
> "Route"&"Step"
> Sorry about my poor English....
> hope somebody could help me... thanks a lot
>
> visit
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---