hello

this is my code for plotting the nearest distance on the map. but the
map is not clearing when i enter new postcode
Please give me solution for these
1. zoom to a particular fixed level
2. to clear the previous markers
3. to find the distance by walking

function plotpath(pointb_new){
directions = new GDirections(map);
GEvent.addListener(directions, "load", function(){
distance = directions.getDistance();
//alert(distance.meters/1000);
document.getElementById("distance").value = (distance.meters/
1000).toFixed(1);
});
var from=pointa.toUrlValue(8);
document.getElementById("postcodefrom").innerHTML =from;
var to=pointb_new;
document.getElementById("postcodeto").innerHTML =to;
directions.load("from: " + from + " to: " + to);
}

regards
Rahul R

On Jan 28, 4:07 pm, Rossko <[email protected]> wrote:
> > while using the Gdirections for finding the direction of two locations
> > I found that the map is zooming high. Is there any way to adjust the
> > zoom?
>
> Use the documented method to stop GDirections auto-centering and
> zooming your map
>    http://code.google.com/apis/maps/documentation/reference.html#GDirect...
> then you can set the centre and zoom to what you like, if different
> from before.

-- 
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