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 006 /** 007 * The result of an ElevationService request, consisting of the set of elevation coordinates and their elevation values. Note that a single request may produce multiple ElevationResults. 008 * <br><br> 009 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#ElevationResult">ElevationResult API Doc</a> 010 */ 011 public class ElevationResult extends JavaScriptObject { 012 013 /** 014 * this will be generated from the ElevationService 015 * use newInstatnce(); 016 */ 017 protected ElevationResult() {} 018 019 /** 020 * The result of an ElevationService request, consisting of the set of elevation coordinates and their elevation values. Note that a single request may produce multiple ElevationResults. 021 */ 022 public static final ElevationResult newInstance() { 023 return JavaScriptObject.createObject().cast(); 024 } 025 026 /** 027 * The elevation of this point on Earth, in meters above sea level. 028 * @param elevation 029 */ 030 public final native void setElevation(double elevation) /*-{ 031 this.elevation = elevation; 032 }-*/; 033 034 /** 035 * The elevation of this point on Earth, in meters above sea level. 036 */ 037 public final native double getElevation() /*-{ 038 return this.elevation; 039 }-*/; 040 041 /** 042 * The location of this elevation result. 043 * @param location 044 */ 045 public final native void setLocation(LatLng location) /*-{ 046 this.location = location; 047 }-*/; 048 049 /** 050 * The location of this elevation result. 051 */ 052 public final native LatLng getLocation() /*-{ 053 return this.location; 054 }-*/; 055 056 /** 057 * The distance, in meters, between sample points from which the elevation was interpolated. This property will be missing if the resolution is not known. Note that elevation data becomes more coarse (larger resolution values) when multiple points are passed. To obtain the most accurate elevation value for a point, it should be queried independently. 058 * @param resolution 059 */ 060 public final native void setResolution(double resolution) /*-{ 061 this.resolution = resolution; 062 }-*/; 063 064 /** 065 * The distance, in meters, between sample points from which the elevation was interpolated. This property will be missing if the resolution is not known. Note that elevation data becomes more coarse (larger resolution values) when multiple points are passed. To obtain the most accurate elevation value for a point, it should be queried independently. 066 */ 067 public final native double getResolution() /*-{ 068 return this.resolution; 069 }-*/; 070 071 }