List of usage examples for com.google.gwt.maps.client.services DirectionsRequest setRegion
public final native void setRegion(String region) ;
From source file:net.cbtltd.client.field.RouteField.java
public void setValue(String value) { String args[] = value.split("-"); DirectionsRequest rq = DirectionsRequest.newInstance(); rq.setAvoidHighways(false);/*from w w w . ja v a 2s .com*/ rq.setAvoidTolls(true); rq.setOrigin(args[0]); rq.setDestination(args[1]); if (args.length > 2) { rq.setRegion(args[2]); } rq.setOptimizeWaypoints(true); rq.setProvideRouteAlternatives(false); rq.setTravelMode(TravelMode.DRIVING); rq.setUnitSystem(UnitSystem.METRIC); DirectionsService directions = DirectionsService.newInstance(); directions.route(rq, new DirectionsResultHandler() { public void onCallback(DirectionsResult rs, DirectionsStatus status) { setResult(rs); } }); }