-
Notifications
You must be signed in to change notification settings - Fork 119
Create and Clear Directions and Route
Rob Terpilowski edited this page Mar 24, 2017
·
2 revisions
public class DirectionsFXMLController implements DirectionsServiceCallback {
@FXML
protected GoogleMapView mapView;
protected DirectionsRenderer directionsRenderer = null;
@FXML
private void toTextFieldAction(ActionEvent event) {
DirectionsRequest request = new DirectionsRequest("Seattle", "Redmond", TravelModes.DRIVING);
directionsRenderer = new DirectionsRenderer(true, mapView.getMap(), directionsPane);
directionsService.getRoute(request, this, directionsRenderer);
}
//Clear the directions.
@FXML
private void clearDirections(ActionEvent event) {
directionsRenderer.clearDirections();
}
test