001    package com.google.gwt.maps.client.services;
002    
003    import com.google.gwt.core.client.JavaScriptObject;
004    import com.google.gwt.maps.client.base.LatLng;
005    import com.google.gwt.maps.client.base.LatLngBounds;
006    import com.google.gwt.maps.client.workaround.WorkAroundUtils;
007    
008    /**
009     * The specification for a geocoding request to be sent to the Geocoder.
010     * <br><br>
011     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#GeocoderRequest">GeocoderRequest API Doc</a>
012     */
013    public class GeocoderRequest extends JavaScriptObject {
014    
015      /**
016       * use newInstance();
017       */
018      protected GeocoderRequest() {}
019      
020      /**
021       * The specification for a geocoding request to be sent to the Geocoder.
022       */
023      public static final GeocoderRequest newInstance() {
024        JavaScriptObject jso = createObject();
025        WorkAroundUtils.removeGwtObjectId(jso);
026        return jso.cast();
027      }
028      
029      /**
030       * Address. Optional.
031       * @param address
032       */
033      public final native void setAddress(String address) /*-{
034        this.address = address;
035      }-*/;
036      
037      /**
038       * Address. Optional.
039       */
040      public final native String getAddress() /*-{
041        return this.address;
042      }-*/;
043      
044      /**
045       * LatLngBounds within which to search. Optional.
046       * @param bounds
047       */
048      public final native void setBounds(LatLngBounds bounds) /*-{
049        this.bounds = bounds;
050      }-*/;
051      
052      /**
053       * LatLngBounds within which to search. Optional.
054       */
055      public final native LatLngBounds getBounds() /*-{
056        return this.bounds;
057      }-*/;
058      
059      /**
060       * LatLng about which to search. Optional.
061       * @param location
062       */
063      public final native void setLocation(LatLng location) /*-{
064        this.location = location;
065      }-*/;
066      
067      /**
068       * LatLng about which to search. Optional.
069       */
070      public final native LatLng getLocation() /*-{
071        return this.location;
072      }-*/;
073      
074      /**
075       * Country code top-level domain within which to search. Optional.
076       * @param region
077       */
078      public final native void setRegion(String region) /*-{
079        this.region = region;
080      }-*/;
081      
082      /**
083       * Country code top-level domain within which to search. Optional.
084       */
085      public final native String getRegion() /*-{
086        return this.region;
087      }-*/;
088      
089    }