001 package com.google.gwt.maps.client.services; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 import com.google.gwt.core.client.JsArray; 005 import com.google.gwt.maps.client.base.LatLng; 006 import com.google.gwt.maps.client.workaround.WorkAroundUtils; 007 008 /** 009 * An elevation request sent by the ElevationService containing the list of discrete coordinates (LatLngs) for which to return elevation data. 010 * <br><br> 011 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#LocationElevationRequest">LocationElevationRequest API Doc</a> 012 */ 013 public class LocationElevationRequest extends JavaScriptObject { 014 015 /** 016 * use newInstance(); 017 */ 018 protected LocationElevationRequest() {} 019 020 /** 021 * An elevation request sent by the ElevationService containing the list of discrete coordinates (LatLngs) for which to return elevation data. 022 */ 023 public final static LocationElevationRequest newInstance() { 024 JavaScriptObject jso = JavaScriptObject.createObject(); 025 WorkAroundUtils.removeGwtObjectId(jso); 026 return jso.cast(); 027 } 028 029 /** 030 * The discrete locations for which to retrieve elevations. 031 * @param locations 032 */ 033 public final native void setLocations(JsArray<LatLng> locations) /*-{ 034 this.locations = locations; 035 }-*/; 036 037 /** 038 * The discrete locations for which to retrieve elevations. 039 */ 040 public final native JsArray<LatLng> getLocations() /*-{ 041 return this.locations; 042 }-*/; 043 044 045 046 }