All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.gwt.client.DirectionsLeg Maven / Gradle / Ivy

/*
 * Copyright 2011 The Google Web Toolkit Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.maps.gwt.client;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;

/**
 * A single leg consisting of a set of steps in a
 * DirectionsResult
 * 
 * . Some fields in the leg may not be returned for all requests. (This
 * object was formerly known as "DirectionsRoute".) Note that though
 * this result is "JSON-like," it is not strictly JSON, as it directly
 * and indirectly includes
 * LatLng
 * 
 * objects.
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class DirectionsLeg extends JavaScriptObject {


  /**
   * Protected constructor avoids default public constructor.
   */
  protected DirectionsLeg() {
    /* Java constructor is protected, */
  }

  /**
   * The total distance covered by this leg.  This property may be
   * undefined as the distance may be unknown.
   */ 
  public final native Distance getDistance()/*-{
    return this.distance;

  }-*/;

  /**
   * The total duration of this leg.  This property may be undefined as
   * the duration may be unknown.
   */ 
  public final native Duration getDuration()/*-{
    return this.duration;

  }-*/;

  /**
   * The address of the destination of this leg.
   */ 
  public final native String getEndAddress()/*-{
    return this.end_address;

  }-*/;

  /**
   * The 
   * DirectionsService
   * 
   * calculates directions between locations by using the nearest
   * transportation option (usually a road) at the start and end
   * locations.
   * end_location
   * 
   * indicates the actual geocoded destination, which may be different than the
   * end_location
   * 
   * of the last step if, for example, the road is not near the destination of this leg.
   */ 
  public final native LatLng getEndLocation()/*-{
    return this.end_location;

  }-*/;

  /**
   * The address of the origin of this leg.
   */ 
  public final native String getStartAddress()/*-{
    return this.start_address;

  }-*/;

  /**
   * The 
   * DirectionsService
   * 
   * calculates directions between locations by using the nearest
   * transportation option (usually a road) at the start and end
   * locations.
   * start_location
   * 
   * indicates the actual geocoded origin, which may be different than the 
   * start_location
   * 
   * of the first step if, for example, the road is not near the origin of this leg.
   */ 
  public final native LatLng getStartLocation()/*-{
    return this.start_location;

  }-*/;

  /**
   * An array of 
   * DirectionsStep
   * 
   * s, each of which contains information about the individual steps in this leg.
   */ 
  public final native JsArray getSteps()/*-{
    return this.steps;

  }-*/;

  /**
   * An array of waypoints along this leg that were not specified in the
   * original request, either as a result of a user dragging the polyline
   * or selecting an alternate route.
   */ 
  public final native JsArray getViaWaypoints()/*-{
    return this.via_waypoints;

  }-*/;

  /**
   * The total distance covered by this leg.  This property may be
   * undefined as the distance may be unknown.
   */ 
  public final native void setDistance(Distance distance)/*-{
    this.distance = distance;
  }-*/;

  /**
   * The total duration of this leg.  This property may be undefined as
   * the duration may be unknown.
   */ 
  public final native void setDuration(Duration duration)/*-{
    this.duration = duration;
  }-*/;

  /**
   * The address of the destination of this leg.
   */ 
  public final native void setEndAddress(String end_address)/*-{
    this.end_address = end_address;
  }-*/;

  /**
   * The 
   * DirectionsService
   * 
   * calculates directions between locations by using the nearest
   * transportation option (usually a road) at the start and end
   * locations.
   * end_location
   * 
   * indicates the actual geocoded destination, which may be different than the
   * end_location
   * 
   * of the last step if, for example, the road is not near the destination of this leg.
   */ 
  public final native void setEndLocation(LatLng end_location)/*-{
    this.end_location = end_location;
  }-*/;

  /**
   * The address of the origin of this leg.
   */ 
  public final native void setStartAddress(String start_address)/*-{
    this.start_address = start_address;
  }-*/;

  /**
   * The 
   * DirectionsService
   * 
   * calculates directions between locations by using the nearest
   * transportation option (usually a road) at the start and end
   * locations.
   * start_location
   * 
   * indicates the actual geocoded origin, which may be different than the 
   * start_location
   * 
   * of the first step if, for example, the road is not near the origin of this leg.
   */ 
  public final native void setStartLocation(LatLng start_location)/*-{
    this.start_location = start_location;
  }-*/;

  /**
   * An array of 
   * DirectionsStep
   * 
   * s, each of which contains information about the individual steps in this leg.
   */ 
  public final native void setSteps(JsArray steps)/*-{
    this.steps = steps;
  }-*/;

  /**
   * An array of waypoints along this leg that were not specified in the
   * original request, either as a result of a user dragging the polyline
   * or selecting an alternate route.
   */ 
  public final native void setViaWaypoints(JsArray via_waypoints)/*-{
    this.via_waypoints = via_waypoints;
  }-*/;

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy