001 package com.google.gwt.maps.client.services; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 005 /** 006 * A representation of distance as a numeric value and a display string. 007 * <br><br> 008 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#Distance">Distance API Doc</a> 009 */ 010 public class Distance extends JavaScriptObject { 011 012 /** 013 * use newInstance(); 014 */ 015 protected Distance() {} 016 017 /** 018 * A representation of distance as a numeric value and a display string. 019 */ 020 public static final Distance newInstance() { 021 return JavaScriptObject.createObject().cast(); 022 } 023 024 /** 025 * A string representation of the distance value, using the UnitSystem specified in the request. 026 * @param text 027 */ 028 public final native void setText(String text) /*-{ 029 this.text = text; 030 }-*/; 031 032 /** 033 * A string representation of the distance value, using the UnitSystem specified in the request. 034 */ 035 public final native String getText() /*-{ 036 return this.text; 037 }-*/; 038 039 /** 040 * The distance in meters. 041 * @param value 042 */ 043 public final native void setValue(int value) /*-{ 044 this.value = value; 045 }-*/; 046 047 /** 048 * The distance in meters. 049 */ 050 public final native int getValue() /*-{ 051 return this.value; 052 }-*/; 053 054 }