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 007 /** 008 * Geometry information about this GeocoderResult 009 * <br><br> 010 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#GeocoderGeometry">GeocoderGeometry API Doc</a> 011 */ 012 public class GeocoderGeometry extends JavaScriptObject { 013 014 /** 015 * use newInstance(); 016 */ 017 protected GeocoderGeometry() {} 018 019 /** 020 * Geometry information about this GeocoderResult 021 */ 022 public static final GeocoderGeometry newInstance() { 023 return JavaScriptObject.createObject().cast(); 024 } 025 026 /** 027 * The precise bounds of this GeocodeResult, if applicable 028 * @param bounds 029 */ 030 public final native void setBounds(LatLngBounds bounds) /*-{ 031 this.bounds = bounds; 032 }-*/; 033 034 /** 035 * The precise bounds of this GeocodeResult, if applicable 036 */ 037 public final native LatLngBounds getBounds() /*-{ 038 return this.bounds; 039 }-*/; 040 041 /** 042 * The latitude/longitude coordinates of this result 043 * @param location 044 */ 045 public final native void setLocation(LatLng location) /*-{ 046 this.location = location; 047 }-*/; 048 049 /** 050 * The latitude/longitude coordinates of this result 051 */ 052 public final native LatLng getLocation() /*-{ 053 return this.location; 054 }-*/; 055 056 /** 057 * The type of location returned in location 058 * @param location_type 059 */ 060 public final void setLocation_Type(GeocoderLocationType location_type) { 061 setLocation_TypeImpl(location_type.value()); 062 } 063 064 private final native void setLocation_TypeImpl(String location_type) /*-{ 065 this.location_type = location_type; 066 }-*/; 067 068 /** 069 * The type of location returned in location 070 */ 071 public final GeocoderLocationType getLocation_Type() { 072 return GeocoderLocationType.fromValue(getLocation_TypeImpl()); 073 } 074 075 private final native String getLocation_TypeImpl() /*-{ 076 return this.location_type; 077 }-*/; 078 079 /** 080 * The bounds of the recommended viewport for displaying this GeocodeResult 081 * @param viewport 082 */ 083 public final native void setViewPort(LatLngBounds viewport) /*-{ 084 this.viewport = viewport; 085 }-*/; 086 087 /** 088 * The bounds of the recommended viewport for displaying this GeocodeResult 089 */ 090 public final native LatLngBounds getViewPort() /*-{ 091 return this.viewport; 092 }-*/; 093 094 }